You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: harden Satin developer tool inputs and diagnostics - #412
Fail explicitly on oversized or non-regular fixture inputs and on inconsistent replay context, and keep configured RPC endpoints and server error text out of developer-tool diagnostics.
Bound fixture discovery and reads without truncating the corpus, and check account and total storage-slot counts before materializing state or hashing it.
State-test files are capped at 64 MiB; blockchain bundles at 256 MiB because the pinned official fixtures reach about 160 MiB.
Discovery fails on non-regular *.json inputs (FIFOs, sockets, devices, directories) and on symlinked directories, given as a root or found below one, instead of hanging, traversing a directory twice or dropping it.
Symlinks to regular *.json files are read.
Fixture files are opened non-blocking on Unix and their type is checked on the open descriptor.
Remove obsolete slow-test filename exemptions for the supported Osaka and Amsterdam forks.
Reject oversized blob-gas fields and type 3/4 creation transactions through the existing expected-exception handling.
Show only the configured endpoint's origin in diagnostics, keep it separate from cache identity, and filter terminal controls when log-file creation fails.
JSON-RPC error responses from the server are reported by their error code and a local diagnostic; the server's message and data are never printed.
Alloy's HTTP and retry implementation is kept, and retry classification still sees the original error.
Satin transaction replay validates the fetched parent's number and hash against the child, refuses pending and genesis transactions, reads pre-state at the verified parent hash (EIP-1898, requireCanonical: true), and serves BLOCKHASH ancestors by walking parentHash from the verified parent, failing on a broken link.
The tests extend the existing runner, input, provider, replay and CLI suites; no historical slow fixtures are added.
Behaviour changes for users
Satin --rpc.replay-file captures recorded before this change miss on state and ancestor reads, because those requests are now keyed by block hash; re-capture them.
RPC error messages no longer include the server's text.
A fixture tree that contains a symlinked directory now fails discovery with an explicit error.
Validation
Branch merged with the Satin base cz/feat/satin-w10 at 5e3f30ad (no rebase).
cargo test --workspace --locked: 1,954 passed, 4 ignored.
Full workspace clippy with all features, format, cargo-sort, and documentation Prettier, markdownlint and offline link checks passed.
Pinned state fixtures: Osaka 19,465 executed / 52 skipped; Amsterdam 15,754 executed / 72 skipped; both deviation gates passed.
Pinned blockchain fixtures: 18,713 executed, all six skip-class counts unchanged, 20,232 blocks checked against Ethereum; deviation gate passed.
Witness replay over every Osaka and Amsterdam fixture file, in equivalence and Satin mode: 0 failed.
Retry regression covers HTTP 503, a bare JSON-RPC 429 body and a missing-id error, with actual request counts checked.
CLI diagnostics exercise both stderr and a log file with dependency tracing enabled.
Scope and known residuals
Successful RPC payloads are unchanged; errors raised later while decoding their typed contents can still contain the returned data.
An offline replay envelope that someone edits by hand to contain a JSON-RPC error response is returned as recorded (the capture writer never stores error responses).
Ancestor headers are checked by their advertised hash and number; a hand-edited recording that keeps those but changes a header's parentHash is not detected.
The Unix O_NONBLOCK value is selected per target; MIPS r6 and illumos are not mapped and fall back to the pathname check (neither is a supported build target).
The witness CI harness (crates/mega-state-test/tests/witness.rs) still reads fixtures with its own unbounded reader.
currentExcessBlobGas = u64::MAX passes the width check and overflows in revm's blob-fee calculation.
Other review residuals (whole-file skip names, harness-added accounts at the state-size boundary, terminal escaping of some tracing fields) are tracked on the audit Issues.
API
mega-state-test's runner::find_json_files now returns io::Result<Vec<PathBuf>>, and runner::find_json_files_in_paths discovers several input paths under one file budget, refusing an empty input directory; callers must propagate discovery failures.
The in-tree CLI and witness callers are updated with it.
Input readers and limits remain private.
Audit coverage
This PR addresses the maintained Satin tooling paths for these findings.
The fixture byte bound also covers #164's authorization-list input through the runner's file entry point.
mega-audits#147 is closed as accepted risk and is not claimed as fixed by this PR. mega-audits#115 is addressed by the existing Satin baseline design, not by this PR.
This PR targets a Satin feature branch.
The audit Issues remain open until an eligible default-branch integration PR can be registered in their fix_prs metadata.
Living comment — rewritten in place. The review workflow keeps this single comment up to date instead of posting a new one each round, so it always describes the latest reviewed commit and the earlier text is intentionally gone. No reply is needed here; reply to a finding in its own review thread, and answer an open question in a reply on this PR. The next review round reconciles your answer.
🛠️ Review did not finish
Attempted head c1ff65b0 · updated 2026-11-19T16:55:09+00:00
System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.
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
api:breakingCrate interface change — downstream users must updatecomp:docChanges in the documentationcomp:mega-evmeChanges to the `mega-evme` toolcomp:miscChanges to the miscellaneous part of this repospec:unchangedNo change to any `mega-evm`'s behavior
1 participant
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.
Summary
Fail explicitly on oversized or non-regular fixture inputs and on inconsistent replay context, and keep configured RPC endpoints and server error text out of developer-tool diagnostics.
State-test files are capped at 64 MiB; blockchain bundles at 256 MiB because the pinned official fixtures reach about 160 MiB.
*.jsoninputs (FIFOs, sockets, devices, directories) and on symlinked directories, given as a root or found below one, instead of hanging, traversing a directory twice or dropping it.Symlinks to regular
*.jsonfiles are read.Fixture files are opened non-blocking on Unix and their type is checked on the open descriptor.
Reject oversized blob-gas fields and type 3/4 creation transactions through the existing expected-exception handling.
JSON-RPC error responses from the server are reported by their error code and a local diagnostic; the server's message and data are never printed.
Alloy's HTTP and retry implementation is kept, and retry classification still sees the original error.
requireCanonical: true), and servesBLOCKHASHancestors by walkingparentHashfrom the verified parent, failing on a broken link.The tests extend the existing runner, input, provider, replay and CLI suites; no historical slow fixtures are added.
Behaviour changes for users
--rpc.replay-filecaptures recorded before this change miss on state and ancestor reads, because those requests are now keyed by block hash; re-capture them.Validation
cz/feat/satin-w10at5e3f30ad(no rebase).cargo test --workspace --locked: 1,954 passed, 4 ignored.CLI diagnostics exercise both stderr and a log file with dependency tracing enabled.
Scope and known residuals
parentHashis not detected.O_NONBLOCKvalue is selected per target; MIPS r6 and illumos are not mapped and fall back to the pathname check (neither is a supported build target).crates/mega-state-test/tests/witness.rs) still reads fixtures with its own unbounded reader.currentExcessBlobGas = u64::MAXpasses the width check and overflows in revm's blob-fee calculation.API
mega-state-test'srunner::find_json_filesnow returnsio::Result<Vec<PathBuf>>, andrunner::find_json_files_in_pathsdiscovers several input paths under one file budget, refusing an empty input directory; callers must propagate discovery failures.The in-tree CLI and witness callers are updated with it.
Input readers and limits remain private.
Audit coverage
This PR addresses the maintained Satin tooling paths for these findings.
The fixture byte bound also covers #164's authorization-list input through the runner's file entry point.
ME-V12-20260609-124: mega-audits#186.ME-V12-20260609-120: mega-audits#182.ME-V12-20260609-107: mega-audits#177.ME-V12-20260609-098: mega-audits#169.ME-V12-20260609-095: mega-audits#166.ME-V12-20260609-094: mega-audits#165.ME-V12-20260609-093: mega-audits#164.ME-V12-20260609-092: mega-audits#163.ME-V12-20260609-089: mega-audits#162.ME-V12-20260609-059: mega-audits#150.ME-V12-20260609-054: mega-audits#148.mega-audits#147 is closed as accepted risk and is not claimed as fixed by this PR.
mega-audits#115 is addressed by the existing Satin baseline design, not by this PR.
This PR targets a Satin feature branch.
The audit Issues remain open until an eligible default-branch integration PR can be registered in their
fix_prsmetadata.