Skip to content

Commit 3328cd1

Browse files
committed
feat(devnet): optimize Docker builds, enable MPT mode, fix missing env var
- Upgrade Rust base image to 1.88-slim (Dockerfile.oracle) - Unify all Ubuntu base images from 20.04 to 22.04 - Expand .dockerignore to reduce build context by ~1.6GB - Enable MPT mode in L2 genesis (UseZktrie=false, JadeForkTime=0) - Add missing MORPH_NODE_ROLLUP_ADDRESS to node-0~3 and sentry-node-0
1 parent ef75c96 commit 3328cd1

8 files changed

Lines changed: 22 additions & 6 deletions

File tree

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
11
prover/
2+
.git/
3+
contracts/node_modules/
4+
ops/reth-cross-test/
5+
ops/publicnode/
6+
docs/

ops/docker/Dockerfile.l1-beacon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=linux/amd64 ubuntu:20.04 as chain-genesis
1+
FROM --platform=linux/amd64 ubuntu:22.04 as chain-genesis
22
RUN apt-get update && ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime && apt-get install build-essential curl wget git make pkg-config -y
33
RUN curl -o prysmctl -fLO https://github.com/prysmaticlabs/prysm/releases/download/v4.2.1/prysmctl-v4.2.1-linux-amd64
44
RUN chmod +x prysmctl

ops/docker/Dockerfile.oracle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
FROM rust:1.70 as builder
1+
FROM rust:1.88-slim as builder
2+
3+
RUN apt-get -qq update && apt-get -qq install -y --no-install-recommends \
4+
pkg-config libssl-dev && rm -rf /var/lib/apt/lists/*
25

36
COPY ./gas-oracle /gas-oracle
47

ops/docker/docker-compose-4nodes.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ services:
238238
- MORPH_NODE_L1_ETH_RPC=${L1_ETH_RPC}
239239
- MORPH_NODE_SYNC_DEPOSIT_CONTRACT_ADDRESS=${MORPH_PORTAL:-0x6900000000000000000000000000000000000001}
240240
- MORPH_NODE_L1_CONFIRMATIONS=0
241+
- MORPH_NODE_ROLLUP_ADDRESS=${MORPH_ROLLUP:-0x6900000000000000000000000000000000000010}
241242
- MORPH_NODE_SYNC_START_HEIGHT=${MORPH_NODE_SYNC_START_HEIGHT:-1}
242243
- MORPH_NODE_UPGRADE_BATCH_TIME=${BATCH_UPGRADE_TIME}
243244
volumes:
@@ -266,6 +267,7 @@ services:
266267
- MORPH_NODE_L1_ETH_RPC=${L1_ETH_RPC}
267268
- MORPH_NODE_SYNC_DEPOSIT_CONTRACT_ADDRESS=${MORPH_PORTAL:-0x6900000000000000000000000000000000000001}
268269
- MORPH_NODE_L1_CONFIRMATIONS=0
270+
- MORPH_NODE_ROLLUP_ADDRESS=${MORPH_ROLLUP:-0x6900000000000000000000000000000000000010}
269271
- MORPH_NODE_SYNC_START_HEIGHT=${MORPH_NODE_SYNC_START_HEIGHT:-1}
270272
- MORPH_NODE_UPGRADE_BATCH_TIME=${BATCH_UPGRADE_TIME}
271273
volumes:
@@ -295,6 +297,7 @@ services:
295297
- MORPH_NODE_L1_ETH_RPC=${L1_ETH_RPC}
296298
- MORPH_NODE_SYNC_DEPOSIT_CONTRACT_ADDRESS=${MORPH_PORTAL:-0x6900000000000000000000000000000000000001}
297299
- MORPH_NODE_L1_CONFIRMATIONS=0
300+
- MORPH_NODE_ROLLUP_ADDRESS=${MORPH_ROLLUP:-0x6900000000000000000000000000000000000010}
298301
- MORPH_NODE_SYNC_START_HEIGHT=${MORPH_NODE_SYNC_START_HEIGHT:-1}
299302
- MORPH_NODE_UPGRADE_BATCH_TIME=${BATCH_UPGRADE_TIME}
300303
volumes:
@@ -324,6 +327,7 @@ services:
324327
- MORPH_NODE_L1_ETH_RPC=${L1_ETH_RPC}
325328
- MORPH_NODE_SYNC_DEPOSIT_CONTRACT_ADDRESS=${MORPH_PORTAL:-0x6900000000000000000000000000000000000001}
326329
- MORPH_NODE_L1_CONFIRMATIONS=0
330+
- MORPH_NODE_ROLLUP_ADDRESS=${MORPH_ROLLUP:-0x6900000000000000000000000000000000000010}
327331
- MORPH_NODE_SYNC_START_HEIGHT=${MORPH_NODE_SYNC_START_HEIGHT:-1}
328332
- MORPH_NODE_UPGRADE_BATCH_TIME=${BATCH_UPGRADE_TIME}
329333
volumes:
@@ -378,6 +382,7 @@ services:
378382
- MORPH_NODE_L1_ETH_RPC=${L1_ETH_RPC}
379383
- MORPH_NODE_SYNC_DEPOSIT_CONTRACT_ADDRESS=${MORPH_PORTAL:-0x6900000000000000000000000000000000000001}
380384
- MORPH_NODE_L1_CONFIRMATIONS=0
385+
- MORPH_NODE_ROLLUP_ADDRESS=${MORPH_ROLLUP:-0x6900000000000000000000000000000000000010}
381386
- MORPH_NODE_SYNC_START_HEIGHT=${MORPH_NODE_SYNC_START_HEIGHT:-1}
382387
volumes:
383388
- ".devnet/node4:${NODE_DATA_DIR}"

ops/docker/go-rust-builder.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ARG GO_VERSION=1.24.0
22
ARG RUST_VERSION=nightly-2022-12-10
33
ARG CARGO_CHEF_TAG=0.1.41
44

5-
FROM ubuntu:20.04
5+
FROM ubuntu:22.04
66

77
RUN apt-get update && ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime
88

ops/docker/intermediate/go-rust-builder.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ARG GO_VERSION=1.24.0
22
ARG RUST_VERSION=nightly-2023-12-03
33
ARG CARGO_CHEF_TAG=0.1.41
44

5-
FROM ubuntu:20.04
5+
FROM ubuntu:22.04
66

77
RUN apt-get update --fix-missing && ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime
88

ops/docker/intermediate/go-ubuntu-builder.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG GO_VERSION=1.24
22

3-
FROM ubuntu:20.04
3+
FROM ubuntu:22.04
44

55
RUN apt-get update --fix-missing && ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime
66

ops/l2-genesis/morph-chain-ops/genesis/genesis.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,11 @@ func NewL2Genesis(config *DeployConfig, block *types.Block) (*core.Genesis, erro
7575
EmeraldTime: emeraldTime,
7676
TerminalTotalDifficulty: big.NewInt(0),
7777
Morph: params.MorphConfig{
78-
UseZktrie: true,
78+
UseZktrie: false,
7979
MaxTxPayloadBytesPerBlock: &maxTxPayloadBytesPerBlock,
8080
FeeVaultAddress: &sequencerFeeVaultReceipt,
8181
},
82+
JadeForkTime: new(uint64),
8283
}
8384

8485
gasLimit := config.L2GenesisBlockGasLimit
@@ -88,6 +89,8 @@ func NewL2Genesis(config *DeployConfig, block *types.Block) (*core.Genesis, erro
8889
var baseFee *big.Int
8990
if config.L2GenesisBlockBaseFeePerGas != nil {
9091
baseFee = config.L2GenesisBlockBaseFeePerGas.ToInt()
92+
} else {
93+
baseFee = big.NewInt(1_000_000)
9194
}
9295

9396
difficulty := config.L2GenesisBlockDifficulty

0 commit comments

Comments
 (0)