Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
f37c7f6
update
zjg555543 Oct 20, 2025
d225f75
update
zjg555543 Oct 20, 2025
63d102f
update
zjg555543 Oct 20, 2025
87b8dda
update
zjg555543 Oct 20, 2025
b2ca3b8
update
zjg555543 Oct 20, 2025
b9ce006
Update m1 script
Vui-Chee Oct 20, 2025
4985458
Fix conditional check for .env file
Vui-Chee Oct 20, 2025
79d6f88
Update deploy contracts script `OKB_TOKEN_ADDRESS`
Vui-Chee Oct 20, 2025
d4f59fc
Push m1 updates
Vui-Chee Oct 20, 2025
fc1a4ac
Update M2 to follow M1
Vui-Chee Oct 20, 2025
a456f54
Step 3 updates
Vui-Chee Oct 20, 2025
1aae435
update
zjg555543 Oct 20, 2025
99e0edb
update
zjg555543 Oct 20, 2025
7396bcc
Change tarfile name in m1 and m2 scripts
Vui-Chee Oct 20, 2025
f4735a2
Update m3 script
Vui-Chee Oct 20, 2025
26a0985
update
zjg555543 Oct 20, 2025
f13fd2d
update
zjg555543 Oct 20, 2025
4e4014c
Merge branch 'pre-release' into zjg/pre-release-v1
zjg555543 Oct 20, 2025
d2382b7
update
zjg555543 Oct 20, 2025
663b7d8
update
zjg555543 Oct 20, 2025
b10494c
update
zjg555543 Oct 20, 2025
275ecfb
update
zjg555543 Oct 20, 2025
3aa5602
update
zjg555543 Oct 21, 2025
a9c40f7
Reorder image vars
Vui-Chee Oct 21, 2025
fb199ef
Omit .env as m2 runs in host
Vui-Chee Oct 21, 2025
a6a975e
Changes to m3
Vui-Chee Oct 21, 2025
dcb624a
Update m1 to load m2 and m3 scripts
Vui-Chee Oct 21, 2025
80bd57a
Update m2
Vui-Chee Oct 21, 2025
f81b80b
Drop m2 script
Vui-Chee Oct 21, 2025
8a9891e
Push new m2
Vui-Chee Oct 21, 2025
d73e08e
update
zjg555543 Oct 21, 2025
1b83781
update
zjg555543 Oct 21, 2025
4eae2ff
update
zjg555543 Oct 21, 2025
62ad720
update
zjg555543 Oct 21, 2025
7bfbac9
Update README with new m1/m2 scripts
Vui-Chee Oct 21, 2025
32864e0
Omit date suffix from backup dir name
Vui-Chee Oct 21, 2025
4d645ab
update
zjg555543 Oct 21, 2025
8b06b8c
Update mount path for run container
Vui-Chee Oct 21, 2025
2afc183
update
zjg555543 Oct 21, 2025
a5f4488
Merge branch 'zjg/pre-release-v1' of github.com:okx/optimism into zjg…
zjg555543 Oct 21, 2025
f7df6df
update
zjg555543 Oct 21, 2025
03206d6
To check block need to specify block number before
Vui-Chee Oct 21, 2025
07d111a
update
zjg555543 Oct 21, 2025
1cec218
increase retry
cliff0412 Oct 21, 2025
c64c6ad
Merge branch 'zjg/pre-release-v1' of github.com:okx/optimism into zjg…
cliff0412 Oct 21, 2025
d49c6ed
refactor
cliff0412 Oct 21, 2025
ccf4734
increase timeout
cliff0412 Oct 21, 2025
d002356
update
zjg555543 Oct 21, 2025
4fcbf26
Merge pull request #92 from okx/zjg/pre-release-v2
zjg555543 Oct 21, 2025
386074a
update
zjg555543 Oct 21, 2025
7a42ae3
Drop sleeps
Vui-Chee Oct 21, 2025
cb20ed6
update
zjg555543 Oct 21, 2025
f1fef64
before/after configs check
Vui-Chee Oct 21, 2025
7677642
Set `EXPECTED_L1_CHAIN_ID` for fakemainnet
Vui-Chee Oct 21, 2025
7eb96e8
Fix print configuration issues
Vui-Chee Oct 22, 2025
8fcb04b
Fix timestamp not showing
Vui-Chee Oct 22, 2025
ef50ec4
Merge branch 'pre-release' into zjg/pre-release-v3
Vui-Chee Oct 22, 2025
4b16c55
update
zjg555543 Oct 22, 2025
7ca676a
Merge branch 'pre-release' into zjg/pre-release-v3
zjg555543 Oct 22, 2025
83543bf
recover
zjg555543 Oct 22, 2025
edff6b0
set deployer as systemConfigOwner first, after setup cgt finish, tran…
doutv Oct 22, 2025
b619749
Add OKB adapter owner address to SetupCustomGasToken script
doutv Oct 22, 2025
da1a886
update
zjg555543 Oct 22, 2025
dd27e7d
Enhance SetupCustomGasToken script to transfer adapter ownership
doutv Oct 22, 2025
7aba676
update
zjg555543 Oct 22, 2025
1a6c909
Update `l2GenesisBlockBaseFeePerGas` in fakemainnet intent
Vui-Chee Oct 22, 2025
354f6bd
Fix duplicate eip1559Denominator values
Vui-Chee Oct 22, 2025
ec0d271
updates to m2
Vui-Chee Oct 22, 2025
457f960
Remove logs for these fields
Vui-Chee Oct 22, 2025
2e986c9
Drop previous builds before building image
Vui-Chee Oct 22, 2025
601730d
prompt delete backup dir if exists
Vui-Chee Oct 22, 2025
7c36156
Print sth if delete
Vui-Chee Oct 22, 2025
086988c
Print `SystemConfigProxy` after regenesis
Vui-Chee Oct 22, 2025
4c41773
update
zjg555543 Oct 22, 2025
8308799
Merge branch 'pre-release' into zjg/pre-release-v3
zjg555543 Oct 23, 2025
1230a92
Merge branch 'zjg/jason/mainnet-cgt-config' into zjg/pre-release-v3
zjg555543 Oct 23, 2025
2fb8bf7
Match rollup.json `eip1559DenominatorCanyon` after
Vui-Chee Oct 23, 2025
c8c0b37
Report removal of upload dir
Vui-Chee Oct 23, 2025
a99b2e3
Reduce verbosity and log upload filename
Vui-Chee Oct 23, 2025
6a9cf0a
Tidy last log at shutdown
Vui-Chee Oct 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions test-pp-op/2-deploy-op-contracts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,31 @@ deploy_custom_gas_token() {
echo "🔧 Setting up Custom Gas Token (CGT) configuration..."
echo ""

# Extract parameters from intent.toml BEFORE changing directory
GAS_LIMIT=$(grep -E "^[[:space:]]*gasLimit[[:space:]]*=" "$CONFIG_DIR/intent.toml" | sed -E 's/^[[:space:]]*gasLimit[[:space:]]*=[[:space:]]*([0-9]+).*/\1/')
EIP1559_DENOMINATOR=$(grep -E "^[[:space:]]*eip1559Denominator[[:space:]]*=" "$CONFIG_DIR/intent.toml" | sed -E 's/^[[:space:]]*eip1559Denominator[[:space:]]*=[[:space:]]*([0-9]+).*/\1/')
EIP1559_ELASTICITY=$(grep -E "^[[:space:]]*eip1559Elasticity[[:space:]]*=" "$CONFIG_DIR/intent.toml" | sed -E 's/^[[:space:]]*eip1559Elasticity[[:space:]]*=[[:space:]]*([0-9]+).*/\1/')

echo "📋 Configuration from intent.toml:"
echo " Gas Limit: $GAS_LIMIT"
echo " EIP1559 Denominator: $EIP1559_DENOMINATOR"
echo " EIP1559 Elasticity: $EIP1559_ELASTICITY"
echo ""

# Validate extracted parameters
if [ -z "$GAS_LIMIT" ]; then
echo "❌ Failed to extract gasLimit from intent.toml"
exit 1
fi
if [ -z "$EIP1559_DENOMINATOR" ]; then
echo "❌ Failed to extract eip1559Denominator from intent.toml"
exit 1
fi
if [ -z "$EIP1559_ELASTICITY" ]; then
echo "❌ Failed to extract eip1559Elasticity from intent.toml"
exit 1
fi

SYSTEM_CONFIG_PROXY_ADDRESS=$(jq -r '.opChainDeployments[0].SystemConfigProxy' "$CONFIG_DIR/state.json")
OPTIMISM_PORTAL_PROXY_ADDRESS=$(jq -r '.opChainDeployments[0].OptimismPortalProxy' "$CONFIG_DIR/state.json")

Expand Down Expand Up @@ -282,6 +307,38 @@ deploy_custom_gas_token() {
echo " Adapter: $ADAPTER_ADDRESS"
echo ""

# Set gas config to 0 for custom gas token (Ecotone upgrade)
echo "🔧 Setting gas config for Ecotone (Custom Gas Token)..."
cast send "$SYSTEM_CONFIG_PROXY_ADDRESS" \
"setGasConfigEcotone(uint32,uint32)" \
0 \
0 \
--rpc-url "$L1_RPC_URL" \
--private-key "$DEPLOYER_PRIVATE_KEY"
echo "✅ Gas config set to (0, 0) for Custom Gas Token"
echo ""

# Set gas limit
echo "🔧 Setting gas limit to $GAS_LIMIT..."
cast send "$SYSTEM_CONFIG_PROXY_ADDRESS" \
"setGasLimit(uint64)" \
"$GAS_LIMIT" \
--rpc-url "$L1_RPC_URL" \
--private-key "$DEPLOYER_PRIVATE_KEY"
echo "✅ Gas limit set successfully"
echo ""

# Set EIP-1559 parameters
echo "🔧 Setting EIP-1559 parameters (denominator: $EIP1559_DENOMINATOR, elasticity: $EIP1559_ELASTICITY)..."
cast send "$SYSTEM_CONFIG_PROXY_ADDRESS" \
"setEIP1559Params(uint32,uint32)" \
"$EIP1559_DENOMINATOR" \
"$EIP1559_ELASTICITY" \
--rpc-url "$L1_RPC_URL" \
--private-key "$DEPLOYER_PRIVATE_KEY"
echo "✅ EIP-1559 parameters set successfully"
echo ""

# Transfer SystemConfig ownership
echo "🔧 Transferring SystemConfig ownership..."
echo ""
Expand Down
33 changes: 29 additions & 4 deletions test-pp-op/4-migrate-op.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
#!/bin/bash
set -x
set -e

# Debug mode - set to true to enable verbose output
DEBUG=${DEBUG:-false}

if [ "$DEBUG" = "true" ]; then
set -x
fi

source .env
source tools.sh
source utils.sh


prepare() {
# Check required files exist
if [ ! -f "./config-op/genesis.json" ]; then
Expand Down Expand Up @@ -151,10 +157,29 @@ migrate() {
echo "L2_NUMBER: $L2_NUMBER"
echo "L2_HASH: $L2_HASH"

jq --argjson num "$L2_NUMBER" --arg hash "$L2_HASH" \
'.genesis.l2.number = $num | .genesis.l2.hash = $hash' \
# Update eip1559DenominatorCanyon to match eip1559Denominator in rollup.json
echo "🔧 Updating eip1559DenominatorCanyon to match eip1559Denominator..."

# Extract eip1559Denominator from rollup.json
EIP1559_DENOMINATOR=$(jq -r '.chain_op_config.eip1559Denominator' config-op/rollup.json)
echo "eip1559Denominator value from rollup.json: $EIP1559_DENOMINATOR"

# Debug: Check current rollup.json structure
echo "🔍 Current rollup.json chain_op_config structure:"
jq '.chain_op_config' config-op/rollup.json

# Update rollup.json with the eip1559DenominatorCanyon value
echo "🔧 Updating rollup.json chain_op_config..."
jq --argjson denominator "$EIP1559_DENOMINATOR" \
'.chain_op_config.eip1559DenominatorCanyon = $denominator' \
config-op/rollup.json > config-op/rollup.json.tmp && mv config-op/rollup.json.tmp config-op/rollup.json

# Verify the update
echo "🔍 Updated rollup.json chain_op_config structure:"
jq '.chain_op_config' config-op/rollup.json

echo "✅ Updated eip1559DenominatorCanyon to $EIP1559_DENOMINATOR in rollup.json"

echo "finished migrate op-geth"
}

Expand Down
6 changes: 3 additions & 3 deletions test-pp-op/config-op/intent.fakemainnet.toml.bak
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ l2ContractsLocator = "file:///app/packages/contracts-bedrock/forge-artifacts"
gasLimit = 30000000
[chains.deployOverrides]
l2GenesisBlockGasLimit = "0x1C9C380"
l2GenesisBlockBaseFeePerGas = "0x5F5E100"
l2GenesisBlockBaseFeePerGas = "0x5FC01C5"
l2BlockTime = 1
[chains.customGasToken]
enabled = true
Expand All @@ -31,5 +31,5 @@ l2ContractsLocator = "file:///app/packages/contracts-bedrock/forge-artifacts"
systemConfigOwner = "0x1183f158515091c94188C13Cd16923cee663d4c4"
unsafeBlockSigner = "0xe44FaF74D0EA83D962BB8cE077F69e449c6D8c4a"
batcher = "0x02E0eF87B04FD60E7F2215D1932420a80Cc35c55"
proposer = "0x8E2e2C0fB70A26d94a9B29f75F9449c09F8CCc5A"
challenger = "0x2ada62d4B0581896c26b8627d46285A3C3078CCf"
proposer = "0xe43944421681170648e10007f73816e04f74394f"
challenger = "0x736e68af2cbf2ab0e46e4310fe5ae568b3642ff6"
2 changes: 1 addition & 1 deletion test-pp-op/config-op/intent.mainnet.toml.bak
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ l2ContractsLocator = "file:///app/packages/contracts-bedrock/forge-artifacts"
gasLimit = 30000000
[chains.deployOverrides]
l2GenesisBlockGasLimit = "0x1C9C380"
l2GenesisBlockBaseFeePerGas = "0x5F5E100"
l2GenesisBlockBaseFeePerGas = "0x5FC01C5"
l2BlockTime = 1
[chains.customGasToken]
enabled = true
Expand Down
2 changes: 1 addition & 1 deletion test-pp-op/config-op/intent.testnet.toml.bak
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ l2ContractsLocator = "file:///app/packages/contracts-bedrock/forge-artifacts"
gasLimit = 30000000
[chains.deployOverrides]
l2GenesisBlockGasLimit = "0x1C9C380"
l2GenesisBlockBaseFeePerGas = "0x5F5E100"
l2GenesisBlockBaseFeePerGas = "0x5FC01C5"
l2BlockTime = 1
[chains.customGasToken]
enabled = true
Expand Down
9 changes: 6 additions & 3 deletions test-pp-op/m1-deploy-and-upload.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash
set -e
set -x

if [ ! -f .env ];then
echo "Please create .env file."
Expand Down Expand Up @@ -32,6 +31,11 @@ echo ""
echo "=============================================="
echo "Step 2: Build op-migrate image"
echo "=============================================="

# Remove previous uploads to keep size of docker image small.
echo "🗑️ Removing existing container ${UPLOAD_DIR}..."
rm -rf $UPLOAD_DIR ${UPLOAD_DIR}.tar.gz

if [ "$SKIP_BUILD_GETH" = true ]; then
echo "⏭️ Skipping build_images.sh (--skip-geth flag detected)"
else
Expand All @@ -50,7 +54,6 @@ echo ""
echo "=============================================="
echo "Step 4: Create folder to store upload files"
echo "=============================================="
rm -rf $UPLOAD_DIR
mkdir -p $UPLOAD_DIR
mv ${IMAGE_NAME}.tar.gz $UPLOAD_DIR
cp ./m2-migrate.sh $UPLOAD_DIR
Expand All @@ -73,4 +76,4 @@ echo ""
echo "=============================================="
echo "Step 6: Upload to OSS"
echo "=============================================="
echo "Please create an OSS ticket with the MD5 hash: ${MD5_HASH}."
echo "Please create an OSS ticket using ${TAR_FILE} and its MD5 hash: ${MD5_HASH}."
Loading