Skip to content

fix(rpc): surface StorageOverrideNotPermitted from seismic-evm - #384

Merged
HenryMBaldwin merged 4 commits into
veridise-audit-april-2026from
hbai__disallow-storage-overrides
Jun 8, 2026
Merged

fix(rpc): surface StorageOverrideNotPermitted from seismic-evm#384
HenryMBaldwin merged 4 commits into
veridise-audit-april-2026from
hbai__disallow-storage-overrides

Conversation

@HenryMBaldwin

@HenryMBaldwin HenryMBaldwin commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Companion to seismic-evm#52, which rejects state / stateDiff overrides at the apply_account_override chokepoint to close an audit finding where signed reads could be evaluated against attacker-controlled storage.

  • Adds EthApiError::StorageOverrideNotPermitted(Address) next to the existing CodeOverrideNotPermitted variant.
  • Includes it in the invalid_params_rpc_err arm so it surfaces as -32602 (matching the code-override behavior).
  • Maps the underlying StateOverrideError::StorageOverrideNotPermitted through From<StateOverrideError> for EthApiError.
  • Bumps alloy-evm / alloy-seismic-evm to the seismic-evm branch tip (e644240) so the new variant resolves.

Merge order

Do not merge this PR until:

  1. seismic-evm#52 is merged to seismic.
  2. The alloy-evm / alloy-seismic-evm rev in Cargo.toml (lines 794-795) is re-bumped to the post-merge commit on seismic — the current pin points at the branch commit, which will differ from the merge commit (squash / merge / rebase).

Test plan

  • After dep re-bump: cargo check -p reth-rpc-eth-types builds clean for the error module changes. (Note: the base veridise-audit-april-2026 has pre-existing Url: serde errors unrelated to this PR — verified by building the baseline without these changes.)
  • Signed eth_call with a stateDiff override returns -32602 invalid params with the storage-override message.

@HenryMBaldwin
HenryMBaldwin requested a review from cdrappi as a code owner April 23, 2026 21:47
@github-actions

github-actions Bot commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Updates seismic-evm dependency to pick up storage override rejection and adds comprehensive E2E tests for RPC privacy enforcement.

LGTM - no issues found.

The PR correctly updates the seismic-evm dependency and adds proper error handling for StorageOverrideNotPermitted. The three E2E tests comprehensively cover the key RPC methods (eth_call, eth_estimateGas, eth_simulateV1) that could potentially bypass Seismic's flagged storage privacy boundaries. The test setup properly uses SEISMIC_DEV chain spec via setup_test_node(), and the error handling follows existing patterns with consistent error messages and proper HTTP status code mapping.

henry-ai and others added 4 commits June 8, 2026 16:51
Companion to the seismic-evm change that rejects `state` / `stateDiff`
overrides at the `apply_account_override` chokepoint. Adds the
corresponding `EthApiError::StorageOverrideNotPermitted` variant,
includes it in the `invalid_params_rpc_err` arm so it surfaces as
-32602 (matching `CodeOverrideNotPermitted`), and maps the underlying
`StateOverrideError` variant through `From<StateOverrideError>`.

The seismic-evm dep bump is a separate change and must land before
this compiles.
Bumps `alloy-evm` / `alloy-seismic-evm` to e644240, which adds
`StateOverrideError::StorageOverrideNotPermitted` and rejects `state` /
`stateDiff` overrides at the `apply_account_override` chokepoint.
Required for the preceding commit to compile.
Adds three integration tests mirroring the existing code-override
coverage — asserts that `eth_call`, `eth_estimateGas`, and
`eth_simulateV1` reject requests carrying a `stateDiff` override and
surface the "storage overrides are not permitted" error through the
full RPC wiring.
Re-pins alloy-evm / alloy-seismic-evm from the seismic-evm#52 branch
commit (e644240) to the post-merge seismic tip (0a751067), per the
merge-order note in the PR description.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@HenryMBaldwin
HenryMBaldwin force-pushed the hbai__disallow-storage-overrides branch from 166f1ac to e9924a1 Compare June 8, 2026 20:52
@HenryMBaldwin
HenryMBaldwin merged commit 8049153 into veridise-audit-april-2026 Jun 8, 2026
1 check passed
@HenryMBaldwin
HenryMBaldwin deleted the hbai__disallow-storage-overrides branch June 8, 2026 20:57
samlaf pushed a commit that referenced this pull request Jul 6, 2026
## Summary

Companion to
[seismic-evm#52](SeismicSystems/seismic-evm#52),
which rejects `state` / `stateDiff` overrides at the
`apply_account_override` chokepoint to close an audit finding where
signed reads could be evaluated against attacker-controlled storage.

- Adds `EthApiError::StorageOverrideNotPermitted(Address)` next to the
existing `CodeOverrideNotPermitted` variant.
- Includes it in the `invalid_params_rpc_err` arm so it surfaces as
`-32602` (matching the code-override behavior).
- Maps the underlying `StateOverrideError::StorageOverrideNotPermitted`
through `From<StateOverrideError> for EthApiError`.
- Bumps `alloy-evm` / `alloy-seismic-evm` to the seismic-evm branch tip
(`e644240`) so the new variant resolves.

## Merge order

**Do not merge this PR until:**
1.
[seismic-evm#52](SeismicSystems/seismic-evm#52)
is merged to `seismic`.
2. The `alloy-evm` / `alloy-seismic-evm` rev in `Cargo.toml` (lines
794-795) is re-bumped to the **post-merge commit on `seismic`** — the
current pin points at the branch commit, which will differ from the
merge commit (squash / merge / rebase).

## Test plan

- [ ] After dep re-bump: `cargo check -p reth-rpc-eth-types` builds
clean for the error module changes. (Note: the base
`veridise-audit-april-2026` has pre-existing `Url: serde` errors
unrelated to this PR — verified by building the baseline without these
changes.)
- [ ] Signed `eth_call` with a `stateDiff` override returns `-32602
invalid params` with the storage-override message.

---------

Co-authored-by: henry-ai <henrymbaldwin+ai@proton.me>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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