Skip to content

Conversation

@pk910
Copy link
Member

@pk910 pk910 commented Jan 5, 2026

statebloat scenarios for perf-devnet-2 by @CPerezz

CPerezz and others added 8 commits December 23, 2025 10:36
- Implements new `storage-trie-brancher` scenario that replicates Python `deploy_deep_branches.py` functionality (See: ethereum/execution-specs#1937)
- Enables deployment of contracts designed to create worst-case storage trie depth scenarios (See https://github.com/CPerezz/worst_case_miner/settings)
- Automatically handles Nick's factory deployment if not present on network.
- Add loadDataFromPathOrURL helper function to load files from URLs or local paths
- Support HTTP/HTTPS URLs for both --data-file and --contract-file flags
- Download contract files to temp directory before compilation when using URLs
- Add comprehensive YAML configuration examples to README
- Document URL loading capabilities with examples

This allows users to load deployment data and Solidity contracts from external
sources like GitHub raw URLs or any HTTP server, enabling more flexible
deployment workflows.
Remove all local JSON and Solidity files from the storage_trie_brancher scenario
directory since the scenario now supports loading these files from external URLs
(GitHub gists, repositories, or any HTTP server).

Removed files:
- All s*_acc*.json deployment data files
- All depth_*.sol Solidity contract files
- deployed_contracts.json output file
- stubs.json test file

Users should now load these files from external sources using the --data-file
and --contract-file flags with HTTP/HTTPS URLs.
Major changes to support running in Docker containers:

1. Replaced Solidity compilation with direct bytecode loading:
   - Removed solc dependency (not available in Docker)
   - Added --bytecode flag to accept hex bytecode directly
   - Supports loading bytecode from string, file path, or URL
   - Removed --contract-file flag

2. Replaced file writing with structured logging:
   - Removed saveDeploymentInfo() that wrote to filesystem
   - Added logDeploymentInfo() that outputs to logs
   - Deployment summary logged at INFO level
   - Full deployment data available at DEBUG level with --log-txs
   - No dependency on scenario directory structure

3. Made data-file and bytecode required parameters:
   - Removed auto-detection logic that relied on file paths
   - Users must explicitly provide both parameters
   - Supports URLs for both data and bytecode

4. Fixed calculateCreate2Address to use factory address:
   - Now uses s.factoryAddress instead of hardcoded NickFactoryAddress
   - Correctly handles dynamic factory addresses

5. Updated documentation:
   - README examples now use --bytecode instead of --contract-file
   - Added examples for URL-based loading
   - Clarified required parameters

These changes ensure the scenario works properly in containerized
environments where only the spamoor binary is available.
…ark contracts

This scenario deploys initcode contracts, CREATE2 factory contracts, and test
contracts of various sizes (0.5, 1, 2, 5, 10, 24 KB) for EXTCODESIZE benchmarks.

Features:
- Deploys initcode contracts that generate bytecode of specific sizes using
  keccak256 expansion loops
- Deploys CREATE2 factory contracts that use EXTCODECOPY to deploy contracts
  with unique bytecode
- Supports parallel deployment using multiple wallets (default 50)
- Dynamic gas calculation based on contract size and block gas limit
- Outputs factory addresses in stubs.json format for execution-spec-tests
- Supports pre-deployed addresses via YAML config
Signed-off-by: CPerezz <37264926+CPerezz@users.noreply.github.com>
feat: add extcodesize_setup scenario for deploying EXTCODESIZE benchm…
@pk910 pk910 added the build-docker-image build docker image for this branch label Jan 5, 2026
The erc20_bloater scenario was losing progress (halving each restart) due to
a semantic mismatch between the Solidity contract and Go code:

- Contract's `nextStorageSlot` stores ADDRESS INDEX (count of addresses bloated)
- Go code was treating this as SLOT COUNT (addresses × 2)

This caused a destructive bug on restart:
1. Read address index X from contract
2. Treat X as slot count (wrong units)
3. Call buildBloatTx(..., X/2, ...) - dividing by SlotsPerBloatCycle
4. Contract sets nextStorageSlot = X/2 - permanently halving progress!

Fix:
- Rename `startSlot` → `nextAddressIndex` for clarity
- Rename `targetSlots` → `targetAddresses`
- Remove the /SlotsPerBloatCycle division when calling buildBloatTx
- Fix progress calculations to properly convert addresses to bytes/GB

Tested with Geth in dev mode: progress now correctly resumes instead of halving.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-docker-image build docker image for this branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants