Factory execution + SnapshotDB RW-set coverage for CREATE/CREATE2#151
Factory execution + SnapshotDB RW-set coverage for CREATE/CREATE2#151rootp1 wants to merge 6 commits into
Conversation
PR1: validates execution and SnapshotDB states for CREATE and CREATE2 ops. Signed-off-by: rootp1 <arnav.iitr@gmail.com>
There was a problem hiding this comment.
Pull request overview
Adds factory-deployment integration coverage (CREATE + improved CREATE2 path) to ensure SnapshotDB read/write sets include child contract code/storage writes and that deployed contracts remain queryable after commit.
Changes:
- Introduces a
ProxyFactorySolidity fixture that deploys arbitrary initcode viaCREATE. - Extends integration tests to (a) assert child contract code/nonce/storage writes appear in the endorsement RW-set and (b) validate gateway indexing (receipts, logs, code queries) for factory deployments.
- Adds small
EthClienthelpers to endorse a state-changing call and then broadcast+wait for commit.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| solidity/ProxyFactory/ProxyFactory.sol | New Solidity factory contract used to exercise CREATE-based deployments in integration tests. |
| integration/integration_test.go | Adds proxy_factory test case and strengthens Uniswap CREATE2 coverage with RW-set assertions and indexing checks. |
| integration/ethclient.go | Adds helper methods to endorse a transaction and broadcast it while waiting for commit. |
| integration/contracts/proxyfactory.gen.go | Generated Go binding for the new ProxyFactory contract. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: rootp1 <arnav.iitr@gmail.com>
Signed-off-by: rootp1 <arnav.iitr@gmail.com>
Signed-off-by: rootp1 <arnav.iitr@gmail.com>
Signed-off-by: rootp1 <arnav.iitr@gmail.com>
Signed-off-by: rootp1 <arnav.iitr@gmail.com>
|
@ale-linux, Please have a look whenever you get a chance to. |
|
I don't know what @arner or @kushnireyal think, but: while those tests served us well at the beginning of the project, I think now we have coverage for create2 and create in the ethereum tests, and I think the Do we also want these? |
Good question. The Hardhat tests test the EVM behavior as a black box, so we don't verify RW sets for CREATE and CREATE2-deployed contract. Also, there are additional assertions around Gateway-level behavior (log indexing, receipt semantics, code queryability) that Hardhat doesn't currently cover (some of those may become redundant as Hardhat coverage grows, but they're filling a real gap today) |
Description
Tests
Related Issues
#47