Skip to content

Commit

Permalink
Merge pull request #19 from rabbitprincess/feature/v1.8.0
Browse files Browse the repository at this point in the history
Feature/v1.8.0
  • Loading branch information
rabbitprincess authored Jul 28, 2024
2 parents 2cacc97 + 4255137 commit ff125b0
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 43 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ buildx: buildx-init buildx-run buildx-bridge
buildx-init:
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t dreamcacao/builderism_init:1.7.7 \
-t dreamcacao/builderism_init:1.8.0 \
-t dreamcacao/builderism_init:latest \
--push ./init

buildx-run:
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t dreamcacao/builderism_run:1.7.7 \
-t dreamcacao/builderism_run:1.8.0 \
-t dreamcacao/builderism_run:latest \
--push ./run

Expand Down
52 changes: 25 additions & 27 deletions init/3_generate_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ config=$(cat << EOL
"l2BlockTime": 2,
"l1BlockTime": 12,
"maxSequencerDrift": 300,
"sequencerWindowSize": 200,
"channelTimeout": 120,
"maxSequencerDrift": 600,
"sequencerWindowSize": 3600,
"channelTimeout": 300,
"p2pSequencerAddress": "$SEQUENCER_ADDRESS",
"batchInboxAddress": "$BatchInboxAddress",
Expand Down Expand Up @@ -78,50 +78,48 @@ config=$(cat << EOL
"l1FeeVaultWithdrawalNetwork": 0,
"sequencerFeeVaultWithdrawalNetwork": 0,
"gasPriceOracleOverhead": 2100,
"gasPriceOracleScalar": 1000000,
"gasPriceOracleBaseFeeScalar": 1368,
"gasPriceOracleBlobBaseFeeScalar": 810949,
$govConfig
"l2GenesisBlockGasLimit": "0x1c9c380",
"l2GenesisBlockBaseFeePerGas": "0x3b9aca00",
"l2GenesisRegolithTimeOffset": "0x0",
"eip1559Denominator": 50,
"eip1559DenominatorCanyon": 250,
"eip1559Elasticity": 6,
"l2GenesisBlockGasLimit": "0x1c9c380",
"l2GenesisBlockBaseFeePerGas": "0x3b9aca00",
"l2GenesisRegolithTimeOffset": "0x0",
"l2GenesisDeltaTimeOffset": "0x0",
"l2GenesisEcotoneTimeOffset": "0x0",
"l1CancunTimeOffset": "0x0",
"l2GenesisDeltaTimeOffset": null,
"l2GenesisCanyonTimeOffset": "0x0",
"systemConfigStartBlock": 0,
"requiredProtocolVersion": "0x0000000000000000000000000000000000000000000000000000000000000000",
"recommendedProtocolVersion": "0x0000000000000000000000000000000000000000000000000000000000000000",
"faultGameAbsolutePrestate": "0x0000000000000000000000000000000000000000000000000000000000000000",
"faultGameMaxDepth": 50,
"faultGameClockExtension": 0,
"faultGameMaxClockDuration": 1200,
"requiredProtocolVersion": "0x0000000000000000000000000000000000000004000000000000000000000001",
"recommendedProtocolVersion": "0x0000000000000000000000000000000000000004000000000000000000000001",
"fundDevAccounts": false,
"faultGameAbsolutePrestate": "0x037ef3c1a487960b0e633d3e513df020c43432769f41a634d18a9595cbf53c55",
"faultGameMaxDepth": 73,
"faultGameClockExtension": 10800,
"faultGameMaxClockDuration": 302400,
"faultGameGenesisBlock": 0,
"faultGameGenesisOutputRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"faultGameSplitDepth": 14,
"faultGameSplitDepth": 30,
"faultGameWithdrawalDelay": 604800,
"preimageOracleMinProposalSize": 18000,
"preimageOracleChallengePeriod": 120,
"fundDevAccounts": false,
"useFaultProofs": false,
"preimageOracleMinProposalSize": 126000,
"preimageOracleChallengePeriod": 86400,
"proofMaturityDelaySeconds": 604800,
"disputeGameFinalityDelaySeconds": 604800,
"respectedGameType": 0
}
"disputeGameFinalityDelaySeconds": 302400,
"respectedGameType": 0,
"useFaultProofs": true
}
EOL
)

# Write the config file
cd ~/optimism/packages/contracts-bedrock && \
mkdir -p ./deployments/$DEPLOYMENT_CONTEXT && \
echo "$config" > ./deployments/$DEPLOYMENT_CONTEXT/config.json
echo "$config" > ./deployments/$DEPLOYMENT_CONTEXT/.deploy
14 changes: 7 additions & 7 deletions init/4_deploy_contract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ set -eu
echo "[4/5] : deploy contract"

cd ~/optimism/packages/contracts-bedrock && \
DEPLOY_CONFIG_PATH="./deployments/$DEPLOYMENT_CONTEXT/config.json" \
forge script scripts/Deploy.s.sol:Deploy \
DEPLOY_CONFIG_PATH="./deployments/$DEPLOYMENT_CONTEXT/.deploy" \
forge script scripts/deploy/Deploy.s.sol:Deploy \
--private-key $ADMIN_PRIVATE_KEY \
--broadcast \
--rpc-url $L1_RPC_URL \
--priority-gas-price $PRIORITY_GAS_PRICE \
--slow
--priority-gas-price $PRIORITY_GAS_PRICE

echo "run upgrader"
echo "[deploy contract done!]"

CONTRACT_ADDRESSES_PATH="./deployments/$L1_CHAIN_ID-deploy.json" \
DEPLOY_CONFIG_PATH="./deployments/$DEPLOYMENT_CONTEXT/config.json" \
DEPLOY_CONFIG_PATH="./deployments/$DEPLOYMENT_CONTEXT/.deploy" \
forge script scripts/L2Genesis.s.sol:L2Genesis \
--sig 'runWithAllUpgrades()' \
--rpc-url $L1_RPC_URL
--chain-id $L2_CHAIN_ID \
--rpc-url $L1_RPC_URL \
6 changes: 3 additions & 3 deletions init/5_export_genesis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ set -eu
echo "[5/5] : export genesis files"

cd ~/optimism/op-node
go run cmd/main.go genesis l2 \
--deploy-config ../packages/contracts-bedrock/deployments/$DEPLOYMENT_CONTEXT/config.json \
./bin/op-node genesis l2 \
--deploy-config ../packages/contracts-bedrock/deployments/$DEPLOYMENT_CONTEXT/.deploy \
--l1-deployments ../packages/contracts-bedrock/deployments/$L1_CHAIN_ID-deploy.json \
--outfile.l2 /config/genesis.json \
--outfile.rollup /config/rollup.json \
--l1-rpc $L1_RPC_URL \
--l2-allocs ../packages/contracts-bedrock/state-dump-$DEPLOYMENT_CONTEXT-ecotone.json
--l2-allocs ../packages/contracts-bedrock/state-dump-$DEPLOYMENT_CONTEXT-fjord.json

cp ../packages/contracts-bedrock/deployments/$L1_CHAIN_ID-deploy.json /config/deploy.json

Expand Down
7 changes: 4 additions & 3 deletions init/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,20 @@ RUN curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
RUN apt-get install -y nodejs && npm install -g pnpm

# install foundry
ENV FOUNDRY_VERSION=${FOUNDRY_VERSION:-nightly}
ENV FOUNDRY_VERSION=${FOUNDRY_VERSION:-nightly-ef62fdbab638a275fc19a2ff8fe8951c3bd1d9aa}
RUN curl -L https://foundry.paradigm.xyz | sudo -E bash -
RUN . ~/.bashrc && foundryup -v "$FOUNDRY_VERSION"
ENV PATH="~/.foundry/bin:${PATH}"

# clone optimism repository
ENV OP_REPO=https://github.com/ethereum-optimism/optimism.git
ENV OP_VERSION=${OP_VERSION:-v1.7.7}
ENV OP_VERSION=${OP_VERSION:-v1.8.0}
RUN mkdir -p ~/optimism && cd ~/optimism && \
git clone $OP_REPO --depth 1 --branch $OP_VERSION --single-branch . && \
git switch -c $OP_VERSION && \
git submodule update --init --recursive --depth 1 && \
go mod download && go mod tidy
go mod download && go mod tidy && \
make -C op-node VERSION=$OP_VERSION op-node

COPY *.sh /script/
RUN chmod +x /script/*.sh
Expand Down
2 changes: 1 addition & 1 deletion run/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM golang:1.22 as op
WORKDIR /app

ENV OP_REPO=https://github.com/ethereum-optimism/optimism.git
ENV OP_VERSION=${OP_VERSION:-v1.7.7}
ENV OP_VERSION=${OP_VERSION:-v1.8.0}

RUN git clone $OP_REPO --depth 1 --branch op-node/$OP_VERSION --single-branch . && \
git switch -c branch-$OP_VERSION && \
Expand Down

0 comments on commit ff125b0

Please sign in to comment.