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

Make chain ID available to contracts #2226

Merged
merged 10 commits into from
Aug 31, 2024
Merged

Make chain ID available to contracts #2226

merged 10 commits into from
Aug 31, 2024

Commits on Aug 30, 2024

  1. rusk-abi: add chain ID as queryable data

    Contracts are given access to the ID of the chain being operated. This
    will allow contracts to check if a call was made originally on this
    chain, - by mixing the chain ID into a signature for example -
    effectively allowing them to prevent replay of calls performed on other
    chains.
    ureeves committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    38377ba View commit details
    Browse the repository at this point in the history

Commits on Aug 31, 2024

  1. execution-core: add chain ID to TXs and calls

    Adding the chain ID to both transaction models and to relevant calls
    allows contracts downstream to check if they are being executed on the
    intended chain. The cost is minimal - 1 byte in the payload - and the
    benefits are cross-chain replay attack protection.
    ureeves committed Aug 31, 2024
    Configuration menu
    Copy the full SHA
    de12927 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    070e3f5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    71af198 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    287eea6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b285d73 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8008290 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    776ee83 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    fb48070 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    b394cd6 View commit details
    Browse the repository at this point in the history