Skip to content

Commit 66aa917

Browse files
authored
Merge pull request #11 from gattaca-com/su/bump-1.16.2
bump to 1.16.2
2 parents fbd19a7 + e70e1c4 commit 66aa917

File tree

402 files changed

+14979
-6162
lines changed

Some content is hidden

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

402 files changed

+14979
-6162
lines changed

.circleci/config.yml

Lines changed: 223 additions & 205 deletions
Large diffs are not rendered by default.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ __pycache__
5050
crytic-export
5151

5252
# ignore local asdf config
53-
.tool-versions
53+
.tool-versions

.semgrep/rules/sol-rules.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ rules:
194194
paths:
195195
exclude:
196196
- packages/contracts-bedrock/src/legacy/L1ChugSplashProxy.sol
197+
- packages/contracts-bedrock/test/invariants/FeeSplit.t.sol
197198

198199
- id: sol-style-enforce-require-msg
199200
languages: [solidity]

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ TEST_PKGS := \
230230
./op-deployer/pkg/deployer/standard/... \
231231
./op-deployer/pkg/deployer/state/... \
232232
./op-deployer/pkg/deployer/verify/... \
233-
./op-sync-tester/...
233+
./op-sync-tester/... \
234+
./op-supernode/...
234235

235236
FRAUD_PROOF_TEST_PKGS := \
236237
./op-e2e/faultproofs/...

cannon/cmd/run.go

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -147,16 +147,18 @@ func (rk rawKey) PreimageKey() [32]byte {
147147
}
148148

149149
type ProcessPreimageOracle struct {
150-
pCl *preimage.OracleClient
151-
hCl *preimage.HintWriter
152-
cmd *exec.Cmd
153-
waitErr chan error
154-
cancelIO context.CancelCauseFunc
150+
log log.Logger
151+
pCl *preimage.OracleClient
152+
hCl *preimage.HintWriter
153+
cmd *exec.Cmd
154+
waitErr chan error
155+
cancelIO context.CancelCauseFunc
156+
ioClosers ioutil.MultiCloser
155157
}
156158

157159
const clientPollTimeout = time.Second * 15
158160

159-
func NewProcessPreimageOracle(name string, args []string, stdout log.Logger, stderr log.Logger) (*ProcessPreimageOracle, error) {
161+
func NewProcessPreimageOracle(logger log.Logger, name string, args []string, stdout log.Logger, stderr log.Logger) (*ProcessPreimageOracle, error) {
160162
if name == "" {
161163
return &ProcessPreimageOracle{}, nil
162164
}
@@ -179,18 +181,23 @@ func NewProcessPreimageOracle(name string, args []string, stdout log.Logger, std
179181
pOracleRW.Reader(),
180182
pOracleRW.Writer(),
181183
}
184+
// Discourage rust programs from using color in logs.
185+
cmd.Env = append([]string{"NO_COLOR=1"}, os.Environ()...)
182186

183187
// Note that the client file descriptors are not closed when the pre-image server exits.
184188
// So we use the FilePoller to ensure that we don't get stuck in a blocking read/write.
185189
ctx, cancelIO := context.WithCancelCause(context.Background())
186190
preimageClientIO := preimage.NewFilePoller(ctx, pClientRW, clientPollTimeout)
187191
hostClientIO := preimage.NewFilePoller(ctx, hClientRW, clientPollTimeout)
188192
out := &ProcessPreimageOracle{
193+
log: logger,
189194
pCl: preimage.NewOracleClient(preimageClientIO),
190195
hCl: preimage.NewHintWriter(hostClientIO),
191196
cmd: cmd,
192197
waitErr: make(chan error),
193198
cancelIO: cancelIO,
199+
// We only close our side of the channels, the client program owns the side we pass through as extra files
200+
ioClosers: ioutil.MultiCloser{preimageClientIO, hostClientIO},
194201
}
195202
return out, nil
196203
}
@@ -237,14 +244,29 @@ func (p *ProcessPreimageOracle) Close() error {
237244
if exited, err := tryWait(1 * time.Second); exited {
238245
return err
239246
}
240-
// Politely ask the process to exit and give it some more time
241-
_ = p.cmd.Process.Signal(os.Interrupt)
247+
248+
// Close the IO streams to the preimage server to encourage it to exit
249+
if err := p.ioClosers.Close(); err != nil {
250+
p.log.Warn("Failed to close preimage oracle IO streams", "err", err)
251+
}
252+
if exited, err := tryWait(30 * time.Second); exited {
253+
return err
254+
}
255+
256+
// Politely ask the process to exit
257+
p.log.Info("Preimage server process did not exit when streams closed, sending interrupt signal")
258+
if err := p.cmd.Process.Signal(os.Interrupt); err != nil {
259+
p.log.Warn("Failed to send interrupt signal to preimage server process", "err", err)
260+
}
242261
if exited, err := tryWait(30 * time.Second); exited {
243262
return err
244263
}
245264

246-
// Force the process to exit
247-
_ = p.cmd.Process.Signal(os.Kill)
265+
// Just terminate the process
266+
p.log.Warn("Preimage server process would not exit cleanly, terminating")
267+
if err := p.cmd.Process.Kill(); err != nil {
268+
p.log.Warn("Failed to kill preimage server process", "err", err)
269+
}
248270
return <-p.waitErr
249271
}
250272

@@ -365,7 +387,7 @@ func Run(ctx *cli.Context) error {
365387

366388
poOut := Logger(os.Stdout, log.LevelInfo).With("module", "host")
367389
poErr := Logger(os.Stderr, log.LevelInfo).With("module", "host")
368-
po, err := NewProcessPreimageOracle(args[0], args[1:], poOut, poErr)
390+
po, err := NewProcessPreimageOracle(l, args[0], args[1:], poOut, poErr)
369391
if err != nil {
370392
return fmt.Errorf("failed to create pre-image oracle process: %w", err)
371393
}

devnet-sdk/contracts/constants/constants.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@ var (
2222
ProxyAdmin types.Address = common.HexToAddress("0x4200000000000000000000000000000000000018")
2323
BaseFeeVault types.Address = common.HexToAddress("0x4200000000000000000000000000000000000019")
2424
L1FeeVault types.Address = common.HexToAddress("0x420000000000000000000000000000000000001a")
25+
OperatorFeeVault types.Address = common.HexToAddress("0x420000000000000000000000000000000000001B")
2526
SchemaRegistry types.Address = common.HexToAddress("0x4200000000000000000000000000000000000020")
2627
EAS types.Address = common.HexToAddress("0x4200000000000000000000000000000000000021")
2728
CrossL2Inbox types.Address = common.HexToAddress("0x4200000000000000000000000000000000000022")
2829
L2ToL2CrossDomainMessenger types.Address = common.HexToAddress("0x4200000000000000000000000000000000000023")
2930
SuperchainETHBridge types.Address = common.HexToAddress("0x4200000000000000000000000000000000000024")
3031
ETHLiquidity types.Address = common.HexToAddress("0x4200000000000000000000000000000000000025")
3132
SuperchainTokenBridge types.Address = common.HexToAddress("0x4200000000000000000000000000000000000028")
33+
FeeSplitter types.Address = common.HexToAddress("0x420000000000000000000000000000000000002B")
3234
GovernanceToken types.Address = common.HexToAddress("0x4200000000000000000000000000000000000042")
3335
Create2Deployer types.Address = common.HexToAddress("0x13b0D85CcB8bf860b6b79AF3029fCA081AE9beF2")
3436
MultiCall3 types.Address = common.HexToAddress("0xcA11bde05977b3631167028862bE2a173976CA11")

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ require (
314314
lukechampine.com/blake3 v1.3.0 // indirect
315315
)
316316

317-
replace github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v1.101603.4-rc.1
317+
replace github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v1.101603.5-rc.1
318318

319319
// replace github.com/ethereum/go-ethereum => ../op-geth
320320

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ github.com/emicklei/dot v1.6.2 h1:08GN+DD79cy/tzN6uLCT84+2Wk9u+wvqP+Hkx/dIR8A=
238238
github.com/emicklei/dot v1.6.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s=
239239
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.4-0.20251001155152-4eb15ccedf7e h1:iy1vBIzACYUyOVyoADUwvAiq2eOPC0yVsDUdolPwQjk=
240240
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.4-0.20251001155152-4eb15ccedf7e/go.mod h1:DYj7+vYJ4cIB7zera9mv4LcAynCL5u4YVfoeUu6Wa+w=
241-
github.com/ethereum-optimism/op-geth v1.101603.4-rc.1 h1:5ByBDUKBY/IHibukF/C9kjzaTk4SxUoXH449VuDrMn4=
242-
github.com/ethereum-optimism/op-geth v1.101603.4-rc.1/go.mod h1:cnGR2M8zX91+rRQxXyNTEOEpw/IwdR8P11FQX7Xaqwk=
241+
github.com/ethereum-optimism/op-geth v1.101603.5-rc.1 h1:Ra/GD1D63qaeMARyK58UA+rcDQIznN2IBBFyzapHHVo=
242+
github.com/ethereum-optimism/op-geth v1.101603.5-rc.1/go.mod h1:cnGR2M8zX91+rRQxXyNTEOEpw/IwdR8P11FQX7Xaqwk=
243243
github.com/ethereum-optimism/superchain-registry/validation v0.0.0-20251009180028-9b4658b9b7af h1:WWz0gJM/boaUImtJnROecPirAerKCLpAU4m6Tx0ArOg=
244244
github.com/ethereum-optimism/superchain-registry/validation v0.0.0-20251009180028-9b4658b9b7af/go.mod h1:NZ816PzLU1TLv1RdAvYAb6KWOj4Zm5aInT0YpDVml2Y=
245245
github.com/ethereum/c-kzg-4844/v2 v2.1.5 h1:aVtoLK5xwJ6c5RiqO8g8ptJ5KU+2Hdquf6G3aXiHh5s=

kona/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
prestates
2+
bin
3+
build

kona/justfile

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
KONA_DIR := `realpath .`
2+
KONA_VERSION := "kona-client/v1.2.2"
3+
KONA_PRESTATE_HASH := "0x03e183aa55db11aba6c1f2f7adccad15411d44fb54285e104cb73468927de0e7"
4+
KONA_INTEROP_PRESTATE_HASH := "0x033f554908ed264b81963ad6bf8a856c7c114af950df5a6fff67c5db85886083"
5+
6+
default: build-all
7+
8+
build-all: build-prestates build-kona-host
9+
10+
build-prestates: build-cannon-prestate build-interop-prestate
11+
12+
build-cannon-prestate:
13+
@just build-prestate kona-client {{KONA_PRESTATE_HASH}}
14+
15+
build-interop-prestate:
16+
@just build-prestate kona-client-int {{KONA_INTEROP_PRESTATE_HASH}}
17+
18+
build-prestate VARIANT HASH:
19+
#!/usr/bin/env bash
20+
set -euo pipefail
21+
22+
cd "{{KONA_DIR}}"
23+
# Check if required prestate already exists
24+
if [[ -f "prestates/{{HASH}}.bin.gz" ]]; then
25+
echo "Prestate {{HASH}} for variant {{VARIANT}} already exists"
26+
exit
27+
fi
28+
echo "Building prestate..."
29+
just checkout-kona
30+
cd "{{KONA_DIR}}/build/kona"
31+
cd docker/fpvm-prestates
32+
# Delete any existing artifacts (they're in .gitignore so reset --hard won't delete them)
33+
rm -rf ../../prestate-artifacts-cannon
34+
echo just cannon {{VARIANT}} "{{KONA_VERSION}}" $(cat ../../.config/cannon_tag)
35+
just cannon {{VARIANT}} "{{KONA_VERSION}}" $(cat ../../.config/cannon_tag)
36+
37+
mkdir -p "{{KONA_DIR}}/prestates"
38+
cp ../../prestate-artifacts-cannon/prestate.bin.gz "{{KONA_DIR}}/prestates/{{HASH}}.bin.gz"
39+
40+
build-kona-host:
41+
#!/usr/bin/env bash
42+
set -euo pipefail
43+
44+
# Check if kona-host has already been built
45+
# This is a simplistic check that relies on CircleCI's cache being keyed on this file
46+
# which contains the kona version we're checking out. Locally you may need to run
47+
# just clean to force a rebuild if the kona version has changed.
48+
if [[ -f "bin/kona-host" ]]; then
49+
echo "kona-host already built. Assuming it is built from {{KONA_VERSION}}"
50+
exit
51+
fi
52+
53+
echo "Building kona-host"
54+
just checkout-kona
55+
cd "{{KONA_DIR}}/build/kona"
56+
just build-native --bin kona-host
57+
58+
mkdir -p "{{KONA_DIR}}/bin"
59+
cp "{{KONA_DIR}}/build/kona/target/debug/kona-host" "{{KONA_DIR}}/bin/kona-host"
60+
61+
checkout-kona:
62+
#!/usr/bin/env bash
63+
set -euo pipefail
64+
65+
DIR="{{KONA_DIR}}/build"
66+
mkdir -p "${DIR}"
67+
cd "${DIR}"
68+
if [[ -d kona ]]; then
69+
cd kona
70+
git fetch origin
71+
git checkout -f "{{KONA_VERSION}}"
72+
git reset --hard HEAD
73+
else
74+
git clone -b "{{KONA_VERSION}}" https://github.com/op-rs/kona kona
75+
cd kona
76+
fi
77+
78+
clean:
79+
#!/usr/bin/env bash
80+
set -euo pipefail
81+
rm -rf "{{KONA_DIR}}/build" "{{KONA_DIR}}/prestates"

0 commit comments

Comments
 (0)