Skip to content

feat!(seismic-tx): extend tx with 7702 auth_list#332

Open
samlaf wants to merge 4 commits intoseismicfrom
feat--tx-seismic-with-authorization-list
Open

feat!(seismic-tx): extend tx with 7702 auth_list#332
samlaf wants to merge 4 commits intoseismicfrom
feat--tx-seismic-with-authorization-list

Conversation

@samlaf
Copy link
Copy Markdown
Contributor

@samlaf samlaf commented Mar 16, 2026

Group of related PRs:

We just bump the dependencies of other repos to get the new tx type, and then chain it everywhere needed.

Note that this is a breaking change, since the tx's rlp encoding is changed, which breaks all of: wire format, db format (whats stored in tx trie), and signatures (signing over different rlp encoding).

@github-actions
Copy link
Copy Markdown
Contributor

PR Review Summary

Reviewed commit: 7c4163f86a29a694bb35abafd077d5ad73d09417

Changes

Adds an authorization_list: Vec<SignedAuthorization> field to TxSeismic (EIP-7702 extension) by bumping the seismic-revm, seismic-alloy, and seismic-evm dependency revisions. The new field is wired through the compact codec, the FromRecoveredTxTxEnv mapping, and all construction sites (tests, utils, fuzz harness). The PR acknowledges this is a breaking change to wire format, db format, and signatures.


Blocking Issues

1. alloy_compat.rs silently drops authorization_list from RPC-deserialized transactions
File: crates/seismic/primitives/src/alloy_compat.rs:96

When building a TxSeismic from an AnyRpcTransaction (e.g., from eth_getTransactionByHash), the authorization_list is unconditionally hardcoded to vec![]:

authorization_list: vec![],

If the Seismic node serializes a non-empty auth list in its RPC response (which the upstream seismic-alloy PR #82 presumably adds), this conversion will silently drop it. The downstream effect is a different sighash, causing incorrect sender recovery and breaking any code path that re-signs or re-verifies the deserialized transaction.

The fields map is already in scope for all other Seismic-specific fields. The fix is to parse authorization_list from the RPC response fields (or fall back to vec![]] if the field is absent/null), consistent with how other fields are extracted. At minimum, a TODO comment should note this is intentionally incomplete and enumerate the expected breakage.


2. Missing compact codec test for non-empty authorization_list
File: crates/storage/codecs/src/alloy/transaction/seismic.rs:434

The only compact roundtrip test constructs a TxSeismic with authorization_list: vec![]. The new field is placed in the middle of the compact struct (between seismic_elements and input), which is the most sensitive position for a field insertion because any decoding regression would silently corrupt input for old-format records. A test encoding and decoding a TxSeismic with at least one real SignedAuthorization is needed to verify:

  • the SignedAuthorization Compact impl round-trips correctly in this context
  • the input field following it is correctly positioned after decoding

Suggestions

1. TODO comments in Cargo.toml reference unmerged upstream PRs
The three new TODO(samlaf) comments note that the pinned revisions point to branch tips on seismic-revm PR #209, seismic-alloy PR #82, and seismic-evm PR #40. This means the code pulled in by this PR has not yet been reviewed/merged through the standard upstream gate. Consider:

  • describing the surface-level changes in those PRs in the PR description (the diff does not show what changed at those revisions)
  • tracking the cleanup as a follow-up issue rather than an in-file TODO, which is easy to forget

2. authorization_list field placement in compact codec struct
The field is inserted between seismic_elements and input rather than at the end of the struct. EIP-7702 convention (and all other reth codec structs for type-4 txs) places authorization_list last. The current placement is a valid choice for a new schema, but deviates from the established pattern and makes schema audits harder. Since this is already a breaking change to the db format, it may be worth moving the field to the end of the struct for consistency before the format is locked.


Positive Notes

  • The FromRecoveredTx fix at crates/seismic/primitives/src/transaction/signed.rs:311 correctly maps each SignedAuthorization via Either::Left rather than defaulting, so the EVM TxEnv will actually carry the auth list through to execution.
  • All affected construction sites (test utils, fuzz harness, RPC test helpers) are consistently updated with authorization_list: vec![].
  • The compact codec struct properly delegates Compact derivation (#[derive(Compact)] on TxSeismic) and the Compact for AlloyTxSeismic manual impl is correctly updated on both the encode and decode sides.
  • Dependency revisions are pinned by exact commit SHA, so the build is reproducible even while the upstream PRs are pending merge.

To request a re-review after pushing fixes, comment @claude on this PR.

@samlaf samlaf force-pushed the feat--tx-seismic-with-authorization-list branch from 7c4163f to 7409c7d Compare March 17, 2026 16:28
@samlaf
Copy link
Copy Markdown
Contributor Author

samlaf commented Mar 17, 2026

@claude fixed your 2 blocking issues:

  1. merged refactor(seismic-primitive): delete unused alloy-compat code/feature #333 into seismic and then rebased this PR on top of that. That code was deadcode anyways so deleted it.
  2. augmented the test to have a non-empty authorization-list in 35d0064

@github-actions
Copy link
Copy Markdown
Contributor

Re-Review Summary

Reviewed commit: 61a01761a0a5b97cf94fdb84fafd36a1c0a46519
Previous review commit: 7c4163f86a29a694bb35abafd077d5ad73d09417

Previously Flagged — Now Resolved

  1. alloy_compat.rs silently drops authorization_list — Resolved by merging PR refactor(seismic-primitive): delete unused alloy-compat code/feature #333, which deleted the entire alloy_compat dead-code module. The conversion path that was losing the auth list no longer exists.

  2. Missing compact codec test for non-empty authorization_list — Resolved in commit 35d0064. The roundtrip test in crates/storage/codecs/src/alloy/transaction/seismic.rs now constructs a real SignedAuthorization (with a chain ID, address, nonce, and explicit r/s/v signature) and asserts it survives encode→decode intact. Field-ordering safety for input is also now exercised.

Previously Flagged — Still Unresolved

  1. authorization_list field placement in compact struct (Suggestion) — The field remains between seismic_elements and input rather than at the end of the struct. This was a non-blocking suggestion; no action required before merge.

  2. TODO comments referencing unmerged upstream PRs (Suggestion) — Still present in Cargo.toml. No action required before merge.

New Issues in Fix Commits

None found.

New Suggestions

  1. test_recover_raw_txtest_generate_and_recover_raw_tx refactor is sound but loses a cross-format sentinel. The old hardcoded raw-bytes test in crates/seismic/rpc/src/eth/transaction.rs caught accidental format regressions by verifying a known-good byte string from outside the current codebase. The replacement test only asserts self-consistency (generate then recover). Consider keeping one hardcoded expected hash (analogous to the one preserved in utils.rs) so a future accidental wire-format change will be caught at test time rather than silently passing.

@samlaf samlaf force-pushed the feat--tx-seismic-with-authorization-list branch from 61a0176 to 7c27124 Compare March 17, 2026 21:47
@samlaf
Copy link
Copy Markdown
Contributor Author

samlaf commented Mar 17, 2026

rebased on top of #336

@samlaf samlaf force-pushed the feat--tx-seismic-with-authorization-list branch from 7c27124 to 50e7b6e Compare March 18, 2026 19:18
@samlaf
Copy link
Copy Markdown
Contributor Author

samlaf commented Mar 18, 2026

rebased on top of #340

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