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

refactor: change transaction layout and use RLP encoding for signing / hashing #725

Open
wants to merge 20 commits into
base: develop
Choose a base branch
from

Conversation

oXtxNt9U
Copy link
Contributor

@oXtxNt9U oXtxNt9U commented Oct 7, 2024

Summary

  • use RLP encoding for transaction signing and hash calculation
    (based on Type 2 / EIP1559 transactions which is the standard on Ethereum nowadays, see here for reference)
  • replace crypto-signature-schnorr with crypto-signature-ecdsa
  • extend signature implementations and add a signRecoverable method for recovering a public key from signature
  • removed vendorfield
  • removed expiration
  • removed signatures (multisig will eventually be reintroduced for legacy use cases)
  • renamed some fields to match ethereum more closely (e.g. amount -> value, fee -> gasPrice)
  • added senderAddress as a convenience to the tx data

TBD

  • tx type registry is now obsolete and could be removed entirely
  • consider getting rid of custom tx serializer in favour of RLP (see signature / hash code). we need at minimum some glue code for the JSON-RPC endpoint in order to process metamask signed transactions (i.e. RLP decode tx into internal tx representation)

Checklist

  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

@oXtxNt9U oXtxNt9U marked this pull request as ready for review October 8, 2024 04:26
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.

1 participant