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

feat: signable message prefix for meta tx #8578

Merged
merged 7 commits into from
Feb 20, 2023

Commits on Feb 16, 2023

  1. feat: signable message prefix

    This is a necessary change to the meta transaction signature scheme to
    address security related concerns with the original proposal.
    
    Meta transactions introduce `DelegateAction` and
    `SignedDelegateAction` where the signature key is an account key.
    Transactions are also signed by account keys.
    
    We don't want to have the possibility that the borsh serialization of a
    `Transaction` and a `DelegateAction` end up with the same binary
    representation. In that case it would be indistinguishable whether the
    account owner signed the Transaction or the DelegateAction, which
    opens the door to various security vulnerabilities.
    
    There is the draft NEP-461 to solve this in a general way. To push
    forward with meta transaction, we will use that proposed schema.
    Regardless of whether the standard gets accepted or not, at least this
    solves the problem for meta transactions and makes it possible to add
    more types of messages later that are also signed with account keys.
    
    This is not a protocol change. It only affects meta transaction which
    have not been stabilized yet.
    jakmeier committed Feb 16, 2023
    Configuration menu
    Copy the full SHA
    b3d6abb View commit details
    Browse the repository at this point in the history
  2. add signable message tests

    jakmeier committed Feb 16, 2023
    Configuration menu
    Copy the full SHA
    93e4c61 View commit details
    Browse the repository at this point in the history
  3. update old tests

    jakmeier committed Feb 16, 2023
    Configuration menu
    Copy the full SHA
    c289db9 View commit details
    Browse the repository at this point in the history
  4. clippy

    jakmeier committed Feb 16, 2023
    Configuration menu
    Copy the full SHA
    fc80352 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d44ab08 View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2023

  1. Configuration menu
    Copy the full SHA
    320aa20 View commit details
    Browse the repository at this point in the history
  2. address review comments

    - add link to NEP-461
    - rename `get_hash` to `get_nep461_hash`
    jakmeier committed Feb 20, 2023
    Configuration menu
    Copy the full SHA
    e001125 View commit details
    Browse the repository at this point in the history