-
Notifications
You must be signed in to change notification settings - Fork 66
audit improvements #454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
audit improvements #454
Conversation
zkatdlog driver: better logs Signed-off-by: Angelo De Caro <[email protected]>
Signed-off-by: Angelo De Caro <[email protected]>
Signed-off-by: Angelo De Caro <[email protected]>
Signed-off-by: Angelo De Caro <[email protected]>
Signed-off-by: Angelo De Caro <[email protected]>
token/core/zkatdlog/nogh/auditor.go
Outdated
@@ -16,13 +16,15 @@ import ( | |||
|
|||
// AuditorCheck verifies if the passed tokenRequest matches the tokenRequestMetadata | |||
func (s *Service) AuditorCheck(tokenRequest *driver.TokenRequest, tokenRequestMetadata *driver.TokenRequestMetadata, txID string) error { | |||
logger.Debugf("check token request validity...") | |||
logger.Debugf("[%s] check token request validity, number of transfer action [%d]...", txID, len(tokenRequestMetadata.Transfers)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
number of transfer actions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed
Signed-off-by: Angelo De Caro <[email protected]>
token/core/zkatdlog/nogh/auditor.go
Outdated
inputs, err := s.TokenCommitmentLoader.GetTokenOutputs(transfer.TokenIDs) | ||
if err != nil { | ||
return errors.Wrapf(err, "failed getting token outputs to perform auditor check") | ||
} | ||
logger.Debugf("[%s] transfer action [%d] contains [%d] inputs, loaded corresponding outputs [%d]", txID, i, len(transfer.TokenIDs), len(inputs)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
contains [%d] token IDs, loaded corresponding inputs [%d]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed
Signed-off-by: Angelo De Caro <[email protected]>
Signed-off-by: Angelo De Caro <[email protected]>
token/core/zkatdlog/nogh/sender.go
Outdated
auditInfo, err := htlc.GetOwnerAuditInfo(t.Owner, s) | ||
if err != nil { | ||
return nil, nil, errors.Wrapf(err, "failed getting audit info for sender identity [%s]", view.Identity(t.Owner).String()) | ||
} | ||
if len(auditInfo) == 0 { | ||
logger.Errorf("empty audit info for token [%s] ith owner [%s]", ids[i].String(), view.Identity(t.Owner)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the owner [%s] of the i^th token [%s]
token/services/ttx/auditor.go
Outdated
if err := view2.GetRegistry(context).RegisterResponder(r.AuditView, &AuditingViewInitiator{}); err != nil { | ||
return nil, errors.Wrapf(err, "failed to register auditor view") | ||
} | ||
|
||
// enable processing all token transactions for the given network and namespace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enable processing of all token transactions for the given...
Signed-off-by: Angelo De Caro <[email protected]>
token/services/ttx/auditor.go
Outdated
} | ||
net := network.GetInstance(context, tms.Network(), tms.Channel()) | ||
if tms == nil { | ||
return nil, errors.Errorf("cannot find netowkr for [%s]", tms.ID()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cannot find network
Signed-off-by: Angelo De Caro <[email protected]>
ttx.audit: store transiant as soon as possible
zkatdlog driver: better logs
Linked to hyperledger-labs/fabric-smart-client#453
Signed-off-by: Angelo De Caro [email protected]