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

Adding signer tests for EIP155, Homestead and private tx. #682

Merged
merged 4 commits into from
May 24, 2019

Conversation

libby
Copy link
Contributor

@libby libby commented Apr 12, 2019

In Quorum, private transactions are marked by v=37 and v=38,
this means the chainId is not set in the signed transcation param
v as it is in EIP155Singer. This also mean chainId 1 cannot be
used, as it will conflict with a public transaction signed by
EIP155Signer, v=chainId * 2 + 35 and v=chainId * 2 + 36
which for chainId = 1 would be 37 and 38.
Test uses 2 fixed keys which will resolve to the recovery bit being
set to 0 and 1.

  1. signing and recovering public txs with EIP155Singer and Homestead.
  2. demonstrating the conflict when chainId is set to 1.
  3. signing a private transaction with Homestead and recoverying with
    EIP155Signer.
  4. signing and recovering private txs with Homestead.
  5. signing and recovery failure when signed with EIP155.

In Quorum, private transactions are marked by v=37 and v=38,
this means the chainId is not set in the signed transcation param
`v` as it is in EIP155Singer. This also mean chainId 1 cannot be
used, as it will conflict with a public transaction signed by
EIP155Signer, `v=chainId * 2 + 35` and `v=chainId * 2 + 36`
which for `chainId = 1` would be 37 and 38.
Test uses 2 fixed keys which will resolve to the recovery bit being
set to 0 and 1.
1. signing and recovering public txs with EIP155Singer and Homestead.
2. demonstrating the conflict when chainId is set to 1.
3. signing a private transaction with Homestead and recoverying with
   EIP155Signer.
4. signing and recovering private txs with Homestead.
5. signing and recovery failure when signed with EIP155.
@jpmsam jpmsam merged commit d1475ee into Consensys:master May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants