PLT-461: StorageRW scenario scaffold + deploy wiring#47
Conversation
Add a "storagerw" scenario over the PLT-457 StorageRWv1 binding, mirroring ERC20Conflict: a ContractScenarioBase[StorageRWv1] that deploys the mapping-backed contract (no constructor args), binds it, and produces a fixed rmw tx against slot 0 with an empty pad. This proves the contract is reachable as a scenario end-to-end; the per-tx slot/value/pad distribution lands in PLT-465. Register "storagerw" in the factory's auto-generated block. Hand-written to match the current ERC20Conflict idiom rather than via `make generate`: the template script still emits the pre-PLT-457 signatures (NewXScenario()/NewContractScenarioBase(scenario)) and a sol-derived name, neither of which matches current base.go or the ticket's "storagerw" name. Test mirrors the mock-deploy generator coverage at the scenario level: attach at a known address, generate, and assert the tx targets the contract and carries the rmw selector (cross-checked against the binding ABI). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The rmw scaffold tx left auth.GasLimit at the 200k CreateTransactionOpts default while every sibling scenario tunes it. On a gas-limit-admission chain that under-packs blocks by ~7x, depressing observed TPS. rmw is SLOAD+SSTORE on one slot (~26k warm, ~44k cold-first); 50k covers cold-first-touch with headroom and packs ~4x denser. PLT-465 revisits once the calldata pad is distribution-driven. Pin the fixed scaffold calldata in the test (slot 0, empty pad). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PR SummaryLow Risk Overview Each tx sets Tests cover factory lookup by name and mock-deploy Generate output (contract Reviewed by Cursor Bugbot for commit 74e53ed. Bugbot is set up for automated code reviews on this repo. Configure here. |
Add generator/scenarios/doc.go documenting the contract-scenario pattern (ContractScenarioBase/ContractDeployer, MockDeploy attach, factory registration) and the StorageRW scaffold with the full gas-sizing derivation. Lean StorageRW.go: consolidate the three PLT-465 deferral notes to one terse note, and reduce the dense gas comment to a critical one-liner plus a pointer to the package doc. Comments and doc only; no behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Implements PLT-461 — makes StorageRWv1 reachable as a sei-load scenario. Scaffold only; per-tx key/size distribution comes in PLT-465.
What
generator/scenarios/StorageRW.gomirroringERC20Conflict.go(ContractScenarioBase[bindings.StorageRWv1], parameterless mapping-backed deploy), registered as"storagerw"in the factory.rmw(slot=0, empty pad)to prove the deploy+send path end-to-end.auth.GasLimit = 50000(matches sibling scenarios; the 200k default under-packs blocks ~7×). Mock-deploy + full-calldata + selector test.Review (solidity + idiom)
bytespad encoding, nonce sequencing). Idiom: faithful ERC20Conflict mirror.rmwis a scaffold; PLT-465 (distribution wiring) is the gate before any real throughput numbers. Follow-up PLT-472 filed for the drifted scenario-generator script (hand-written here).Decision brief:
designs/sei-load-workload-modeler/PLT-461-storagerw-scaffold.md.🤖 Generated with Claude Code