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

signTransaction API bug-fixes: Mark the tx as private before signing #864

Merged
merged 3 commits into from
Oct 23, 2019

Conversation

chris-j-h
Copy link
Collaborator

  • eth_signTransaction: Fixes bug when signing private txs with this API and then submitting them (e.g. with eth_sendRawPrivateTransaction).
    Prior to this change, the tx is only marked as private after signing, so it is signed with the EIP155 signer. The signed tx's v is then overridden to 37. As a result, when calling eth_sendRawPrivateTransaction, the recipient attempts to verify the signature using the QuorumPrivateTx signer, recovering the incorrect address.
    There are two outcomes for the transaction once submitted, depending on the nonce of the tx:

    • If the nonce is 0 the tx will be minted but have the incorrect from value
    • If the nonce is not 0 the tx will get stuck queued in the txpool as the recovered, wrong, acct will have a tx count of 0.
  • personal_signTransaction: Fixes bug where signed private txs cannot be submitted using eth_sendRawPrivateTransaction. Prior to this change, the tx is never marked as private so any request to eth_sendRawPrivateTransaction fails with error "transaction is not private"

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.

3 participants