Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Benchmark Size Comparison (vs main)
REGRESSION: 4 artifact(s) exceed 5% threshold
Run 29021013263 | e66df89 | 2026-07-09 13:43 UTC |
There was a problem hiding this comment.
Pull request overview
Adds a new differential-testing crate that validates the SDK’s on-chain storage representation against Solidity compiler output by compiling small Solidity fixtures with solc, executing the deployed bytecode on revm, and comparing the resulting {slot -> 32 bytes} storage maps to what pvm-storage writes into MockHost.
Changes:
- Introduces
pvm-solc-differentialwith a comprehensive suite of storage-representation fixtures (packing, mappings, dynamics, vectors/arrays, clearing, signed ints). - Adds a
MockHost::storage_dump()helper to enumerate all written storage slots for full-map comparisons. - Wires the new crate into the workspace and CI, running it behind the
solc-testsfeature.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| crates/pvm-solc-differential/src/storage.rs | Implements the solc+revm ground-truth harness and a wide set of differential storage representation tests. |
| crates/pvm-solc-differential/src/lib.rs | Adds crate-level documentation and gates the test modules behind test + solc-tests. |
| crates/pvm-solc-differential/src/common.rs | Adds a shared solc --standard-json runner and JSON parsing for test modules. |
| crates/pvm-solc-differential/Cargo.toml | Defines the new crate and gates heavy dependencies (revm, alloy-core, serde_json) behind solc-tests. |
| crates/pvm-contract-types/src/mock_host.rs | Adds storage_dump() to snapshot all stored key/value pairs for differential assertions. |
| Cargo.toml | Adds pvm-solc-differential to the workspace members list. |
| Cargo.lock | Updates the lockfile for the newly introduced optional dependencies. |
| .github/workflows/ci.yml | Adds a CI step to run the new solc differential storage-representation tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
pkhry
left a comment
There was a problem hiding this comment.
lgtm, but maybe we can also add a-la quickcheck testing for storage value equivalences too?
I agree, but it is a longer story I will handle it in a separate PR |
Adds a new differential-testing crate that validates the SDK’s on-chain storage representation against Solidity compiler output by compiling small Solidity fixtures with solc, executing the deployed bytecode on revm, and comparing the resulting {slot -> 32 bytes} storage maps to what pvm-storage writes into MockHost.