Replace chain_id with chain_hash_fragment in TxDetails, to aid in deterministic signature checking#3035
Merged
theodorebugnet merged 6 commits intoJul 20, 2026
Conversation
…erministic signature checking
theodorebugnet
force-pushed
the
theodore/replace-chainid-with-chainhash
branch
from
July 10, 2026 13:02
e8975fd to
21d9f40
Compare
theodorebugnet
force-pushed
the
theodore/replace-chainid-with-chainhash
branch
from
July 10, 2026 13:15
21d9f40 to
5884624
Compare
…against chain hash prefix collision at build time
- make TS clients refresh, rebuild, and validate fragments consistently - centralize fragment derivation and remove obsolete chain-ID plumbing - fix some additional examples, tests, and documentation that had been overlooked
theodorebugnet
force-pushed
the
theodore/replace-chainid-with-chainhash
branch
3 times, most recently
from
July 14, 2026 13:05
984dc7b to
8ae9926
Compare
theodorebugnet
force-pushed
the
theodore/replace-chainid-with-chainhash
branch
from
July 14, 2026 13:08
8ae9926 to
2452eb8
Compare
theodorebugnet
commented
Jul 15, 2026
| items: | ||
| type: integer | ||
| format: uint64 | ||
| PartialTransaction: |
Contributor
Author
There was a problem hiding this comment.
These were unused anywhere in the spec and stale
| /// The fragment is the first eight bytes of the chain hash. Interpreting it as | ||
| /// little-endian means Borsh serializes the `u64` back to those same eight bytes. | ||
| #[must_use] | ||
| pub const fn chain_hash_fragment(chain_hash: &[u8; 32]) -> u64 { |
Contributor
Author
There was a problem hiding this comment.
The reason it's in the universal-wallet crate is that it's a dependency of the web3 crate, and generally going to be needed by all clients (at least all rust clients), so it's added as a helper here to avoid requiring duplication of the logic.
bkolad
approved these changes
Jul 17, 2026
theodorebugnet
merged commit Jul 20, 2026
c0f05eb
into
theodore/multisig-upgrade
25 of 28 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
Request from Bullet.
chain_idis not needed for security - it's already hashed as part of the chain hash - and seems to be rarely, if ever, checked by users. So remove it in favor of adding a chain hash fragment which allows eliminating the trial-and-error loop in verifying transactions when multiple chain hash overrides are active.Also adds consistency verification to V1 signing flows to assert that all signatures are done over the same chain has, helping avoid footguns if users sign a multisig around the exact time a rollup upgrades its chain hash.
CHANGELOG.mdwith a new entry if my PR makes any breaking changes or fixes a bug. If my PR removes a feature or changes its behavior, I provide help for users on how to migrate to the new behavior.Cargo.tomlchanges before opening the PRs. (Are all new dependencies necessary? Is any module dependency leaked into the full-node (hint: it shouldn't)?)Linked Issues
Testing
Describe how these changes were tested. If you've added new features, have you added unit tests?
Docs
Describe where this code is documented. If it changes a documented interface, have the docs been updated?
Rendered docs are available at
https://sovlabs-ci-rustdoc-artifacts.us-east-1.amazonaws.com/<BRANCH_NAME>/index.html