-
Notifications
You must be signed in to change notification settings - Fork 60
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
Remove signature metadata action #358
Conversation
token/core/fabtoken/actions.go
Outdated
@@ -189,6 +189,6 @@ func (t *TransferAction) Deserialize(raw []byte) error { | |||
} | |||
|
|||
// GetMetadata returns the claim pre-image |
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.
Please change this comment
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.
done
@@ -207,8 +210,8 @@ func (t *TransferAction) IsGraphHiding() bool { | |||
|
|||
// GetMetadata returns metadata of the TransferAction | |||
// in zkatdlog it returns the claim pre-image |
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.
Please change comment
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.
done
IsGraphHiding() bool | ||
GetMetadata() []byte | ||
// GetMetadata returns the action's metadata |
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.
Add a dot at the end of the comment?
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.
I think we usually don't have it. No?
if logger.IsEnabledFor(zapcore.DebugLevel) { | ||
logger.Debugf("expected key without the claim pre-image, skipping") | ||
logger.Debugf("expected key without the issue action metadata, skipping") |
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.
issue-->transfer
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.
okay
Signed-off-by: Hagar Meir <[email protected]>
Signed-off-by: Hagar Meir <[email protected]>
Signed-off-by: Hagar Meir <[email protected]>
Signed-off-by: Angelo De Caro <[email protected]>
Signed-off-by: Angelo De Caro <[email protected]>
token/services/vault/keys/keys.go
Outdated
@@ -41,6 +41,7 @@ const ( | |||
SerialNumber = "sn" | |||
IssueActionMetadata = "iam" | |||
TransferActionMetadata = "tam" | |||
ClaimPreImage = "cpi" |
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.
I think you can remove this?
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.
okay
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]>
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]>
} | ||
// is it owned by a htlc script? | ||
if owner.Type == htlc.ScriptType { | ||
// Then, the first output must be compatible with this input. |
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.
the transfer action should include one output.
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.
not sure about this. What should I change?
return errors.Errorf("invalid transfer action: an htlc script only transfers the ownership of a token") | ||
} | ||
|
||
// check type and quantity |
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 an ownership transfer
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.
can you specify the full error message, please?
Signed-off-by: Angelo De Caro <[email protected]>
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.
looks good to me.
} | ||
|
||
out := ctx.Action.GetOutputs()[0].(*token.Token) | ||
if ctx.InputTokens[0].Data.Equals(out.Data) { |
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.
This check should be removed as it is incorrect. ZKVerifier takes care of checking if the transfer of ownership is correct.
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.
where is this check done exactly?
Signed-off-by: Hagar Meir <[email protected]>
Signed-off-by: Hagar Meir <[email protected]>
Signed-off-by: Hagar Meir [email protected]