Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
5511151
ci: Fix release workflow (#17091)
mslipper Aug 15, 2025
c42ceba
op-devstack: run rust services as sub-processes in sysgo (#16726)
protolambda Aug 15, 2025
6683f1a
op-node: Refactor step scheduling events (#17093)
mslipper Aug 15, 2025
a87c898
op-deployer: fix bootstrap implementations flags (#17090)
bitwiseguy Aug 15, 2025
23b2cba
op-node: Remove TryUpdateEngine event (#17096)
mslipper Aug 15, 2025
d1ed1d4
feat: make the cwia arg layout human readable (#17010)
stevennevins Aug 15, 2025
aa4db40
op-up: upgrade default version in install script (#17078)
joshklop Aug 15, 2025
f13179c
op-chain-ops: using reflect.TypeFor in std lib (#16965)
cuiweixie Aug 18, 2025
f207738
ci: Only run contracts tests on contracts changes (#17105)
mslipper Aug 18, 2025
e7efd8b
cannon: allocator preheap instrumentation [rebased from ec2#2] (#16030)
salindne Aug 18, 2025
2f09f76
ci: Have contracts-bedrock-tests depend on op-node (#17116)
mslipper Aug 18, 2025
f6c1dcf
fix: set explicit IPv4 binding for op-devstack services (#17114)
DeVikingMark Aug 18, 2025
2da6ec7
op-e2e: Delete TestCrossLayerUser (#17106)
mslipper Aug 18, 2025
a432e4f
refactor: remove CrossUpdateRequestEvent, CrossUnsafeUpdateEvent, and…
mds1 Aug 18, 2025
25b7d01
vm-runner: Rework l2 block selection (#17089)
mbaxter Aug 18, 2025
a4d51f0
refactor: remove ForceResetEvent (#17061)
mds1 Aug 19, 2025
5bb3f36
ci: reduce go-tests timeout (#17126)
mds1 Aug 19, 2025
673e1a0
op-acceptance-tests: fix TestNotTruncateDatabaseOnRestartWithExisting…
ajsutton Aug 19, 2025
b4c6919
cannon,op-challenger: Add metric to report i-cache misses (#17123)
Inphi Aug 19, 2025
061043e
op-batcher: improve default throttle parameters (#17148)
sebastianst Aug 19, 2025
0327dcc
op-program: Rely on mise install cache for prestate build (#17124)
Inphi Aug 19, 2025
e237c74
op-acceptance-tests: migrate operator fee tests from devnet-sdk to op…
scharissis Aug 19, 2025
2a67efc
Remove TODO (#17159)
ajsutton Aug 20, 2025
a1a200a
op-sync-tester: eth namespace relay (#17117)
pcw109550 Aug 20, 2025
3b73ebb
refactor: Remove PromoteSafeEvent (#17161)
pcw109550 Aug 20, 2025
f9e7aac
op-node: remove PendingSafeRequestEvent (#17122)
joshklop Aug 20, 2025
a4275c9
update conductor scenario when builder failure (#17158)
cody-wang-cb Aug 20, 2025
79f3e4d
op-service/eth: fix exec payload creation from block (#17154)
sebastianst Aug 20, 2025
cb52e92
op-node: remove PromoteFinalizedEvent (#17165)
joshklop Aug 20, 2025
a59b414
chore(op-acceptance-tests): migrate TestInteropReadiness to op-devsta…
scharissis Aug 20, 2025
0148766
ci: Increase timeout of publish-cannon-prestates job (#17163)
Inphi Aug 20, 2025
705abbb
op-e2e: Remove unused withdrawal action methods (#17128)
rickck11 Aug 21, 2025
f4147d1
feat(devstack/rpc): expose rpc endpoint (#17168)
theochap Aug 21, 2025
f6e0e88
op-deployer: Add forge autodiscovery (#17152)
mslipper Aug 21, 2025
cea6199
op-acceptance-tests: Introduce GameHelper to perform multiple moves (…
ajsutton Aug 21, 2025
fea03f4
op-service: Clarify testlogs (#17174)
mslipper Aug 21, 2025
9263a9d
cannon: Drop version 7 feature flags (#17167)
mbaxter Aug 21, 2025
382fe3f
op-program: Disable go1.25 annotation of anonymous memory mappings. (…
ajsutton Aug 21, 2025
eb2b7db
acceptance-tests: Wait for follower node to be in sync with sequencer…
ajsutton Aug 22, 2025
576843a
feat: create a v2 of the fault dispute game to validate creator patte…
stevennevins Aug 22, 2025
0b53a5b
Move `closer.Close()` to a defer statement immediately after error ch…
rickck11 Aug 22, 2025
477692e
op-sync-tester: Verifier Engine APIs for Isthmus (#17072)
pcw109550 Aug 22, 2025
aafa23a
op-sync-tester: Verifier Engine APIs for Ecotone, Fjord, Granite, Hol…
pcw109550 Aug 22, 2025
1263559
op-devstack: add SyncTester to sysgo; initial E2E test with SyncTeste…
nonsense Aug 22, 2025
9feb722
Upload finalized Cannon (Go 1.24) audit report (#17183)
mbaxter Aug 22, 2025
d867c1c
feat(cannon): reduce info logging frequency from %100000 to %1000000 …
rickck11 Aug 24, 2025
53a4cf3
Update README.md (#16753)
rickck11 Aug 24, 2025
5033003
Reorganize sync deriver logic (#17098)
teddyknox Aug 25, 2025
f7a637a
op-devstack: add hydrate to sync tester (#17198)
nonsense Aug 25, 2025
c72a9ce
cannon: Deploy Cannon with Go 1.24 support (#17155)
mbaxter Aug 25, 2025
0dc85c8
chore: Add fork retries to upgrade tests (#17201)
janjakubnanista Aug 25, 2025
5dfb32a
feat(kurtosis-devnet): 1/2 add flashblocks support (#17172)
serpixel Aug 25, 2025
19fddc6
all: Update op-geth dependency, based on geth v1.16.1 (#16785)
0x00101010 Aug 25, 2025
9eed9fa
challenger: Add a metric to report the number of consecutive failures…
ajsutton Aug 25, 2025
ea7bbe9
superchain-config: Fix fuzz test proxyAdmin constraints (#17203)
mbaxter Aug 25, 2025
e4c34ec
op-up: add ascii art (#17205)
joshklop Aug 25, 2025
b20dc2e
op-chain-ops: update srcmap loading to handle forge compiler profiles…
protolambda Aug 25, 2025
2951d4d
op-up: add survey link (#17206)
joshklop Aug 25, 2025
5a4374c
op-up: basic cli argument handling (#17208)
joshklop Aug 26, 2025
772ef5d
ci: Write cannon preimage commit info to a temp file before uploading…
ajsutton Aug 26, 2025
3009677
op-sync-tester: implement L2ELNode interface with sync tester (#17200)
nonsense Aug 26, 2025
e30097b
chore: update op-deployer docs (#17204)
hexshire Aug 26, 2025
386ee4d
fix(ci): remove #986 todo (#17229)
serpixel Aug 26, 2025
95ce6f1
Verify contract deployment tx is actually included. (#17232)
ajsutton Aug 27, 2025
c76d2b2
op-sync-tester: Verifier Engine APIs for Bedrock, Canyon, Delta (#17234)
pcw109550 Aug 27, 2025
74faf21
feat(op-devstack): support kona supervisor sysgo (#17195)
dhyaniarun1993 Aug 27, 2025
691d92f
op-up: add unit test (#17210)
joshklop Aug 27, 2025
e9991a8
op-program: Fix length check for pending progress in consolidate step…
ajsutton Aug 27, 2025
25180d3
op-challenger: Implement an option to restrict frequency of update cy…
ajsutton Aug 27, 2025
f6bf2b8
feat(op-acceptance-tests): flaky test report; updates. (#17250)
scharissis Aug 28, 2025
08c87eb
op-sync-tester: Session Types and API interfaces (#17252)
pcw109550 Aug 28, 2025
e4352fe
op-deployer: Add forge CLI wrapper (#17231)
mslipper Aug 28, 2025
1ebc5f5
op-deployer: StandardBin enforces specific forge version (#17242)
bitwiseguy Aug 28, 2025
b20817a
cannon: Reduce size of heap/code cache (#17246)
Inphi Aug 28, 2025
edfd53a
op-devstack: Fix flakiness in AwaitTimestamp (#17270)
ajsutton Aug 29, 2025
2850953
op-deployer: enable embedded artifacts integration test (#17276)
bitwiseguy Aug 29, 2025
080d626
ci: Remove codecov from go tests (#17291)
mslipper Aug 30, 2025
acb89e9
op-devstack: Explicit Sync Tester EL and API Session Binding (#17275)
pcw109550 Sep 1, 2025
397db1c
configurable delay between game responses (#16988)
leopoldjoy Sep 1, 2025
8af88eb
chore: remove the frozen file check (#17289)
stevennevins Sep 1, 2025
355fdcb
feat(op-acceptance-tests): port fjord (holocene) tests to devstack (#…
serpixel Sep 2, 2025
49eaec0
op-sync-tester: Support sync namespace (#17299)
pcw109550 Sep 2, 2025
d6733fd
all: Update op-geth dependency, based on geth v1.16.2 (#17228)
joshklop Sep 2, 2025
d97e8af
op-deployer: add configurable chainIntent.GasLimit field (#17271)
bitwiseguy Sep 2, 2025
a92e804
feat(op-acceptance-tests): Port TestSmokeTestFailure and TestInteropS…
serpixel Sep 2, 2025
891015e
ci: Run the publish-cannon-prestates job on circleci boxes instead of…
ajsutton Sep 3, 2025
fc6ddc8
op-devstack: add sync-tester with external EL (#17251)
nonsense Sep 3, 2025
9312db0
fix comment for l1.cache-size (#17107)
zhiqiangxu Sep 3, 2025
539c39a
feat: add feature flagging functionality to SystemConfig (#17281)
smartcontracts Sep 3, 2025
ce174fc
feat(op-acceptance-tests): add more sysgo tests. (#16817)
scharissis Sep 4, 2025
5a8da84
feat(op-acceptance-tests): move all ATs to one workflow (#16755)
scharissis Sep 4, 2025
fac5bbe
feat(op-acceptance-tests): op-acceptor v3.1.0 (#17310)
scharissis Sep 4, 2025
8835647
make `IDelayedWETH` inherit `IProxyAdminOwnedBase` (#16912)
zhiqiangxu Sep 4, 2025
d3435ad
circleci, op-acceptance-tests: nightly ci sync tests with external ne…
nonsense Sep 4, 2025
2a4444e
feat: bump op-geth and update GetCommittedState to GetStateAndCommite…
jelias2 Sep 4, 2025
7a2ff6d
remove un-used code in backend.FromConfig (#17321)
zhiqiangxu Sep 5, 2025
b8d6340
remove dup (#17325)
DenseDenise Sep 5, 2025
7176d35
feat: creator pattern integrate FaultDisputeGameV2 into DGF (#17119)
stevennevins Sep 5, 2025
b9ebd2e
op-sync-tester: Better Session Handling (#17316)
pcw109550 Sep 5, 2025
898e03a
feat: op-node sync tests for multiple networks in ci (#17334)
jelias2 Sep 5, 2025
ee73dba
min-base-fee: bring in op-geth code (#17307)
geoknee Sep 5, 2025
c09c867
feat: dev feature flagging in OPCM (#17268)
smartcontracts Sep 5, 2025
0293dac
feat: updated system config pause (#17322)
smartcontracts Sep 5, 2025
8328a42
feat: have VerifyOPCM check for dev bitmap (#17324)
smartcontracts Sep 5, 2025
4de2dc2
op-e2e: Fix broken jovian precompile FP tests (#17349)
Inphi Sep 6, 2025
0c9a25c
contracts: Add CANNON_KONA game type (#17358)
ajsutton Sep 8, 2025
333f7c5
feat(readme): update directory structure (#17359)
scharissis Sep 8, 2025
f3fd550
refactor(op-e2e): use ActivateForkAtOffset utility (#17362)
geoknee Sep 8, 2025
61dba77
fix superchainConfig upgrade issue & support multiple superchainConfi…
AmadiMichael Sep 8, 2025
45f03f2
op-sync-tester: Better logging (#17364)
pcw109550 Sep 8, 2025
c9be74f
proofs: Introduce PermissionedDisputeGame v2 (#17290)
mbaxter Sep 8, 2025
6d8abe3
docs(op-e2e/system): add deprecation notice (#17369)
geoknee Sep 8, 2025
1a37ab4
op-service: cliutils add support for common.Hash (#17376)
bitwiseguy Sep 8, 2025
835f72d
op-challenger: Fix metric label name for asterisc-kona (#17367)
Inphi Sep 8, 2025
33750e7
prestate-check: Add support for kona (#17355)
ajsutton Sep 8, 2025
fc32f4f
op-program: Use prestate build script in repro.justfile (#17372)
Inphi Sep 8, 2025
d71ce15
op-challenger: Add cannon-kona trace support (#17356)
ajsutton Sep 8, 2025
f13e3a0
fix: version loop to handle tags with spaces (#17360)
mdqst Sep 8, 2025
6662c16
fix: bump validator version on develop (#17378)
smartcontracts Sep 8, 2025
eedaa0f
fixed kona envs (#17370)
sadiq1971 Sep 9, 2025
7b9ad69
op-acceptance-tests: upgrade tests with real-data (op-sepolia) (#17363)
nonsense Sep 9, 2025
b4e7692
Get version of impls from the impl contracts themselves, reduce bytec…
AmadiMichael Sep 9, 2025
0dfc2cd
docs: add interface inheritance guidelines and style examples to guid…
maurelian Sep 9, 2025
21d638b
op-up: encode version information in binary (#17405)
joshklop Sep 9, 2025
19c7f98
fix(op-acceptance-tests): wait for fund balance for persistent devnet…
serpixel Sep 9, 2025
ccb5a95
fix: remove unused variables from test file (#17400)
stevennevins Sep 10, 2025
d74c81a
op-conductor: p2p healthcheck fix and execution_p2p_healthcheck_api_t…
yashvardhan-kukreja Sep 10, 2025
77c146c
circleci: enable OPM and Base mainnet op-node sync tests (nightly) (#…
nonsense Sep 10, 2025
06799ec
op-dispute-mon: Support cannon-kona games (#17380)
ajsutton Sep 10, 2025
3f11e7f
ci: Add a stand alone check for solc warnings (#17403)
maurelian Sep 10, 2025
66e6a7e
op-up: update default version in install script (#17414)
joshklop Sep 10, 2025
94af69b
acceptance-tests.yaml: flashblocks-with-isthmus gate config (#17413)
yashvardhan-kukreja Sep 11, 2025
08477e9
feat(op-acceptance-tests): v3.2.1 (#17422)
scharissis Sep 11, 2025
1c74975
feat(devstack): add user RPC method. fix kona config in sysgo (#17390)
theochap Sep 11, 2025
b7c9755
Revert "ci: Add a stand alone check for solc warnings (#17403)" (#17428)
maurelian Sep 11, 2025
bd86688
afix slack in semgrep-scan (#17433)
raffaele-oplabs Sep 11, 2025
e54e627
chore(op-acceptance-tests): ci timeout (#17438)
scharissis Sep 11, 2025
8749b77
op-node: Skip L1 genesis hash check if block is not available from th…
ajsutton Sep 12, 2025
5643a20
chore: bump op-geth to include new superchain registry configuration …
jelias2 Sep 12, 2025
7f9a467
refactor(test): improve L2CrossDomainMessenger test coverage and qual…
devin-ai-integration[bot] Sep 12, 2025
33efd65
feat: set up OPCM for U17 (#17406)
smartcontracts Sep 12, 2025
0cfd71e
feat: contract changes to enable min-base-fee (#17330)
wlawt Sep 15, 2025
b1b911f
fix(op-deployer): EnsureDefaultCacheDir (#17411)
bitwiseguy Sep 15, 2025
d5d934b
justfile: add latest-versions recipe (#17399)
bitwiseguy Sep 15, 2025
141e42b
chore(cleanup): close #17194 (#17452)
serpixel Sep 15, 2025
d657c78
op-acceptance-tests: remove INITIAL_L2_BLOCK variable, and fetch late…
nonsense Sep 15, 2025
9211f45
op-deployer: read addresses onchain instead of from chainConfig (#17456)
bitwiseguy Sep 15, 2025
c813b04
feat(op-acceptance-tests): op-acceptor v3.3.0 (#17467)
scharissis Sep 16, 2025
f9dae26
Merge branch 'develop' into chore/sync-fee-splitter-system
0xDiscotech Sep 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
612 changes: 430 additions & 182 deletions .circleci/config.yml

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ cache

!op-deployer/pkg/deployer/artifacts


packages/contracts-bedrock/deployments/anvil

# vim
Expand All @@ -45,8 +44,10 @@ packages/contracts-bedrock/deployments/anvil

coverage.out


__pycache__

# Ignore echidna artifacts
crytic-export

# ignore local asdf config
.tool-versions
1 change: 0 additions & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ linters:
- asciicheck
- misspell
- errorlint
- bodyclose

# Only enabled in specific cases. See settings and exclusions below
- exhaustruct
Expand Down
20 changes: 20 additions & 0 deletions .semgrep/rules/sol-rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ rules:
exclude:
- packages/contracts-bedrock/src/L1/OPContractsManager.sol
- packages/contracts-bedrock/src/L1/OptimismPortal2.sol
- packages/contracts-bedrock/src/L1/OptimismPortalInterop.sol
- packages/contracts-bedrock/src/L2/FeeVault.sol
- packages/contracts-bedrock/src/L2/OptimismMintableERC721.sol
- packages/contracts-bedrock/src/L2/OptimismMintableERC721Factory.sol
Expand All @@ -327,7 +328,9 @@ rules:
- packages/contracts-bedrock/src/dispute/AnchorStateRegistry.sol
- packages/contracts-bedrock/src/dispute/DelayedWETH.sol
- packages/contracts-bedrock/src/dispute/FaultDisputeGame.sol
- packages/contracts-bedrock/src/dispute/v2/FaultDisputeGameV2.sol
- packages/contracts-bedrock/src/dispute/PermissionedDisputeGame.sol
- packages/contracts-bedrock/src/dispute/v2/PermissionedDisputeGameV2.sol
- packages/contracts-bedrock/src/dispute/SuperFaultDisputeGame.sol
- packages/contracts-bedrock/src/dispute/SuperPermissionedDisputeGame.sol
- packages/contracts-bedrock/src/governance/MintManager.sol
Expand Down Expand Up @@ -362,3 +365,20 @@ rules:
paths:
exclude:
- packages/contracts-bedrock/scripts/libraries/Config.sol

- id: sol-style-event-param-fmt
languages: [solidity]
severity: ERROR
message: Event parameters must be named using camelCase and must not be prefixed with underscore
pattern-either:
# Match parameters with underscore prefix
- pattern-regex: event\s+\w+\s*\([^)]*\b(?:address|uint\d*|int\d*|bytes\d*|bool|string)\s+(?:indexed\s+)?_\w+
# Match unnamed parameters (type with optional indexed but no parameter name before comma or closing paren)
- pattern-regex: event\s+\w+\s*\([^)]*\b(?:address|uint\d*|int\d*|bytes\d*|bool|string)\b(?:\s+indexed)?\s*[,)]
# Match parameters that are all uppercase (like NEW_OWNER)
- pattern-regex: event\s+\w+\s*\([^)]*\b(?:address|uint\d*|int\d*|bytes\d*|bool|string)\s+(?:indexed\s+)?[A-Z][A-Z0-9_]*\s*[,)]
paths:
exclude:
# LegacyMintableERC20 and the corresponding interface use legacy naming conventions.
- packages/contracts-bedrock/src/legacy/LegacyMintableERC20.sol
- packages/contracts-bedrock/interfaces/legacy/ILegacyMintableERC20Full.sol
20 changes: 20 additions & 0 deletions .semgrep/tests/sol-rules.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -712,3 +712,23 @@ contract SemgrepTest__sol_safety_try_catch_eip_150 {
}
}
}

contract SemgrepTest__sol_style_event_param_fmt {
// ok: sol-style-event-param-fmt
event OwnerChanged(address previousOwner, address newOwner);

// ruleid: sol-style-event-param-fmt
event OwnerChanged(address _previousOwner, address _newOwner);

// ruleid: sol-style-event-param-fmt
event OwnerChanged(address);

// ruleid: sol-style-event-param-fmt
event OwnerChanged(address NEW_OWNER);

// ok: sol-style-event-param-fmt
event SomethingWithMint(uint256 mint);

// ruleid: sol-style-event-param-fmt
event SomethingWithMint(uint256 _mint);
}
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ TEST_PKGS := \
./packages/contracts-bedrock/scripts/checks/... \
./op-dripper/... \
./devnet-sdk/... \
./op-acceptance-tests/... \
./kurtosis-devnet/... \
./op-devstack/... \
./op-deployer/pkg/deployer/artifacts/... \
Expand Down Expand Up @@ -265,7 +264,7 @@ go-tests-short: $(TEST_DEPS) ## Runs comprehensive Go tests with -short flag
go-tests-short-ci: ## Runs short Go tests with gotestsum for CI (assumes deps built by CI)
@echo "Setting up test directories..."
mkdir -p ./tmp/test-results ./tmp/testlogs
@echo "Running Go tests with gotestsum..."
@echo 'Running Go tests (short) with gotestsum...'
$(DEFAULT_TEST_ENV_VARS) && \
$(CI_ENV_VARS) && \
gotestsum --format=testname \
Expand Down
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,22 +63,38 @@ The Optimism Immunefi program offers up to $2,000,042 for in-scope critical vuln
## Directory Structure

<pre>
├── <a href="./cannon">cannon</a>: Onchain MIPS instruction emulator for fault proofs
├── <a href="./devnet-sdk">devnet-sdk</a>: Comprehensive toolkit for standardized devnet interactions
├── <a href="./docs">docs</a>: A collection of documents including audits and post-mortems
├── <a href="./kurtosis-devnet">kurtosis-devnet</a>: OP-Stack Kurtosis devnet
├── <a href="./op-acceptance-tests">op-acceptance-tests</a>: Acceptance tests and configuration for OP Stack
├── <a href="./op-alt-da">op-alt-da</a>: Alternative Data Availability mode (beta)
├── <a href="./op-batcher">op-batcher</a>: L2-Batch Submitter, submits bundles of batches to L1
├── <a href="./op-chain-ops">op-chain-ops</a>: State surgery utilities
├── <a href="./op-challenger">op-challenger</a>: Dispute game challenge agent
├── <a href="./op-conductor">op-conductor</a>: High-availability sequencer service
├── <a href="./op-deployer">op-deployer</a>: CLI tool for deploying and upgrading OP Stack smart contracts
├── <a href="./op-devstack">op-devstack</a>: Flexible test frontend for integration and acceptance testing
├── <a href="./op-dispute-mon">op-dispute-mon</a>: Off-chain service to monitor dispute games
├── <a href="./op-dripper">op-dripper</a>: Controlled token distribution service
├── <a href="./op-e2e">op-e2e</a>: End-to-End testing of all bedrock components in Go
├── <a href="./op-node">op-node</a>: rollup consensus-layer client
├── <a href="./op-faucet">op-faucet</a>: Dev-faucet with support for multiple chains
├── <a href="./op-fetcher">op-fetcher</a>: Data fetching utilities
├── <a href="./op-interop-mon">op-interop-mon</a>: Interoperability monitoring service
├── <a href="./op-node">op-node</a>: Rollup consensus-layer client
├── <a href="./op-preimage">op-preimage</a>: Go bindings for Preimage Oracle
├── <a href="./op-program">op-program</a>: Fault proof program
├── <a href="./op-proposer">op-proposer</a>: L2-Output Submitter, submits proposals to L1
├── <a href="./op-service">op-service</a>: Common codebase utilities
├── <a href="./op-supervisor">op-supervisor</a>: Service to monitor chains and determine cross-chain message safety
├── <a href="./op-sync-tester">op-sync-tester</a>: Sync testing utilities
├── <a href="./op-test-sequencer">op-test-sequencer</a>: Test sequencer for development
├── <a href="./op-up">op-up</a>: Deployment and management utilities
├── <a href="./op-validator">op-validator</a>: Tool for validating Optimism chain configurations and deployments
├── <a href="./op-wheel">op-wheel</a>: Database utilities
├── <a href="./ops">ops</a>: Various operational packages
├── <a href="./packages">packages</a>
│ ├── <a href="./packages/contracts-bedrock">contracts-bedrock</a>: OP Stack smart contracts
├── <a href="./.semgrep">semgrep</a>: Semgrep rules and tests
</pre>

## Development and Release Process
Expand Down
4 changes: 2 additions & 2 deletions cannon/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ var (
RunInfoAtFlag = &cli.GenericFlag{
Name: "info-at",
Usage: "step pattern to print info at: " + patternHelp,
Value: MustStepMatcherFlag("%100000"),
Value: MustStepMatcherFlag("%1000000000"),
Required: false,
}
RunPProfCPU = &cli.BoolFlag{
Expand Down Expand Up @@ -395,7 +395,7 @@ func Run(ctx *cli.Context) error {
}
}

state, err := versions.LoadStateFromFile(ctx.Path(RunInputFlag.Name))
state, err := versions.LoadStateFromFileWithLargeICache(ctx.Path(RunInputFlag.Name))
if err != nil {
return fmt.Errorf("failed to load state: %w", err)
}
Expand Down
11 changes: 6 additions & 5 deletions cannon/mipsevm/arch/arch64.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ const (
ExtMask = 0x7

// Ensure virtual address is limited to 48-bits as many user programs assume such to implement packed pointers
// limit 0x00_00_FF_FF_FF_FF_FF_FF
HeapStart = 0x00_00_10_00_00_00_00_00
HeapEnd = 0x00_00_60_00_00_00_00_00
ProgramBreak = 0x00_00_40_00_00_00_00_00
HighMemoryStart = 0x00_00_7F_FF_FF_FF_F0_00
Limit = 0x00_00_FF_FF_FF_FF_FF_FF
ProgramHeapStart = 0x00_00_00_c0_00_00_00_00
HeapStart = 0x00_00_10_00_00_00_00_00
HeapEnd = 0x00_00_60_00_00_00_00_00
ProgramBreak = 0x00_00_40_00_00_00_00_00
HighMemoryStart = 0x00_00_7F_FF_FF_FF_F0_00
)

// MIPS64 syscall table - https://github.com/torvalds/linux/blob/3efc57369a0ce8f76bf0804f7e673982384e4ac9/arch/mips/kernel/syscalls/syscall_n64.tbl. Generate the syscall numbers using the Makefile in that directory.
Expand Down
12 changes: 7 additions & 5 deletions cannon/mipsevm/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ package mipsevm
import "github.com/ethereum/go-ethereum/common/hexutil"

type DebugInfo struct {
Pages int `json:"pages"`
MemoryUsed hexutil.Uint64 `json:"memory_used"`
NumPreimageRequests int `json:"num_preimage_requests"`
TotalPreimageSize int `json:"total_preimage_size"`
TotalSteps uint64 `json:"total_steps"`
Pages int `json:"pages"`
MemoryUsed hexutil.Uint64 `json:"memory_used"`
NumPreimageRequests int `json:"num_preimage_requests"`
TotalPreimageSize int `json:"total_preimage_size"`
TotalSteps uint64 `json:"total_steps"`
InstructionCacheMissCount uint64 `json:"instruction_cache_miss_count"`
HighestICacheMissPC hexutil.Uint64 `json:"highest_icache_miss_pc"`
// Multithreading-related stats below
RmwSuccessCount uint64 `json:"rmw_success_count"`
RmwFailCount uint64 `json:"rmw_fail_count"`
Expand Down
2 changes: 2 additions & 0 deletions cannon/mipsevm/debug_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ func TestDebugInfo_Serialization(t *testing.T) {
NumPreimageRequests: 3,
TotalPreimageSize: 4,
TotalSteps: 123456,
InstructionCacheMissCount: 10,
HighestICacheMissPC: 11,
RmwSuccessCount: 5,
RmwFailCount: 6,
MaxStepsBetweenLLAndSC: 7,
Expand Down
8 changes: 4 additions & 4 deletions cannon/mipsevm/exec/mips_instructions.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func GetInstructionDetails(pc Word, memory *memory.Memory) (insn, opcode, fun ui

// ExecMipsCoreStepLogic executes a MIPS instruction that isn't a syscall nor a RMW operation
// If a store operation occurred, then it returns the effective address of the store memory location.
func ExecMipsCoreStepLogic(cpu *mipsevm.CpuScalars, registers *[32]Word, memory *memory.Memory, insn, opcode, fun uint32, memTracker MemTracker, stackTracker StackTracker, features mipsevm.FeatureToggles) (memUpdated bool, effMemAddr Word, err error) {
func ExecMipsCoreStepLogic(cpu *mipsevm.CpuScalars, registers *[32]Word, memory *memory.Memory, insn, opcode, fun uint32, memTracker MemTracker, stackTracker StackTracker) (memUpdated bool, effMemAddr Word, err error) {
// j-type j/jal
if opcode == 2 || opcode == 3 {
linkReg := Word(0)
Expand Down Expand Up @@ -117,7 +117,7 @@ func ExecMipsCoreStepLogic(cpu *mipsevm.CpuScalars, registers *[32]Word, memory
}

// ALU
val := ExecuteMipsInstruction(insn, opcode, fun, rs, rt, mem, features)
val := ExecuteMipsInstruction(insn, opcode, fun, rs, rt, mem)

funSel := uint32(0x1c)
if !arch.IsMips32 {
Expand Down Expand Up @@ -182,7 +182,7 @@ func assertMips64Fun(fun uint32) {
}
}

func ExecuteMipsInstruction(insn uint32, opcode uint32, fun uint32, rs, rt, mem Word, features mipsevm.FeatureToggles) Word {
func ExecuteMipsInstruction(insn uint32, opcode uint32, fun uint32, rs, rt, mem Word) Word {
if opcode == 0 || (opcode >= 8 && opcode < 0xF) || (!arch.IsMips32 && (opcode == 0x18 || opcode == 0x19)) {
// transform ArithLogI to SPECIAL
switch opcode {
Expand Down Expand Up @@ -350,7 +350,7 @@ func ExecuteMipsInstruction(insn uint32, opcode uint32, fun uint32, rs, rt, mem
rs <<= 1
}
return Word(i)
case features.SupportDclzDclo && (fun == 0x24 || fun == 0x25): // dclz, dclo
case fun == 0x24 || fun == 0x25: // dclz, dclo
assertMips64Fun(insn)
if fun == 0x24 {
rs = ^rs
Expand Down
3 changes: 0 additions & 3 deletions cannon/mipsevm/iface.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ type Metadata interface {
// Toggles here are temporary and should be removed once the newer state version is deployed widely. The older
// version can then be supported via multicannon pulling in a specific build and support for it dropped in latest code.
type FeatureToggles struct {
SupportMinimalSysEventFd2 bool
SupportDclzDclo bool
SupportNoopMprotect bool
SupportWorkingSysGetRandom bool
}

Expand Down
44 changes: 39 additions & 5 deletions cannon/mipsevm/memory/binary_tree.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
package memory

import (
"fmt"
"math/bits"

"github.com/ethereum-optimism/optimism/cannon/mipsevm/arch"
)

const (
defaultCodeSize = 128 * 1024 * 1024 // 128 MiB
defaultHeapSize = 512 * 1024 * 1024 // 512 MiB
)

// BinaryTreeIndex is a representation of the state of the memory in a binary merkle tree.
Expand All @@ -12,13 +20,39 @@ type BinaryTreeIndex struct {
pageTable map[Word]*CachedPage
}

func NewBinaryTreeMemory() *Memory {
pages := make(map[Word]*CachedPage)
func NewBinaryTreeMemory(codeSize, heapSize arch.Word) *Memory {
pages := make(map[arch.Word]*CachedPage)
index := NewBinaryTreeIndex(pages)

if codeSize == 0 {
codeSize = defaultCodeSize
}
if heapSize == 0 {
heapSize = defaultHeapSize
}

// Defensive bounds: code region must not overlap heap start
if codeSize > arch.ProgramHeapStart {
panic(fmt.Sprintf("codeSize (0x%x) overlaps heap start (0x%x)", codeSize, arch.ProgramHeapStart))
}

indexedRegions := make([]MappedMemoryRegion, 2)
indexedRegions[0] = MappedMemoryRegion{
startAddr: 0,
endAddr: codeSize,
Data: make([]byte, codeSize),
}
indexedRegions[1] = MappedMemoryRegion{
startAddr: arch.ProgramHeapStart,
endAddr: arch.ProgramHeapStart + heapSize,
Data: make([]byte, heapSize),
}

return &Memory{
merkleIndex: index,
pageTable: pages,
lastPageKeys: [2]Word{^Word(0), ^Word(0)}, // default to invalid keys, to not match any pages
merkleIndex: index,
pageTable: pages,
lastPageKeys: [2]arch.Word{^arch.Word(0), ^arch.Word(0)},
MappedRegions: indexedRegions,
}
}

Expand Down
Loading