-
Notifications
You must be signed in to change notification settings - Fork 60
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
Commits on Aug 30, 2024
-
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.
Configuration menu - View commit details
-
Copy full SHA for 38377ba - Browse repository at this point
Copy the full SHA 38377baView commit details
Commits on Aug 31, 2024
-
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.
Configuration menu - View commit details
-
Copy full SHA for de12927 - Browse repository at this point
Copy the full SHA de12927View commit details -
Configuration menu - View commit details
-
Copy full SHA for 070e3f5 - Browse repository at this point
Copy the full SHA 070e3f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 71af198 - Browse repository at this point
Copy the full SHA 71af198View commit details -
Configuration menu - View commit details
-
Copy full SHA for 287eea6 - Browse repository at this point
Copy the full SHA 287eea6View commit details -
Configuration menu - View commit details
-
Copy full SHA for b285d73 - Browse repository at this point
Copy the full SHA b285d73View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8008290 - Browse repository at this point
Copy the full SHA 8008290View commit details -
Configuration menu - View commit details
-
Copy full SHA for 776ee83 - Browse repository at this point
Copy the full SHA 776ee83View commit details -
Configuration menu - View commit details
-
Copy full SHA for fb48070 - Browse repository at this point
Copy the full SHA fb48070View commit details -
Configuration menu - View commit details
-
Copy full SHA for b394cd6 - Browse repository at this point
Copy the full SHA b394cd6View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.