Skip to content
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

Add verification that we have already received a signature for the transaction for the selected input and validator #7

Merged
merged 1 commit into from
Apr 6, 2017
Merged

Conversation

alekseysidorov
Copy link
Contributor

Resolve #4

Copy link
Contributor

@slowli slowli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review as of 7a9581f.

Needs unit test(s) that demonstrate the change; the case in which the old code added several signatures for the same (txid, validator, input) triple.

Also, there is a problem with low-level serialization logic for keys of an MPT (see the line comment). Probably should be solved within exonum-core.

@@ -254,6 +270,15 @@ impl<'a> AnchoringSchema<'a> {
}
}

fn known_signature_id(msg: &MsgAnchoringSignature) -> Vec<u8> {
Copy link
Contributor

@slowli slowli Mar 31, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe create a new Exonum datatype encompassing a (txid, validator, input_index) triple, and use it here? The current approach may be not sustainable; e.g., we may want to provide proofs to light clients and/or change general serialization logic in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can not represent the custom type as &[u8].

@alekseysidorov alekseysidorov changed the title Add verification that we have already received a signature for the transaction for the selected input and validator WIP: Add verification that we have already received a signature for the transaction for the selected input and validator Apr 4, 2017
 - Add verification that we have already received a signature for the transaction for the selected input and validator
 - Add secp256k1's hack for generate signatures with given nonce.
@alekseysidorov alekseysidorov changed the title WIP: Add verification that we have already received a signature for the transaction for the selected input and validator Add verification that we have already received a signature for the transaction for the selected input and validator Apr 5, 2017
@alekseysidorov alekseysidorov merged commit 2dfb923 into exonum:master Apr 6, 2017
@alekseysidorov alekseysidorov deleted the 4-multiple-signatures-for-txid branch June 1, 2017 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants