Skip to content

Commit 0f3a33f

Browse files
authored
Merge upstream op-node/v1.14.1
Merges upstream op-node/v1.14.1 release tag. Pins op-node to v1.13.7 for kurtosis devnet tests.
2 parents 916db80 + ed8d2c3 commit 0f3a33f

File tree

746 files changed

+42540
-10656
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

746 files changed

+42540
-10656
lines changed

.cursor/rules/solidity-styles.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Applies to Solidity files.
6363
- `method`: `test`, `testFuzz`, or `testDiff`
6464
- `status`: `succeeds`, `reverts`, `works`, `fails`, or `benchmark`
6565
- Test contract naming:
66-
- `TargetContract_Init`: for basic setup contracts
66+
- `TargetContract_TestInit`: for basic setup contracts
6767
- `TargetContract_FunctionName_Test`: for happy path tests
6868
- `TargetContract_FunctionName_TestFail`: for sad path tests
6969
- `TargetContract_Harness`: for harness contracts

.github/cliff.toml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# git-cliff ~ configuration file
2+
# https://git-cliff.org/docs/configuration
3+
4+
[remote.github]
5+
owner = "ethereum-optimism"
6+
repo = "optimism"
7+
# token = "" # Set via the GITHUB_TOKEN environment variable.
8+
9+
[changelog]
10+
# A Tera template to be rendered for each release in the changelog.
11+
# See https://keats.github.io/tera/docs/#introduction
12+
body = """
13+
## What's Changed
14+
15+
{%- if version %} in {{ version }}{%- endif -%}
16+
{% for commit in commits %}
17+
{% if commit.remote.pr_title -%}
18+
{%- set commit_message = commit.remote.pr_title -%}
19+
{%- else -%}
20+
{%- set commit_message = commit.message -%}
21+
{%- endif -%}
22+
* {{ commit_message | split(pat="\n") | first | trim }}\
23+
{% if commit.remote.username %} by @{{ commit.remote.username }}{%- endif -%}
24+
{% if commit.remote.pr_number %} in \
25+
[#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }}) \
26+
{%- endif %}
27+
{%- endfor -%}
28+
29+
{%- if github -%}
30+
{% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
31+
{% raw %}\n{% endraw -%}
32+
## New Contributors
33+
{%- endif %}\
34+
{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
35+
* @{{ contributor.username }} made their first contribution
36+
{%- if contributor.pr_number %} in \
37+
[#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \
38+
{%- endif %}
39+
{%- endfor -%}
40+
{%- endif -%}
41+
42+
{% if version %}
43+
{% if previous.version %}
44+
**Full Changelog**: {{ self::remote_url() }}/compare/{{ previous.version }}...{{ version }}
45+
{% endif %}
46+
🚢 Docker Image: https://us-docker.pkg.dev/oplabs-tools-artifacts/images/{{ version | replace(from="/", to=":") }}
47+
{% else -%}
48+
{% raw %}\n{% endraw %}
49+
{% endif %}
50+
51+
{%- macro remote_url() -%}
52+
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
53+
{%- endmacro -%}
54+
"""
55+
# Remove leading and trailing whitespaces from the changelog's body.
56+
trim = true
57+
# A Tera template to be rendered as the changelog's footer.
58+
# See https://keats.github.io/tera/docs/#introduction
59+
footer = """
60+
<!-- generated by git-cliff -->
61+
"""
62+
# An array of regex based postprocessors to modify the changelog.
63+
# Replace the placeholder `<REPO>` with a URL.
64+
postprocessors = []
65+
66+
[git]
67+
# Parse commits according to the conventional commits specification.
68+
# See https://www.conventionalcommits.org
69+
conventional_commits = false
70+
# Exclude commits that do not match the conventional commits specification.
71+
filter_unconventional = false
72+
# Split commits on newlines, treating each line as an individual commit.
73+
split_commits = false
74+
# An array of regex based parsers to modify commit messages prior to further processing.
75+
commit_preprocessors = [{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" }]
76+
# Exclude commits that are not matched by any commit parser.
77+
filter_commits = false
78+
# Order releases topologically instead of chronologically.
79+
topo_order = false
80+
# Order of commits in each group/release within the changelog.
81+
# Allowed values: newest, oldest
82+
sort_commits = "newest"

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ index.html
2525

2626
!op-deployer/pkg/deployer/artifacts
2727

28-
2928
packages/contracts-bedrock/deployments/anvil
3029

3130
# vim
@@ -48,8 +47,10 @@ packages/contracts-bedrock/deployments/anvil
4847

4948
coverage.out
5049

51-
5250
__pycache__
5351

5452
# Ignore echidna artifacts
5553
crytic-export
54+
55+
# ignore local asdf config
56+
.tool-versions

.golangci.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ linters:
66
- asciicheck
77
- misspell
88
- errorlint
9-
- bodyclose
109

1110
# Only enabled in specific cases. See settings and exclusions below
1211
- exhaustruct

.semgrep/rules/sol-rules.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ rules:
110110
exclude:
111111
- packages/contracts-bedrock/test
112112
- packages/contracts-bedrock/scripts
113+
- ops/ai-eng/contracts-test-maintenance/prompt/prompt.md
113114

114115
- id: sol-style-input-arg-fmt
115116
languages: [solidity]
@@ -319,6 +320,7 @@ rules:
319320
exclude:
320321
- packages/contracts-bedrock/src/L1/OPContractsManager.sol
321322
- packages/contracts-bedrock/src/L1/OptimismPortal2.sol
323+
- packages/contracts-bedrock/src/L1/OptimismPortalInterop.sol
322324
- packages/contracts-bedrock/src/L2/FeeVault.sol
323325
- packages/contracts-bedrock/src/L2/OptimismMintableERC721.sol
324326
- packages/contracts-bedrock/src/L2/OptimismMintableERC721Factory.sol
@@ -327,7 +329,9 @@ rules:
327329
- packages/contracts-bedrock/src/dispute/AnchorStateRegistry.sol
328330
- packages/contracts-bedrock/src/dispute/DelayedWETH.sol
329331
- packages/contracts-bedrock/src/dispute/FaultDisputeGame.sol
332+
- packages/contracts-bedrock/src/dispute/v2/FaultDisputeGameV2.sol
330333
- packages/contracts-bedrock/src/dispute/PermissionedDisputeGame.sol
334+
- packages/contracts-bedrock/src/dispute/v2/PermissionedDisputeGameV2.sol
331335
- packages/contracts-bedrock/src/dispute/SuperFaultDisputeGame.sol
332336
- packages/contracts-bedrock/src/dispute/SuperPermissionedDisputeGame.sol
333337
- packages/contracts-bedrock/src/governance/MintManager.sol
@@ -362,3 +366,20 @@ rules:
362366
paths:
363367
exclude:
364368
- packages/contracts-bedrock/scripts/libraries/Config.sol
369+
370+
- id: sol-style-event-param-fmt
371+
languages: [solidity]
372+
severity: ERROR
373+
message: Event parameters must be named using camelCase and must not be prefixed with underscore
374+
pattern-either:
375+
# Match parameters with underscore prefix
376+
- pattern-regex: event\s+\w+\s*\([^)]*\b(?:address|uint\d*|int\d*|bytes\d*|bool|string)\s+(?:indexed\s+)?_\w+
377+
# Match unnamed parameters (type with optional indexed but no parameter name before comma or closing paren)
378+
- pattern-regex: event\s+\w+\s*\([^)]*\b(?:address|uint\d*|int\d*|bytes\d*|bool|string)\b(?:\s+indexed)?\s*[,)]
379+
# Match parameters that are all uppercase (like NEW_OWNER)
380+
- 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*[,)]
381+
paths:
382+
exclude:
383+
# LegacyMintableERC20 and the corresponding interface use legacy naming conventions.
384+
- packages/contracts-bedrock/src/legacy/LegacyMintableERC20.sol
385+
- packages/contracts-bedrock/interfaces/legacy/ILegacyMintableERC20Full.sol

.semgrep/tests/sol-rules.t.sol

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -712,3 +712,23 @@ contract SemgrepTest__sol_safety_try_catch_eip_150 {
712712
}
713713
}
714714
}
715+
716+
contract SemgrepTest__sol_style_event_param_fmt {
717+
// ok: sol-style-event-param-fmt
718+
event OwnerChanged(address previousOwner, address newOwner);
719+
720+
// ruleid: sol-style-event-param-fmt
721+
event OwnerChanged(address _previousOwner, address _newOwner);
722+
723+
// ruleid: sol-style-event-param-fmt
724+
event OwnerChanged(address);
725+
726+
// ruleid: sol-style-event-param-fmt
727+
event OwnerChanged(address NEW_OWNER);
728+
729+
// ok: sol-style-event-param-fmt
730+
event SomethingWithMint(uint256 mint);
731+
732+
// ruleid: sol-style-event-param-fmt
733+
event SomethingWithMint(uint256 _mint);
734+
}

Makefile

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ TEST_PKGS := \
228228
./packages/contracts-bedrock/scripts/checks/... \
229229
./op-dripper/... \
230230
./devnet-sdk/... \
231-
./op-acceptance-tests/... \
232231
./kurtosis-devnet/... \
233232
./op-devstack/... \
234233
./op-deployer/pkg/deployer/artifacts/... \
@@ -252,6 +251,9 @@ RPC_TEST_PKGS := \
252251
./op-deployer/pkg/deployer/pipeline/... \
253252
./op-deployer/pkg/deployer/upgrade/...
254253

254+
# All test packages used by CI (combination of all package groups)
255+
ALL_TEST_PACKAGES := $(TEST_PKGS) $(RPC_TEST_PKGS) $(FRAUD_PROOF_TEST_PKGS)
256+
255257
# Common test environment variables
256258
# For setting PARALLEL, nproc is for linux, sysctl for Mac and then fallback to 4 if neither is available
257259
define DEFAULT_TEST_ENV_VARS
@@ -284,34 +286,48 @@ go-tests-short: $(TEST_DEPS) ## Runs comprehensive Go tests with -short flag
284286
go test -short -parallel=$$PARALLEL -timeout=$(TEST_TIMEOUT) $(TEST_PKGS)
285287
.PHONY: go-tests-short
286288

287-
go-tests-short-ci: ## Runs short Go tests with gotestsum for CI (assumes deps built by CI)
289+
# Internal target for running Go tests with gotestsum for CI
290+
# Usage: make _go-tests-ci-internal GO_TEST_FLAGS="-short"
291+
_go-tests-ci-internal:
288292
@echo "Setting up test directories..."
289293
mkdir -p ./tmp/test-results ./tmp/testlogs
290294
@echo "Running Go tests with gotestsum..."
291295
$(DEFAULT_TEST_ENV_VARS) && \
292296
$(CI_ENV_VARS) && \
293-
gotestsum --format=testname \
294-
--junitfile=./tmp/test-results/results.xml \
295-
--jsonfile=./tmp/testlogs/log.json \
296-
--rerun-fails=3 \
297-
--rerun-fails-max-failures=50 \
298-
--packages="$(TEST_PKGS) $(RPC_TEST_PKGS) $(FRAUD_PROOF_TEST_PKGS)" \
299-
-- -parallel=$$PARALLEL -coverprofile=coverage.out -short -timeout=$(TEST_TIMEOUT) -tags="ci"
297+
if [ -n "$$CIRCLE_NODE_TOTAL" ] && [ "$$CIRCLE_NODE_TOTAL" -gt 1 ]; then \
298+
export NODE_INDEX=$${CIRCLE_NODE_INDEX:-0} && \
299+
export NODE_TOTAL=$${CIRCLE_NODE_TOTAL:-1} && \
300+
export PARALLEL_PACKAGES=$$(echo "$(ALL_TEST_PACKAGES)" | tr ' ' '\n' | awk -v idx=$$NODE_INDEX -v total=$$NODE_TOTAL 'NR % total == idx' | tr '\n' ' ') && \
301+
if [ -n "$$PARALLEL_PACKAGES" ]; then \
302+
echo "Node $$NODE_INDEX/$$NODE_TOTAL running packages: $$PARALLEL_PACKAGES"; \
303+
gotestsum --format=testname \
304+
--junitfile=./tmp/test-results/results-$$NODE_INDEX.xml \
305+
--jsonfile=./tmp/testlogs/log-$$NODE_INDEX.json \
306+
--rerun-fails=3 \
307+
--rerun-fails-max-failures=50 \
308+
--packages="$$PARALLEL_PACKAGES" \
309+
-- -parallel=$$PARALLEL -coverprofile=coverage-$$NODE_INDEX.out $(GO_TEST_FLAGS) -timeout=$(TEST_TIMEOUT) -tags="ci"; \
310+
else \
311+
echo "ERROR: Node $$NODE_INDEX/$$NODE_TOTAL has no packages to run! Perhaps parallelism is set too high? (ALL_TEST_PACKAGES has $$(echo '$(ALL_TEST_PACKAGES)' | wc -w) packages)"; \
312+
exit 1; \
313+
fi; \
314+
else \
315+
gotestsum --format=testname \
316+
--junitfile=./tmp/test-results/results.xml \
317+
--jsonfile=./tmp/testlogs/log.json \
318+
--rerun-fails=3 \
319+
--rerun-fails-max-failures=50 \
320+
--packages="$(ALL_TEST_PACKAGES)" \
321+
-- -parallel=$$PARALLEL -coverprofile=coverage.out $(GO_TEST_FLAGS) -timeout=$(TEST_TIMEOUT) -tags="ci"; \
322+
fi
323+
.PHONY: _go-tests-ci-internal
324+
325+
go-tests-short-ci: ## Runs short Go tests with gotestsum for CI (assumes deps built by CI)
326+
$(MAKE) _go-tests-ci-internal GO_TEST_FLAGS="-short"
300327
.PHONY: go-tests-short-ci
301328

302329
go-tests-ci: ## Runs comprehensive Go tests with gotestsum for CI (assumes deps built by CI)
303-
@echo "Setting up test directories..."
304-
mkdir -p ./tmp/test-results ./tmp/testlogs
305-
@echo "Running Go tests with gotestsum..."
306-
$(DEFAULT_TEST_ENV_VARS) && \
307-
$(CI_ENV_VARS) && \
308-
gotestsum --format=testname \
309-
--junitfile=./tmp/test-results/results.xml \
310-
--jsonfile=./tmp/testlogs/log.json \
311-
--rerun-fails=3 \
312-
--rerun-fails-max-failures=50 \
313-
--packages="$(TEST_PKGS) $(RPC_TEST_PKGS) $(FRAUD_PROOF_TEST_PKGS)" \
314-
-- -parallel=$$PARALLEL -coverprofile=coverage.out -timeout=$(TEST_TIMEOUT) -tags="ci"
330+
$(MAKE) _go-tests-ci-internal GO_TEST_FLAGS=""
315331
.PHONY: go-tests-ci
316332

317333
go-tests-fraud-proofs-ci: ## Runs fraud proofs Go tests with gotestsum for CI (assumes deps built by CI)

cannon/cmd/run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ var (
9999
RunInfoAtFlag = &cli.GenericFlag{
100100
Name: "info-at",
101101
Usage: "step pattern to print info at: " + patternHelp,
102-
Value: MustStepMatcherFlag("%100000"),
102+
Value: MustStepMatcherFlag("%1000000000"),
103103
Required: false,
104104
}
105105
RunPProfCPU = &cli.BoolFlag{

cannon/mipsevm/exec/mips_instructions.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func GetInstructionDetails(pc Word, memory *memory.Memory) (insn, opcode, fun ui
3838

3939
// ExecMipsCoreStepLogic executes a MIPS instruction that isn't a syscall nor a RMW operation
4040
// If a store operation occurred, then it returns the effective address of the store memory location.
41-
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) {
41+
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) {
4242
// j-type j/jal
4343
if opcode == 2 || opcode == 3 {
4444
linkReg := Word(0)
@@ -117,7 +117,7 @@ func ExecMipsCoreStepLogic(cpu *mipsevm.CpuScalars, registers *[32]Word, memory
117117
}
118118

119119
// ALU
120-
val := ExecuteMipsInstruction(insn, opcode, fun, rs, rt, mem, features)
120+
val := ExecuteMipsInstruction(insn, opcode, fun, rs, rt, mem)
121121

122122
funSel := uint32(0x1c)
123123
if !arch.IsMips32 {
@@ -182,7 +182,7 @@ func assertMips64Fun(fun uint32) {
182182
}
183183
}
184184

185-
func ExecuteMipsInstruction(insn uint32, opcode uint32, fun uint32, rs, rt, mem Word, features mipsevm.FeatureToggles) Word {
185+
func ExecuteMipsInstruction(insn uint32, opcode uint32, fun uint32, rs, rt, mem Word) Word {
186186
if opcode == 0 || (opcode >= 8 && opcode < 0xF) || (!arch.IsMips32 && (opcode == 0x18 || opcode == 0x19)) {
187187
// transform ArithLogI to SPECIAL
188188
switch opcode {
@@ -350,7 +350,7 @@ func ExecuteMipsInstruction(insn uint32, opcode uint32, fun uint32, rs, rt, mem
350350
rs <<= 1
351351
}
352352
return Word(i)
353-
case features.SupportDclzDclo && (fun == 0x24 || fun == 0x25): // dclz, dclo
353+
case fun == 0x24 || fun == 0x25: // dclz, dclo
354354
assertMips64Fun(insn)
355355
if fun == 0x24 {
356356
rs = ^rs

cannon/mipsevm/iface.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ type Metadata interface {
7474
// Toggles here are temporary and should be removed once the newer state version is deployed widely. The older
7575
// version can then be supported via multicannon pulling in a specific build and support for it dropped in latest code.
7676
type FeatureToggles struct {
77-
SupportMinimalSysEventFd2 bool
78-
SupportDclzDclo bool
79-
SupportNoopMprotect bool
8077
SupportWorkingSysGetRandom bool
8178
}
8279

0 commit comments

Comments
 (0)