From c373a7fd18f81cfc03aed7c55ea4201805b90ab9 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Tue, 24 Sep 2024 23:22:35 +0800 Subject: [PATCH 01/86] disable deploying contracts & enable forking anvil --- charts/l1-devnet/values.yaml | 2 +- charts/scroll-sdk/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/l1-devnet/values.yaml b/charts/l1-devnet/values.yaml index ea089885..39c7e849 100644 --- a/charts/l1-devnet/values.yaml +++ b/charts/l1-devnet/values.yaml @@ -14,7 +14,7 @@ image: tag: v0.0.4 command: - ["/bin/bash", "-c", "anvil --host 0.0.0.0 --port 8545 --chain-id ${CHAIN_ID} --state /data/state.json --state-interval 60 --slots-in-an-epoch 3"] + ["/bin/bash", "-c", "anvil --host 0.0.0.0 --port 8545 --chain-id ${CHAIN_ID} --fork-url ${L1_RPC_ENDPOINT} --fork-block-number ${L1_SHADOW_FORK_HEIGHT} --state /data/state.json --state-interval 60 --slots-in-an-epoch 3"] envFrom: - configMapRef: diff --git a/charts/scroll-sdk/values.yaml b/charts/scroll-sdk/values.yaml index cd65f0d3..5d51100f 100644 --- a/charts/scroll-sdk/values.yaml +++ b/charts/scroll-sdk/values.yaml @@ -38,7 +38,7 @@ chain-monitor: enabled: true contracts: - enabled: true + enabled: false coordinator-api: enabled: false From af7c4f0d6869ba8e3a6a0b26b128deee6abc7a9e Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Tue, 24 Sep 2024 23:54:40 +0800 Subject: [PATCH 02/86] rename --- charts/l1-devnet/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/l1-devnet/values.yaml b/charts/l1-devnet/values.yaml index 39c7e849..0e5b4b08 100644 --- a/charts/l1-devnet/values.yaml +++ b/charts/l1-devnet/values.yaml @@ -14,7 +14,7 @@ image: tag: v0.0.4 command: - ["/bin/bash", "-c", "anvil --host 0.0.0.0 --port 8545 --chain-id ${CHAIN_ID} --fork-url ${L1_RPC_ENDPOINT} --fork-block-number ${L1_SHADOW_FORK_HEIGHT} --state /data/state.json --state-interval 60 --slots-in-an-epoch 3"] + ["/bin/bash", "-c", "anvil --host 0.0.0.0 --port 8545 --chain-id ${CHAIN_ID} --fork-url ${L1_FULL_NODE_RPC_ENDPOINT} --fork-block-number ${L1_SHADOW_FORK_HEIGHT} --state /data/state.json --state-interval 60 --slots-in-an-epoch 3"] envFrom: - configMapRef: From cff5d6354c6ab087e75d9d771c64fc31c2e6b163 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Wed, 25 Sep 2024 00:43:11 +0800 Subject: [PATCH 03/86] tmp commit --- charts/scroll-sdk/values.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/charts/scroll-sdk/values.yaml b/charts/scroll-sdk/values.yaml index 5d51100f..83af4066 100644 --- a/charts/scroll-sdk/values.yaml +++ b/charts/scroll-sdk/values.yaml @@ -260,3 +260,11 @@ db: gas_oracle_password: "test1234" rollup_node_password: "test1234" rpc_gateway_password: "test1234" + scroll_rds: "your_scroll_rds_endpoint" + scroll_rds_username: "your_scroll_rds_username" + scroll_rds_db_name: "your_scroll_rds_db_name" + +l1: + scroll_chain_proxy_addr: "your_l1_scroll_chain_proxy_address" + forked_rpc_endpoint: "your_forked_l1_rpc_endpoint" + rpc_endpoint: "your_l1_rpc_endpoint" From 701e37e7b7fc3808207e73f4d24408123e4b9a32 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Wed, 25 Sep 2024 02:18:26 +0800 Subject: [PATCH 04/86] tmp commit --- charts/scroll-sdk/config.toml | 8 +++---- charts/scroll-sdk/templates/init-db-job.yaml | 14 +++++++++++++ charts/scroll-sdk/templates/init-db.yaml | 22 ++++++++++++++++++++ charts/scroll-sdk/values.yaml | 13 ++++++------ 4 files changed, 47 insertions(+), 10 deletions(-) diff --git a/charts/scroll-sdk/config.toml b/charts/scroll-sdk/config.toml index 67a7befb..0bb4d829 100644 --- a/charts/scroll-sdk/config.toml +++ b/charts/scroll-sdk/config.toml @@ -4,10 +4,10 @@ L1_RPC_ENDPOINT = "http://l1-devnet:8545" L1_RPC_ENDPOINT_WEBSOCKET = "ws://l1-devnet:8546" L2_RPC_ENDPOINT = "http://l2-sequencer:8545" -CHAIN_NAME_L1="Ethereum" -CHAIN_NAME_L2="Scroll SDK" -CHAIN_ID_L1 = 111111 -CHAIN_ID_L2 = 221122 +CHAIN_NAME_L1="Ethereum Shadowfork" +CHAIN_NAME_L2="Scroll Shadowfork" +CHAIN_ID_L1 = 1 +CHAIN_ID_L2 = 534352 L1_CONTRACT_DEPLOYMENT_BLOCK = 0 diff --git a/charts/scroll-sdk/templates/init-db-job.yaml b/charts/scroll-sdk/templates/init-db-job.yaml index 6f793857..f474e5ca 100644 --- a/charts/scroll-sdk/templates/init-db-job.yaml +++ b/charts/scroll-sdk/templates/init-db-job.yaml @@ -35,6 +35,20 @@ spec: value: {{ .Values.db.pg_password }} - name: DB_PASSWORD value: {{ .Values.db.bridge_history_password }} + - name: L1_SCROLL_CHAIN_PROXY_ADDR + value: {{ .Values.l1.scroll_chain_proxy_addr }} + - name: L1_RPC_ENDPOINT + value: {{ .Values.l1.rpc_endpoint }} + - name: SCROLL_RDS_HOST + value: {{ .Values.db.scroll_rds_host }} + - name: SCROLL_RDS_USER + value: {{ .Values.db.scroll_rds_user }} + - name: SCROLL_RDS_ROLLUP_NODE_DATABASE + value: {{ .Values.db.scroll_rds_rollup_node_database }} + - name: SCROLL_RDS_ROLLUP_NODE_PASSWORD + value: {{ .Values.db.scroll_rds_rollup_node_password }} + - name: SCROLL_RDS_PG_PORT + value: {{ .Values.db.scroll_rds_pg_port | quote }} command: ["bash", "-c", "./init-db.sh"] volumeMounts: - name: init-db diff --git a/charts/scroll-sdk/templates/init-db.yaml b/charts/scroll-sdk/templates/init-db.yaml index 4d7aa64a..2501dc5b 100644 --- a/charts/scroll-sdk/templates/init-db.yaml +++ b/charts/scroll-sdk/templates/init-db.yaml @@ -46,3 +46,25 @@ data: psql -h $PG_HOST -p $PG_PORT -U $PG_USER -c "alter default privileges in schema public grant select, update, insert on tables to $DB_USER;" psql -h $PG_HOST -p $PG_PORT -U $PG_USER -c "grant usage, select on all sequences in schema public to $DB_USER;" psql -h $PG_HOST -p $PG_PORT -U $PG_USER -c "alter default privileges in schema public grant usage, select on sequences to $DB_USER;" + + echo "Getting batch information..." + + # Get last finalized batch + export LAST_FINALIZED_BATCH=$(cast call "${L1_SCROLL_CHAIN_PROXY_ADDR}" "lastFinalizedBatchIndex()(uint256)" --rpc-url ${L1_RPC_ENDPOINT} | awk '{print $1}') + + # Calculate last committed batch + FIRST_UNCOMMITTED_BATCH=$((LAST_FINALIZED_BATCH + 1)) + while true; do + BATCH_HASH=$(cast call "${L1_SCROLL_CHAIN_PROXY_ADDR}" "committedBatches(uint256)(bytes32)" "$FIRST_UNCOMMITTED_BATCH" --rpc-url ${L1_RPC_ENDPOINT}) + if [[ $BATCH_HASH == "0x0000000000000000000000000000000000000000000000000000000000000000" ]]; then + break + fi + FIRST_UNCOMMITTED_BATCH=$((FIRST_UNCOMMITTED_BATCH + 1)) + done + export LAST_COMMITTED_BATCH=$((FIRST_UNCOMMITTED_BATCH - 1)) + + echo "SHADOW: Last Finalized Batch: $LAST_FINALIZED_BATCH Last Committed Batch: $LAST_COMMITTED_BATCH" + + # Export the variables to be used by other processes + echo "export LAST_FINALIZED_BATCH=$LAST_FINALIZED_BATCH" + echo "export LAST_COMMITTED_BATCH=$LAST_COMMITTED_BATCH" diff --git a/charts/scroll-sdk/values.yaml b/charts/scroll-sdk/values.yaml index 83af4066..663e1f6d 100644 --- a/charts/scroll-sdk/values.yaml +++ b/charts/scroll-sdk/values.yaml @@ -260,11 +260,12 @@ db: gas_oracle_password: "test1234" rollup_node_password: "test1234" rpc_gateway_password: "test1234" - scroll_rds: "your_scroll_rds_endpoint" - scroll_rds_username: "your_scroll_rds_username" - scroll_rds_db_name: "your_scroll_rds_db_name" + scroll_rds_host: "xxx" + scroll_rds_user: "yyy" + scroll_rds_rollup_node_database: "mainnet_rollup" + scroll_rds_rollup_node_password: "zzz" + scroll_rds_pg_port: "5432" l1: - scroll_chain_proxy_addr: "your_l1_scroll_chain_proxy_address" - forked_rpc_endpoint: "your_forked_l1_rpc_endpoint" - rpc_endpoint: "your_l1_rpc_endpoint" + scroll_chain_proxy_addr: "0xa13BAF47339d63B743e7Da8741db5456DAc1E556" + rpc_endpoint: "http://l1-devnet:8545" From b0deb290433e1c2710fb9b9acbb1ac804773608c Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Wed, 25 Sep 2024 02:51:13 +0800 Subject: [PATCH 05/86] bump versions --- charts/l1-devnet/Chart.yaml | 2 +- charts/scroll-sdk/Chart.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/l1-devnet/Chart.yaml b/charts/l1-devnet/Chart.yaml index 6705dd66..05640ce5 100644 --- a/charts/l1-devnet/Chart.yaml +++ b/charts/l1-devnet/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: l1-devnet helm charts name: l1-devnet -version: 0.0.3 +version: 0.0.4 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/scroll-sdk/Chart.yaml b/charts/scroll-sdk/Chart.yaml index 8ea8a19d..139faac8 100644 --- a/charts/scroll-sdk/Chart.yaml +++ b/charts/scroll-sdk/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: scroll helm charts to deploy scroll sdk name: scroll-sdk -version: 0.0.36 +version: 0.0.37 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: @@ -14,7 +14,7 @@ keywords: home: https://github.com/scroll-tech/scroll-sdk dependencies: - name: l1-devnet - version: 0.0.3 + version: 0.0.4 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: l1-devnet.enabled - name: balance-checker From e9155c468759806856022411d0ce4b630fb1f819 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Wed, 25 Sep 2024 14:12:53 +0800 Subject: [PATCH 06/86] update scripts --- charts/scroll-sdk/templates/init-db-job.yaml | 11 +++- charts/scroll-sdk/templates/init-db.yaml | 22 -------- .../templates/wait-l1-and-get-batch-info.yaml | 55 +++++++++++++++++++ charts/scroll-sdk/values.yaml | 6 +- 4 files changed, 67 insertions(+), 27 deletions(-) create mode 100644 charts/scroll-sdk/templates/wait-l1-and-get-batch-info.yaml diff --git a/charts/scroll-sdk/templates/init-db-job.yaml b/charts/scroll-sdk/templates/init-db-job.yaml index f474e5ca..f5d4613f 100644 --- a/charts/scroll-sdk/templates/init-db-job.yaml +++ b/charts/scroll-sdk/templates/init-db-job.yaml @@ -16,7 +16,7 @@ spec: - --timeout - "0" containers: - - name: init-db + - name: init-db-and-get-batch-info image: postgres:latest env: - name: PG_HOST @@ -49,15 +49,22 @@ spec: value: {{ .Values.db.scroll_rds_rollup_node_password }} - name: SCROLL_RDS_PG_PORT value: {{ .Values.db.scroll_rds_pg_port | quote }} - command: ["bash", "-c", "./init-db.sh"] + command: ["/bin/bash", "-c", "./init-db.sh && ./wait-l1-and-get-batch-info.sh"] volumeMounts: - name: init-db mountPath: /init-db.sh subPath: init-db.sh + - name: wait-l1-and-get-batch-info + mountPath: /wait-l1-and-get-batch-info.sh + subPath: wait-l1-and-get-batch-info.sh restartPolicy: Never volumes: - name: init-db configMap: name: init-db defaultMode: 0777 + - name: wait-l1-and-get-batch-info + configMap: + name: wait-l1-and-get-batch-info + defaultMode: 0777 backoffLimit: 4 diff --git a/charts/scroll-sdk/templates/init-db.yaml b/charts/scroll-sdk/templates/init-db.yaml index 2501dc5b..4d7aa64a 100644 --- a/charts/scroll-sdk/templates/init-db.yaml +++ b/charts/scroll-sdk/templates/init-db.yaml @@ -46,25 +46,3 @@ data: psql -h $PG_HOST -p $PG_PORT -U $PG_USER -c "alter default privileges in schema public grant select, update, insert on tables to $DB_USER;" psql -h $PG_HOST -p $PG_PORT -U $PG_USER -c "grant usage, select on all sequences in schema public to $DB_USER;" psql -h $PG_HOST -p $PG_PORT -U $PG_USER -c "alter default privileges in schema public grant usage, select on sequences to $DB_USER;" - - echo "Getting batch information..." - - # Get last finalized batch - export LAST_FINALIZED_BATCH=$(cast call "${L1_SCROLL_CHAIN_PROXY_ADDR}" "lastFinalizedBatchIndex()(uint256)" --rpc-url ${L1_RPC_ENDPOINT} | awk '{print $1}') - - # Calculate last committed batch - FIRST_UNCOMMITTED_BATCH=$((LAST_FINALIZED_BATCH + 1)) - while true; do - BATCH_HASH=$(cast call "${L1_SCROLL_CHAIN_PROXY_ADDR}" "committedBatches(uint256)(bytes32)" "$FIRST_UNCOMMITTED_BATCH" --rpc-url ${L1_RPC_ENDPOINT}) - if [[ $BATCH_HASH == "0x0000000000000000000000000000000000000000000000000000000000000000" ]]; then - break - fi - FIRST_UNCOMMITTED_BATCH=$((FIRST_UNCOMMITTED_BATCH + 1)) - done - export LAST_COMMITTED_BATCH=$((FIRST_UNCOMMITTED_BATCH - 1)) - - echo "SHADOW: Last Finalized Batch: $LAST_FINALIZED_BATCH Last Committed Batch: $LAST_COMMITTED_BATCH" - - # Export the variables to be used by other processes - echo "export LAST_FINALIZED_BATCH=$LAST_FINALIZED_BATCH" - echo "export LAST_COMMITTED_BATCH=$LAST_COMMITTED_BATCH" diff --git a/charts/scroll-sdk/templates/wait-l1-and-get-batch-info.yaml b/charts/scroll-sdk/templates/wait-l1-and-get-batch-info.yaml new file mode 100644 index 00000000..1943bb15 --- /dev/null +++ b/charts/scroll-sdk/templates/wait-l1-and-get-batch-info.yaml @@ -0,0 +1,55 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + {{- include "scroll-sdk.labels" $ | nindent 4 }} + name: wait-l1-and-get-batch-info +data: + wait-l1-and-get-batch-info.sh: | + #!/bin/bash + + apt-get update && apt-get install -y curl git + + echo "Waiting for L1 contract to be ready..." + while true; do + HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" -X POST --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":1}' -H "Content-Type: application/json" $L1_RPC_ENDPOINT) + if [ "$HTTP_CODE" -eq 200 ]; then + echo "L1 contract is ready!" + break + else + echo "L1 contract is not responding, HTTP code: $HTTP_CODE. Retrying in 5 seconds..." + sleep 5 + fi + done + + echo "Getting batch information..." + + curl -L https://foundry.paradigm.xyz | bash + source /root/.bashrc + foundryup + + # Get last finalized batch + export LAST_FINALIZED_BATCH=$(cast call "${L1_SCROLL_CHAIN_PROXY_ADDR}" "lastFinalizedBatchIndex()(uint256)" --rpc-url ${L1_RPC_ENDPOINT} | awk '{print $1}') + + # Calculate last committed batch + FIRST_UNCOMMITTED_BATCH=$((LAST_FINALIZED_BATCH + 1)) + echo "Starting search from batch: $FIRST_UNCOMMITTED_BATCH" + while true; do + BATCH_HASH=$(cast call "${L1_SCROLL_CHAIN_PROXY_ADDR}" "committedBatches(uint256)(bytes32)" "$FIRST_UNCOMMITTED_BATCH" --rpc-url ${L1_RPC_ENDPOINT}) + echo "Batch $FIRST_UNCOMMITTED_BATCH - Hash: $BATCH_HASH" + if [[ $BATCH_HASH == "0x0000000000000000000000000000000000000000000000000000000000000000" ]]; then + echo "Found first uncommitted batch: $FIRST_UNCOMMITTED_BATCH" + break + fi + FIRST_UNCOMMITTED_BATCH=$((FIRST_UNCOMMITTED_BATCH + 1)) + done + export LAST_COMMITTED_BATCH=$((FIRST_UNCOMMITTED_BATCH - 1)) + echo "Last committed batch: $LAST_COMMITTED_BATCH" + + echo "SHADOW: Last Finalized Batch: $LAST_FINALIZED_BATCH Last Committed Batch: $LAST_COMMITTED_BATCH" + + # Export the variables to be used by other processes + echo "export LAST_FINALIZED_BATCH=$LAST_FINALIZED_BATCH" + echo "export LAST_COMMITTED_BATCH=$LAST_COMMITTED_BATCH" + + # TODO: Add logic for copying database here diff --git a/charts/scroll-sdk/values.yaml b/charts/scroll-sdk/values.yaml index 663e1f6d..5e6ae8c5 100644 --- a/charts/scroll-sdk/values.yaml +++ b/charts/scroll-sdk/values.yaml @@ -260,10 +260,10 @@ db: gas_oracle_password: "test1234" rollup_node_password: "test1234" rpc_gateway_password: "test1234" - scroll_rds_host: "xxx" - scroll_rds_user: "yyy" + scroll_rds_host: "rds-mainnet-rollup-2.c3bqxa4vukow.us-west-2.rds.amazonaws.com" + scroll_rds_user: "mainnet_infra_team_read_only" scroll_rds_rollup_node_database: "mainnet_rollup" - scroll_rds_rollup_node_password: "zzz" + scroll_rds_rollup_node_password: "xxx" scroll_rds_pg_port: "5432" l1: From d2459c5d916e3af6c65a7860949819426bba1511 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 26 Sep 2024 02:18:15 +0800 Subject: [PATCH 07/86] add scripts --- charts/l1-devnet/values.yaml | 2 +- charts/scroll-sdk/Chart.yaml | 2 +- charts/scroll-sdk/config.toml | 4 + charts/scroll-sdk/templates/init-db-job.yaml | 39 ++++----- ...fy-l1-scroll-chain-contract-whitelist.yaml | 59 +++++++++++++ .../templates/wait-l1-and-get-batch-info.yaml | 85 ++++++++++++++++++- charts/scroll-sdk/values.yaml | 10 +-- create-env-files.sh | 4 +- 8 files changed, 171 insertions(+), 34 deletions(-) create mode 100644 charts/scroll-sdk/templates/modify-l1-scroll-chain-contract-whitelist.yaml diff --git a/charts/l1-devnet/values.yaml b/charts/l1-devnet/values.yaml index 0e5b4b08..199b7af4 100644 --- a/charts/l1-devnet/values.yaml +++ b/charts/l1-devnet/values.yaml @@ -14,7 +14,7 @@ image: tag: v0.0.4 command: - ["/bin/bash", "-c", "anvil --host 0.0.0.0 --port 8545 --chain-id ${CHAIN_ID} --fork-url ${L1_FULL_NODE_RPC_ENDPOINT} --fork-block-number ${L1_SHADOW_FORK_HEIGHT} --state /data/state.json --state-interval 60 --slots-in-an-epoch 3"] + ["/bin/bash", "-c", "anvil --host 0.0.0.0 --port 8545 --chain-id ${CHAIN_ID} --fork-url ${L1_FULLNODE_RPC_ENDPOINT} --fork-block-number ${L1_SHADOWFORK_BLOCK_NUMBER} --state /data/state.json --state-interval 60 --slots-in-an-epoch 3"] envFrom: - configMapRef: diff --git a/charts/scroll-sdk/Chart.yaml b/charts/scroll-sdk/Chart.yaml index 139faac8..d0820376 100644 --- a/charts/scroll-sdk/Chart.yaml +++ b/charts/scroll-sdk/Chart.yaml @@ -14,7 +14,7 @@ keywords: home: https://github.com/scroll-tech/scroll-sdk dependencies: - name: l1-devnet - version: 0.0.4 + version: 0.0.5 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: l1-devnet.enabled - name: balance-checker diff --git a/charts/scroll-sdk/config.toml b/charts/scroll-sdk/config.toml index 0bb4d829..1e350c27 100644 --- a/charts/scroll-sdk/config.toml +++ b/charts/scroll-sdk/config.toml @@ -115,3 +115,7 @@ RPC_GATEWAY_HOST = "l2-rpc.scrollsdk" BLOCKSCOUT_HOST = "blockscout.scrollsdk" ADMIN_SYSTEM_DASHBOARD_HOST= "admin-system-dashboard.scrollsdk" GRAFANA_HOST = "http://grafana.scrollsdk" + +[shadowfork] +L1_FULLNODE_RPC_ENDPOINT: "https://rpc.ankr.com/eth" +L1_SHADOWFORK_BLOCK_NUMBER: "20800000" diff --git a/charts/scroll-sdk/templates/init-db-job.yaml b/charts/scroll-sdk/templates/init-db-job.yaml index f5d4613f..d0efb7dc 100644 --- a/charts/scroll-sdk/templates/init-db-job.yaml +++ b/charts/scroll-sdk/templates/init-db-job.yaml @@ -18,6 +18,12 @@ spec: containers: - name: init-db-and-get-batch-info image: postgres:latest + - configMapRef: + name: l1-devnet-env + - configMapRef: + name: rollup-node-env + - configMapRef: + name: balance-checker-env env: - name: PG_HOST value: {{ .Values.db.pg_host }} @@ -27,29 +33,17 @@ spec: value: {{ .Values.db.pg_user }} - name: PG_PORT value: {{ .Values.db.pg_port | quote }} - - name: PGPASSWORD - value: {{ .Values.db.pg_password }} - name: DB_USER value: bridge_history - - name: POSTGRES_PASSWORD - value: {{ .Values.db.pg_password }} - name: DB_PASSWORD value: {{ .Values.db.bridge_history_password }} - - name: L1_SCROLL_CHAIN_PROXY_ADDR - value: {{ .Values.l1.scroll_chain_proxy_addr }} - - name: L1_RPC_ENDPOINT - value: {{ .Values.l1.rpc_endpoint }} - - name: SCROLL_RDS_HOST - value: {{ .Values.db.scroll_rds_host }} - - name: SCROLL_RDS_USER - value: {{ .Values.db.scroll_rds_user }} - - name: SCROLL_RDS_ROLLUP_NODE_DATABASE - value: {{ .Values.db.scroll_rds_rollup_node_database }} - - name: SCROLL_RDS_ROLLUP_NODE_PASSWORD - value: {{ .Values.db.scroll_rds_rollup_node_password }} - - name: SCROLL_RDS_PG_PORT - value: {{ .Values.db.scroll_rds_pg_port | quote }} - command: ["/bin/bash", "-c", "./init-db.sh && ./wait-l1-and-get-batch-info.sh"] + - name: L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR + value: {{ .Values.l1.mainnet_scroll_chain_proxy_addr }} + - name: L1_MAINNET_SCROLL_OWNER_ADDR + value: {{ .Values.l1.mainnet_scroll_owner_addr }} + - name: SCROLL_RDS_ROLLUP_NODE_DSN + value: {{ .Values.db.scroll_rds_rollup_node_dsn }} + command: ["/bin/bash", "-c", "./init-db.sh && ./wait-l1-and-get-batch-info.sh && ./modify-l1-scroll-chain-contract-whitelist.sh"] volumeMounts: - name: init-db mountPath: /init-db.sh @@ -57,6 +51,9 @@ spec: - name: wait-l1-and-get-batch-info mountPath: /wait-l1-and-get-batch-info.sh subPath: wait-l1-and-get-batch-info.sh + - name: modify-l1-scroll-chain-contract-whitelist + mountPath: /modify-l1-scroll-chain-contract-whitelist.sh + subPath: modify-l1-scroll-chain-contract-whitelist.sh restartPolicy: Never volumes: - name: init-db @@ -67,4 +64,8 @@ spec: configMap: name: wait-l1-and-get-batch-info defaultMode: 0777 + - name: modify-l1-scroll-chain-contract-whitelist + configMap: + name: modify-l1-scroll-chain-contract-whitelist + defaultMode: 0777 backoffLimit: 4 diff --git a/charts/scroll-sdk/templates/modify-l1-scroll-chain-contract-whitelist.yaml b/charts/scroll-sdk/templates/modify-l1-scroll-chain-contract-whitelist.yaml new file mode 100644 index 00000000..5ede83ac --- /dev/null +++ b/charts/scroll-sdk/templates/modify-l1-scroll-chain-contract-whitelist.yaml @@ -0,0 +1,59 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: modify-l1-scroll-chain-contract-whitelist +data: + modify-l1-scroll-chain-contract-whitelist.sh: | + #!/bin/bash + + # Function to check if a variable is set + check_var() { + if [ -z "${!1}" ]; then + echo "Error: $1 is not set" + exit 1 + fi + } + + # Check required variables + check_var L1_RPC_ENDPOINT + check_var L1_MAINNET_SCROLL_OWNER_ADDR + check_var L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR + check_var L1_COMMIT_SENDER_ADDR + check_var L1_FINALIZE_SENDER_ADDR + + # Set the balance of the Scroll owner + # We're setting it to 1000 ETH (0x3635C9ADC5DEA00000 in wei) + cast rpc --rpc-url ${L1_RPC_ENDPOINT} anvil_setBalance ${L1_MAINNET_SCROLL_OWNER_ADDR} 0x3635C9ADC5DEA00000 + + # Start impersonating the Scroll owner account + cast rpc --rpc-url ${L1_RPC_ENDPOINT} anvil_impersonateAccount ${L1_MAINNET_SCROLL_OWNER_ADDR} + + # Add a new sequencer + cast send ${L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR} --rpc-url ${L1_RPC_ENDPOINT} \ + --from ${L1_MAINNET_SCROLL_OWNER_ADDR} \ + --unlocked \ + "addSequencer(address)" \ + ${L1_COMMIT_SENDER_ADDR} + + # Add a new prover + cast send ${L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR} --rpc-url ${L1_RPC_ENDPOINT} \ + --from ${L1_MAINNET_SCROLL_OWNER_ADDR} \ + --unlocked \ + "addProver(address)" \ + ${L1_FINALIZE_SENDER_ADDR} + + # Stop impersonating the L1_MAINNET_SCROLL_OWNER_ADDR account + cast rpc --rpc-url ${L1_RPC_ENDPOINT} anvil_stopImpersonatingAccount ${L1_MAINNET_SCROLL_OWNER_ADDR} + + # Check if the new prover was successfully added + echo "SHADOW: isProver($L1_FINALIZE_SENDER_ADDR)= $(cast call ${L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR} --rpc-url ${L1_RPC_ENDPOINT} \ + "isProver(address)(bool)" \ + ${L1_FINALIZE_SENDER_ADDR})" + + # Check if the new sequencer was successfully added + echo "SHADOW: isSequencer($L1_COMMIT_SENDER_ADDR)= $(cast call ${L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR} --rpc-url ${L1_RPC_ENDPOINT} \ + "isSequencer(address)(bool)" \ + ${L1_COMMIT_SENDER_ADDR})" + + # Indicate that the process is complete + echo "SHADOW: done taking over L1 contracts" diff --git a/charts/scroll-sdk/templates/wait-l1-and-get-batch-info.yaml b/charts/scroll-sdk/templates/wait-l1-and-get-batch-info.yaml index 1943bb15..ad3407b4 100644 --- a/charts/scroll-sdk/templates/wait-l1-and-get-batch-info.yaml +++ b/charts/scroll-sdk/templates/wait-l1-and-get-batch-info.yaml @@ -8,7 +8,7 @@ data: wait-l1-and-get-batch-info.sh: | #!/bin/bash - apt-get update && apt-get install -y curl git + apt-get update && apt-get install -y curl git postgresql-client echo "Waiting for L1 contract to be ready..." while true; do @@ -29,13 +29,13 @@ data: foundryup # Get last finalized batch - export LAST_FINALIZED_BATCH=$(cast call "${L1_SCROLL_CHAIN_PROXY_ADDR}" "lastFinalizedBatchIndex()(uint256)" --rpc-url ${L1_RPC_ENDPOINT} | awk '{print $1}') + export LAST_FINALIZED_BATCH=$(cast call "${L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR}" "lastFinalizedBatchIndex()(uint256)" --rpc-url ${L1_RPC_ENDPOINT} | awk '{print $1}') # Calculate last committed batch FIRST_UNCOMMITTED_BATCH=$((LAST_FINALIZED_BATCH + 1)) echo "Starting search from batch: $FIRST_UNCOMMITTED_BATCH" while true; do - BATCH_HASH=$(cast call "${L1_SCROLL_CHAIN_PROXY_ADDR}" "committedBatches(uint256)(bytes32)" "$FIRST_UNCOMMITTED_BATCH" --rpc-url ${L1_RPC_ENDPOINT}) + BATCH_HASH=$(cast call "${L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR}" "committedBatches(uint256)(bytes32)" "$FIRST_UNCOMMITTED_BATCH" --rpc-url ${L1_RPC_ENDPOINT}) echo "Batch $FIRST_UNCOMMITTED_BATCH - Hash: $BATCH_HASH" if [[ $BATCH_HASH == "0x0000000000000000000000000000000000000000000000000000000000000000" ]]; then echo "Found first uncommitted batch: $FIRST_UNCOMMITTED_BATCH" @@ -52,4 +52,81 @@ data: echo "export LAST_FINALIZED_BATCH=$LAST_FINALIZED_BATCH" echo "export LAST_COMMITTED_BATCH=$LAST_COMMITTED_BATCH" - # TODO: Add logic for copying database here + # Database copy logic + local_sql_run() { + PGPASSWORD=$DB_PASSWORD psql -h $PG_HOST -p $PG_PORT -U $PG_USER -d $POSTGRES_DB -Aqt -c "$@" + } + + remote_sql_run() { + psql "$SCROLL_RDS_ROLLUP_NODE_DSN" -Aqt -c "$@" + } + + # Get the bundle containing the last finalized batch + BUNDLE_INDEX=$(remote_sql_run "SELECT index FROM bundle WHERE end_batch_index = $LAST_FINALIZED_BATCH") + + if [ -z "$BUNDLE_INDEX" ]; then + echo "Warning: No bundle found for the last finalized batch. Skipping bundle copy." + else + # Copy bundles + echo "SHADOW: Copying bundle containing last finalized batch (index $BUNDLE_INDEX)" + remote_sql_run "COPY (SELECT * FROM bundle WHERE index = $BUNDLE_INDEX) TO STDOUT WITH CSV HEADER" | local_sql_run "COPY bundle FROM STDIN WITH CSV HEADER" + fi + + # Copy batches + echo "SHADOW: Copying batches [$LAST_FINALIZED_BATCH, $LAST_COMMITTED_BATCH]" + remote_sql_run "COPY (SELECT * FROM batch WHERE index >= $LAST_FINALIZED_BATCH AND index <= $LAST_COMMITTED_BATCH) TO STDOUT WITH CSV HEADER" | local_sql_run "COPY batch FROM STDIN WITH CSV HEADER" + local_sql_run "UPDATE batch SET rollup_status = 3, finalize_tx_hash = NULL, finalized_at = NULL, committed_at = NOW() WHERE index > $LAST_FINALIZED_BATCH" + local_sql_run "UPDATE batch SET proving_status = 1, prover_assigned_at = NULL, total_attempts = 0, active_attempts = 0, chunk_proofs_status = 1" + + # Get the start_chunk_index for the batch between the last finalized batch and end_chunk_index for the last committed batch + # Note: The range [finalized, committed] is used to handle corner cases and ensure data integrity. + # This approach ensures that even when committed == finalized, we still retrieve the necessary parent chunk data. + # It helps to maintain data consistency and prevents potential issues in edge scenarios. + CHUNK_INDICES=$(local_sql_run " + SELECT + MIN(start_chunk_index) as start_chunk_index, + MAX(end_chunk_index) as end_chunk_index + FROM batch + WHERE index BETWEEN $LAST_FINALIZED_BATCH AND $LAST_COMMITTED_BATCH + ") + + # Extract start_chunk_index (first field) from CHUNK_INDICES + START_CHUNK_INDEX=$(echo $CHUNK_INDICES | cut -d '|' -f1) + + # Extract end_chunk_index (second field) from CHUNK_INDICES + END_CHUNK_INDEX=$(echo $CHUNK_INDICES | cut -d '|' -f2) + + # Print the values of START_CHUNK_INDEX and END_CHUNK_INDEX for verification + echo "Chunk index range: $START_CHUNK_INDEX to $END_CHUNK_INDEX" + + # Copy chunks + echo "SHADOW: Copying chunks [$START_CHUNK_INDEX, $END_CHUNK_INDEX]" + remote_sql_run "COPY (SELECT * FROM chunk WHERE index >= $START_CHUNK_INDEX AND index <= $END_CHUNK_INDEX) TO STDOUT WITH CSV HEADER" | local_sql_run "COPY chunk FROM STDIN WITH CSV HEADER" + + # Update chunks' proving status and reset attempt counters + local_sql_run "UPDATE chunk SET proving_status = 1, prover_assigned_at = NULL, total_attempts = 0, active_attempts = 0" + + # Check how many chunks were updated to verified status + UPDATED_CHUNKS_NUM=$(local_sql_run " + SELECT COUNT(*) + FROM chunk + WHERE proving_status = 4 + AND batch_hash = ( + SELECT hash + FROM batch + WHERE index = $LAST_FINALIZED_BATCH + ) + ") + echo "Number of chunks updated to verified status (proving_status = 4): $UPDATED_CHUNKS_NUM" + + # Get the start and end block numbers for the copied chunks + BLOCK_NUMBERS=$(local_sql_run "SELECT MIN(start_block_number), MAX(end_block_number) FROM chunk WHERE index >= $START_CHUNK_INDEX AND index <= $END_CHUNK_INDEX") + START_BLOCK_NUM=$(echo $BLOCK_NUMBERS | cut -d '|' -f1) + END_BLOCK_NUM=$(echo $BLOCK_NUMBERS | cut -d '|' -f2) + + # Print block number range for verification + echo "Block number range: $START_BLOCK_NUM to $END_BLOCK_NUM" + + # Copy blocks + echo "SHADOW: Copying blocks [$START_BLOCK_NUM, $END_BLOCK_NUM]" + remote_sql_run "COPY (SELECT * FROM l2_block WHERE number >= $START_BLOCK_NUM AND number <= $END_BLOCK_NUM) TO STDOUT WITH CSV HEADER" | local_sql_run "COPY l2_block FROM STDIN WITH CSV HEADER" diff --git a/charts/scroll-sdk/values.yaml b/charts/scroll-sdk/values.yaml index 5e6ae8c5..78f05d2c 100644 --- a/charts/scroll-sdk/values.yaml +++ b/charts/scroll-sdk/values.yaml @@ -260,12 +260,8 @@ db: gas_oracle_password: "test1234" rollup_node_password: "test1234" rpc_gateway_password: "test1234" - scroll_rds_host: "rds-mainnet-rollup-2.c3bqxa4vukow.us-west-2.rds.amazonaws.com" - scroll_rds_user: "mainnet_infra_team_read_only" - scroll_rds_rollup_node_database: "mainnet_rollup" - scroll_rds_rollup_node_password: "xxx" - scroll_rds_pg_port: "5432" + scroll_rds_rollup_node_dsn: "xxx" l1: - scroll_chain_proxy_addr: "0xa13BAF47339d63B743e7Da8741db5456DAc1E556" - rpc_endpoint: "http://l1-devnet:8545" + mainnet_scroll_chain_proxy_addr: "0xa13BAF47339d63B743e7Da8741db5456DAc1E556" + mainnet_scroll_owner_addr: "0x798576400F7D662961BA15C6b3F3d813447a26a6" diff --git a/create-env-files.sh b/create-env-files.sh index 6c7da000..e2f232e2 100755 --- a/create-env-files.sh +++ b/create-env-files.sh @@ -25,7 +25,7 @@ get_service_configmap_variables() { local service_name=$1 case "$service_name" in balance-checker) - echo "CHAIN_ID_L1:SCROLL_L1_RPC CHAIN_ID_L2:SCROLL_L2_RPC" + echo "L1_RPC_ENDPOINT:SCROLL_L1_RPC L2_RPC_ENDPOINT:SCROLL_L2_RPC L1_COMMIT_SENDER_ADDR:L1_COMMIT_SENDER_ADDR L1_FINALIZE_SENDER_ADDR:L1_FINALIZE_SENDER_ADDR" ;; blockscout) echo "L1_RPC_ENDPOINT:SCROLL_L1_RPC BLOCKSCOUT_DB_CONNECTION_STRING:DATABASE_URL" @@ -49,7 +49,7 @@ get_service_configmap_variables() { echo "L1_RPC_ENDPOINT:SCROLL_L1_RPC GAS_ORACLE_DB_CONNECTION_STRING:DATABASE_URL" ;; l1-devnet) - echo "CHAIN_ID_L1:CHAIN_ID" + echo "CHAIN_ID_L1:CHAIN_ID L1_FULLNODE_RPC_ENDPOINT:L1_FULLNODE_RPC_ENDPOINT L1_SHADOWFORK_BLOCK_NUMBER:L1_SHADOWFORK_BLOCK_NUMBER" ;; l1-explorer) echo "CHAIN_ID_L1:CHAIN_ID L1_EXPLORER_DB_CONNECTION_STRING:DATABASE_URL L1_RPC_ENDPOINT:ETHEREUM_JSONRPC_HTTP_URL L1_RPC_ENDPOINT:ETHEREUM_JSONRPC_TRACE_URL L1_RPC_ENDPOINT:JSON_RPC L1_RPC_ENDPOINT_WEBSOCKET:ETHEREUM_JSONRPC_WS_URL L1_EXPLORER_DB_CONNECTION_STRING:DATABASE_URL" From c0be49ec36c682f7ca3bf94276174e9458dd8046 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 26 Sep 2024 03:05:07 +0800 Subject: [PATCH 08/86] bug fixes --- charts/scroll-sdk/config.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/scroll-sdk/config.toml b/charts/scroll-sdk/config.toml index 1e350c27..f64b89a6 100644 --- a/charts/scroll-sdk/config.toml +++ b/charts/scroll-sdk/config.toml @@ -117,5 +117,5 @@ ADMIN_SYSTEM_DASHBOARD_HOST= "admin-system-dashboard.scrollsdk" GRAFANA_HOST = "http://grafana.scrollsdk" [shadowfork] -L1_FULLNODE_RPC_ENDPOINT: "https://rpc.ankr.com/eth" -L1_SHADOWFORK_BLOCK_NUMBER: "20800000" +L1_FULLNODE_RPC_ENDPOINT = "https://rpc.ankr.com/eth" +L1_SHADOWFORK_BLOCK_NUMBER = "20800000" From b6f19e7f6a663d5d156a728edfb20d0aa92570c4 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 26 Sep 2024 03:23:37 +0800 Subject: [PATCH 09/86] bump l1-devnet version --- charts/l1-devnet/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/l1-devnet/values.yaml b/charts/l1-devnet/values.yaml index 199b7af4..4351fd1f 100644 --- a/charts/l1-devnet/values.yaml +++ b/charts/l1-devnet/values.yaml @@ -11,7 +11,7 @@ controller: image: repository: scrolltech/l1-devnet pullPolicy: Always - tag: v0.0.4 + tag: v0.0.5 command: ["/bin/bash", "-c", "anvil --host 0.0.0.0 --port 8545 --chain-id ${CHAIN_ID} --fork-url ${L1_FULLNODE_RPC_ENDPOINT} --fork-block-number ${L1_SHADOWFORK_BLOCK_NUMBER} --state /data/state.json --state-interval 60 --slots-in-an-epoch 3"] From 2d6de58a119779cacd15751ddb2e3cc0fb8d94cd Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 26 Sep 2024 03:49:12 +0800 Subject: [PATCH 10/86] fix versions --- charts/l1-devnet/Chart.yaml | 2 +- charts/l1-devnet/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/l1-devnet/Chart.yaml b/charts/l1-devnet/Chart.yaml index 05640ce5..7e6dce5d 100644 --- a/charts/l1-devnet/Chart.yaml +++ b/charts/l1-devnet/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: l1-devnet helm charts name: l1-devnet -version: 0.0.4 +version: 0.0.5 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/l1-devnet/values.yaml b/charts/l1-devnet/values.yaml index 4351fd1f..199b7af4 100644 --- a/charts/l1-devnet/values.yaml +++ b/charts/l1-devnet/values.yaml @@ -11,7 +11,7 @@ controller: image: repository: scrolltech/l1-devnet pullPolicy: Always - tag: v0.0.5 + tag: v0.0.4 command: ["/bin/bash", "-c", "anvil --host 0.0.0.0 --port 8545 --chain-id ${CHAIN_ID} --fork-url ${L1_FULLNODE_RPC_ENDPOINT} --fork-block-number ${L1_SHADOWFORK_BLOCK_NUMBER} --state /data/state.json --state-interval 60 --slots-in-an-epoch 3"] From 2af58032242b43ecc07b5988c7dc1d61816eec08 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 26 Sep 2024 16:32:38 +0800 Subject: [PATCH 11/86] bump version --- charts/l1-devnet/Chart.yaml | 2 +- charts/scroll-sdk/Chart.yaml | 2 +- devnet/Makefile | 2 +- devnet/create-env-files.sh | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/l1-devnet/Chart.yaml b/charts/l1-devnet/Chart.yaml index 7e6dce5d..875d0521 100644 --- a/charts/l1-devnet/Chart.yaml +++ b/charts/l1-devnet/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: l1-devnet helm charts name: l1-devnet -version: 0.0.5 +version: 0.0.6 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/scroll-sdk/Chart.yaml b/charts/scroll-sdk/Chart.yaml index d0820376..3cb5a4c8 100644 --- a/charts/scroll-sdk/Chart.yaml +++ b/charts/scroll-sdk/Chart.yaml @@ -14,7 +14,7 @@ keywords: home: https://github.com/scroll-tech/scroll-sdk dependencies: - name: l1-devnet - version: 0.0.5 + version: 0.0.6 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: l1-devnet.enabled - name: balance-checker diff --git a/devnet/Makefile b/devnet/Makefile index 20ef73ba..ea17cb22 100644 --- a/devnet/Makefile +++ b/devnet/Makefile @@ -6,7 +6,7 @@ L1_RPC_HOST := l1-devnet.scrollsdk bootstrap: echo "Pulling helm chart..." - helm pull oci://ghcr.io/scroll-tech/scroll-sdk/helm/scroll-sdk + helm pull oci://ghcr.io/scroll-tech/scroll-sdk/helm/dev/scroll-sdk --version 0.0.37 echo "Extracting helm chart..." tar -xvf *.tgz $(MAKE) config diff --git a/devnet/create-env-files.sh b/devnet/create-env-files.sh index d844f9ce..d4d39c0f 100755 --- a/devnet/create-env-files.sh +++ b/devnet/create-env-files.sh @@ -52,7 +52,7 @@ get_service_configmap_variables() { echo "L1_RPC_ENDPOINT:SCROLL_L1_RPC GAS_ORACLE_DB_CONNECTION_STRING:SCROLL_ROLLUP_DB_CONFIG_DSN L2_GAS_ORACLE_SENDER_PRIVATE_KEY:SCROLL_ROLLUP_L1_CONFIG_RELAYER_CONFIG_GAS_ORACLE_SENDER_PRIVATE_KEY L1_GAS_ORACLE_SENDER_PRIVATE_KEY:SCROLL_ROLLUP_L2_CONFIG_RELAYER_CONFIG_GAS_ORACLE_SENDER_PRIVATE_KEY" ;; l1-devnet) - echo "CHAIN_ID_L1:CHAIN_ID" + echo "CHAIN_ID_L1:CHAIN_ID L1_FULLNODE_RPC_ENDPOINT:L1_FULLNODE_RPC_ENDPOINT L1_SHADOWFORK_BLOCK_NUMBER:L1_SHADOWFORK_BLOCK_NUMBER" ;; l1-explorer) echo "CHAIN_ID_L1:CHAIN_ID L1_RPC_ENDPOINT:ETHEREUM_JSONRPC_HTTP_URL L1_RPC_ENDPOINT:ETHEREUM_JSONRPC_TRACE_URL L1_RPC_ENDPOINT:JSON_RPC L1_RPC_ENDPOINT_WEBSOCKET:ETHEREUM_JSONRPC_WS_URL L1_EXPLORER_DB_CONNECTION_STRING:DATABASE_URL" @@ -67,7 +67,7 @@ get_service_configmap_variables() { echo "CHAIN_ID_L2:CHAIN_ID L1_RPC_ENDPOINT:L2GETH_L1_ENDPOINT L2GETH_SIGNER_ADDRESS:L2GETH_SIGNER_ADDRESS L1_CONTRACT_DEPLOYMENT_BLOCK:L2GETH_L1_CONTRACT_DEPLOYMENT_BLOCK L2GETH_KEYSTORE:L2GETH_KEYSTORE L2GETH_PASSWORD:L2GETH_PASSWORD L2GETH_NODEKEY:L2GETH_NODEKEY" ;; rollup-node) - echo "L1_RPC_ENDPOINT:L1_RPC_ENDPOINT L2_RPC_ENDPOINT:L2_RPC_ENDPOINT ROLLUP_NODE_DB_CONNECTION_STRING:SCROLL_ROLLUP_DB_CONFIG_DSN L1_SCROLL_CHAIN_PROXY_ADDR:L1_SCROLL_CHAIN_PROXY_ADDR L1_COMMIT_SENDER_PRIVATE_KEY:SCROLL_ROLLUP_L2_CONFIG_RELAYER_CONFIG_COMMIT_SENDER_PRIVATE_KEY L1_FINALIZE_SENDER_PRIVATE_KEY:SCROLL_ROLLUP_L2_CONFIG_RELAYER_CONFIG_FINALIZE_SENDER_PRIVATE_KEY" + echo "L1_RPC_ENDPOINT:L1_RPC_ENDPOINT L2_RPC_ENDPOINT:L2_RPC_ENDPOINT ROLLUP_NODE_DB_CONNECTION_STRING:SCROLL_ROLLUP_DB_CONFIG_DSN L1_SCROLL_CHAIN_PROXY_ADDR:L1_SCROLL_CHAIN_PROXY_ADDR L1_COMMIT_SENDER_PRIVATE_KEY:SCROLL_ROLLUP_L2_CONFIG_RELAYER_CONFIG_COMMIT_SENDER_PRIVATE_KEY L1_FINALIZE_SENDER_PRIVATE_KEY:SCROLL_ROLLUP_L2_CONFIG_RELAYER_CONFIG_FINALIZE_SENDER_PRIVATE_KEY L1_COMMIT_SENDER_ADDR:L1_COMMIT_SENDER_ADDR L1_FINALIZE_SENDER_ADDR:L1_FINALIZE_SENDER_ADDR" ;; *) echo "Service $service_name not found." From ab783f21b41b90e835ce524aab938f0359b40f79 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 26 Sep 2024 17:45:09 +0800 Subject: [PATCH 12/86] update --- charts/scroll-sdk/templates/init-db-job.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/charts/scroll-sdk/templates/init-db-job.yaml b/charts/scroll-sdk/templates/init-db-job.yaml index d0efb7dc..e2090993 100644 --- a/charts/scroll-sdk/templates/init-db-job.yaml +++ b/charts/scroll-sdk/templates/init-db-job.yaml @@ -18,12 +18,11 @@ spec: containers: - name: init-db-and-get-batch-info image: postgres:latest + envFrom: - configMapRef: name: l1-devnet-env - configMapRef: name: rollup-node-env - - configMapRef: - name: balance-checker-env env: - name: PG_HOST value: {{ .Values.db.pg_host }} From 0d979bb09a1ffbfaa1c936b15cc79e2b8fd98ac1 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 26 Sep 2024 17:48:32 +0800 Subject: [PATCH 13/86] update envs --- charts/l1-devnet/Chart.yaml | 2 +- charts/scroll-sdk/Chart.yaml | 2 +- charts/scroll-sdk/templates/init-db-job.yaml | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/charts/l1-devnet/Chart.yaml b/charts/l1-devnet/Chart.yaml index 875d0521..e576f0dd 100644 --- a/charts/l1-devnet/Chart.yaml +++ b/charts/l1-devnet/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: l1-devnet helm charts name: l1-devnet -version: 0.0.6 +version: 0.0.7 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/scroll-sdk/Chart.yaml b/charts/scroll-sdk/Chart.yaml index 3cb5a4c8..84f97e90 100644 --- a/charts/scroll-sdk/Chart.yaml +++ b/charts/scroll-sdk/Chart.yaml @@ -14,7 +14,7 @@ keywords: home: https://github.com/scroll-tech/scroll-sdk dependencies: - name: l1-devnet - version: 0.0.6 + version: 0.0.7 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: l1-devnet.enabled - name: balance-checker diff --git a/charts/scroll-sdk/templates/init-db-job.yaml b/charts/scroll-sdk/templates/init-db-job.yaml index e2090993..2c7c7c7d 100644 --- a/charts/scroll-sdk/templates/init-db-job.yaml +++ b/charts/scroll-sdk/templates/init-db-job.yaml @@ -32,8 +32,12 @@ spec: value: {{ .Values.db.pg_user }} - name: PG_PORT value: {{ .Values.db.pg_port | quote }} + - name: PGPASSWORD + value: {{ .Values.db.pg_password }} - name: DB_USER value: bridge_history + - name: POSTGRES_PASSWORD + value: {{ .Values.db.pg_password }} - name: DB_PASSWORD value: {{ .Values.db.bridge_history_password }} - name: L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR From ea97c7eb2d8c52e78eced382a7289b96c44b8d31 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 26 Sep 2024 19:27:49 +0800 Subject: [PATCH 14/86] update script --- .../scroll-sdk/templates/wait-l1-and-get-batch-info.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/charts/scroll-sdk/templates/wait-l1-and-get-batch-info.yaml b/charts/scroll-sdk/templates/wait-l1-and-get-batch-info.yaml index ad3407b4..5ce4355d 100644 --- a/charts/scroll-sdk/templates/wait-l1-and-get-batch-info.yaml +++ b/charts/scroll-sdk/templates/wait-l1-and-get-batch-info.yaml @@ -28,6 +28,14 @@ data: source /root/.bashrc foundryup + echo "Checking if cast is available..." + if command -v cast &> /dev/null; then + echo "cast is available" + else + echo "cast is not available. Foundry installation might have failed." + exit 1 + fi + # Get last finalized batch export LAST_FINALIZED_BATCH=$(cast call "${L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR}" "lastFinalizedBatchIndex()(uint256)" --rpc-url ${L1_RPC_ENDPOINT} | awk '{print $1}') From 0401b9105f4c619b17b4b2fb76147cfa8b01939c Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 26 Sep 2024 23:31:20 +0800 Subject: [PATCH 15/86] tmp commit --- .../templates/get-db-info.yaml} | 4 +-- ...ake-over-commit-and-finalize-senders.yaml} | 0 charts/rollup-node/values.yaml | 28 +++++++++++++++++++ charts/scroll-sdk/templates/init-db-job.yaml | 17 +---------- 4 files changed, 31 insertions(+), 18 deletions(-) rename charts/{scroll-sdk/templates/wait-l1-and-get-batch-info.yaml => rollup-node/templates/get-db-info.yaml} (98%) rename charts/{scroll-sdk/templates/modify-l1-scroll-chain-contract-whitelist.yaml => rollup-node/templates/take-over-commit-and-finalize-senders.yaml} (100%) diff --git a/charts/scroll-sdk/templates/wait-l1-and-get-batch-info.yaml b/charts/rollup-node/templates/get-db-info.yaml similarity index 98% rename from charts/scroll-sdk/templates/wait-l1-and-get-batch-info.yaml rename to charts/rollup-node/templates/get-db-info.yaml index 5ce4355d..ddf8d956 100644 --- a/charts/scroll-sdk/templates/wait-l1-and-get-batch-info.yaml +++ b/charts/rollup-node/templates/get-db-info.yaml @@ -3,9 +3,9 @@ kind: ConfigMap metadata: labels: {{- include "scroll-sdk.labels" $ | nindent 4 }} - name: wait-l1-and-get-batch-info + name: get-db-info data: - wait-l1-and-get-batch-info.sh: | + get-db-info.sh: | #!/bin/bash apt-get update && apt-get install -y curl git postgresql-client diff --git a/charts/scroll-sdk/templates/modify-l1-scroll-chain-contract-whitelist.yaml b/charts/rollup-node/templates/take-over-commit-and-finalize-senders.yaml similarity index 100% rename from charts/scroll-sdk/templates/modify-l1-scroll-chain-contract-whitelist.yaml rename to charts/rollup-node/templates/take-over-commit-and-finalize-senders.yaml diff --git a/charts/rollup-node/values.yaml b/charts/rollup-node/values.yaml index ba2e31f9..edb4972f 100644 --- a/charts/rollup-node/values.yaml +++ b/charts/rollup-node/values.yaml @@ -20,6 +20,8 @@ env: envFrom: - configMapRef: name: rollup-node-env + - configMapRef: + name: l1-devnet-env command: [ "/bin/sh", @@ -131,6 +133,32 @@ initContainers: - name: wait-for-contracts-script mountPath: /wait-for-contract.sh subPath: wait-for-contract.sh + 5-take-over-commit-and-finalize-senders: + image: scrolltech/scroll-alpine:v0.0.1 + command: + - /bin/sh + - -c + - /take-over-commit-and-finalize-senders.sh + envFrom: + - configMapRef: + name: rollup-node-env + volumeMounts: + - name: take-over-script + mountPath: /take-over-commit-and-finalize-senders.sh + subPath: take-over-commit-and-finalize-senders.sh + 6-get-db-info: + image: scrolltech/scroll-alpine:v0.0.1 + command: + - /bin/sh + - -c + - /get-db-info.sh + envFrom: + - configMapRef: + name: rollup-node-env + volumeMounts: + - name: get-db-info-script + mountPath: /get-db-info.sh + subPath: get-db-info.sh configMaps: migrate-db: diff --git a/charts/scroll-sdk/templates/init-db-job.yaml b/charts/scroll-sdk/templates/init-db-job.yaml index 2c7c7c7d..ae2b2a78 100644 --- a/charts/scroll-sdk/templates/init-db-job.yaml +++ b/charts/scroll-sdk/templates/init-db-job.yaml @@ -18,11 +18,6 @@ spec: containers: - name: init-db-and-get-batch-info image: postgres:latest - envFrom: - - configMapRef: - name: l1-devnet-env - - configMapRef: - name: rollup-node-env env: - name: PG_HOST value: {{ .Values.db.pg_host }} @@ -46,27 +41,17 @@ spec: value: {{ .Values.l1.mainnet_scroll_owner_addr }} - name: SCROLL_RDS_ROLLUP_NODE_DSN value: {{ .Values.db.scroll_rds_rollup_node_dsn }} - command: ["/bin/bash", "-c", "./init-db.sh && ./wait-l1-and-get-batch-info.sh && ./modify-l1-scroll-chain-contract-whitelist.sh"] + command: ["/bin/bash", "-c", "./init-db.sh"] volumeMounts: - name: init-db mountPath: /init-db.sh subPath: init-db.sh - - name: wait-l1-and-get-batch-info - mountPath: /wait-l1-and-get-batch-info.sh - subPath: wait-l1-and-get-batch-info.sh - - name: modify-l1-scroll-chain-contract-whitelist - mountPath: /modify-l1-scroll-chain-contract-whitelist.sh - subPath: modify-l1-scroll-chain-contract-whitelist.sh restartPolicy: Never volumes: - name: init-db configMap: name: init-db defaultMode: 0777 - - name: wait-l1-and-get-batch-info - configMap: - name: wait-l1-and-get-batch-info - defaultMode: 0777 - name: modify-l1-scroll-chain-contract-whitelist configMap: name: modify-l1-scroll-chain-contract-whitelist From 86dcd80aab9562d9d47a7c77521c856077749420 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Fri, 27 Sep 2024 00:14:13 +0800 Subject: [PATCH 16/86] bump version --- charts/l1-devnet/Chart.yaml | 2 +- charts/rollup-node/Chart.yaml | 2 +- charts/rollup-node/templates/get-db-info.yaml | 2 +- charts/scroll-sdk/config.toml | 3 +++ charts/scroll-sdk/templates/init-db-job.yaml | 12 +----------- charts/scroll-sdk/values.yaml | 5 ----- devnet/create-env-files.sh | 2 +- 7 files changed, 8 insertions(+), 20 deletions(-) diff --git a/charts/l1-devnet/Chart.yaml b/charts/l1-devnet/Chart.yaml index e576f0dd..0e673868 100644 --- a/charts/l1-devnet/Chart.yaml +++ b/charts/l1-devnet/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: l1-devnet helm charts name: l1-devnet -version: 0.0.7 +version: 0.0.8 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/rollup-node/Chart.yaml b/charts/rollup-node/Chart.yaml index 04243540..5f2f9b32 100644 --- a/charts/rollup-node/Chart.yaml +++ b/charts/rollup-node/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: rollup-node helm charts name: rollup-node -version: 0.0.10 +version: 0.0.11 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/rollup-node/templates/get-db-info.yaml b/charts/rollup-node/templates/get-db-info.yaml index ddf8d956..6e694280 100644 --- a/charts/rollup-node/templates/get-db-info.yaml +++ b/charts/rollup-node/templates/get-db-info.yaml @@ -8,7 +8,7 @@ data: get-db-info.sh: | #!/bin/bash - apt-get update && apt-get install -y curl git postgresql-client + apt-get update && apt-get install -y git postgresql-client echo "Waiting for L1 contract to be ready..." while true; do diff --git a/charts/scroll-sdk/config.toml b/charts/scroll-sdk/config.toml index f64b89a6..84093279 100644 --- a/charts/scroll-sdk/config.toml +++ b/charts/scroll-sdk/config.toml @@ -119,3 +119,6 @@ GRAFANA_HOST = "http://grafana.scrollsdk" [shadowfork] L1_FULLNODE_RPC_ENDPOINT = "https://rpc.ankr.com/eth" L1_SHADOWFORK_BLOCK_NUMBER = "20800000" +L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR = "0xa13BAF47339d63B743e7Da8741db5456DAc1E556" +L1_MAINNET_SCROLL_OWNER_ADDR = "0x798576400F7D662961BA15C6b3F3d813447a26a6" +SCROLL_RDS_ROLLUP_NODE_DSN = "xxx" diff --git a/charts/scroll-sdk/templates/init-db-job.yaml b/charts/scroll-sdk/templates/init-db-job.yaml index ae2b2a78..a45d4561 100644 --- a/charts/scroll-sdk/templates/init-db-job.yaml +++ b/charts/scroll-sdk/templates/init-db-job.yaml @@ -16,7 +16,7 @@ spec: - --timeout - "0" containers: - - name: init-db-and-get-batch-info + - name: init-db image: postgres:latest env: - name: PG_HOST @@ -35,12 +35,6 @@ spec: value: {{ .Values.db.pg_password }} - name: DB_PASSWORD value: {{ .Values.db.bridge_history_password }} - - name: L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR - value: {{ .Values.l1.mainnet_scroll_chain_proxy_addr }} - - name: L1_MAINNET_SCROLL_OWNER_ADDR - value: {{ .Values.l1.mainnet_scroll_owner_addr }} - - name: SCROLL_RDS_ROLLUP_NODE_DSN - value: {{ .Values.db.scroll_rds_rollup_node_dsn }} command: ["/bin/bash", "-c", "./init-db.sh"] volumeMounts: - name: init-db @@ -52,8 +46,4 @@ spec: configMap: name: init-db defaultMode: 0777 - - name: modify-l1-scroll-chain-contract-whitelist - configMap: - name: modify-l1-scroll-chain-contract-whitelist - defaultMode: 0777 backoffLimit: 4 diff --git a/charts/scroll-sdk/values.yaml b/charts/scroll-sdk/values.yaml index 78f05d2c..5d51100f 100644 --- a/charts/scroll-sdk/values.yaml +++ b/charts/scroll-sdk/values.yaml @@ -260,8 +260,3 @@ db: gas_oracle_password: "test1234" rollup_node_password: "test1234" rpc_gateway_password: "test1234" - scroll_rds_rollup_node_dsn: "xxx" - -l1: - mainnet_scroll_chain_proxy_addr: "0xa13BAF47339d63B743e7Da8741db5456DAc1E556" - mainnet_scroll_owner_addr: "0x798576400F7D662961BA15C6b3F3d813447a26a6" diff --git a/devnet/create-env-files.sh b/devnet/create-env-files.sh index d4d39c0f..4e40fde1 100755 --- a/devnet/create-env-files.sh +++ b/devnet/create-env-files.sh @@ -67,7 +67,7 @@ get_service_configmap_variables() { echo "CHAIN_ID_L2:CHAIN_ID L1_RPC_ENDPOINT:L2GETH_L1_ENDPOINT L2GETH_SIGNER_ADDRESS:L2GETH_SIGNER_ADDRESS L1_CONTRACT_DEPLOYMENT_BLOCK:L2GETH_L1_CONTRACT_DEPLOYMENT_BLOCK L2GETH_KEYSTORE:L2GETH_KEYSTORE L2GETH_PASSWORD:L2GETH_PASSWORD L2GETH_NODEKEY:L2GETH_NODEKEY" ;; rollup-node) - echo "L1_RPC_ENDPOINT:L1_RPC_ENDPOINT L2_RPC_ENDPOINT:L2_RPC_ENDPOINT ROLLUP_NODE_DB_CONNECTION_STRING:SCROLL_ROLLUP_DB_CONFIG_DSN L1_SCROLL_CHAIN_PROXY_ADDR:L1_SCROLL_CHAIN_PROXY_ADDR L1_COMMIT_SENDER_PRIVATE_KEY:SCROLL_ROLLUP_L2_CONFIG_RELAYER_CONFIG_COMMIT_SENDER_PRIVATE_KEY L1_FINALIZE_SENDER_PRIVATE_KEY:SCROLL_ROLLUP_L2_CONFIG_RELAYER_CONFIG_FINALIZE_SENDER_PRIVATE_KEY L1_COMMIT_SENDER_ADDR:L1_COMMIT_SENDER_ADDR L1_FINALIZE_SENDER_ADDR:L1_FINALIZE_SENDER_ADDR" + echo "L1_RPC_ENDPOINT:L1_RPC_ENDPOINT L2_RPC_ENDPOINT:L2_RPC_ENDPOINT ROLLUP_NODE_DB_CONNECTION_STRING:SCROLL_ROLLUP_DB_CONFIG_DSN L1_SCROLL_CHAIN_PROXY_ADDR:L1_SCROLL_CHAIN_PROXY_ADDR L1_COMMIT_SENDER_PRIVATE_KEY:SCROLL_ROLLUP_L2_CONFIG_RELAYER_CONFIG_COMMIT_SENDER_PRIVATE_KEY L1_FINALIZE_SENDER_PRIVATE_KEY:SCROLL_ROLLUP_L2_CONFIG_RELAYER_CONFIG_FINALIZE_SENDER_PRIVATE_KEY L1_COMMIT_SENDER_ADDR:L1_COMMIT_SENDER_ADDR L1_FINALIZE_SENDER_ADDR:L1_FINALIZE_SENDER_ADDR L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR:L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR L1_MAINNET_SCROLL_OWNER_ADDR:L1_MAINNET_SCROLL_OWNER_ADDR SCROLL_RDS_ROLLUP_NODE_DSN:SCROLL_RDS_ROLLUP_NODE_DSN" ;; *) echo "Service $service_name not found." From 654f0f5794bb3f6666f1b52639a9044660d65615 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Fri, 27 Sep 2024 00:23:49 +0800 Subject: [PATCH 17/86] bump version --- charts/scroll-sdk/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/scroll-sdk/Chart.yaml b/charts/scroll-sdk/Chart.yaml index 84f97e90..bc467e29 100644 --- a/charts/scroll-sdk/Chart.yaml +++ b/charts/scroll-sdk/Chart.yaml @@ -98,7 +98,7 @@ dependencies: repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-explorer-backend.enabled - name: rollup-node - version: 0.0.10 + version: 0.0.11 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-node.enabled - name: rpc-gateway From e8ee7112c90dedf2d9fedda41d772cb4b2efb0f9 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Fri, 27 Sep 2024 00:29:29 +0800 Subject: [PATCH 18/86] bump rollup-node version --- charts/rollup-node/Chart.yaml | 2 +- charts/scroll-sdk/Chart.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/rollup-node/Chart.yaml b/charts/rollup-node/Chart.yaml index 5f2f9b32..5810d0a5 100644 --- a/charts/rollup-node/Chart.yaml +++ b/charts/rollup-node/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: rollup-node helm charts name: rollup-node -version: 0.0.11 +version: 0.0.12 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/scroll-sdk/Chart.yaml b/charts/scroll-sdk/Chart.yaml index bc467e29..fe93f75b 100644 --- a/charts/scroll-sdk/Chart.yaml +++ b/charts/scroll-sdk/Chart.yaml @@ -98,7 +98,7 @@ dependencies: repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-explorer-backend.enabled - name: rollup-node - version: 0.0.11 + version: 0.0.12 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-node.enabled - name: rpc-gateway From a495038e3fdfbc938840dfb1136ed016c9f307cf Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Fri, 27 Sep 2024 00:34:28 +0800 Subject: [PATCH 19/86] update --- .../{get-db-info.yaml => get-db-info-script.yaml} | 0 ...ake-over-commit-and-finalize-senders-script.yaml} | 0 charts/rollup-node/values.yaml | 12 +++++++++++- 3 files changed, 11 insertions(+), 1 deletion(-) rename charts/rollup-node/templates/{get-db-info.yaml => get-db-info-script.yaml} (100%) rename charts/rollup-node/templates/{take-over-commit-and-finalize-senders.yaml => take-over-commit-and-finalize-senders-script.yaml} (100%) diff --git a/charts/rollup-node/templates/get-db-info.yaml b/charts/rollup-node/templates/get-db-info-script.yaml similarity index 100% rename from charts/rollup-node/templates/get-db-info.yaml rename to charts/rollup-node/templates/get-db-info-script.yaml diff --git a/charts/rollup-node/templates/take-over-commit-and-finalize-senders.yaml b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml similarity index 100% rename from charts/rollup-node/templates/take-over-commit-and-finalize-senders.yaml rename to charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml diff --git a/charts/rollup-node/values.yaml b/charts/rollup-node/values.yaml index edb4972f..ca0c77b3 100644 --- a/charts/rollup-node/values.yaml +++ b/charts/rollup-node/values.yaml @@ -85,6 +85,16 @@ persistence: type: configMap name: wait-for-contracts-script defaultMode: "0777" + take-over-commit-and-finalize-senders-script: + enabled: true + type: configMap + name: take-over-commit-and-finalize-senders-script + defaultMode: "0777" + get-db-info-script: + enabled: true + type: configMap + name: get-db-info-script + defaultMode: "0777" initContainers: 1-check-postgres-connection: @@ -143,7 +153,7 @@ initContainers: - configMapRef: name: rollup-node-env volumeMounts: - - name: take-over-script + - name: take-over-commit-and-finalize-senders-script mountPath: /take-over-commit-and-finalize-senders.sh subPath: take-over-commit-and-finalize-senders.sh 6-get-db-info: From e8944f216b3c70a8d014e1f4d25f31f3cc000d69 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Fri, 27 Sep 2024 00:40:06 +0800 Subject: [PATCH 20/86] fixes --- charts/rollup-node/templates/get-db-info-script.yaml | 2 +- .../take-over-commit-and-finalize-senders-script.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/rollup-node/templates/get-db-info-script.yaml b/charts/rollup-node/templates/get-db-info-script.yaml index 6e694280..cb637a22 100644 --- a/charts/rollup-node/templates/get-db-info-script.yaml +++ b/charts/rollup-node/templates/get-db-info-script.yaml @@ -3,7 +3,7 @@ kind: ConfigMap metadata: labels: {{- include "scroll-sdk.labels" $ | nindent 4 }} - name: get-db-info + name: get-db-info-script data: get-db-info.sh: | #!/bin/bash diff --git a/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml index 5ede83ac..0522415f 100644 --- a/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml +++ b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: ConfigMap metadata: - name: modify-l1-scroll-chain-contract-whitelist + name: take-over-commit-and-finalize-senders-script data: - modify-l1-scroll-chain-contract-whitelist.sh: | + take-over-commit-and-finalize-senders.sh: | #!/bin/bash # Function to check if a variable is set From f8818e8a0e2cdfa9abdbf447ea7e031aeb2bfa42 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Fri, 27 Sep 2024 00:42:01 +0800 Subject: [PATCH 21/86] fix --- charts/rollup-node/templates/get-db-info-script.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/charts/rollup-node/templates/get-db-info-script.yaml b/charts/rollup-node/templates/get-db-info-script.yaml index cb637a22..8534840f 100644 --- a/charts/rollup-node/templates/get-db-info-script.yaml +++ b/charts/rollup-node/templates/get-db-info-script.yaml @@ -1,8 +1,6 @@ apiVersion: v1 kind: ConfigMap metadata: - labels: - {{- include "scroll-sdk.labels" $ | nindent 4 }} name: get-db-info-script data: get-db-info.sh: | From 8ee62185d3d1dace375e35f6c2d81f0f32793f9c Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Fri, 27 Sep 2024 18:12:20 +0800 Subject: [PATCH 22/86] update L1_SCROLL_CHAIN_PROXY_ADDR --- charts/rollup-node/Chart.yaml | 2 +- charts/rollup-node/templates/get-db-info-script.yaml | 4 ++-- .../take-over-commit-and-finalize-senders-script.yaml | 10 +++++----- charts/scroll-sdk/Chart.yaml | 2 +- devnet/create-env-files.sh | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/charts/rollup-node/Chart.yaml b/charts/rollup-node/Chart.yaml index 5810d0a5..46a87900 100644 --- a/charts/rollup-node/Chart.yaml +++ b/charts/rollup-node/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: rollup-node helm charts name: rollup-node -version: 0.0.12 +version: 0.0.13 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/rollup-node/templates/get-db-info-script.yaml b/charts/rollup-node/templates/get-db-info-script.yaml index 8534840f..530862d9 100644 --- a/charts/rollup-node/templates/get-db-info-script.yaml +++ b/charts/rollup-node/templates/get-db-info-script.yaml @@ -35,13 +35,13 @@ data: fi # Get last finalized batch - export LAST_FINALIZED_BATCH=$(cast call "${L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR}" "lastFinalizedBatchIndex()(uint256)" --rpc-url ${L1_RPC_ENDPOINT} | awk '{print $1}') + export LAST_FINALIZED_BATCH=$(cast call "${L1_SCROLL_CHAIN_PROXY_ADDR}" "lastFinalizedBatchIndex()(uint256)" --rpc-url ${L1_RPC_ENDPOINT} | awk '{print $1}') # Calculate last committed batch FIRST_UNCOMMITTED_BATCH=$((LAST_FINALIZED_BATCH + 1)) echo "Starting search from batch: $FIRST_UNCOMMITTED_BATCH" while true; do - BATCH_HASH=$(cast call "${L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR}" "committedBatches(uint256)(bytes32)" "$FIRST_UNCOMMITTED_BATCH" --rpc-url ${L1_RPC_ENDPOINT}) + BATCH_HASH=$(cast call "${L1_SCROLL_CHAIN_PROXY_ADDR}" "committedBatches(uint256)(bytes32)" "$FIRST_UNCOMMITTED_BATCH" --rpc-url ${L1_RPC_ENDPOINT}) echo "Batch $FIRST_UNCOMMITTED_BATCH - Hash: $BATCH_HASH" if [[ $BATCH_HASH == "0x0000000000000000000000000000000000000000000000000000000000000000" ]]; then echo "Found first uncommitted batch: $FIRST_UNCOMMITTED_BATCH" diff --git a/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml index 0522415f..7dba8e53 100644 --- a/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml +++ b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml @@ -17,7 +17,7 @@ data: # Check required variables check_var L1_RPC_ENDPOINT check_var L1_MAINNET_SCROLL_OWNER_ADDR - check_var L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR + check_var L1_SCROLL_CHAIN_PROXY_ADDR check_var L1_COMMIT_SENDER_ADDR check_var L1_FINALIZE_SENDER_ADDR @@ -29,14 +29,14 @@ data: cast rpc --rpc-url ${L1_RPC_ENDPOINT} anvil_impersonateAccount ${L1_MAINNET_SCROLL_OWNER_ADDR} # Add a new sequencer - cast send ${L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR} --rpc-url ${L1_RPC_ENDPOINT} \ + cast send ${L1_SCROLL_CHAIN_PROXY_ADDR} --rpc-url ${L1_RPC_ENDPOINT} \ --from ${L1_MAINNET_SCROLL_OWNER_ADDR} \ --unlocked \ "addSequencer(address)" \ ${L1_COMMIT_SENDER_ADDR} # Add a new prover - cast send ${L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR} --rpc-url ${L1_RPC_ENDPOINT} \ + cast send ${L1_SCROLL_CHAIN_PROXY_ADDR} --rpc-url ${L1_RPC_ENDPOINT} \ --from ${L1_MAINNET_SCROLL_OWNER_ADDR} \ --unlocked \ "addProver(address)" \ @@ -46,12 +46,12 @@ data: cast rpc --rpc-url ${L1_RPC_ENDPOINT} anvil_stopImpersonatingAccount ${L1_MAINNET_SCROLL_OWNER_ADDR} # Check if the new prover was successfully added - echo "SHADOW: isProver($L1_FINALIZE_SENDER_ADDR)= $(cast call ${L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR} --rpc-url ${L1_RPC_ENDPOINT} \ + echo "SHADOW: isProver($L1_FINALIZE_SENDER_ADDR)= $(cast call ${L1_SCROLL_CHAIN_PROXY_ADDR} --rpc-url ${L1_RPC_ENDPOINT} \ "isProver(address)(bool)" \ ${L1_FINALIZE_SENDER_ADDR})" # Check if the new sequencer was successfully added - echo "SHADOW: isSequencer($L1_COMMIT_SENDER_ADDR)= $(cast call ${L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR} --rpc-url ${L1_RPC_ENDPOINT} \ + echo "SHADOW: isSequencer($L1_COMMIT_SENDER_ADDR)= $(cast call ${L1_SCROLL_CHAIN_PROXY_ADDR} --rpc-url ${L1_RPC_ENDPOINT} \ "isSequencer(address)(bool)" \ ${L1_COMMIT_SENDER_ADDR})" diff --git a/charts/scroll-sdk/Chart.yaml b/charts/scroll-sdk/Chart.yaml index fe93f75b..02abe41c 100644 --- a/charts/scroll-sdk/Chart.yaml +++ b/charts/scroll-sdk/Chart.yaml @@ -98,7 +98,7 @@ dependencies: repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-explorer-backend.enabled - name: rollup-node - version: 0.0.12 + version: 0.0.13 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-node.enabled - name: rpc-gateway diff --git a/devnet/create-env-files.sh b/devnet/create-env-files.sh index 4e40fde1..69cd35b5 100755 --- a/devnet/create-env-files.sh +++ b/devnet/create-env-files.sh @@ -67,7 +67,7 @@ get_service_configmap_variables() { echo "CHAIN_ID_L2:CHAIN_ID L1_RPC_ENDPOINT:L2GETH_L1_ENDPOINT L2GETH_SIGNER_ADDRESS:L2GETH_SIGNER_ADDRESS L1_CONTRACT_DEPLOYMENT_BLOCK:L2GETH_L1_CONTRACT_DEPLOYMENT_BLOCK L2GETH_KEYSTORE:L2GETH_KEYSTORE L2GETH_PASSWORD:L2GETH_PASSWORD L2GETH_NODEKEY:L2GETH_NODEKEY" ;; rollup-node) - echo "L1_RPC_ENDPOINT:L1_RPC_ENDPOINT L2_RPC_ENDPOINT:L2_RPC_ENDPOINT ROLLUP_NODE_DB_CONNECTION_STRING:SCROLL_ROLLUP_DB_CONFIG_DSN L1_SCROLL_CHAIN_PROXY_ADDR:L1_SCROLL_CHAIN_PROXY_ADDR L1_COMMIT_SENDER_PRIVATE_KEY:SCROLL_ROLLUP_L2_CONFIG_RELAYER_CONFIG_COMMIT_SENDER_PRIVATE_KEY L1_FINALIZE_SENDER_PRIVATE_KEY:SCROLL_ROLLUP_L2_CONFIG_RELAYER_CONFIG_FINALIZE_SENDER_PRIVATE_KEY L1_COMMIT_SENDER_ADDR:L1_COMMIT_SENDER_ADDR L1_FINALIZE_SENDER_ADDR:L1_FINALIZE_SENDER_ADDR L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR:L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR L1_MAINNET_SCROLL_OWNER_ADDR:L1_MAINNET_SCROLL_OWNER_ADDR SCROLL_RDS_ROLLUP_NODE_DSN:SCROLL_RDS_ROLLUP_NODE_DSN" + echo "L1_RPC_ENDPOINT:L1_RPC_ENDPOINT L2_RPC_ENDPOINT:L2_RPC_ENDPOINT ROLLUP_NODE_DB_CONNECTION_STRING:SCROLL_ROLLUP_DB_CONFIG_DSN L1_SCROLL_CHAIN_PROXY_ADDR:L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR L1_COMMIT_SENDER_PRIVATE_KEY:SCROLL_ROLLUP_L2_CONFIG_RELAYER_CONFIG_COMMIT_SENDER_PRIVATE_KEY L1_FINALIZE_SENDER_PRIVATE_KEY:SCROLL_ROLLUP_L2_CONFIG_RELAYER_CONFIG_FINALIZE_SENDER_PRIVATE_KEY L1_COMMIT_SENDER_ADDR:L1_COMMIT_SENDER_ADDR L1_FINALIZE_SENDER_ADDR:L1_FINALIZE_SENDER_ADDR L1_MAINNET_SCROLL_OWNER_ADDR:L1_MAINNET_SCROLL_OWNER_ADDR SCROLL_RDS_ROLLUP_NODE_DSN:SCROLL_RDS_ROLLUP_NODE_DSN" ;; *) echo "Service $service_name not found." From a023748ed8c277cf03eb65174545e44d17519229 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Fri, 27 Sep 2024 18:24:30 +0800 Subject: [PATCH 23/86] fix a bug --- devnet/create-env-files.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devnet/create-env-files.sh b/devnet/create-env-files.sh index 69cd35b5..6551064e 100755 --- a/devnet/create-env-files.sh +++ b/devnet/create-env-files.sh @@ -67,7 +67,7 @@ get_service_configmap_variables() { echo "CHAIN_ID_L2:CHAIN_ID L1_RPC_ENDPOINT:L2GETH_L1_ENDPOINT L2GETH_SIGNER_ADDRESS:L2GETH_SIGNER_ADDRESS L1_CONTRACT_DEPLOYMENT_BLOCK:L2GETH_L1_CONTRACT_DEPLOYMENT_BLOCK L2GETH_KEYSTORE:L2GETH_KEYSTORE L2GETH_PASSWORD:L2GETH_PASSWORD L2GETH_NODEKEY:L2GETH_NODEKEY" ;; rollup-node) - echo "L1_RPC_ENDPOINT:L1_RPC_ENDPOINT L2_RPC_ENDPOINT:L2_RPC_ENDPOINT ROLLUP_NODE_DB_CONNECTION_STRING:SCROLL_ROLLUP_DB_CONFIG_DSN L1_SCROLL_CHAIN_PROXY_ADDR:L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR L1_COMMIT_SENDER_PRIVATE_KEY:SCROLL_ROLLUP_L2_CONFIG_RELAYER_CONFIG_COMMIT_SENDER_PRIVATE_KEY L1_FINALIZE_SENDER_PRIVATE_KEY:SCROLL_ROLLUP_L2_CONFIG_RELAYER_CONFIG_FINALIZE_SENDER_PRIVATE_KEY L1_COMMIT_SENDER_ADDR:L1_COMMIT_SENDER_ADDR L1_FINALIZE_SENDER_ADDR:L1_FINALIZE_SENDER_ADDR L1_MAINNET_SCROLL_OWNER_ADDR:L1_MAINNET_SCROLL_OWNER_ADDR SCROLL_RDS_ROLLUP_NODE_DSN:SCROLL_RDS_ROLLUP_NODE_DSN" + echo "L1_RPC_ENDPOINT:L1_RPC_ENDPOINT L2_RPC_ENDPOINT:L2_RPC_ENDPOINT ROLLUP_NODE_DB_CONNECTION_STRING:SCROLL_ROLLUP_DB_CONFIG_DSN L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR:L1_SCROLL_CHAIN_PROXY_ADDR L1_COMMIT_SENDER_PRIVATE_KEY:SCROLL_ROLLUP_L2_CONFIG_RELAYER_CONFIG_COMMIT_SENDER_PRIVATE_KEY L1_FINALIZE_SENDER_PRIVATE_KEY:SCROLL_ROLLUP_L2_CONFIG_RELAYER_CONFIG_FINALIZE_SENDER_PRIVATE_KEY L1_COMMIT_SENDER_ADDR:L1_COMMIT_SENDER_ADDR L1_FINALIZE_SENDER_ADDR:L1_FINALIZE_SENDER_ADDR L1_MAINNET_SCROLL_OWNER_ADDR:L1_MAINNET_SCROLL_OWNER_ADDR SCROLL_RDS_ROLLUP_NODE_DSN:SCROLL_RDS_ROLLUP_NODE_DSN" ;; *) echo "Service $service_name not found." From cf97c87ce46755a9624437d94c980c74ef2a1cf0 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Fri, 27 Sep 2024 18:28:21 +0800 Subject: [PATCH 24/86] bump version --- charts/rollup-node/Chart.yaml | 2 +- charts/scroll-sdk/Chart.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/rollup-node/Chart.yaml b/charts/rollup-node/Chart.yaml index 46a87900..bb2e048b 100644 --- a/charts/rollup-node/Chart.yaml +++ b/charts/rollup-node/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: rollup-node helm charts name: rollup-node -version: 0.0.13 +version: 0.0.14 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/scroll-sdk/Chart.yaml b/charts/scroll-sdk/Chart.yaml index 02abe41c..caeb56d5 100644 --- a/charts/scroll-sdk/Chart.yaml +++ b/charts/scroll-sdk/Chart.yaml @@ -98,7 +98,7 @@ dependencies: repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-explorer-backend.enabled - name: rollup-node - version: 0.0.13 + version: 0.0.14 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-node.enabled - name: rpc-gateway From 1b7a140d5afb18a372c39aa9fb8104e93edd905e Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Fri, 27 Sep 2024 22:50:06 +0800 Subject: [PATCH 25/86] fix bugs --- charts/rollup-node/templates/get-db-info-script.yaml | 2 +- .../templates/take-over-commit-and-finalize-senders-script.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/rollup-node/templates/get-db-info-script.yaml b/charts/rollup-node/templates/get-db-info-script.yaml index 530862d9..ff1a5a57 100644 --- a/charts/rollup-node/templates/get-db-info-script.yaml +++ b/charts/rollup-node/templates/get-db-info-script.yaml @@ -4,7 +4,7 @@ metadata: name: get-db-info-script data: get-db-info.sh: | - #!/bin/bash + #!/bin/sh apt-get update && apt-get install -y git postgresql-client diff --git a/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml index 7dba8e53..3648036f 100644 --- a/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml +++ b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml @@ -4,7 +4,7 @@ metadata: name: take-over-commit-and-finalize-senders-script data: take-over-commit-and-finalize-senders.sh: | - #!/bin/bash + #!/bin/sh # Function to check if a variable is set check_var() { From e4a2000d175b6b049309fa8347ceb30e31d44132 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Sun, 29 Sep 2024 00:32:50 +0800 Subject: [PATCH 26/86] bump version --- charts/rollup-node/Chart.yaml | 2 +- ...er-commit-and-finalize-senders-script.yaml | 31 ++++++++++--------- charts/scroll-sdk/Chart.yaml | 2 +- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/charts/rollup-node/Chart.yaml b/charts/rollup-node/Chart.yaml index bb2e048b..fb3f4889 100644 --- a/charts/rollup-node/Chart.yaml +++ b/charts/rollup-node/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: rollup-node helm charts name: rollup-node -version: 0.0.14 +version: 0.0.15 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml index 3648036f..7b7d0163 100644 --- a/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml +++ b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml @@ -8,8 +8,9 @@ data: # Function to check if a variable is set check_var() { - if [ -z "${!1}" ]; then - echo "Error: $1 is not set" + eval "value=\$$1" + if [ -z "$value" ]; then + echo "Error: $1 is not set" >&2 exit 1 fi } @@ -23,37 +24,37 @@ data: # Set the balance of the Scroll owner # We're setting it to 1000 ETH (0x3635C9ADC5DEA00000 in wei) - cast rpc --rpc-url ${L1_RPC_ENDPOINT} anvil_setBalance ${L1_MAINNET_SCROLL_OWNER_ADDR} 0x3635C9ADC5DEA00000 + cast rpc --rpc-url "${L1_RPC_ENDPOINT}" anvil_setBalance "${L1_MAINNET_SCROLL_OWNER_ADDR}" 0x3635C9ADC5DEA00000 # Start impersonating the Scroll owner account - cast rpc --rpc-url ${L1_RPC_ENDPOINT} anvil_impersonateAccount ${L1_MAINNET_SCROLL_OWNER_ADDR} + cast rpc --rpc-url "${L1_RPC_ENDPOINT}" anvil_impersonateAccount "${L1_MAINNET_SCROLL_OWNER_ADDR}" # Add a new sequencer - cast send ${L1_SCROLL_CHAIN_PROXY_ADDR} --rpc-url ${L1_RPC_ENDPOINT} \ - --from ${L1_MAINNET_SCROLL_OWNER_ADDR} \ + cast send "${L1_SCROLL_CHAIN_PROXY_ADDR}" --rpc-url "${L1_RPC_ENDPOINT}" \ + --from "${L1_MAINNET_SCROLL_OWNER_ADDR}" \ --unlocked \ "addSequencer(address)" \ - ${L1_COMMIT_SENDER_ADDR} + "${L1_COMMIT_SENDER_ADDR}" # Add a new prover - cast send ${L1_SCROLL_CHAIN_PROXY_ADDR} --rpc-url ${L1_RPC_ENDPOINT} \ - --from ${L1_MAINNET_SCROLL_OWNER_ADDR} \ + cast send "${L1_SCROLL_CHAIN_PROXY_ADDR}" --rpc-url "${L1_RPC_ENDPOINT}" \ + --from "${L1_MAINNET_SCROLL_OWNER_ADDR}" \ --unlocked \ "addProver(address)" \ - ${L1_FINALIZE_SENDER_ADDR} + "${L1_FINALIZE_SENDER_ADDR}" # Stop impersonating the L1_MAINNET_SCROLL_OWNER_ADDR account - cast rpc --rpc-url ${L1_RPC_ENDPOINT} anvil_stopImpersonatingAccount ${L1_MAINNET_SCROLL_OWNER_ADDR} + cast rpc --rpc-url "${L1_RPC_ENDPOINT}" anvil_stopImpersonatingAccount "${L1_MAINNET_SCROLL_OWNER_ADDR}" # Check if the new prover was successfully added - echo "SHADOW: isProver($L1_FINALIZE_SENDER_ADDR)= $(cast call ${L1_SCROLL_CHAIN_PROXY_ADDR} --rpc-url ${L1_RPC_ENDPOINT} \ + echo "SHADOW: isProver($L1_FINALIZE_SENDER_ADDR)= $(cast call "${L1_SCROLL_CHAIN_PROXY_ADDR}" --rpc-url "${L1_RPC_ENDPOINT}" \ "isProver(address)(bool)" \ - ${L1_FINALIZE_SENDER_ADDR})" + "${L1_FINALIZE_SENDER_ADDR}")" # Check if the new sequencer was successfully added - echo "SHADOW: isSequencer($L1_COMMIT_SENDER_ADDR)= $(cast call ${L1_SCROLL_CHAIN_PROXY_ADDR} --rpc-url ${L1_RPC_ENDPOINT} \ + echo "SHADOW: isSequencer($L1_COMMIT_SENDER_ADDR)= $(cast call "${L1_SCROLL_CHAIN_PROXY_ADDR}" --rpc-url "${L1_RPC_ENDPOINT}" \ "isSequencer(address)(bool)" \ - ${L1_COMMIT_SENDER_ADDR})" + "${L1_COMMIT_SENDER_ADDR}")" # Indicate that the process is complete echo "SHADOW: done taking over L1 contracts" diff --git a/charts/scroll-sdk/Chart.yaml b/charts/scroll-sdk/Chart.yaml index caeb56d5..219a8497 100644 --- a/charts/scroll-sdk/Chart.yaml +++ b/charts/scroll-sdk/Chart.yaml @@ -98,7 +98,7 @@ dependencies: repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-explorer-backend.enabled - name: rollup-node - version: 0.0.14 + version: 0.0.15 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-node.enabled - name: rpc-gateway From 9bb3828959a89d50e18c9b049d4275dc4562c23a Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Sun, 29 Sep 2024 00:44:47 +0800 Subject: [PATCH 27/86] bump version --- charts/rollup-node/Chart.yaml | 2 +- charts/rollup-node/templates/get-db-info-script.yaml | 4 ---- .../take-over-commit-and-finalize-senders-script.yaml | 5 +++++ charts/scroll-sdk/Chart.yaml | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/charts/rollup-node/Chart.yaml b/charts/rollup-node/Chart.yaml index fb3f4889..5df155cc 100644 --- a/charts/rollup-node/Chart.yaml +++ b/charts/rollup-node/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: rollup-node helm charts name: rollup-node -version: 0.0.15 +version: 0.0.16 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/rollup-node/templates/get-db-info-script.yaml b/charts/rollup-node/templates/get-db-info-script.yaml index ff1a5a57..0c0926da 100644 --- a/charts/rollup-node/templates/get-db-info-script.yaml +++ b/charts/rollup-node/templates/get-db-info-script.yaml @@ -22,10 +22,6 @@ data: echo "Getting batch information..." - curl -L https://foundry.paradigm.xyz | bash - source /root/.bashrc - foundryup - echo "Checking if cast is available..." if command -v cast &> /dev/null; then echo "cast is available" diff --git a/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml index 7b7d0163..8a8851d6 100644 --- a/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml +++ b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml @@ -22,6 +22,11 @@ data: check_var L1_COMMIT_SENDER_ADDR check_var L1_FINALIZE_SENDER_ADDR + # Install cast + curl -L https://foundry.paradigm.xyz | bash + source /root/.bashrc + foundryup + # Set the balance of the Scroll owner # We're setting it to 1000 ETH (0x3635C9ADC5DEA00000 in wei) cast rpc --rpc-url "${L1_RPC_ENDPOINT}" anvil_setBalance "${L1_MAINNET_SCROLL_OWNER_ADDR}" 0x3635C9ADC5DEA00000 diff --git a/charts/scroll-sdk/Chart.yaml b/charts/scroll-sdk/Chart.yaml index 219a8497..009885a9 100644 --- a/charts/scroll-sdk/Chart.yaml +++ b/charts/scroll-sdk/Chart.yaml @@ -98,7 +98,7 @@ dependencies: repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-explorer-backend.enabled - name: rollup-node - version: 0.0.15 + version: 0.0.16 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-node.enabled - name: rpc-gateway From 9d66f8729709604a6a24b8479105823093f1e76d Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Sun, 29 Sep 2024 02:22:02 +0800 Subject: [PATCH 28/86] fix --- charts/l1-devnet/Chart.yaml | 2 +- charts/rollup-node/Chart.yaml | 2 +- charts/scroll-sdk/Chart.yaml | 4 ++-- charts/scroll-sdk/templates/init-db-job.yaml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/l1-devnet/Chart.yaml b/charts/l1-devnet/Chart.yaml index 0e673868..7b416add 100644 --- a/charts/l1-devnet/Chart.yaml +++ b/charts/l1-devnet/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: l1-devnet helm charts name: l1-devnet -version: 0.0.8 +version: 0.0.9 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/rollup-node/Chart.yaml b/charts/rollup-node/Chart.yaml index 5df155cc..69a09fc2 100644 --- a/charts/rollup-node/Chart.yaml +++ b/charts/rollup-node/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: rollup-node helm charts name: rollup-node -version: 0.0.16 +version: 0.0.17 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/scroll-sdk/Chart.yaml b/charts/scroll-sdk/Chart.yaml index 009885a9..7942b87c 100644 --- a/charts/scroll-sdk/Chart.yaml +++ b/charts/scroll-sdk/Chart.yaml @@ -14,7 +14,7 @@ keywords: home: https://github.com/scroll-tech/scroll-sdk dependencies: - name: l1-devnet - version: 0.0.7 + version: 0.0.9 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: l1-devnet.enabled - name: balance-checker @@ -98,7 +98,7 @@ dependencies: repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-explorer-backend.enabled - name: rollup-node - version: 0.0.16 + version: 0.0.17 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-node.enabled - name: rpc-gateway diff --git a/charts/scroll-sdk/templates/init-db-job.yaml b/charts/scroll-sdk/templates/init-db-job.yaml index a45d4561..c625257e 100644 --- a/charts/scroll-sdk/templates/init-db-job.yaml +++ b/charts/scroll-sdk/templates/init-db-job.yaml @@ -35,7 +35,7 @@ spec: value: {{ .Values.db.pg_password }} - name: DB_PASSWORD value: {{ .Values.db.bridge_history_password }} - command: ["/bin/bash", "-c", "./init-db.sh"] + command: ["/bash", "-c", "./init-db.sh"] volumeMounts: - name: init-db mountPath: /init-db.sh From 2f8ffc6ba22dfd628a95c867db69cce1aec36339 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Sun, 29 Sep 2024 02:24:10 +0800 Subject: [PATCH 29/86] tweak --- charts/scroll-sdk/templates/init-db-job.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/scroll-sdk/templates/init-db-job.yaml b/charts/scroll-sdk/templates/init-db-job.yaml index c625257e..6f793857 100644 --- a/charts/scroll-sdk/templates/init-db-job.yaml +++ b/charts/scroll-sdk/templates/init-db-job.yaml @@ -35,7 +35,7 @@ spec: value: {{ .Values.db.pg_password }} - name: DB_PASSWORD value: {{ .Values.db.bridge_history_password }} - command: ["/bash", "-c", "./init-db.sh"] + command: ["bash", "-c", "./init-db.sh"] volumeMounts: - name: init-db mountPath: /init-db.sh From 2ef78cca1e3f72e094bead219e36750fd03d93b4 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Sun, 29 Sep 2024 02:48:16 +0800 Subject: [PATCH 30/86] fix --- charts/rollup-node/Chart.yaml | 2 +- .../take-over-commit-and-finalize-senders-script.yaml | 4 ++-- charts/scroll-sdk/Chart.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/rollup-node/Chart.yaml b/charts/rollup-node/Chart.yaml index 69a09fc2..e6e96121 100644 --- a/charts/rollup-node/Chart.yaml +++ b/charts/rollup-node/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: rollup-node helm charts name: rollup-node -version: 0.0.17 +version: 0.0.18 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml index 8a8851d6..850d24e2 100644 --- a/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml +++ b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml @@ -23,8 +23,8 @@ data: check_var L1_FINALIZE_SENDER_ADDR # Install cast - curl -L https://foundry.paradigm.xyz | bash - source /root/.bashrc + curl -L https://foundry.paradigm.xyz | sh + export PATH="$PATH:/root/.foundry/bin" foundryup # Set the balance of the Scroll owner diff --git a/charts/scroll-sdk/Chart.yaml b/charts/scroll-sdk/Chart.yaml index 7942b87c..6415c7f5 100644 --- a/charts/scroll-sdk/Chart.yaml +++ b/charts/scroll-sdk/Chart.yaml @@ -98,7 +98,7 @@ dependencies: repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-explorer-backend.enabled - name: rollup-node - version: 0.0.17 + version: 0.0.18 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-node.enabled - name: rpc-gateway From 9aae560845e968dc84cc1f5beb699bce420d04bc Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Sun, 29 Sep 2024 03:09:16 +0800 Subject: [PATCH 31/86] fixes --- charts/rollup-node/Chart.yaml | 2 +- .../take-over-commit-and-finalize-senders-script.yaml | 9 ++++----- charts/rollup-node/values.yaml | 2 +- charts/scroll-sdk/Chart.yaml | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/charts/rollup-node/Chart.yaml b/charts/rollup-node/Chart.yaml index e6e96121..2eb5d376 100644 --- a/charts/rollup-node/Chart.yaml +++ b/charts/rollup-node/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: rollup-node helm charts name: rollup-node -version: 0.0.18 +version: 0.0.19 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml index 850d24e2..c276f111 100644 --- a/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml +++ b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml @@ -4,12 +4,11 @@ metadata: name: take-over-commit-and-finalize-senders-script data: take-over-commit-and-finalize-senders.sh: | - #!/bin/sh + #!/bin/bash # Function to check if a variable is set check_var() { - eval "value=\$$1" - if [ -z "$value" ]; then + if [[ -z "${!1}" ]]; then echo "Error: $1 is not set" >&2 exit 1 fi @@ -23,8 +22,8 @@ data: check_var L1_FINALIZE_SENDER_ADDR # Install cast - curl -L https://foundry.paradigm.xyz | sh - export PATH="$PATH:/root/.foundry/bin" + curl -L https://foundry.paradigm.xyz | bash + source /root/.bashrc foundryup # Set the balance of the Scroll owner diff --git a/charts/rollup-node/values.yaml b/charts/rollup-node/values.yaml index ca0c77b3..8b0e1e3d 100644 --- a/charts/rollup-node/values.yaml +++ b/charts/rollup-node/values.yaml @@ -146,7 +146,7 @@ initContainers: 5-take-over-commit-and-finalize-senders: image: scrolltech/scroll-alpine:v0.0.1 command: - - /bin/sh + - /bin/bash - -c - /take-over-commit-and-finalize-senders.sh envFrom: diff --git a/charts/scroll-sdk/Chart.yaml b/charts/scroll-sdk/Chart.yaml index 6415c7f5..7d8b2322 100644 --- a/charts/scroll-sdk/Chart.yaml +++ b/charts/scroll-sdk/Chart.yaml @@ -98,7 +98,7 @@ dependencies: repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-explorer-backend.enabled - name: rollup-node - version: 0.0.18 + version: 0.0.19 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-node.enabled - name: rpc-gateway From 3e36713ea9d122b22833d865d0e1e1cbc7d73b03 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Sun, 29 Sep 2024 03:29:59 +0800 Subject: [PATCH 32/86] fix --- charts/rollup-node/Chart.yaml | 2 +- .../templates/take-over-commit-and-finalize-senders-script.yaml | 1 + charts/rollup-node/values.yaml | 2 +- charts/scroll-sdk/Chart.yaml | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/charts/rollup-node/Chart.yaml b/charts/rollup-node/Chart.yaml index 2eb5d376..b3f286c2 100644 --- a/charts/rollup-node/Chart.yaml +++ b/charts/rollup-node/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: rollup-node helm charts name: rollup-node -version: 0.0.19 +version: 0.0.20 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml index c276f111..13eee3e5 100644 --- a/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml +++ b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml @@ -22,6 +22,7 @@ data: check_var L1_FINALIZE_SENDER_ADDR # Install cast + apt-get update && apt-get install -y git postgresql-client curl -L https://foundry.paradigm.xyz | bash source /root/.bashrc foundryup diff --git a/charts/rollup-node/values.yaml b/charts/rollup-node/values.yaml index 8b0e1e3d..e89a2a85 100644 --- a/charts/rollup-node/values.yaml +++ b/charts/rollup-node/values.yaml @@ -144,7 +144,7 @@ initContainers: mountPath: /wait-for-contract.sh subPath: wait-for-contract.sh 5-take-over-commit-and-finalize-senders: - image: scrolltech/scroll-alpine:v0.0.1 + image: ubuntu:20.04 command: - /bin/bash - -c diff --git a/charts/scroll-sdk/Chart.yaml b/charts/scroll-sdk/Chart.yaml index 7d8b2322..64fe6f17 100644 --- a/charts/scroll-sdk/Chart.yaml +++ b/charts/scroll-sdk/Chart.yaml @@ -98,7 +98,7 @@ dependencies: repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-explorer-backend.enabled - name: rollup-node - version: 0.0.19 + version: 0.0.20 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-node.enabled - name: rpc-gateway From bdf8c9375a6ea4b8785c451e52cb9f4c0f9f508d Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Sun, 29 Sep 2024 13:17:23 +0800 Subject: [PATCH 33/86] bump version --- charts/rollup-node/Chart.yaml | 2 +- .../templates/take-over-commit-and-finalize-senders-script.yaml | 2 +- charts/scroll-sdk/Chart.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/rollup-node/Chart.yaml b/charts/rollup-node/Chart.yaml index b3f286c2..367dddf5 100644 --- a/charts/rollup-node/Chart.yaml +++ b/charts/rollup-node/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: rollup-node helm charts name: rollup-node -version: 0.0.20 +version: 0.0.21 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml index 13eee3e5..e55faee6 100644 --- a/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml +++ b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml @@ -22,7 +22,7 @@ data: check_var L1_FINALIZE_SENDER_ADDR # Install cast - apt-get update && apt-get install -y git postgresql-client + apt-get update && apt-get install -y git curl postgresql-client curl -L https://foundry.paradigm.xyz | bash source /root/.bashrc foundryup diff --git a/charts/scroll-sdk/Chart.yaml b/charts/scroll-sdk/Chart.yaml index 64fe6f17..37c07cd8 100644 --- a/charts/scroll-sdk/Chart.yaml +++ b/charts/scroll-sdk/Chart.yaml @@ -98,7 +98,7 @@ dependencies: repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-explorer-backend.enabled - name: rollup-node - version: 0.0.20 + version: 0.0.21 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-node.enabled - name: rpc-gateway From 421ce6448a2f92d7a3fad5a73c332c4277fb43d8 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Sun, 29 Sep 2024 14:14:36 +0800 Subject: [PATCH 34/86] fixes --- charts/rollup-node/Chart.yaml | 2 +- .../rollup-node/templates/get-db-info-script.yaml | 15 +++++++++++++-- ...e-over-commit-and-finalize-senders-script.yaml | 11 +++++++++-- charts/rollup-node/values.yaml | 4 ++-- charts/scroll-sdk/Chart.yaml | 2 +- 5 files changed, 26 insertions(+), 8 deletions(-) diff --git a/charts/rollup-node/Chart.yaml b/charts/rollup-node/Chart.yaml index 367dddf5..278907ea 100644 --- a/charts/rollup-node/Chart.yaml +++ b/charts/rollup-node/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: rollup-node helm charts name: rollup-node -version: 0.0.21 +version: 0.0.22 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/rollup-node/templates/get-db-info-script.yaml b/charts/rollup-node/templates/get-db-info-script.yaml index 0c0926da..fa73d962 100644 --- a/charts/rollup-node/templates/get-db-info-script.yaml +++ b/charts/rollup-node/templates/get-db-info-script.yaml @@ -4,9 +4,20 @@ metadata: name: get-db-info-script data: get-db-info.sh: | - #!/bin/sh + #!/bin/bash - apt-get update && apt-get install -y git postgresql-client + # Install dependencies + apt-get update && apt-get install -y git curl + + # Install Foundry + curl -L https://foundry.paradigm.xyz | bash + source /root/.bashrc + + # Explicitly set PATH to include Foundry binaries + export PATH="$PATH:/root/.foundry/bin" + + # Run foundryup + foundryup echo "Waiting for L1 contract to be ready..." while true; do diff --git a/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml index e55faee6..1a846b7b 100644 --- a/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml +++ b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml @@ -21,10 +21,17 @@ data: check_var L1_COMMIT_SENDER_ADDR check_var L1_FINALIZE_SENDER_ADDR - # Install cast - apt-get update && apt-get install -y git curl postgresql-client + # Install dependencies + apt-get update && apt-get install -y git curl + + # Install Foundry curl -L https://foundry.paradigm.xyz | bash source /root/.bashrc + + # Explicitly set PATH to include Foundry binaries + export PATH="$PATH:/root/.foundry/bin" + + # Run foundryup foundryup # Set the balance of the Scroll owner diff --git a/charts/rollup-node/values.yaml b/charts/rollup-node/values.yaml index e89a2a85..0b161181 100644 --- a/charts/rollup-node/values.yaml +++ b/charts/rollup-node/values.yaml @@ -157,9 +157,9 @@ initContainers: mountPath: /take-over-commit-and-finalize-senders.sh subPath: take-over-commit-and-finalize-senders.sh 6-get-db-info: - image: scrolltech/scroll-alpine:v0.0.1 + image: ubuntu:20.04 command: - - /bin/sh + - /bin/bash - -c - /get-db-info.sh envFrom: diff --git a/charts/scroll-sdk/Chart.yaml b/charts/scroll-sdk/Chart.yaml index 37c07cd8..c7fa0b1f 100644 --- a/charts/scroll-sdk/Chart.yaml +++ b/charts/scroll-sdk/Chart.yaml @@ -98,7 +98,7 @@ dependencies: repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-explorer-backend.enabled - name: rollup-node - version: 0.0.21 + version: 0.0.22 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-node.enabled - name: rpc-gateway From d0616cc8653edd5d14c11de182d3a742a2ef8b1a Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Sun, 29 Sep 2024 19:04:13 +0800 Subject: [PATCH 35/86] update --- .../templates/get-db-info-script.yaml | 75 ++++++++++++++----- ...er-commit-and-finalize-senders-script.yaml | 4 +- 2 files changed, 58 insertions(+), 21 deletions(-) diff --git a/charts/rollup-node/templates/get-db-info-script.yaml b/charts/rollup-node/templates/get-db-info-script.yaml index fa73d962..13442066 100644 --- a/charts/rollup-node/templates/get-db-info-script.yaml +++ b/charts/rollup-node/templates/get-db-info-script.yaml @@ -7,7 +7,7 @@ data: #!/bin/bash # Install dependencies - apt-get update && apt-get install -y git curl + apt-get update && apt-get install -y git curl postgresql-client # Install Foundry curl -L https://foundry.paradigm.xyz | bash @@ -47,7 +47,10 @@ data: # Calculate last committed batch FIRST_UNCOMMITTED_BATCH=$((LAST_FINALIZED_BATCH + 1)) echo "Starting search from batch: $FIRST_UNCOMMITTED_BATCH" - while true; do + + LOOP_COUNT=0 + MAX_LOOPS=1000 + while [ $LOOP_COUNT -lt $MAX_LOOPS ]; do BATCH_HASH=$(cast call "${L1_SCROLL_CHAIN_PROXY_ADDR}" "committedBatches(uint256)(bytes32)" "$FIRST_UNCOMMITTED_BATCH" --rpc-url ${L1_RPC_ENDPOINT}) echo "Batch $FIRST_UNCOMMITTED_BATCH - Hash: $BATCH_HASH" if [[ $BATCH_HASH == "0x0000000000000000000000000000000000000000000000000000000000000000" ]]; then @@ -55,7 +58,14 @@ data: break fi FIRST_UNCOMMITTED_BATCH=$((FIRST_UNCOMMITTED_BATCH + 1)) + LOOP_COUNT=$((LOOP_COUNT + 1)) done + + if [ $LOOP_COUNT -eq $MAX_LOOPS ]; then + echo "Reached maximum number of iterations ($MAX_LOOPS). Exiting loop." + exit 1 + fi + export LAST_COMMITTED_BATCH=$((FIRST_UNCOMMITTED_BATCH - 1)) echo "Last committed batch: $LAST_COMMITTED_BATCH" @@ -67,13 +77,29 @@ data: # Database copy logic local_sql_run() { - PGPASSWORD=$DB_PASSWORD psql -h $PG_HOST -p $PG_PORT -U $PG_USER -d $POSTGRES_DB -Aqt -c "$@" + psql "${SCROLL_ROLLUP_DB_CONFIG_DSN}" -Aqt -c "$@" } remote_sql_run() { - psql "$SCROLL_RDS_ROLLUP_NODE_DSN" -Aqt -c "$@" + psql "${SCROLL_RDS_ROLLUP_NODE_DSN}" -Aqt -c "$@" } + # Check database connections + echo "Checking database connections..." + if ! local_sql_run "SELECT 1;" > /dev/null 2>&1; then + echo "Error: Cannot connect to local PostgreSQL database. Please check your connection string." + echo "DSN: $SCROLL_ROLLUP_DB_CONFIG_DSN" + exit 1 + fi + + if ! remote_sql_run "SELECT 1;" > /dev/null 2>&1; then + echo "Error: Cannot connect to remote PostgreSQL database. Please check your connection string." + echo "DSN: $SCROLL_RDS_ROLLUP_NODE_DSN" + exit 1 + fi + + echo "Database connections successful. Proceeding with operations..." + # Get the bundle containing the last finalized batch BUNDLE_INDEX=$(remote_sql_run "SELECT index FROM bundle WHERE end_batch_index = $LAST_FINALIZED_BATCH") @@ -112,25 +138,36 @@ data: # Print the values of START_CHUNK_INDEX and END_CHUNK_INDEX for verification echo "Chunk index range: $START_CHUNK_INDEX to $END_CHUNK_INDEX" - # Copy chunks - echo "SHADOW: Copying chunks [$START_CHUNK_INDEX, $END_CHUNK_INDEX]" - remote_sql_run "COPY (SELECT * FROM chunk WHERE index >= $START_CHUNK_INDEX AND index <= $END_CHUNK_INDEX) TO STDOUT WITH CSV HEADER" | local_sql_run "COPY chunk FROM STDIN WITH CSV HEADER" - - # Update chunks' proving status and reset attempt counters - local_sql_run "UPDATE chunk SET proving_status = 1, prover_assigned_at = NULL, total_attempts = 0, active_attempts = 0" + # Get the batch hash for the last finalized batch + LAST_FINALIZED_BATCH_HASH=$(local_sql_run " + SELECT hash + FROM batch + WHERE index = $LAST_FINALIZED_BATCH + ") + echo "Last finalized batch hash: $LAST_FINALIZED_BATCH_HASH" - # Check how many chunks were updated to verified status - UPDATED_CHUNKS_NUM=$(local_sql_run " - SELECT COUNT(*) + # Check how many chunks still have verified status + VERIFIED_CHUNKS_INFO=$(local_sql_run " + SELECT MIN(index), MAX(index), COUNT(*) FROM chunk WHERE proving_status = 4 - AND batch_hash = ( - SELECT hash - FROM batch - WHERE index = $LAST_FINALIZED_BATCH - ) + AND batch_hash = '$LAST_FINALIZED_BATCH_HASH' ") - echo "Number of chunks updated to verified status (proving_status = 4): $UPDATED_CHUNKS_NUM" + echo "Raw VERIFIED_CHUNKS_INFO: $VERIFIED_CHUNKS_INFO" + + MIN_VERIFIED_CHUNK_INDEX=$(echo $VERIFIED_CHUNKS_INFO | cut -d '|' -f1) + MAX_VERIFIED_CHUNK_INDEX=$(echo $VERIFIED_CHUNKS_INFO | cut -d '|' -f2) + VERIFIED_CHUNKS_COUNT=$(echo $VERIFIED_CHUNKS_INFO | cut -d '|' -f3) + + echo "Min verified chunk index: $MIN_VERIFIED_CHUNK_INDEX" + echo "Max verified chunk index: $MAX_VERIFIED_CHUNK_INDEX" + echo "Verified chunks count: $VERIFIED_CHUNKS_COUNT" + + if [ -z "$MIN_VERIFIED_CHUNK_INDEX" ] || [ -z "$MAX_VERIFIED_CHUNK_INDEX" ]; then + echo "Warning: No verified chunks found for the last finalized batch." + else + echo "Range of verified chunks: [$MIN_VERIFIED_CHUNK_INDEX, $MAX_VERIFIED_CHUNK_INDEX]" + fi # Get the start and end block numbers for the copied chunks BLOCK_NUMBERS=$(local_sql_run "SELECT MIN(start_block_number), MAX(end_block_number) FROM chunk WHERE index >= $START_CHUNK_INDEX AND index <= $END_CHUNK_INDEX") diff --git a/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml index 1a846b7b..5c403bbe 100644 --- a/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml +++ b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml @@ -59,12 +59,12 @@ data: cast rpc --rpc-url "${L1_RPC_ENDPOINT}" anvil_stopImpersonatingAccount "${L1_MAINNET_SCROLL_OWNER_ADDR}" # Check if the new prover was successfully added - echo "SHADOW: isProver($L1_FINALIZE_SENDER_ADDR)= $(cast call "${L1_SCROLL_CHAIN_PROXY_ADDR}" --rpc-url "${L1_RPC_ENDPOINT}" \ + echo "SHADOW: isProver($L1_FINALIZE_SENDER_ADDR) = $(cast call "${L1_SCROLL_CHAIN_PROXY_ADDR}" --rpc-url "${L1_RPC_ENDPOINT}" \ "isProver(address)(bool)" \ "${L1_FINALIZE_SENDER_ADDR}")" # Check if the new sequencer was successfully added - echo "SHADOW: isSequencer($L1_COMMIT_SENDER_ADDR)= $(cast call "${L1_SCROLL_CHAIN_PROXY_ADDR}" --rpc-url "${L1_RPC_ENDPOINT}" \ + echo "SHADOW: isSequencer($L1_COMMIT_SENDER_ADDR) = $(cast call "${L1_SCROLL_CHAIN_PROXY_ADDR}" --rpc-url "${L1_RPC_ENDPOINT}" \ "isSequencer(address)(bool)" \ "${L1_COMMIT_SENDER_ADDR}")" From a8787d7c0c157718c56efdce6a4bebe1d0d6b582 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Sun, 29 Sep 2024 22:26:43 +0800 Subject: [PATCH 36/86] bump version --- charts/rollup-node/Chart.yaml | 2 +- charts/scroll-sdk/Chart.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/rollup-node/Chart.yaml b/charts/rollup-node/Chart.yaml index 278907ea..8284f935 100644 --- a/charts/rollup-node/Chart.yaml +++ b/charts/rollup-node/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: rollup-node helm charts name: rollup-node -version: 0.0.22 +version: 0.0.23 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/scroll-sdk/Chart.yaml b/charts/scroll-sdk/Chart.yaml index c7fa0b1f..8ecd55dd 100644 --- a/charts/scroll-sdk/Chart.yaml +++ b/charts/scroll-sdk/Chart.yaml @@ -98,7 +98,7 @@ dependencies: repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-explorer-backend.enabled - name: rollup-node - version: 0.0.22 + version: 0.0.23 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-node.enabled - name: rpc-gateway From 7774e9b986e58024d6ce221b0b2da816190fe8c2 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Sun, 29 Sep 2024 23:09:13 +0800 Subject: [PATCH 37/86] bump version --- charts/rollup-node/Chart.yaml | 2 +- .../templates/get-db-info-script.yaml | 50 +++++++++++++++---- charts/scroll-sdk/Chart.yaml | 2 +- 3 files changed, 43 insertions(+), 11 deletions(-) diff --git a/charts/rollup-node/Chart.yaml b/charts/rollup-node/Chart.yaml index 8284f935..dc4d9681 100644 --- a/charts/rollup-node/Chart.yaml +++ b/charts/rollup-node/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: rollup-node helm charts name: rollup-node -version: 0.0.23 +version: 0.0.24 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/rollup-node/templates/get-db-info-script.yaml b/charts/rollup-node/templates/get-db-info-script.yaml index 13442066..a4ab7321 100644 --- a/charts/rollup-node/templates/get-db-info-script.yaml +++ b/charts/rollup-node/templates/get-db-info-script.yaml @@ -138,6 +138,10 @@ data: # Print the values of START_CHUNK_INDEX and END_CHUNK_INDEX for verification echo "Chunk index range: $START_CHUNK_INDEX to $END_CHUNK_INDEX" + # Copy chunks + echo "SHADOW: Copying chunks [$START_CHUNK_INDEX, $END_CHUNK_INDEX]" + remote_sql_run "COPY (SELECT * FROM chunk WHERE index >= $START_CHUNK_INDEX AND index <= $END_CHUNK_INDEX) TO STDOUT WITH CSV HEADER" | local_sql_run "COPY chunk FROM STDIN WITH CSV HEADER" + # Get the batch hash for the last finalized batch LAST_FINALIZED_BATCH_HASH=$(local_sql_run " SELECT hash @@ -146,28 +150,56 @@ data: ") echo "Last finalized batch hash: $LAST_FINALIZED_BATCH_HASH" + # Reset chunk status for chunks not in the last finalized batch + local_sql_run "UPDATE chunk SET proving_status = 1, prover_assigned_at = NULL, total_attempts = 0, active_attempts = 0 WHERE batch_hash != '$LAST_FINALIZED_BATCH_HASH'" + + # Get total chunk count + TOTAL_CHUNKS=$(local_sql_run "SELECT COUNT(*) FROM chunk") + + # Get unassigned chunks info + UNASSIGNED_CHUNKS_INFO=$(local_sql_run " + SELECT MIN(index), MAX(index), COUNT(*) + FROM chunk + WHERE proving_status = 1 + ") + + MIN_UNASSIGNED_CHUNK_INDEX=$(echo $UNASSIGNED_CHUNKS_INFO | cut -d '|' -f1) + MAX_UNASSIGNED_CHUNK_INDEX=$(echo $UNASSIGNED_CHUNKS_INFO | cut -d '|' -f2) + UNASSIGNED_CHUNKS_COUNT=$(echo $UNASSIGNED_CHUNKS_INFO | cut -d '|' -f3) + # Check how many chunks still have verified status VERIFIED_CHUNKS_INFO=$(local_sql_run " SELECT MIN(index), MAX(index), COUNT(*) FROM chunk WHERE proving_status = 4 - AND batch_hash = '$LAST_FINALIZED_BATCH_HASH' ") - echo "Raw VERIFIED_CHUNKS_INFO: $VERIFIED_CHUNKS_INFO" MIN_VERIFIED_CHUNK_INDEX=$(echo $VERIFIED_CHUNKS_INFO | cut -d '|' -f1) MAX_VERIFIED_CHUNK_INDEX=$(echo $VERIFIED_CHUNKS_INFO | cut -d '|' -f2) VERIFIED_CHUNKS_COUNT=$(echo $VERIFIED_CHUNKS_INFO | cut -d '|' -f3) - echo "Min verified chunk index: $MIN_VERIFIED_CHUNK_INDEX" - echo "Max verified chunk index: $MAX_VERIFIED_CHUNK_INDEX" - echo "Verified chunks count: $VERIFIED_CHUNKS_COUNT" - - if [ -z "$MIN_VERIFIED_CHUNK_INDEX" ] || [ -z "$MAX_VERIFIED_CHUNK_INDEX" ]; then - echo "Warning: No verified chunks found for the last finalized batch." + # Print summary + echo "----------------------------------------" + echo "Chunk Statistics Summary:" + echo "----------------------------------------" + echo "Total chunks: $TOTAL_CHUNKS" + echo "" + echo "Verified chunks:" + echo " Count: $VERIFIED_CHUNKS_COUNT" + if [ -n "$MIN_VERIFIED_CHUNK_INDEX" ] && [ -n "$MAX_VERIFIED_CHUNK_INDEX" ]; then + echo " Range: [$MIN_VERIFIED_CHUNK_INDEX, $MAX_VERIFIED_CHUNK_INDEX]" + else + echo " Range: N/A (no verified chunks)" + fi + echo "" + echo "Unassigned chunks:" + echo " Count: $UNASSIGNED_CHUNKS_COUNT" + if [ -n "$MIN_UNASSIGNED_CHUNK_INDEX" ] && [ -n "$MAX_UNASSIGNED_CHUNK_INDEX" ]; then + echo " Range: [$MIN_UNASSIGNED_CHUNK_INDEX, $MAX_UNASSIGNED_CHUNK_INDEX]" else - echo "Range of verified chunks: [$MIN_VERIFIED_CHUNK_INDEX, $MAX_VERIFIED_CHUNK_INDEX]" + echo " Range: N/A (no unassigned chunks)" fi + echo "----------------------------------------" # Get the start and end block numbers for the copied chunks BLOCK_NUMBERS=$(local_sql_run "SELECT MIN(start_block_number), MAX(end_block_number) FROM chunk WHERE index >= $START_CHUNK_INDEX AND index <= $END_CHUNK_INDEX") diff --git a/charts/scroll-sdk/Chart.yaml b/charts/scroll-sdk/Chart.yaml index 8ecd55dd..cca6ba64 100644 --- a/charts/scroll-sdk/Chart.yaml +++ b/charts/scroll-sdk/Chart.yaml @@ -98,7 +98,7 @@ dependencies: repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-explorer-backend.enabled - name: rollup-node - version: 0.0.23 + version: 0.0.24 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-node.enabled - name: rpc-gateway From 934bb40be7ca9fbf2ffaecc5d3cdf9830e9deb41 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Mon, 30 Sep 2024 14:09:36 +0800 Subject: [PATCH 38/86] disable unused services --- charts/scroll-sdk/values.yaml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/charts/scroll-sdk/values.yaml b/charts/scroll-sdk/values.yaml index 5d51100f..11565c8a 100644 --- a/charts/scroll-sdk/values.yaml +++ b/charts/scroll-sdk/values.yaml @@ -11,10 +11,10 @@ l1-devnet: pathType: Prefix blockscout: - enabled: true + enabled: false bridge-history-api: - enabled: true + enabled: false ingress: main: enabled: true @@ -29,13 +29,13 @@ bridge-history-api: pathType: Prefix bridge-history-fetcher: - enabled: true + enabled: false balance-checker: enabled: false chain-monitor: - enabled: true + enabled: false contracts: enabled: false @@ -47,7 +47,7 @@ coordinator-cron: enabled: false frontends: - enabled: true + enabled: false ingress: main: enabled: true @@ -58,10 +58,10 @@ frontends: pathType: Prefix gas-oracle: - enabled: true + enabled: false grafana: - enabled: true + enabled: false fullnameOverride: grafana nameOverride: grafana adminUser: admin @@ -104,7 +104,7 @@ grafana: hosts: ["grafana.scrollsdk"] rollup-explorer-backend: - enabled: true + enabled: false ingress: main: enabled: true @@ -122,7 +122,7 @@ rollup-node: enabled: true l1-explorer: - enabled: true + enabled: false ingress: main: enabled: true @@ -137,7 +137,7 @@ l2-sequencer: enabled: true l2-rpc: - enabled: true + enabled: false ingress: main: enabled: true @@ -149,10 +149,10 @@ l2-rpc: pathType: Prefix l2-bootnode: - enabled: true + enabled: false loki-stack: - enabled: true + enabled: false loki: fullnameOverride: loki nameOverride: loki @@ -181,13 +181,13 @@ rpc-gateway: pathType: Prefix admin-system-backend: - enabled: true + enabled: false admin-system-cron: - enabled: true + enabled: false admin-system-dashboard: - enabled: true + enabled: false ingress: main: enabled: true @@ -232,7 +232,7 @@ postgresql: kube-prometheus-stack: - enabled: true + enabled: false nameOverride: prometheus fullnameOverride: prometheus prometheus: From d1a5afe347801704cb0759cba8b3fe7261e9c164 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Tue, 8 Oct 2024 20:51:27 +0800 Subject: [PATCH 39/86] fix --- charts/l2-sequencer/values.yaml | 1 + charts/scroll-sdk/config.toml | 7 +-- devnet/Makefile | 5 ++ devnet/genesis.shadow.json | 97 +++++++++++++++++++++++++++++++++ 4 files changed, 106 insertions(+), 4 deletions(-) create mode 100644 devnet/genesis.shadow.json diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index cb8b1be1..09a2ba4c 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -54,6 +54,7 @@ command: --http --http.port \"$L2GETH_RPC_HTTP_PORT\" --http.addr \"0.0.0.0\" --http.vhosts=\"*\" --http.corsdomain \"*\" --http.api \"eth,scroll,net,web3,debug\" \ --pprof --pprof.addr \"0.0.0.0\" --pprof.port 6060 \ --ws --ws.port \"$L2GETH_RPC_WS_PORT\" --ws.addr \"0.0.0.0\" --ws.api \"eth,scroll,net,web3,debug\" \ + --net.shadowforkpeer empty \ --unlock \"$L2GETH_SIGNER_ADDRESS\" --password \"/l2geth/password\" --allow-insecure-unlock --mine \ --ccc --ccc.numworkers 5 \ --gcmode archive \ diff --git a/charts/scroll-sdk/config.toml b/charts/scroll-sdk/config.toml index 84093279..af46014c 100644 --- a/charts/scroll-sdk/config.toml +++ b/charts/scroll-sdk/config.toml @@ -50,11 +50,10 @@ ALTERNATIVE_GAS_TOKEN_ENABLED = false [sequencer] -L2GETH_SIGNER_ADDRESS = "0x756EA06BDEe36de11F22DCca45a31d8a178eF3c6" -L2GETH_KEYSTORE = '{"address":"756ea06bdee36de11f22dcca45a31d8a178ef3c6","crypto":{"cipher":"aes-128-ctr","ciphertext":"8bfb4e48c6b172f1f5794d2874476ca62f8184507c0916dbd45fe77a0056114c","cipherparams":{"iv":"509eb70e7379a776e0779634b6668277"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"ef0f0334e5db7c12d76993e1e9627593fd0d7cd44444b689e792c86bc8a5d75f"},"mac":"d766cac11d0bd563316f5655ebf07550b6fce98ba0ca3c13acdc1b65f5f185ca"},"id":"4459ad67-f2ce-48b2-8940-c0582106a4c6","version":3}' -L2GETH_PASSWORD = "scroll2022" +L2GETH_SIGNER_ADDRESS = "0x4e1f062ffab6dca974947f82a6e836e678a7d435" +L2GETH_KEYSTORE = '{"address":"4e1f062ffab6dca974947f82a6e836e678a7d435","crypto":{"cipher":"aes-128-ctr","ciphertext":"c99d70c628ade76bcfbfd7b5b8a971b36617578fee28866f780357de146bcf28","cipherparams":{"iv":"e32b0124fbcee506087e9893c4a9bcbb"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"3edd130403fdf26e7a7c20da544865e458137a062badff1e2e637ad4fe2d43dc"},"mac":"b96073a311dc26f369d82bd222db1905302444bb53048f2864f747ed1ce48bc3"},"id":"4d7d0d01-45a6-4840-925b-1d89cb626eb8","version":3}' +L2GETH_PASSWORD = "1234" L2GETH_NODEKEY = "2f59ff2fdee1c42a3d8c8980c313bc8d6c2557463f7bb92b0f0bc89a6d3cbf01" -L2_GETH_STATIC_PEERS = '["enode://848a7d59dd8f60dd1a51160e6bc15c194937855443de9be4b2abd83e11a5c4ac21d61d065448c5c520826fe83f1f29eb5a452daccca27b8113aa897074132507@l2-sequencer:30303"]' [rollup] diff --git a/devnet/Makefile b/devnet/Makefile index ea17cb22..2d809808 100644 --- a/devnet/Makefile +++ b/devnet/Makefile @@ -16,6 +16,11 @@ config: cd scroll-sdk && time docker run --rm -it -v .:/contracts/volume scrolltech/scroll-stack-contracts:gen-configs-v0.0.22 echo "Creating env files..." ./create-env-files.sh scroll-sdk + echo "Overwriting genesis.json..." + cp scroll-sdk/configs/genesis.json scroll-sdk/configs/genesis.json.backup + cp genesis.shadow.json scroll-sdk/configs/genesis.json + cp scroll-sdk/genesis.json scroll-sdk/genesis.json.backup + cp genesis.shadow.json scroll-sdk/genesis.json install: helm upgrade -i scroll-sdk scroll-sdk/ \ diff --git a/devnet/genesis.shadow.json b/devnet/genesis.shadow.json new file mode 100644 index 00000000..a4049848 --- /dev/null +++ b/devnet/genesis.shadow.json @@ -0,0 +1,97 @@ +{ + "config": { + "chainId": 534352, + "homesteadBlock": 0, + "eip150Block": 0, + "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "eip155Block": 0, + "eip158Block": 0, + "byzantiumBlock": 0, + "constantinopleBlock": 0, + "petersburgBlock": 0, + "istanbulBlock": 0, + "berlinBlock": 0, + "londonBlock": 0, + "archimedesBlock": 0, + "shanghaiBlock": 0, + "bernoulliBlock": 5220340, + "curieBlock": 7096836, + "clique": { + "period": 3, + "epoch": 30000, + "relaxed_period": true, + "shadow_fork_height": 1370000, + "shadow_fork_signer": "0x4e1f062ffab6dca974947f82a6e836e678a7d435" + }, + "scroll": { + "useZktrie": true, + "maxTxPerBlock": 100, + "maxTxPayloadBytesPerBlock": 122880, + "feeVaultAddress": "0x5300000000000000000000000000000000000005", + "l1Config": { + "l1ChainId": "1", + "l1MessageQueueAddress": "0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B", + "scrollChainAddress": "0xa13BAF47339d63B743e7Da8741db5456DAc1E556", + "numL1MessagesPerBlock": "10" + } + } + }, + "nonce": "0x0", + "timestamp": "0x6524e860", + "extraData": "0x4c61206573746f6e7465636f206573746173206d616c6665726d6974612e0000d2ACF5d16a983DB0d909d9D761B8337Fabd6cBd10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "gasLimit": "10000000", + "difficulty": "0x1", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "coinbase": "0x0000000000000000000000000000000000000000", + "alloc": { + "0xF9062b8a30e0d7722960e305049FA50b86ba6253": { + "balance": "2000000000000000000" + }, + "0x781e90f1c8Fc4611c9b7497C3B47F99Ef6969CbC": { + "balance": "226156424291633194186662080095093570025917938800079226637565593765455331328" + }, + "0x5300000000000000000000000000000000000000": { + "balance": "0x0", + "code": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c806383cc76601161006657806383cc7660146100fc5780638da5cb5b1461010f578063c4d66de814610122578063d4b9f4fa14610135578063f2fde38b1461013e57600080fd5b806326aad7b7146100985780633cb747bf146100b4578063600a2e77146100df578063715018a6146100f2575b600080fd5b6100a160015481565b6040519081526020015b60405180910390f35b6053546100c7906001600160a01b031681565b6040516001600160a01b0390911681526020016100ab565b6100a16100ed36600461054a565b610151565b6100fa6101f6565b005b6100a161010a36600461054a565b61022c565b6052546100c7906001600160a01b031681565b6100fa610130366004610563565b610243565b6100a160005481565b6100fa61014c366004610563565b6102db565b6053546000906001600160a01b031633146101a45760405162461bcd60e51b815260206004820152600e60248201526d37b7363c9036b2b9b9b2b733b2b960911b60448201526064015b60405180910390fd5b6000806101b084610367565b60408051838152602081018890529294509092507ffaa617c2d8ce12c62637dbce76efcc18dae60574aa95709bdcedce7e76071693910160405180910390a19392505050565b6052546001600160a01b031633146102205760405162461bcd60e51b815260040161019b90610593565b61022a6000610486565b565b602a816028811061023c57600080fd5b0154905081565b6052546001600160a01b0316331461026d5760405162461bcd60e51b815260040161019b90610593565b600154156102b15760405162461bcd60e51b815260206004820152601160248201527063616e6e6f7420696e697469616c697a6560781b604482015260640161019b565b6102b96104d8565b605380546001600160a01b0319166001600160a01b0392909216919091179055565b6052546001600160a01b031633146103055760405162461bcd60e51b815260040161019b90610593565b6001600160a01b03811661035b5760405162461bcd60e51b815260206004820152601d60248201527f6e6577206f776e657220697320746865207a65726f2061646472657373000000604482015260640161019b565b61036481610486565b50565b60035460009081906103bb5760405162461bcd60e51b815260206004820152601a60248201527f63616c6c206265666f726520696e697469616c697a6174696f6e000000000000604482015260640161019b565b6001548360005b8215610456576103d36002846105e0565b60000361041f5781602a82602881106103ee576103ee6105ca565b01556104188260028360288110610407576104076105ca565b015460009182526020526040902090565b915061044a565b610447602a8260288110610435576104356105ca565b01548360009182526020526040902090565b91505b600192831c92016103c2565b81602a826028811061046a5761046a6105ca565b0155506000819055600180548082019091559590945092505050565b605280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60005b60286104e8826001610618565b10156103645761051960028260288110610504576105046105ca565b015460028360288110610407576104076105ca565b6002610526836001610618565b60288110610536576105366105ca565b01558061054281610631565b9150506104db565b60006020828403121561055c57600080fd5b5035919050565b60006020828403121561057557600080fd5b81356001600160a01b038116811461058c57600080fd5b9392505050565b60208082526017908201527f63616c6c6572206973206e6f7420746865206f776e6572000000000000000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000826105fd57634e487b7160e01b600052601260045260246000fd5b500690565b634e487b7160e01b600052601160045260246000fd5b8082018082111561062b5761062b610602565b92915050565b60006001820161064357610643610602565b506001019056fea26469706673582212208fb1cb9933bb17dd0a7c17de7c890919b08d2fd7eb2bede7b41caa32709b30b564736f6c63430008100033", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000052": "0xF9062b8a30e0d7722960e305049FA50b86ba6253" + } + }, + "0x5300000000000000000000000000000000000002": { + "balance": "0x0", + "code": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063715018a61161008c578063bede39b511610066578063bede39b51461018d578063de26c4a1146101a0578063f2fde38b146101b3578063f45e65d8146101c657600080fd5b8063715018a6146101475780638da5cb5b1461014f57806393e59dc11461017a57600080fd5b80630c18c162146100d45780633577afc5146100f05780633d0f963e1461010557806349948e0e14610118578063519b4bd31461012b5780637046559714610134575b600080fd5b6100dd60025481565b6040519081526020015b60405180910390f35b6101036100fe366004610671565b6101cf565b005b61010361011336600461068a565b610291565b6100dd6101263660046106d0565b61031c565b6100dd60015481565b610103610142366004610671565b610361565b610103610416565b600054610162906001600160a01b031681565b6040516001600160a01b0390911681526020016100e7565b600454610162906001600160a01b031681565b61010361019b366004610671565b61044c565b6100dd6101ae3660046106d0565b610533565b6101036101c136600461068a565b610595565b6100dd60035481565b6000546001600160a01b031633146102025760405162461bcd60e51b81526004016101f990610781565b60405180910390fd5b621c9c388111156102555760405162461bcd60e51b815260206004820152601760248201527f657863656564206d6178696d756d206f7665726865616400000000000000000060448201526064016101f9565b60028190556040518181527f32740b35c0ea213650f60d44366b4fb211c9033b50714e4a1d34e65d5beb9bb4906020015b60405180910390a150565b6000546001600160a01b031633146102bb5760405162461bcd60e51b81526004016101f990610781565b600480546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f22d1c35fe072d2e42c3c8f9bd4a0d34aa84a0101d020a62517b33fdb3174e5f7910160405180910390a15050565b60008061032883610533565b905060006001548261033a91906107b8565b9050633b9aca006003548261034f91906107b8565b61035991906107e5565b949350505050565b6000546001600160a01b0316331461038b5760405162461bcd60e51b81526004016101f990610781565b61039b633b9aca006103e86107b8565b8111156103e15760405162461bcd60e51b8152602060048201526014602482015273657863656564206d6178696d756d207363616c6560601b60448201526064016101f9565b60038190556040518181527f3336cd9708eaf2769a0f0dc0679f30e80f15dcd88d1921b5a16858e8b85c591a90602001610286565b6000546001600160a01b031633146104405760405162461bcd60e51b81526004016101f990610781565b61044a6000610621565b565b6004805460405163efc7840160e01b815233928101929092526001600160a01b03169063efc7840190602401602060405180830381865afa158015610495573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b99190610807565b6104fe5760405162461bcd60e51b81526020600482015260166024820152752737ba103bb434ba32b634b9ba32b21039b2b73232b960511b60448201526064016101f9565b60018190556040518181527f351fb23757bb5ea0546c85b7996ddd7155f96b939ebaa5ff7bc49c75f27f2c4490602001610286565b80516000908190815b818110156105865784818151811061055657610556610829565b01602001516001600160f81b0319166000036105775760048301925061057e565b6010830192505b60010161053c565b50506002540160400192915050565b6000546001600160a01b031633146105bf5760405162461bcd60e51b81526004016101f990610781565b6001600160a01b0381166106155760405162461bcd60e51b815260206004820152601d60248201527f6e6577206f776e657220697320746865207a65726f206164647265737300000060448201526064016101f9565b61061e81610621565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561068357600080fd5b5035919050565b60006020828403121561069c57600080fd5b81356001600160a01b03811681146106b357600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156106e257600080fd5b813567ffffffffffffffff808211156106fa57600080fd5b818401915084601f83011261070e57600080fd5b813581811115610720576107206106ba565b604051601f8201601f19908116603f01168101908382118183101715610748576107486106ba565b8160405282815287602084870101111561076157600080fd5b826020860160208301376000928101602001929092525095945050505050565b60208082526017908201527f63616c6c6572206973206e6f7420746865206f776e6572000000000000000000604082015260600190565b60008160001904831182151516156107e057634e487b7160e01b600052601160045260246000fd5b500290565b60008261080257634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561081957600080fd5b815180151581146106b357600080fd5b634e487b7160e01b600052603260045260246000fdfea26469706673582212205ea335809638809cf032c794fd966e2439020737b1dcc2218435cb438286efcf64736f6c63430008100033", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0xF9062b8a30e0d7722960e305049FA50b86ba6253" + } + }, + "0x5300000000000000000000000000000000000003": { + "balance": "0x0", + "code": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c8063715018a61461005c57806379586dd7146100665780638da5cb5b14610079578063efc78401146100a9578063f2fde38b146100e5575b600080fd5b6100646100f8565b005b610064610074366004610356565b610137565b60005461008c906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100d56100b736600461042d565b6001600160a01b031660009081526001602052604090205460ff1690565b60405190151581526020016100a0565b6100646100f336600461042d565b610238565b6000546001600160a01b0316331461012b5760405162461bcd60e51b81526004016101229061044f565b60405180910390fd5b61013560006102c4565b565b6000546001600160a01b031633146101615760405162461bcd60e51b81526004016101229061044f565b60005b825181101561023357816001600085848151811061018457610184610486565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055508281815181106101d5576101d5610486565b60200260200101516001600160a01b03167f8daaf060c3306c38e068a75c054bf96ecd85a3db1252712c4d93632744c42e0d83604051610219911515815260200190565b60405180910390a28061022b8161049c565b915050610164565b505050565b6000546001600160a01b031633146102625760405162461bcd60e51b81526004016101229061044f565b6001600160a01b0381166102b85760405162461bcd60e51b815260206004820152601d60248201527f6e6577206f776e657220697320746865207a65726f20616464726573730000006044820152606401610122565b6102c1816102c4565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b80356001600160a01b038116811461034157600080fd5b919050565b8035801515811461034157600080fd5b6000806040838503121561036957600080fd5b823567ffffffffffffffff8082111561038157600080fd5b818501915085601f83011261039557600080fd5b81356020828211156103a9576103a9610314565b8160051b604051601f19603f830116810181811086821117156103ce576103ce610314565b6040529283528183019350848101820192898411156103ec57600080fd5b948201945b83861015610411576104028661032a565b855294820194938201936103f1565b96506104209050878201610346565b9450505050509250929050565b60006020828403121561043f57600080fd5b6104488261032a565b9392505050565b60208082526017908201527f63616c6c6572206973206e6f7420746865206f776e6572000000000000000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600182016104bc57634e487b7160e01b600052601160045260246000fd5b506001019056fea26469706673582212203414b076e92b618bd7c3437159d7bceb2acc3a5c82f51f383465512d9c52e97064736f6c63430008100033", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0xF9062b8a30e0d7722960e305049FA50b86ba6253" + } + }, + "0x5300000000000000000000000000000000000004": { + "balance": "0x0", + "code": "0x6080604052600436106101025760003560e01c806370a0823111610095578063a457c2d711610064578063a457c2d7146102b4578063a9059cbb146102d4578063d0e30db0146102f4578063d505accf146102fc578063dd62ed3e1461031c57600080fd5b806370a08231146102215780637ecebe001461025757806384b0196e1461027757806395d89b411461029f57600080fd5b80632e1a7d4d116100d15780632e1a7d4d146101b0578063313ce567146101d05780633644e515146101ec578063395093511461020157600080fd5b806306fdde0314610116578063095ea7b31461014157806318160ddd1461017157806323b872dd1461019057600080fd5b366101115761010f61033c565b005b600080fd5b34801561012257600080fd5b5061012b61038d565b60405161013891906112fa565b60405180910390f35b34801561014d57600080fd5b5061016161015c366004611330565b61041f565b6040519015158152602001610138565b34801561017d57600080fd5b506002545b604051908152602001610138565b34801561019c57600080fd5b506101616101ab36600461135a565b610439565b3480156101bc57600080fd5b5061010f6101cb366004611396565b61045d565b3480156101dc57600080fd5b5060405160128152602001610138565b3480156101f857600080fd5b5061018261054e565b34801561020d57600080fd5b5061016161021c366004611330565b61055d565b34801561022d57600080fd5b5061018261023c3660046113af565b6001600160a01b031660009081526020819052604090205490565b34801561026357600080fd5b506101826102723660046113af565b61057f565b34801561028357600080fd5b5061028c61059d565b60405161013897969594939291906113ca565b3480156102ab57600080fd5b5061012b610626565b3480156102c057600080fd5b506101616102cf366004611330565b610635565b3480156102e057600080fd5b506101616102ef366004611330565b6106b0565b61010f61033c565b34801561030857600080fd5b5061010f610317366004611460565b6106be565b34801561032857600080fd5b506101826103373660046114d3565b610822565b336103478134610881565b806001600160a01b03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c3460405161038291815260200190565b60405180910390a250565b60606003805461039c90611506565b80601f01602080910402602001604051908101604052809291908181526020018280546103c890611506565b80156104155780601f106103ea57610100808354040283529160200191610415565b820191906000526020600020905b8154815290600101906020018083116103f857829003601f168201915b5050505050905090565b60003361042d818585610940565b60019150505b92915050565b600033610447858285610a65565b610452858585610adf565b506001949350505050565b336104688183610c83565b6000816001600160a01b03168360405160006040518083038185875af1925050503d80600081146104b5576040519150601f19603f3d011682016040523d82523d6000602084013e6104ba565b606091505b50509050806105065760405162461bcd60e51b81526020600482015260136024820152721dda5d1a191c985dc81155120819985a5b1959606a1b60448201526064015b60405180910390fd5b816001600160a01b03167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b658460405161054191815260200190565b60405180910390a2505050565b6000610558610db2565b905090565b60003361042d8185856105708383610822565b61057a919061153a565b610940565b6001600160a01b038116600090815260076020526040812054610433565b6000606080828080836105d17f577261707065642045746865720000000000000000000000000000000000000d6005610edd565b6105fc7f31000000000000000000000000000000000000000000000000000000000000016006610edd565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b60606004805461039c90611506565b600033816106438286610822565b9050838110156106a35760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016104fd565b6104528286868403610940565b60003361042d818585610adf565b8342111561070e5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e6500000060448201526064016104fd565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988888861073d8c610f81565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061079882610fa9565b905060006107a882878787610fd6565b9050896001600160a01b0316816001600160a01b03161461080b5760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e6174757265000060448201526064016104fd565b6108168a8a8a610940565b50505050505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60006020835110156108695761086283610ffe565b9050610433565b8161087484826115bf565b5060ff9050610433565b90565b6001600160a01b0382166108d75760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016104fd565b80600260008282546108e9919061153a565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6001600160a01b0383166109a25760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104fd565b6001600160a01b038216610a035760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104fd565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6000610a718484610822565b90506000198114610ad95781811015610acc5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016104fd565b610ad98484848403610940565b50505050565b6001600160a01b038316610b435760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104fd565b6001600160a01b038216610ba55760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104fd565b6001600160a01b03831660009081526020819052604090205481811015610c1d5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016104fd565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610ad9565b6001600160a01b038216610ce35760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016104fd565b6001600160a01b03821660009081526020819052604090205481811015610d575760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016104fd565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101610a58565b505050565b6000306001600160a01b037f000000000000000000000000530000000000000000000000000000000000000416148015610e0b57507f000000000000000000000000000000000000000000000000000000000008275046145b15610e3557507fe5b117a3cd7ae7ed3508e6e6c5a0794536b2a8dee12533c4d7524eae9c85438f90565b610558604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f00cd3d46df44f2cbb950cf84eb2e92aa2ddd23195b1a009173ea59a063357ed3918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b606060ff8314610ef0576108628361103c565b818054610efc90611506565b80601f0160208091040260200160405190810160405280929190818152602001828054610f2890611506565b8015610f755780601f10610f4a57610100808354040283529160200191610f75565b820191906000526020600020905b815481529060010190602001808311610f5857829003601f168201915b50505050509050610433565b6001600160a01b03811660009081526007602052604090208054600181018255905b50919050565b6000610433610fb6610db2565b8360405161190160f01b8152600281019290925260228201526042902090565b6000806000610fe78787878761107b565b91509150610ff48161113f565b5095945050505050565b600080829050601f81511115611029578260405163305a27a960e01b81526004016104fd91906112fa565b80516110348261167f565b179392505050565b606060006110498361128c565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156110b25750600090506003611136565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611106573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661112f57600060019250925050611136565b9150600090505b94509492505050565b6000816004811115611153576111536116a3565b0361115b5750565b600181600481111561116f5761116f6116a3565b036111bc5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104fd565b60028160048111156111d0576111d06116a3565b0361121d5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104fd565b6003816004811115611231576112316116a3565b036112895760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016104fd565b50565b600060ff8216601f81111561043357604051632cd44ac360e21b815260040160405180910390fd5b6000815180845260005b818110156112da576020818501810151868301820152016112be565b506000602082860101526020601f19601f83011685010191505092915050565b60208152600061130d60208301846112b4565b9392505050565b80356001600160a01b038116811461132b57600080fd5b919050565b6000806040838503121561134357600080fd5b61134c83611314565b946020939093013593505050565b60008060006060848603121561136f57600080fd5b61137884611314565b925061138660208501611314565b9150604084013590509250925092565b6000602082840312156113a857600080fd5b5035919050565b6000602082840312156113c157600080fd5b61130d82611314565b60ff60f81b881681526000602060e0818401526113ea60e084018a6112b4565b83810360408501526113fc818a6112b4565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b8181101561144e57835183529284019291840191600101611432565b50909c9b505050505050505050505050565b600080600080600080600060e0888a03121561147b57600080fd5b61148488611314565b965061149260208901611314565b95506040880135945060608801359350608088013560ff811681146114b657600080fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156114e657600080fd5b6114ef83611314565b91506114fd60208401611314565b90509250929050565b600181811c9082168061151a57607f821691505b602082108103610fa357634e487b7160e01b600052602260045260246000fd5b8082018082111561043357634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b601f821115610dad57600081815260208120601f850160051c810160208610156115985750805b601f850160051c820191505b818110156115b7578281556001016115a4565b505050505050565b815167ffffffffffffffff8111156115d9576115d961155b565b6115ed816115e78454611506565b84611571565b602080601f831160018114611622576000841561160a5750858301515b600019600386901b1c1916600185901b1785556115b7565b600085815260208120601f198616915b8281101561165157888601518255948401946001909101908401611632565b508582101561166f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b80516020808301519190811015610fa35760001960209190910360031b1b16919050565b634e487b7160e01b600052602160045260246000fdfea26469706673582212207f39e33e122e8e2b0381aa6abea46046f56b05ced66c556a06bb1b80be7f55cf64736f6c63430008100033", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000003": "0x577261707065642045746865720000000000000000000000000000000000001a", + "0x0000000000000000000000000000000000000000000000000000000000000004": "0x5745544800000000000000000000000000000000000000000000000000000008" + } + }, + "0x5300000000000000000000000000000000000005": { + "balance": "0x0", + "code": "0x6080604052600436106100ab5760003560e01c806384411d651161006457806384411d65146101845780638da5cb5b1461019a5780639e7adc79146101ba578063f2fde38b146101da578063feec756c146101fa578063ff4f35461461021a57600080fd5b80632e1a7d4d146100b75780633cb747bf146100d95780633ccfd60b14610116578063457e1a491461012b57806366d003ac1461014f578063715018a61461016f57600080fd5b366100b257005b600080fd5b3480156100c357600080fd5b506100d76100d2366004610682565b61023a565b005b3480156100e557600080fd5b506002546100f9906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561012257600080fd5b506100d76103ff565b34801561013757600080fd5b5061014160015481565b60405190815260200161010d565b34801561015b57600080fd5b506003546100f9906001600160a01b031681565b34801561017b57600080fd5b506100d761040c565b34801561019057600080fd5b5061014160045481565b3480156101a657600080fd5b506000546100f9906001600160a01b031681565b3480156101c657600080fd5b506100d76101d536600461069b565b610442565b3480156101e657600080fd5b506100d76101f536600461069b565b6104be565b34801561020657600080fd5b506100d761021536600461069b565b610547565b34801561022657600080fd5b506100d7610235366004610682565b6105c3565b6001548110156102ca5760405162461bcd60e51b815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d20776974686472616064820152691dd85b08185b5bdd5b9d60b21b608482015260a4015b60405180910390fd5b478082111561032e5760405162461bcd60e51b815260206004820152602a60248201527f4665655661756c743a20696e73756666696369656e742062616c616e636520746044820152696f20776974686472617760b01b60648201526084016102c1565b6004805483019055600354604080518481526001600160a01b0390921660208301523382820152517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1600254600354604080516020810182526000808252915163b2267a7b60e01b81526001600160a01b039485169463b2267a7b9488946103c99491909216928592906004016106cb565b6000604051808303818588803b1580156103e257600080fd5b505af11580156103f6573d6000803e3d6000fd5b50505050505050565b476104098161023a565b50565b6000546001600160a01b031633146104365760405162461bcd60e51b81526004016102c190610737565b6104406000610632565b565b6000546001600160a01b0316331461046c5760405162461bcd60e51b81526004016102c190610737565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f1c928c417a10a21c3cddad148c5dba5d710e4b1442d6d8a36de345935ad8461290600090a35050565b6000546001600160a01b031633146104e85760405162461bcd60e51b81526004016102c190610737565b6001600160a01b03811661053e5760405162461bcd60e51b815260206004820152601d60248201527f6e6577206f776e657220697320746865207a65726f206164647265737300000060448201526064016102c1565b61040981610632565b6000546001600160a01b031633146105715760405162461bcd60e51b81526004016102c190610737565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f7e1e96961a397c8aa26162fe259cc837afc95e33aad4945ddc61c18dabb7a6ad90600090a35050565b6000546001600160a01b031633146105ed5760405162461bcd60e51b81526004016102c190610737565b600180549082905560408051828152602081018490527f0d3c80219fe57713b9f9c83d1e51426792d0c14d8e330e65b102571816140965910160405180910390a15050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561069457600080fd5b5035919050565b6000602082840312156106ad57600080fd5b81356001600160a01b03811681146106c457600080fd5b9392505050565b60018060a01b038516815260006020858184015260806040840152845180608085015260005b8181101561070d5786810183015185820160a0015282016106f1565b50600060a0828601015260a0601f19601f8301168501019250505082606083015295945050505050565b60208082526017908201527f63616c6c6572206973206e6f7420746865206f776e657200000000000000000060408201526060019056fea2646970667358221220063c6c384f745ebcacfdd13320e5b9a50687aae43ff14566761f56273111b97e64736f6c63430008100033", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0xF9062b8a30e0d7722960e305049FA50b86ba6253", + "0x0000000000000000000000000000000000000000000000000000000000000001": "0x8ac7230489e80000", + "0x0000000000000000000000000000000000000000000000000000000000000002": "0x781e90f1c8Fc4611c9b7497C3B47F99Ef6969CbC", + "0x0000000000000000000000000000000000000000000000000000000000000003": "0x8FA3b4570B4C96f8036C13b64971BA65867eEB48" + } + } + }, + "number": "0x0", + "gasUsed": "0x0", + "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "baseFeePerGas": null +} From 4358bf48c46f4229043d57187e9114a79300cb0d Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Tue, 8 Oct 2024 20:52:40 +0800 Subject: [PATCH 40/86] bump version --- charts/l2-sequencer/Chart.yaml | 2 +- charts/scroll-sdk/Chart.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/l2-sequencer/Chart.yaml b/charts/l2-sequencer/Chart.yaml index 620bcc25..084df40d 100644 --- a/charts/l2-sequencer/Chart.yaml +++ b/charts/l2-sequencer/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: l2-sequencer helm charts name: l2-sequencer -version: 0.0.9 +version: 0.0.10 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/scroll-sdk/Chart.yaml b/charts/scroll-sdk/Chart.yaml index cca6ba64..2d7712ad 100644 --- a/charts/scroll-sdk/Chart.yaml +++ b/charts/scroll-sdk/Chart.yaml @@ -78,7 +78,7 @@ dependencies: version: 7.3.11 condition: grafana.enabled - name: l2-sequencer - version: 0.0.9 + version: 0.0.10 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: l2-sequencer.enabled - name: loki-stack From 33581d97c9f986340eae4333e680f42ae2b289e9 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Tue, 8 Oct 2024 20:55:08 +0800 Subject: [PATCH 41/86] bump version --- charts/l2-sequencer/Chart.yaml | 2 +- charts/scroll-sdk/Chart.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/l2-sequencer/Chart.yaml b/charts/l2-sequencer/Chart.yaml index 084df40d..db2dbe6c 100644 --- a/charts/l2-sequencer/Chart.yaml +++ b/charts/l2-sequencer/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: l2-sequencer helm charts name: l2-sequencer -version: 0.0.10 +version: 0.0.11 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/scroll-sdk/Chart.yaml b/charts/scroll-sdk/Chart.yaml index 2d7712ad..ea72747c 100644 --- a/charts/scroll-sdk/Chart.yaml +++ b/charts/scroll-sdk/Chart.yaml @@ -78,7 +78,7 @@ dependencies: version: 7.3.11 condition: grafana.enabled - name: l2-sequencer - version: 0.0.10 + version: 0.0.11 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: l2-sequencer.enabled - name: loki-stack From 43589791368cda76910d9a3022103b1d1a1d4607 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Tue, 8 Oct 2024 21:02:41 +0800 Subject: [PATCH 42/86] bump version --- charts/l2-sequencer/Chart.yaml | 2 +- charts/scroll-sdk/Chart.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/l2-sequencer/Chart.yaml b/charts/l2-sequencer/Chart.yaml index db2dbe6c..04b4ecd1 100644 --- a/charts/l2-sequencer/Chart.yaml +++ b/charts/l2-sequencer/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: l2-sequencer helm charts name: l2-sequencer -version: 0.0.11 +version: 0.0.30 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/scroll-sdk/Chart.yaml b/charts/scroll-sdk/Chart.yaml index ea72747c..6cc836ec 100644 --- a/charts/scroll-sdk/Chart.yaml +++ b/charts/scroll-sdk/Chart.yaml @@ -78,7 +78,7 @@ dependencies: version: 7.3.11 condition: grafana.enabled - name: l2-sequencer - version: 0.0.11 + version: 0.0.30 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: l2-sequencer.enabled - name: loki-stack From 0cf0687a2c1110de1a887e2ee208fef038e88269 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Tue, 8 Oct 2024 21:28:15 +0800 Subject: [PATCH 43/86] fix bugs --- charts/scroll-sdk/values.yaml | 2 +- create-env-files.sh | 4 ++-- devnet/Makefile | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/charts/scroll-sdk/values.yaml b/charts/scroll-sdk/values.yaml index 11565c8a..d5240eb4 100644 --- a/charts/scroll-sdk/values.yaml +++ b/charts/scroll-sdk/values.yaml @@ -232,7 +232,7 @@ postgresql: kube-prometheus-stack: - enabled: false + enabled: true nameOverride: prometheus fullnameOverride: prometheus prometheus: diff --git a/create-env-files.sh b/create-env-files.sh index e2f232e2..6c7da000 100755 --- a/create-env-files.sh +++ b/create-env-files.sh @@ -25,7 +25,7 @@ get_service_configmap_variables() { local service_name=$1 case "$service_name" in balance-checker) - echo "L1_RPC_ENDPOINT:SCROLL_L1_RPC L2_RPC_ENDPOINT:SCROLL_L2_RPC L1_COMMIT_SENDER_ADDR:L1_COMMIT_SENDER_ADDR L1_FINALIZE_SENDER_ADDR:L1_FINALIZE_SENDER_ADDR" + echo "CHAIN_ID_L1:SCROLL_L1_RPC CHAIN_ID_L2:SCROLL_L2_RPC" ;; blockscout) echo "L1_RPC_ENDPOINT:SCROLL_L1_RPC BLOCKSCOUT_DB_CONNECTION_STRING:DATABASE_URL" @@ -49,7 +49,7 @@ get_service_configmap_variables() { echo "L1_RPC_ENDPOINT:SCROLL_L1_RPC GAS_ORACLE_DB_CONNECTION_STRING:DATABASE_URL" ;; l1-devnet) - echo "CHAIN_ID_L1:CHAIN_ID L1_FULLNODE_RPC_ENDPOINT:L1_FULLNODE_RPC_ENDPOINT L1_SHADOWFORK_BLOCK_NUMBER:L1_SHADOWFORK_BLOCK_NUMBER" + echo "CHAIN_ID_L1:CHAIN_ID" ;; l1-explorer) echo "CHAIN_ID_L1:CHAIN_ID L1_EXPLORER_DB_CONNECTION_STRING:DATABASE_URL L1_RPC_ENDPOINT:ETHEREUM_JSONRPC_HTTP_URL L1_RPC_ENDPOINT:ETHEREUM_JSONRPC_TRACE_URL L1_RPC_ENDPOINT:JSON_RPC L1_RPC_ENDPOINT_WEBSOCKET:ETHEREUM_JSONRPC_WS_URL L1_EXPLORER_DB_CONNECTION_STRING:DATABASE_URL" diff --git a/devnet/Makefile b/devnet/Makefile index 2d809808..bea91227 100644 --- a/devnet/Makefile +++ b/devnet/Makefile @@ -17,8 +17,6 @@ config: echo "Creating env files..." ./create-env-files.sh scroll-sdk echo "Overwriting genesis.json..." - cp scroll-sdk/configs/genesis.json scroll-sdk/configs/genesis.json.backup - cp genesis.shadow.json scroll-sdk/configs/genesis.json cp scroll-sdk/genesis.json scroll-sdk/genesis.json.backup cp genesis.shadow.json scroll-sdk/genesis.json From 7e47df96150d91ca891c8fa414b36644f05f4f61 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Tue, 8 Oct 2024 21:58:03 +0800 Subject: [PATCH 44/86] update scripts --- charts/rollup-node/templates/get-db-info-script.yaml | 12 +----------- ...take-over-commit-and-finalize-senders-script.yaml | 12 +----------- charts/rollup-node/values.yaml | 4 ++-- 3 files changed, 4 insertions(+), 24 deletions(-) diff --git a/charts/rollup-node/templates/get-db-info-script.yaml b/charts/rollup-node/templates/get-db-info-script.yaml index a4ab7321..2a5f91c4 100644 --- a/charts/rollup-node/templates/get-db-info-script.yaml +++ b/charts/rollup-node/templates/get-db-info-script.yaml @@ -7,17 +7,7 @@ data: #!/bin/bash # Install dependencies - apt-get update && apt-get install -y git curl postgresql-client - - # Install Foundry - curl -L https://foundry.paradigm.xyz | bash - source /root/.bashrc - - # Explicitly set PATH to include Foundry binaries - export PATH="$PATH:/root/.foundry/bin" - - # Run foundryup - foundryup + apk add --no-cache curl echo "Waiting for L1 contract to be ready..." while true; do diff --git a/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml index 5c403bbe..9cbb817b 100644 --- a/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml +++ b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml @@ -22,17 +22,7 @@ data: check_var L1_FINALIZE_SENDER_ADDR # Install dependencies - apt-get update && apt-get install -y git curl - - # Install Foundry - curl -L https://foundry.paradigm.xyz | bash - source /root/.bashrc - - # Explicitly set PATH to include Foundry binaries - export PATH="$PATH:/root/.foundry/bin" - - # Run foundryup - foundryup + apk add --no-cache curl # Set the balance of the Scroll owner # We're setting it to 1000 ETH (0x3635C9ADC5DEA00000 in wei) diff --git a/charts/rollup-node/values.yaml b/charts/rollup-node/values.yaml index 0b161181..4788810a 100644 --- a/charts/rollup-node/values.yaml +++ b/charts/rollup-node/values.yaml @@ -144,7 +144,7 @@ initContainers: mountPath: /wait-for-contract.sh subPath: wait-for-contract.sh 5-take-over-commit-and-finalize-senders: - image: ubuntu:20.04 + image: ghcr.io/foundry-rs/foundry:nightly-e215f3fdeada259a8886a7611151794d280ca298 command: - /bin/bash - -c @@ -157,7 +157,7 @@ initContainers: mountPath: /take-over-commit-and-finalize-senders.sh subPath: take-over-commit-and-finalize-senders.sh 6-get-db-info: - image: ubuntu:20.04 + image: ghcr.io/foundry-rs/foundry:nightly-e215f3fdeada259a8886a7611151794d280ca298 command: - /bin/bash - -c From 3542d9211bed47aa054cafea211272fe3051552b Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Tue, 8 Oct 2024 21:59:06 +0800 Subject: [PATCH 45/86] update scripts --- charts/rollup-node/templates/get-db-info-script.yaml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/charts/rollup-node/templates/get-db-info-script.yaml b/charts/rollup-node/templates/get-db-info-script.yaml index 2a5f91c4..2031ce5d 100644 --- a/charts/rollup-node/templates/get-db-info-script.yaml +++ b/charts/rollup-node/templates/get-db-info-script.yaml @@ -21,16 +21,6 @@ data: fi done - echo "Getting batch information..." - - echo "Checking if cast is available..." - if command -v cast &> /dev/null; then - echo "cast is available" - else - echo "cast is not available. Foundry installation might have failed." - exit 1 - fi - # Get last finalized batch export LAST_FINALIZED_BATCH=$(cast call "${L1_SCROLL_CHAIN_PROXY_ADDR}" "lastFinalizedBatchIndex()(uint256)" --rpc-url ${L1_RPC_ENDPOINT} | awk '{print $1}') From af7518d5764476a576809fdc039eb0817b7383b5 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Tue, 8 Oct 2024 22:32:21 +0800 Subject: [PATCH 46/86] fix --- charts/rollup-node/values.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/rollup-node/values.yaml b/charts/rollup-node/values.yaml index 4788810a..321980ff 100644 --- a/charts/rollup-node/values.yaml +++ b/charts/rollup-node/values.yaml @@ -144,9 +144,9 @@ initContainers: mountPath: /wait-for-contract.sh subPath: wait-for-contract.sh 5-take-over-commit-and-finalize-senders: - image: ghcr.io/foundry-rs/foundry:nightly-e215f3fdeada259a8886a7611151794d280ca298 + image: ghcr.io/foundry-rs/foundry command: - - /bin/bash + - /bin/sh - -c - /take-over-commit-and-finalize-senders.sh envFrom: @@ -157,9 +157,9 @@ initContainers: mountPath: /take-over-commit-and-finalize-senders.sh subPath: take-over-commit-and-finalize-senders.sh 6-get-db-info: - image: ghcr.io/foundry-rs/foundry:nightly-e215f3fdeada259a8886a7611151794d280ca298 + image: ghcr.io/foundry-rs/foundry command: - - /bin/bash + - /bin/sh - -c - /get-db-info.sh envFrom: From 9d16a075cceaddf658f399aefb91d58346484ba6 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Tue, 8 Oct 2024 22:55:47 +0800 Subject: [PATCH 47/86] update base image of foundry scripts --- charts/rollup-node/templates/get-db-info-script.yaml | 3 --- .../take-over-commit-and-finalize-senders-script.yaml | 3 --- charts/rollup-node/values.yaml | 8 ++++---- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/charts/rollup-node/templates/get-db-info-script.yaml b/charts/rollup-node/templates/get-db-info-script.yaml index 2031ce5d..8a287334 100644 --- a/charts/rollup-node/templates/get-db-info-script.yaml +++ b/charts/rollup-node/templates/get-db-info-script.yaml @@ -6,9 +6,6 @@ data: get-db-info.sh: | #!/bin/bash - # Install dependencies - apk add --no-cache curl - echo "Waiting for L1 contract to be ready..." while true; do HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" -X POST --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":1}' -H "Content-Type: application/json" $L1_RPC_ENDPOINT) diff --git a/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml index 9cbb817b..096aa2d5 100644 --- a/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml +++ b/charts/rollup-node/templates/take-over-commit-and-finalize-senders-script.yaml @@ -21,9 +21,6 @@ data: check_var L1_COMMIT_SENDER_ADDR check_var L1_FINALIZE_SENDER_ADDR - # Install dependencies - apk add --no-cache curl - # Set the balance of the Scroll owner # We're setting it to 1000 ETH (0x3635C9ADC5DEA00000 in wei) cast rpc --rpc-url "${L1_RPC_ENDPOINT}" anvil_setBalance "${L1_MAINNET_SCROLL_OWNER_ADDR}" 0x3635C9ADC5DEA00000 diff --git a/charts/rollup-node/values.yaml b/charts/rollup-node/values.yaml index 321980ff..4a9f1662 100644 --- a/charts/rollup-node/values.yaml +++ b/charts/rollup-node/values.yaml @@ -133,7 +133,7 @@ initContainers: 4-wait-for-contract: image: scrolltech/scroll-alpine:v0.0.1 command: - - /bin/sh + - /bin/bash - -c - /wait-for-contract.sh $L1_RPC_ENDPOINT $L1_SCROLL_CHAIN_PROXY_ADDR envFrom: @@ -144,9 +144,9 @@ initContainers: mountPath: /wait-for-contract.sh subPath: wait-for-contract.sh 5-take-over-commit-and-finalize-senders: - image: ghcr.io/foundry-rs/foundry + image: scrolltech/scroll-foundry:v0.0.1 command: - - /bin/sh + - /bin/bash - -c - /take-over-commit-and-finalize-senders.sh envFrom: @@ -157,7 +157,7 @@ initContainers: mountPath: /take-over-commit-and-finalize-senders.sh subPath: take-over-commit-and-finalize-senders.sh 6-get-db-info: - image: ghcr.io/foundry-rs/foundry + image: scrolltech/scroll-foundry:v0.0.1 command: - /bin/sh - -c From 135a12bbc442d8a29a689d28f117602eb61e2464 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Wed, 9 Oct 2024 00:40:29 +0800 Subject: [PATCH 48/86] fix bugs --- charts/rollup-node/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/rollup-node/values.yaml b/charts/rollup-node/values.yaml index 4a9f1662..c40c3a1b 100644 --- a/charts/rollup-node/values.yaml +++ b/charts/rollup-node/values.yaml @@ -133,7 +133,7 @@ initContainers: 4-wait-for-contract: image: scrolltech/scroll-alpine:v0.0.1 command: - - /bin/bash + - /bin/sh - -c - /wait-for-contract.sh $L1_RPC_ENDPOINT $L1_SCROLL_CHAIN_PROXY_ADDR envFrom: @@ -159,7 +159,7 @@ initContainers: 6-get-db-info: image: scrolltech/scroll-foundry:v0.0.1 command: - - /bin/sh + - /bin/bash - -c - /get-db-info.sh envFrom: From 31465b32b3639b3cd57ecbbda240ecf045d4ba0b Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Wed, 9 Oct 2024 00:54:11 +0800 Subject: [PATCH 49/86] fix --- charts/rollup-node/templates/get-db-info-script.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/charts/rollup-node/templates/get-db-info-script.yaml b/charts/rollup-node/templates/get-db-info-script.yaml index 8a287334..15d021ed 100644 --- a/charts/rollup-node/templates/get-db-info-script.yaml +++ b/charts/rollup-node/templates/get-db-info-script.yaml @@ -61,6 +61,9 @@ data: psql "${SCROLL_RDS_ROLLUP_NODE_DSN}" -Aqt -c "$@" } + # Install PostgreSQL client + apt-get install -y postgresql-client + # Check database connections echo "Checking database connections..." if ! local_sql_run "SELECT 1;" > /dev/null 2>&1; then From 254ef2e4bff28e01557fe3a2b2c4673df233d42e Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Wed, 9 Oct 2024 01:40:30 +0800 Subject: [PATCH 50/86] update env --- charts/scroll-sdk/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/scroll-sdk/config.toml b/charts/scroll-sdk/config.toml index af46014c..da3c2471 100644 --- a/charts/scroll-sdk/config.toml +++ b/charts/scroll-sdk/config.toml @@ -62,7 +62,7 @@ MAX_BLOCK_IN_CHUNK = 100 MAX_CHUNK_IN_BATCH = 15 MAX_BATCH_IN_BUNDLE = 30 MAX_L1_MESSAGE_GAS_LIMIT = 10_000_000 -TEST_ENV_MOCK_FINALIZE_ENABLED = true +TEST_ENV_MOCK_FINALIZE_ENABLED = false TEST_ENV_MOCK_FINALIZE_TIMEOUT_SEC = 300 [frontend] From 8dc4ad130df30dc7ce6d15ccf1e314de6cdba2b1 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Wed, 9 Oct 2024 02:43:48 +0800 Subject: [PATCH 51/86] fix --- charts/l2-sequencer/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index 09a2ba4c..474dc633 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -54,7 +54,7 @@ command: --http --http.port \"$L2GETH_RPC_HTTP_PORT\" --http.addr \"0.0.0.0\" --http.vhosts=\"*\" --http.corsdomain \"*\" --http.api \"eth,scroll,net,web3,debug\" \ --pprof --pprof.addr \"0.0.0.0\" --pprof.port 6060 \ --ws --ws.port \"$L2GETH_RPC_WS_PORT\" --ws.addr \"0.0.0.0\" --ws.api \"eth,scroll,net,web3,debug\" \ - --net.shadowforkpeer empty \ + --net.shadowforkpeers empty \ --unlock \"$L2GETH_SIGNER_ADDRESS\" --password \"/l2geth/password\" --allow-insecure-unlock --mine \ --ccc --ccc.numworkers 5 \ --gcmode archive \ From 705c8f9861539fc047bb1c52ab05d672f5d209d3 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Wed, 9 Oct 2024 03:34:57 +0800 Subject: [PATCH 52/86] update env --- devnet/create-env-files.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devnet/create-env-files.sh b/devnet/create-env-files.sh index 6551064e..fcad0abf 100755 --- a/devnet/create-env-files.sh +++ b/devnet/create-env-files.sh @@ -67,7 +67,7 @@ get_service_configmap_variables() { echo "CHAIN_ID_L2:CHAIN_ID L1_RPC_ENDPOINT:L2GETH_L1_ENDPOINT L2GETH_SIGNER_ADDRESS:L2GETH_SIGNER_ADDRESS L1_CONTRACT_DEPLOYMENT_BLOCK:L2GETH_L1_CONTRACT_DEPLOYMENT_BLOCK L2GETH_KEYSTORE:L2GETH_KEYSTORE L2GETH_PASSWORD:L2GETH_PASSWORD L2GETH_NODEKEY:L2GETH_NODEKEY" ;; rollup-node) - echo "L1_RPC_ENDPOINT:L1_RPC_ENDPOINT L2_RPC_ENDPOINT:L2_RPC_ENDPOINT ROLLUP_NODE_DB_CONNECTION_STRING:SCROLL_ROLLUP_DB_CONFIG_DSN L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR:L1_SCROLL_CHAIN_PROXY_ADDR L1_COMMIT_SENDER_PRIVATE_KEY:SCROLL_ROLLUP_L2_CONFIG_RELAYER_CONFIG_COMMIT_SENDER_PRIVATE_KEY L1_FINALIZE_SENDER_PRIVATE_KEY:SCROLL_ROLLUP_L2_CONFIG_RELAYER_CONFIG_FINALIZE_SENDER_PRIVATE_KEY L1_COMMIT_SENDER_ADDR:L1_COMMIT_SENDER_ADDR L1_FINALIZE_SENDER_ADDR:L1_FINALIZE_SENDER_ADDR L1_MAINNET_SCROLL_OWNER_ADDR:L1_MAINNET_SCROLL_OWNER_ADDR SCROLL_RDS_ROLLUP_NODE_DSN:SCROLL_RDS_ROLLUP_NODE_DSN" + echo "L1_RPC_ENDPOINT:L1_RPC_ENDPOINT L2_RPC_ENDPOINT:L2_RPC_ENDPOINT ROLLUP_NODE_DB_CONNECTION_STRING:SCROLL_ROLLUP_DB_CONFIG_DSN L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR:L1_SCROLL_CHAIN_PROXY_ADDR L1_COMMIT_SENDER_PRIVATE_KEY:SCROLL_ROLLUP_L2_CONFIG_RELAYER_CONFIG_COMMIT_SENDER_PRIVATE_KEY L1_FINALIZE_SENDER_PRIVATE_KEY:SCROLL_ROLLUP_L2_CONFIG_RELAYER_CONFIG_FINALIZE_SENDER_PRIVATE_KEY L1_COMMIT_SENDER_ADDR:L1_COMMIT_SENDER_ADDR L1_FINALIZE_SENDER_ADDR:L1_FINALIZE_SENDER_ADDR L1_MAINNET_SCROLL_OWNER_ADDR:L1_MAINNET_SCROLL_OWNER_ADDR SCROLL_RDS_ROLLUP_NODE_DSN:SCROLL_RDS_ROLLUP_NODE_DSN TEST_ENV_MOCK_FINALIZE_ENABLED:TEST_ENV_MOCK_FINALIZE_ENABLED" ;; *) echo "Service $service_name not found." From 4bb0207d445348c56c918bc9ae445897607ee327 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Wed, 9 Oct 2024 03:37:58 +0800 Subject: [PATCH 53/86] bump version --- charts/rollup-node/Chart.yaml | 2 +- charts/scroll-sdk/Chart.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/rollup-node/Chart.yaml b/charts/rollup-node/Chart.yaml index dc4d9681..eba4d880 100644 --- a/charts/rollup-node/Chart.yaml +++ b/charts/rollup-node/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: rollup-node helm charts name: rollup-node -version: 0.0.24 +version: 0.0.25 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/scroll-sdk/Chart.yaml b/charts/scroll-sdk/Chart.yaml index 6cc836ec..dcd56415 100644 --- a/charts/scroll-sdk/Chart.yaml +++ b/charts/scroll-sdk/Chart.yaml @@ -98,7 +98,7 @@ dependencies: repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-explorer-backend.enabled - name: rollup-node - version: 0.0.24 + version: 0.0.25 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: rollup-node.enabled - name: rpc-gateway From cf42cb0e6e4bdccd5684eb071a274e2e724ff820 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Wed, 9 Oct 2024 03:49:46 +0800 Subject: [PATCH 54/86] fix --- charts/scroll-sdk/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/scroll-sdk/config.toml b/charts/scroll-sdk/config.toml index da3c2471..cac2a4d7 100644 --- a/charts/scroll-sdk/config.toml +++ b/charts/scroll-sdk/config.toml @@ -62,7 +62,7 @@ MAX_BLOCK_IN_CHUNK = 100 MAX_CHUNK_IN_BATCH = 15 MAX_BATCH_IN_BUNDLE = 30 MAX_L1_MESSAGE_GAS_LIMIT = 10_000_000 -TEST_ENV_MOCK_FINALIZE_ENABLED = false +TEST_ENV_MOCK_FINALIZE_ENABLED = "false" TEST_ENV_MOCK_FINALIZE_TIMEOUT_SEC = 300 [frontend] From e6ef1c6d6859d1ae527d3df84b42a23570d57e6a Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Wed, 9 Oct 2024 20:45:17 +0800 Subject: [PATCH 55/86] update configs --- charts/l2-sequencer/values.yaml | 7 ++++++- charts/scroll-sdk/config.toml | 2 +- devnet/genesis.shadow.json | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index 474dc633..e95ac980 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -34,6 +34,8 @@ env: value: "1000000" - name: VERBOSITY value: "3" + - name: L2_SHADOWFORK_BLOCK_NUMBER + value: "0xf4233" envFrom: - configMapRef: @@ -45,6 +47,7 @@ command: "-c", "mkdir -p /l2geth/data/keystore && \ mkdir -p /l2geth/data/geth && \ + cp -r ls /var/scroll/l2geth/snapshot/* /l2geth/data/ && \ echo ${L2GETH_PASSWORD} > /l2geth/password && \ echo ${L2GETH_KEYSTORE} > /l2geth/data/keystore/keystore.json && \ echo ${L2GETH_NODEKEY} > /l2geth/data/geth/nodekey && \ @@ -67,7 +70,9 @@ command: --l1.endpoint \"$L2GETH_L1_ENDPOINT\" --l1.confirmations \"$L2GETH_L1_WATCHER_CONFIRMATIONS\" --l1.sync.startblock \"$L2GETH_L1_CONTRACT_DEPLOYMENT_BLOCK\" \ --rollup.verify \ --metrics --metrics.expensive \ - $L2GETH_EXTRA_PARAMS" + $L2GETH_EXTRA_PARAMS \ + sleep 120 && \ + curl -X POST -H \"Content-Type: application/json\" --data '{\"jsonrpc\":\"2.0\",\"method\":\"debug_setHead\",\"params\":[\"${L2_SHADOWFORK_BLOCK_NUMBER}\"],\"id\":1}' http://localhost:$L2GETH_RPC_HTTP_PORT" ] initContainers: diff --git a/charts/scroll-sdk/config.toml b/charts/scroll-sdk/config.toml index cac2a4d7..3c18e043 100644 --- a/charts/scroll-sdk/config.toml +++ b/charts/scroll-sdk/config.toml @@ -117,7 +117,7 @@ GRAFANA_HOST = "http://grafana.scrollsdk" [shadowfork] L1_FULLNODE_RPC_ENDPOINT = "https://rpc.ankr.com/eth" -L1_SHADOWFORK_BLOCK_NUMBER = "20800000" +L1_SHADOWFORK_BLOCK_NUMBER = "18628557" L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR = "0xa13BAF47339d63B743e7Da8741db5456DAc1E556" L1_MAINNET_SCROLL_OWNER_ADDR = "0x798576400F7D662961BA15C6b3F3d813447a26a6" SCROLL_RDS_ROLLUP_NODE_DSN = "xxx" diff --git a/devnet/genesis.shadow.json b/devnet/genesis.shadow.json index a4049848..f0e9e24c 100644 --- a/devnet/genesis.shadow.json +++ b/devnet/genesis.shadow.json @@ -20,7 +20,7 @@ "period": 3, "epoch": 30000, "relaxed_period": true, - "shadow_fork_height": 1370000, + "shadow_fork_height": 999987, "shadow_fork_signer": "0x4e1f062ffab6dca974947f82a6e836e678a7d435" }, "scroll": { From 2a1d08565cce9c4f78805edc54eb16bf97ec61ba Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Wed, 9 Oct 2024 21:18:21 +0800 Subject: [PATCH 56/86] fix bugs --- charts/l2-sequencer/values.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index e95ac980..328a2995 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -41,13 +41,21 @@ envFrom: - configMapRef: name: l2-sequencer-env +persistence: + snapshot: + enabled: true + type: hostPath + hostPath: /var/scroll/l2geth/snapshot + mountPath: /host/snapshot + command: [ "bash", "-c", "mkdir -p /l2geth/data/keystore && \ mkdir -p /l2geth/data/geth && \ - cp -r ls /var/scroll/l2geth/snapshot/* /l2geth/data/ && \ + apt-get update && apt-get install -y rsync && \ + rsync -av --progress /host/snapshot/ /l2geth/data/ && \ echo ${L2GETH_PASSWORD} > /l2geth/password && \ echo ${L2GETH_KEYSTORE} > /l2geth/data/keystore/keystore.json && \ echo ${L2GETH_NODEKEY} > /l2geth/data/geth/nodekey && \ From 6478f1d9cd1a0be7425a9acb74d0acd76047f38a Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Wed, 9 Oct 2024 21:30:18 +0800 Subject: [PATCH 57/86] bump version --- charts/l2-sequencer/Chart.yaml | 2 +- charts/scroll-sdk/Chart.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/l2-sequencer/Chart.yaml b/charts/l2-sequencer/Chart.yaml index 04b4ecd1..1bbe0a4c 100644 --- a/charts/l2-sequencer/Chart.yaml +++ b/charts/l2-sequencer/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: l2-sequencer helm charts name: l2-sequencer -version: 0.0.30 +version: 0.0.31 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/scroll-sdk/Chart.yaml b/charts/scroll-sdk/Chart.yaml index dcd56415..e90877eb 100644 --- a/charts/scroll-sdk/Chart.yaml +++ b/charts/scroll-sdk/Chart.yaml @@ -78,7 +78,7 @@ dependencies: version: 7.3.11 condition: grafana.enabled - name: l2-sequencer - version: 0.0.30 + version: 0.0.31 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: l2-sequencer.enabled - name: loki-stack From 28397a4042a5a9eb012ef9a14219587435bf43d9 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Wed, 9 Oct 2024 21:47:16 +0800 Subject: [PATCH 58/86] bump version --- charts/l2-sequencer/Chart.yaml | 2 +- charts/scroll-sdk/Chart.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/l2-sequencer/Chart.yaml b/charts/l2-sequencer/Chart.yaml index 1bbe0a4c..531ee796 100644 --- a/charts/l2-sequencer/Chart.yaml +++ b/charts/l2-sequencer/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: l2-sequencer helm charts name: l2-sequencer -version: 0.0.31 +version: 0.0.32 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/scroll-sdk/Chart.yaml b/charts/scroll-sdk/Chart.yaml index e90877eb..c8c89b9a 100644 --- a/charts/scroll-sdk/Chart.yaml +++ b/charts/scroll-sdk/Chart.yaml @@ -78,7 +78,7 @@ dependencies: version: 7.3.11 condition: grafana.enabled - name: l2-sequencer - version: 0.0.31 + version: 0.0.32 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: l2-sequencer.enabled - name: loki-stack From 9b585f098e0c0e715c5b3e13b955ae88414e2b90 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Wed, 9 Oct 2024 21:50:42 +0800 Subject: [PATCH 59/86] bump version --- charts/l2-sequencer/Chart.yaml | 2 +- charts/scroll-sdk/Chart.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/l2-sequencer/Chart.yaml b/charts/l2-sequencer/Chart.yaml index 531ee796..9ac46c3d 100644 --- a/charts/l2-sequencer/Chart.yaml +++ b/charts/l2-sequencer/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: l2-sequencer helm charts name: l2-sequencer -version: 0.0.32 +version: 0.0.34 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/scroll-sdk/Chart.yaml b/charts/scroll-sdk/Chart.yaml index c8c89b9a..73c5a076 100644 --- a/charts/scroll-sdk/Chart.yaml +++ b/charts/scroll-sdk/Chart.yaml @@ -78,7 +78,7 @@ dependencies: version: 7.3.11 condition: grafana.enabled - name: l2-sequencer - version: 0.0.32 + version: 0.0.34 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: l2-sequencer.enabled - name: loki-stack From 75018297192a4b3431f1c9e0f57cac172640f122 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Wed, 9 Oct 2024 21:54:10 +0800 Subject: [PATCH 60/86] bump version --- charts/l2-sequencer/Chart.yaml | 2 +- charts/scroll-sdk/Chart.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/l2-sequencer/Chart.yaml b/charts/l2-sequencer/Chart.yaml index 9ac46c3d..ff4ddc4c 100644 --- a/charts/l2-sequencer/Chart.yaml +++ b/charts/l2-sequencer/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: l2-sequencer helm charts name: l2-sequencer -version: 0.0.34 +version: 0.0.40 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/scroll-sdk/Chart.yaml b/charts/scroll-sdk/Chart.yaml index 73c5a076..63e305df 100644 --- a/charts/scroll-sdk/Chart.yaml +++ b/charts/scroll-sdk/Chart.yaml @@ -78,7 +78,7 @@ dependencies: version: 7.3.11 condition: grafana.enabled - name: l2-sequencer - version: 0.0.34 + version: 0.0.40 repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm" condition: l2-sequencer.enabled - name: loki-stack From 06444f0f9c5712162f30e108100a4e30cbd4f38d Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Wed, 9 Oct 2024 22:08:53 +0800 Subject: [PATCH 61/86] fix bugs --- charts/l2-sequencer/values.yaml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index 328a2995..383b3d09 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -41,13 +41,6 @@ envFrom: - configMapRef: name: l2-sequencer-env -persistence: - snapshot: - enabled: true - type: hostPath - hostPath: /var/scroll/l2geth/snapshot - mountPath: /host/snapshot - command: [ "bash", @@ -149,7 +142,7 @@ persistence: type: pvc mountPath: /l2geth/data/ name: l2geth-data - size: 10Gi + size: 100Gi accessMode: ReadWriteOnce env: enabled: true @@ -166,6 +159,11 @@ persistence: type: configMap name: wait-for-l1-script defaultMode: "0777" + snapshot: + enabled: true + type: hostPath + hostPath: /var/scroll/l2geth/snapshot + mountPath: /host/snapshot configMaps: config: From 81724e3988d5561d4d844797350390517d3240ab Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Wed, 9 Oct 2024 22:30:50 +0800 Subject: [PATCH 62/86] fix --- charts/l2-sequencer/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index 383b3d09..96c16a5a 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -47,7 +47,7 @@ command: "-c", "mkdir -p /l2geth/data/keystore && \ mkdir -p /l2geth/data/geth && \ - apt-get update && apt-get install -y rsync && \ + apt-get install -y rsync && \ rsync -av --progress /host/snapshot/ /l2geth/data/ && \ echo ${L2GETH_PASSWORD} > /l2geth/password && \ echo ${L2GETH_KEYSTORE} > /l2geth/data/keystore/keystore.json && \ From bb07fd55ebb250833fbb4ee69f207d4ab03c2597 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Wed, 9 Oct 2024 22:49:18 +0800 Subject: [PATCH 63/86] fix a bug --- charts/l2-sequencer/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index 96c16a5a..be31ea57 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -141,7 +141,7 @@ persistence: enabled: true type: pvc mountPath: /l2geth/data/ - name: l2geth-data + name: l2-sequencer-data size: 100Gi accessMode: ReadWriteOnce env: From 8facd5eb86f6a2e9269f8aaf49827155dc0f920a Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Wed, 9 Oct 2024 23:01:37 +0800 Subject: [PATCH 64/86] revert --- charts/l2-sequencer/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index be31ea57..96c16a5a 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -141,7 +141,7 @@ persistence: enabled: true type: pvc mountPath: /l2geth/data/ - name: l2-sequencer-data + name: l2geth-data size: 100Gi accessMode: ReadWriteOnce env: From 3260f88f7e7248fe040cf431600445d0fe487498 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Wed, 9 Oct 2024 23:31:11 +0800 Subject: [PATCH 65/86] change param --- charts/l2-sequencer/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index fb09bb95..3eac189c 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -141,7 +141,7 @@ persistence: type: pvc mountPath: /l2geth/data/ name: l2geth-data - size: 100Gi + size: 80Gi accessMode: ReadWriteOnce env: enabled: true From e0241e74592e9c9ad68b1f5b45eacbe2e039b27e Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 10 Oct 2024 00:05:28 +0800 Subject: [PATCH 66/86] fix a bug --- charts/l2-sequencer/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index 3eac189c..5f8d060c 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -70,7 +70,7 @@ command: --l1.endpoint \"$L2GETH_L1_ENDPOINT\" --l1.confirmations \"$L2GETH_L1_WATCHER_CONFIRMATIONS\" --l1.sync.startblock \"$L2GETH_L1_CONTRACT_DEPLOYMENT_BLOCK\" \ --rollup.verify \ --metrics --metrics.expensive \ - $L2GETH_EXTRA_PARAMS \ + $L2GETH_EXTRA_PARAMS & \ sleep 120 && \ curl -X POST -H \"Content-Type: application/json\" --data '{\"jsonrpc\":\"2.0\",\"method\":\"debug_setHead\",\"params\":[\"${L2_SHADOWFORK_BLOCK_NUMBER}\"],\"id\":1}' http://localhost:$L2GETH_RPC_HTTP_PORT" ] From c410581cc5751c94597b75cb314c2e8178bac476 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 10 Oct 2024 00:24:46 +0800 Subject: [PATCH 67/86] fix bugs --- devnet/Makefile | 6 +-- devnet/genesis.shadow.yaml | 98 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+), 3 deletions(-) create mode 100644 devnet/genesis.shadow.yaml diff --git a/devnet/Makefile b/devnet/Makefile index 2e195a93..c2077a4b 100644 --- a/devnet/Makefile +++ b/devnet/Makefile @@ -17,9 +17,9 @@ config: cd scroll-sdk && time docker run --rm -it -v .:/contracts/volume scrolltech/scroll-stack-contracts:gen-configs-v0.0.25 echo "Creating env files..." ./create-env-files.sh scroll-sdk - echo "Overwriting genesis.json..." - cp scroll-sdk/genesis.json scroll-sdk/genesis.json.backup - cp genesis.shadow.json scroll-sdk/genesis.json + echo "Overwriting genesis.yaml..." + cp scroll-sdk/genesis.yaml scroll-sdk/genesis.yaml.backup + cp genesis.shadow.yaml scroll-sdk/genesis.yaml ./prepare-config-files.sh install: diff --git a/devnet/genesis.shadow.yaml b/devnet/genesis.shadow.yaml new file mode 100644 index 00000000..5a6f7035 --- /dev/null +++ b/devnet/genesis.shadow.yaml @@ -0,0 +1,98 @@ +scrollConfig: | + { + "config": { + "chainId": 534352, + "homesteadBlock": 0, + "eip150Block": 0, + "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "eip155Block": 0, + "eip158Block": 0, + "byzantiumBlock": 0, + "constantinopleBlock": 0, + "petersburgBlock": 0, + "istanbulBlock": 0, + "berlinBlock": 0, + "londonBlock": 0, + "archimedesBlock": 0, + "shanghaiBlock": 0, + "bernoulliBlock": 5220340, + "curieBlock": 7096836, + "clique": { + "period": 3, + "epoch": 30000, + "relaxed_period": true, + "shadow_fork_height": 999987, + "shadow_fork_signer": "0x4e1f062ffab6dca974947f82a6e836e678a7d435" + }, + "scroll": { + "useZktrie": true, + "maxTxPerBlock": 100, + "maxTxPayloadBytesPerBlock": 122880, + "feeVaultAddress": "0x5300000000000000000000000000000000000005", + "l1Config": { + "l1ChainId": "1", + "l1MessageQueueAddress": "0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B", + "scrollChainAddress": "0xa13BAF47339d63B743e7Da8741db5456DAc1E556", + "numL1MessagesPerBlock": "10" + } + } + }, + "nonce": "0x0", + "timestamp": "0x6524e860", + "extraData": "0x4c61206573746f6e7465636f206573746173206d616c6665726d6974612e0000d2ACF5d16a983DB0d909d9D761B8337Fabd6cBd10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "gasLimit": "10000000", + "difficulty": "0x1", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "coinbase": "0x0000000000000000000000000000000000000000", + "alloc": { + "0xF9062b8a30e0d7722960e305049FA50b86ba6253": { + "balance": "2000000000000000000" + }, + "0x781e90f1c8Fc4611c9b7497C3B47F99Ef6969CbC": { + "balance": "226156424291633194186662080095093570025917938800079226637565593765455331328" + }, + "0x5300000000000000000000000000000000000000": { + "balance": "0x0", + "code": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c806383cc76601161006657806383cc7660146100fc5780638da5cb5b1461010f578063c4d66de814610122578063d4b9f4fa14610135578063f2fde38b1461013e57600080fd5b806326aad7b7146100985780633cb747bf146100b4578063600a2e77146100df578063715018a6146100f2575b600080fd5b6100a160015481565b6040519081526020015b60405180910390f35b6053546100c7906001600160a01b031681565b6040516001600160a01b0390911681526020016100ab565b6100a16100ed36600461054a565b610151565b6100fa6101f6565b005b6100a161010a36600461054a565b61022c565b6052546100c7906001600160a01b031681565b6100fa610130366004610563565b610243565b6100a160005481565b6100fa61014c366004610563565b6102db565b6053546000906001600160a01b031633146101a45760405162461bcd60e51b815260206004820152600e60248201526d37b7363c9036b2b9b9b2b733b2b960911b60448201526064015b60405180910390fd5b6000806101b084610367565b60408051838152602081018890529294509092507ffaa617c2d8ce12c62637dbce76efcc18dae60574aa95709bdcedce7e76071693910160405180910390a19392505050565b6052546001600160a01b031633146102205760405162461bcd60e51b815260040161019b90610593565b61022a6000610486565b565b602a816028811061023c57600080fd5b0154905081565b6052546001600160a01b0316331461026d5760405162461bcd60e51b815260040161019b90610593565b600154156102b15760405162461bcd60e51b815260206004820152601160248201527063616e6e6f7420696e697469616c697a6560781b604482015260640161019b565b6102b96104d8565b605380546001600160a01b0319166001600160a01b0392909216919091179055565b6052546001600160a01b031633146103055760405162461bcd60e51b815260040161019b90610593565b6001600160a01b03811661035b5760405162461bcd60e51b815260206004820152601d60248201527f6e6577206f776e657220697320746865207a65726f2061646472657373000000604482015260640161019b565b61036481610486565b50565b60035460009081906103bb5760405162461bcd60e51b815260206004820152601a60248201527f63616c6c206265666f726520696e697469616c697a6174696f6e000000000000604482015260640161019b565b6001548360005b8215610456576103d36002846105e0565b60000361041f5781602a82602881106103ee576103ee6105ca565b01556104188260028360288110610407576104076105ca565b015460009182526020526040902090565b915061044a565b610447602a8260288110610435576104356105ca565b01548360009182526020526040902090565b91505b600192831c92016103c2565b81602a826028811061046a5761046a6105ca565b0155506000819055600180548082019091559590945092505050565b605280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60005b60286104e8826001610618565b10156103645761051960028260288110610504576105046105ca565b015460028360288110610407576104076105ca565b6002610526836001610618565b60288110610536576105366105ca565b01558061054281610631565b9150506104db565b60006020828403121561055c57600080fd5b5035919050565b60006020828403121561057557600080fd5b81356001600160a01b038116811461058c57600080fd5b9392505050565b60208082526017908201527f63616c6c6572206973206e6f7420746865206f776e6572000000000000000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000826105fd57634e487b7160e01b600052601260045260246000fd5b500690565b634e487b7160e01b600052601160045260246000fd5b8082018082111561062b5761062b610602565b92915050565b60006001820161064357610643610602565b506001019056fea26469706673582212208fb1cb9933bb17dd0a7c17de7c890919b08d2fd7eb2bede7b41caa32709b30b564736f6c63430008100033", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000052": "0xF9062b8a30e0d7722960e305049FA50b86ba6253" + } + }, + "0x5300000000000000000000000000000000000002": { + "balance": "0x0", + "code": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063715018a61161008c578063bede39b511610066578063bede39b51461018d578063de26c4a1146101a0578063f2fde38b146101b3578063f45e65d8146101c657600080fd5b8063715018a6146101475780638da5cb5b1461014f57806393e59dc11461017a57600080fd5b80630c18c162146100d45780633577afc5146100f05780633d0f963e1461010557806349948e0e14610118578063519b4bd31461012b5780637046559714610134575b600080fd5b6100dd60025481565b6040519081526020015b60405180910390f35b6101036100fe366004610671565b6101cf565b005b61010361011336600461068a565b610291565b6100dd6101263660046106d0565b61031c565b6100dd60015481565b610103610142366004610671565b610361565b610103610416565b600054610162906001600160a01b031681565b6040516001600160a01b0390911681526020016100e7565b600454610162906001600160a01b031681565b61010361019b366004610671565b61044c565b6100dd6101ae3660046106d0565b610533565b6101036101c136600461068a565b610595565b6100dd60035481565b6000546001600160a01b031633146102025760405162461bcd60e51b81526004016101f990610781565b60405180910390fd5b621c9c388111156102555760405162461bcd60e51b815260206004820152601760248201527f657863656564206d6178696d756d206f7665726865616400000000000000000060448201526064016101f9565b60028190556040518181527f32740b35c0ea213650f60d44366b4fb211c9033b50714e4a1d34e65d5beb9bb4906020015b60405180910390a150565b6000546001600160a01b031633146102bb5760405162461bcd60e51b81526004016101f990610781565b600480546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f22d1c35fe072d2e42c3c8f9bd4a0d34aa84a0101d020a62517b33fdb3174e5f7910160405180910390a15050565b60008061032883610533565b905060006001548261033a91906107b8565b9050633b9aca006003548261034f91906107b8565b61035991906107e5565b949350505050565b6000546001600160a01b0316331461038b5760405162461bcd60e51b81526004016101f990610781565b61039b633b9aca006103e86107b8565b8111156103e15760405162461bcd60e51b8152602060048201526014602482015273657863656564206d6178696d756d207363616c6560601b60448201526064016101f9565b60038190556040518181527f3336cd9708eaf2769a0f0dc0679f30e80f15dcd88d1921b5a16858e8b85c591a90602001610286565b6000546001600160a01b031633146104405760405162461bcd60e51b81526004016101f990610781565b61044a6000610621565b565b6004805460405163efc7840160e01b815233928101929092526001600160a01b03169063efc7840190602401602060405180830381865afa158015610495573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b99190610807565b6104fe5760405162461bcd60e51b81526020600482015260166024820152752737ba103bb434ba32b634b9ba32b21039b2b73232b960511b60448201526064016101f9565b60018190556040518181527f351fb23757bb5ea0546c85b7996ddd7155f96b939ebaa5ff7bc49c75f27f2c4490602001610286565b80516000908190815b818110156105865784818151811061055657610556610829565b01602001516001600160f81b0319166000036105775760048301925061057e565b6010830192505b60010161053c565b50506002540160400192915050565b6000546001600160a01b031633146105bf5760405162461bcd60e51b81526004016101f990610781565b6001600160a01b0381166106155760405162461bcd60e51b815260206004820152601d60248201527f6e6577206f776e657220697320746865207a65726f206164647265737300000060448201526064016101f9565b61061e81610621565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561068357600080fd5b5035919050565b60006020828403121561069c57600080fd5b81356001600160a01b03811681146106b357600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156106e257600080fd5b813567ffffffffffffffff808211156106fa57600080fd5b818401915084601f83011261070e57600080fd5b813581811115610720576107206106ba565b604051601f8201601f19908116603f01168101908382118183101715610748576107486106ba565b8160405282815287602084870101111561076157600080fd5b826020860160208301376000928101602001929092525095945050505050565b60208082526017908201527f63616c6c6572206973206e6f7420746865206f776e6572000000000000000000604082015260600190565b60008160001904831182151516156107e057634e487b7160e01b600052601160045260246000fd5b500290565b60008261080257634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561081957600080fd5b815180151581146106b357600080fd5b634e487b7160e01b600052603260045260246000fdfea26469706673582212205ea335809638809cf032c794fd966e2439020737b1dcc2218435cb438286efcf64736f6c63430008100033", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0xF9062b8a30e0d7722960e305049FA50b86ba6253" + } + }, + "0x5300000000000000000000000000000000000003": { + "balance": "0x0", + "code": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c8063715018a61461005c57806379586dd7146100665780638da5cb5b14610079578063efc78401146100a9578063f2fde38b146100e5575b600080fd5b6100646100f8565b005b610064610074366004610356565b610137565b60005461008c906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100d56100b736600461042d565b6001600160a01b031660009081526001602052604090205460ff1690565b60405190151581526020016100a0565b6100646100f336600461042d565b610238565b6000546001600160a01b0316331461012b5760405162461bcd60e51b81526004016101229061044f565b60405180910390fd5b61013560006102c4565b565b6000546001600160a01b031633146101615760405162461bcd60e51b81526004016101229061044f565b60005b825181101561023357816001600085848151811061018457610184610486565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055508281815181106101d5576101d5610486565b60200260200101516001600160a01b03167f8daaf060c3306c38e068a75c054bf96ecd85a3db1252712c4d93632744c42e0d83604051610219911515815260200190565b60405180910390a28061022b8161049c565b915050610164565b505050565b6000546001600160a01b031633146102625760405162461bcd60e51b81526004016101229061044f565b6001600160a01b0381166102b85760405162461bcd60e51b815260206004820152601d60248201527f6e6577206f776e657220697320746865207a65726f20616464726573730000006044820152606401610122565b6102c1816102c4565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b80356001600160a01b038116811461034157600080fd5b919050565b8035801515811461034157600080fd5b6000806040838503121561036957600080fd5b823567ffffffffffffffff8082111561038157600080fd5b818501915085601f83011261039557600080fd5b81356020828211156103a9576103a9610314565b8160051b604051601f19603f830116810181811086821117156103ce576103ce610314565b6040529283528183019350848101820192898411156103ec57600080fd5b948201945b83861015610411576104028661032a565b855294820194938201936103f1565b96506104209050878201610346565b9450505050509250929050565b60006020828403121561043f57600080fd5b6104488261032a565b9392505050565b60208082526017908201527f63616c6c6572206973206e6f7420746865206f776e6572000000000000000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600182016104bc57634e487b7160e01b600052601160045260246000fd5b506001019056fea26469706673582212203414b076e92b618bd7c3437159d7bceb2acc3a5c82f51f383465512d9c52e97064736f6c63430008100033", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0xF9062b8a30e0d7722960e305049FA50b86ba6253" + } + }, + "0x5300000000000000000000000000000000000004": { + "balance": "0x0", + "code": "0x6080604052600436106101025760003560e01c806370a0823111610095578063a457c2d711610064578063a457c2d7146102b4578063a9059cbb146102d4578063d0e30db0146102f4578063d505accf146102fc578063dd62ed3e1461031c57600080fd5b806370a08231146102215780637ecebe001461025757806384b0196e1461027757806395d89b411461029f57600080fd5b80632e1a7d4d116100d15780632e1a7d4d146101b0578063313ce567146101d05780633644e515146101ec578063395093511461020157600080fd5b806306fdde0314610116578063095ea7b31461014157806318160ddd1461017157806323b872dd1461019057600080fd5b366101115761010f61033c565b005b600080fd5b34801561012257600080fd5b5061012b61038d565b60405161013891906112fa565b60405180910390f35b34801561014d57600080fd5b5061016161015c366004611330565b61041f565b6040519015158152602001610138565b34801561017d57600080fd5b506002545b604051908152602001610138565b34801561019c57600080fd5b506101616101ab36600461135a565b610439565b3480156101bc57600080fd5b5061010f6101cb366004611396565b61045d565b3480156101dc57600080fd5b5060405160128152602001610138565b3480156101f857600080fd5b5061018261054e565b34801561020d57600080fd5b5061016161021c366004611330565b61055d565b34801561022d57600080fd5b5061018261023c3660046113af565b6001600160a01b031660009081526020819052604090205490565b34801561026357600080fd5b506101826102723660046113af565b61057f565b34801561028357600080fd5b5061028c61059d565b60405161013897969594939291906113ca565b3480156102ab57600080fd5b5061012b610626565b3480156102c057600080fd5b506101616102cf366004611330565b610635565b3480156102e057600080fd5b506101616102ef366004611330565b6106b0565b61010f61033c565b34801561030857600080fd5b5061010f610317366004611460565b6106be565b34801561032857600080fd5b506101826103373660046114d3565b610822565b336103478134610881565b806001600160a01b03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c3460405161038291815260200190565b60405180910390a250565b60606003805461039c90611506565b80601f01602080910402602001604051908101604052809291908181526020018280546103c890611506565b80156104155780601f106103ea57610100808354040283529160200191610415565b820191906000526020600020905b8154815290600101906020018083116103f857829003601f168201915b5050505050905090565b60003361042d818585610940565b60019150505b92915050565b600033610447858285610a65565b610452858585610adf565b506001949350505050565b336104688183610c83565b6000816001600160a01b03168360405160006040518083038185875af1925050503d80600081146104b5576040519150601f19603f3d011682016040523d82523d6000602084013e6104ba565b606091505b50509050806105065760405162461bcd60e51b81526020600482015260136024820152721dda5d1a191c985dc81155120819985a5b1959606a1b60448201526064015b60405180910390fd5b816001600160a01b03167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b658460405161054191815260200190565b60405180910390a2505050565b6000610558610db2565b905090565b60003361042d8185856105708383610822565b61057a919061153a565b610940565b6001600160a01b038116600090815260076020526040812054610433565b6000606080828080836105d17f577261707065642045746865720000000000000000000000000000000000000d6005610edd565b6105fc7f31000000000000000000000000000000000000000000000000000000000000016006610edd565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b60606004805461039c90611506565b600033816106438286610822565b9050838110156106a35760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016104fd565b6104528286868403610940565b60003361042d818585610adf565b8342111561070e5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e6500000060448201526064016104fd565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988888861073d8c610f81565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061079882610fa9565b905060006107a882878787610fd6565b9050896001600160a01b0316816001600160a01b03161461080b5760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e6174757265000060448201526064016104fd565b6108168a8a8a610940565b50505050505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60006020835110156108695761086283610ffe565b9050610433565b8161087484826115bf565b5060ff9050610433565b90565b6001600160a01b0382166108d75760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016104fd565b80600260008282546108e9919061153a565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6001600160a01b0383166109a25760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104fd565b6001600160a01b038216610a035760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104fd565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6000610a718484610822565b90506000198114610ad95781811015610acc5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016104fd565b610ad98484848403610940565b50505050565b6001600160a01b038316610b435760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104fd565b6001600160a01b038216610ba55760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104fd565b6001600160a01b03831660009081526020819052604090205481811015610c1d5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016104fd565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610ad9565b6001600160a01b038216610ce35760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016104fd565b6001600160a01b03821660009081526020819052604090205481811015610d575760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016104fd565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101610a58565b505050565b6000306001600160a01b037f000000000000000000000000530000000000000000000000000000000000000416148015610e0b57507f000000000000000000000000000000000000000000000000000000000008275046145b15610e3557507fe5b117a3cd7ae7ed3508e6e6c5a0794536b2a8dee12533c4d7524eae9c85438f90565b610558604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f00cd3d46df44f2cbb950cf84eb2e92aa2ddd23195b1a009173ea59a063357ed3918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b606060ff8314610ef0576108628361103c565b818054610efc90611506565b80601f0160208091040260200160405190810160405280929190818152602001828054610f2890611506565b8015610f755780601f10610f4a57610100808354040283529160200191610f75565b820191906000526020600020905b815481529060010190602001808311610f5857829003601f168201915b50505050509050610433565b6001600160a01b03811660009081526007602052604090208054600181018255905b50919050565b6000610433610fb6610db2565b8360405161190160f01b8152600281019290925260228201526042902090565b6000806000610fe78787878761107b565b91509150610ff48161113f565b5095945050505050565b600080829050601f81511115611029578260405163305a27a960e01b81526004016104fd91906112fa565b80516110348261167f565b179392505050565b606060006110498361128c565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156110b25750600090506003611136565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611106573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661112f57600060019250925050611136565b9150600090505b94509492505050565b6000816004811115611153576111536116a3565b0361115b5750565b600181600481111561116f5761116f6116a3565b036111bc5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104fd565b60028160048111156111d0576111d06116a3565b0361121d5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104fd565b6003816004811115611231576112316116a3565b036112895760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016104fd565b50565b600060ff8216601f81111561043357604051632cd44ac360e21b815260040160405180910390fd5b6000815180845260005b818110156112da576020818501810151868301820152016112be565b506000602082860101526020601f19601f83011685010191505092915050565b60208152600061130d60208301846112b4565b9392505050565b80356001600160a01b038116811461132b57600080fd5b919050565b6000806040838503121561134357600080fd5b61134c83611314565b946020939093013593505050565b60008060006060848603121561136f57600080fd5b61137884611314565b925061138660208501611314565b9150604084013590509250925092565b6000602082840312156113a857600080fd5b5035919050565b6000602082840312156113c157600080fd5b61130d82611314565b60ff60f81b881681526000602060e0818401526113ea60e084018a6112b4565b83810360408501526113fc818a6112b4565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b8181101561144e57835183529284019291840191600101611432565b50909c9b505050505050505050505050565b600080600080600080600060e0888a03121561147b57600080fd5b61148488611314565b965061149260208901611314565b95506040880135945060608801359350608088013560ff811681146114b657600080fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156114e657600080fd5b6114ef83611314565b91506114fd60208401611314565b90509250929050565b600181811c9082168061151a57607f821691505b602082108103610fa357634e487b7160e01b600052602260045260246000fd5b8082018082111561043357634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b601f821115610dad57600081815260208120601f850160051c810160208610156115985750805b601f850160051c820191505b818110156115b7578281556001016115a4565b505050505050565b815167ffffffffffffffff8111156115d9576115d961155b565b6115ed816115e78454611506565b84611571565b602080601f831160018114611622576000841561160a5750858301515b600019600386901b1c1916600185901b1785556115b7565b600085815260208120601f198616915b8281101561165157888601518255948401946001909101908401611632565b508582101561166f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b80516020808301519190811015610fa35760001960209190910360031b1b16919050565b634e487b7160e01b600052602160045260246000fdfea26469706673582212207f39e33e122e8e2b0381aa6abea46046f56b05ced66c556a06bb1b80be7f55cf64736f6c63430008100033", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000003": "0x577261707065642045746865720000000000000000000000000000000000001a", + "0x0000000000000000000000000000000000000000000000000000000000000004": "0x5745544800000000000000000000000000000000000000000000000000000008" + } + }, + "0x5300000000000000000000000000000000000005": { + "balance": "0x0", + "code": "0x6080604052600436106100ab5760003560e01c806384411d651161006457806384411d65146101845780638da5cb5b1461019a5780639e7adc79146101ba578063f2fde38b146101da578063feec756c146101fa578063ff4f35461461021a57600080fd5b80632e1a7d4d146100b75780633cb747bf146100d95780633ccfd60b14610116578063457e1a491461012b57806366d003ac1461014f578063715018a61461016f57600080fd5b366100b257005b600080fd5b3480156100c357600080fd5b506100d76100d2366004610682565b61023a565b005b3480156100e557600080fd5b506002546100f9906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561012257600080fd5b506100d76103ff565b34801561013757600080fd5b5061014160015481565b60405190815260200161010d565b34801561015b57600080fd5b506003546100f9906001600160a01b031681565b34801561017b57600080fd5b506100d761040c565b34801561019057600080fd5b5061014160045481565b3480156101a657600080fd5b506000546100f9906001600160a01b031681565b3480156101c657600080fd5b506100d76101d536600461069b565b610442565b3480156101e657600080fd5b506100d76101f536600461069b565b6104be565b34801561020657600080fd5b506100d761021536600461069b565b610547565b34801561022657600080fd5b506100d7610235366004610682565b6105c3565b6001548110156102ca5760405162461bcd60e51b815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d20776974686472616064820152691dd85b08185b5bdd5b9d60b21b608482015260a4015b60405180910390fd5b478082111561032e5760405162461bcd60e51b815260206004820152602a60248201527f4665655661756c743a20696e73756666696369656e742062616c616e636520746044820152696f20776974686472617760b01b60648201526084016102c1565b6004805483019055600354604080518481526001600160a01b0390921660208301523382820152517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1600254600354604080516020810182526000808252915163b2267a7b60e01b81526001600160a01b039485169463b2267a7b9488946103c99491909216928592906004016106cb565b6000604051808303818588803b1580156103e257600080fd5b505af11580156103f6573d6000803e3d6000fd5b50505050505050565b476104098161023a565b50565b6000546001600160a01b031633146104365760405162461bcd60e51b81526004016102c190610737565b6104406000610632565b565b6000546001600160a01b0316331461046c5760405162461bcd60e51b81526004016102c190610737565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f1c928c417a10a21c3cddad148c5dba5d710e4b1442d6d8a36de345935ad8461290600090a35050565b6000546001600160a01b031633146104e85760405162461bcd60e51b81526004016102c190610737565b6001600160a01b03811661053e5760405162461bcd60e51b815260206004820152601d60248201527f6e6577206f776e657220697320746865207a65726f206164647265737300000060448201526064016102c1565b61040981610632565b6000546001600160a01b031633146105715760405162461bcd60e51b81526004016102c190610737565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f7e1e96961a397c8aa26162fe259cc837afc95e33aad4945ddc61c18dabb7a6ad90600090a35050565b6000546001600160a01b031633146105ed5760405162461bcd60e51b81526004016102c190610737565b600180549082905560408051828152602081018490527f0d3c80219fe57713b9f9c83d1e51426792d0c14d8e330e65b102571816140965910160405180910390a15050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561069457600080fd5b5035919050565b6000602082840312156106ad57600080fd5b81356001600160a01b03811681146106c457600080fd5b9392505050565b60018060a01b038516815260006020858184015260806040840152845180608085015260005b8181101561070d5786810183015185820160a0015282016106f1565b50600060a0828601015260a0601f19601f8301168501019250505082606083015295945050505050565b60208082526017908201527f63616c6c6572206973206e6f7420746865206f776e657200000000000000000060408201526060019056fea2646970667358221220063c6c384f745ebcacfdd13320e5b9a50687aae43ff14566761f56273111b97e64736f6c63430008100033", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0xF9062b8a30e0d7722960e305049FA50b86ba6253", + "0x0000000000000000000000000000000000000000000000000000000000000001": "0x8ac7230489e80000", + "0x0000000000000000000000000000000000000000000000000000000000000002": "0x781e90f1c8Fc4611c9b7497C3B47F99Ef6969CbC", + "0x0000000000000000000000000000000000000000000000000000000000000003": "0x8FA3b4570B4C96f8036C13b64971BA65867eEB48" + } + } + }, + "number": "0x0", + "gasUsed": "0x0", + "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "baseFeePerGas": null + } From 429f9244714a22b6d159c8714b10c5ec7f1e93fb Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 10 Oct 2024 00:32:03 +0800 Subject: [PATCH 68/86] fix --- charts/l2-sequencer/values.yaml | 1 - devnet/genesis.shadow.json | 97 --------------------------------- 2 files changed, 98 deletions(-) delete mode 100644 devnet/genesis.shadow.json diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index 5f8d060c..870ffce0 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -53,7 +53,6 @@ command: geth --datadir \"/l2geth/data\" init /l2geth/genesis/genesis.json && \ geth --datadir \"/l2geth/data\" \ --port \"$L2GETH_P2P_PORT\" --nodiscover --syncmode full --networkid \"$CHAIN_ID\" \ - --config \"/l2geth/config.toml\" \ --http --http.port \"$L2GETH_RPC_HTTP_PORT\" --http.addr \"0.0.0.0\" --http.vhosts=\"*\" --http.corsdomain \"*\" --http.api \"eth,scroll,net,web3,debug\" \ --pprof --pprof.addr \"0.0.0.0\" --pprof.port 6060 \ --ws --ws.port \"$L2GETH_RPC_WS_PORT\" --ws.addr \"0.0.0.0\" --ws.api \"eth,scroll,net,web3,debug\" \ diff --git a/devnet/genesis.shadow.json b/devnet/genesis.shadow.json deleted file mode 100644 index f0e9e24c..00000000 --- a/devnet/genesis.shadow.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "config": { - "chainId": 534352, - "homesteadBlock": 0, - "eip150Block": 0, - "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "eip155Block": 0, - "eip158Block": 0, - "byzantiumBlock": 0, - "constantinopleBlock": 0, - "petersburgBlock": 0, - "istanbulBlock": 0, - "berlinBlock": 0, - "londonBlock": 0, - "archimedesBlock": 0, - "shanghaiBlock": 0, - "bernoulliBlock": 5220340, - "curieBlock": 7096836, - "clique": { - "period": 3, - "epoch": 30000, - "relaxed_period": true, - "shadow_fork_height": 999987, - "shadow_fork_signer": "0x4e1f062ffab6dca974947f82a6e836e678a7d435" - }, - "scroll": { - "useZktrie": true, - "maxTxPerBlock": 100, - "maxTxPayloadBytesPerBlock": 122880, - "feeVaultAddress": "0x5300000000000000000000000000000000000005", - "l1Config": { - "l1ChainId": "1", - "l1MessageQueueAddress": "0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B", - "scrollChainAddress": "0xa13BAF47339d63B743e7Da8741db5456DAc1E556", - "numL1MessagesPerBlock": "10" - } - } - }, - "nonce": "0x0", - "timestamp": "0x6524e860", - "extraData": "0x4c61206573746f6e7465636f206573746173206d616c6665726d6974612e0000d2ACF5d16a983DB0d909d9D761B8337Fabd6cBd10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "gasLimit": "10000000", - "difficulty": "0x1", - "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "0x0000000000000000000000000000000000000000", - "alloc": { - "0xF9062b8a30e0d7722960e305049FA50b86ba6253": { - "balance": "2000000000000000000" - }, - "0x781e90f1c8Fc4611c9b7497C3B47F99Ef6969CbC": { - "balance": "226156424291633194186662080095093570025917938800079226637565593765455331328" - }, - "0x5300000000000000000000000000000000000000": { - "balance": "0x0", - "code": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c806383cc76601161006657806383cc7660146100fc5780638da5cb5b1461010f578063c4d66de814610122578063d4b9f4fa14610135578063f2fde38b1461013e57600080fd5b806326aad7b7146100985780633cb747bf146100b4578063600a2e77146100df578063715018a6146100f2575b600080fd5b6100a160015481565b6040519081526020015b60405180910390f35b6053546100c7906001600160a01b031681565b6040516001600160a01b0390911681526020016100ab565b6100a16100ed36600461054a565b610151565b6100fa6101f6565b005b6100a161010a36600461054a565b61022c565b6052546100c7906001600160a01b031681565b6100fa610130366004610563565b610243565b6100a160005481565b6100fa61014c366004610563565b6102db565b6053546000906001600160a01b031633146101a45760405162461bcd60e51b815260206004820152600e60248201526d37b7363c9036b2b9b9b2b733b2b960911b60448201526064015b60405180910390fd5b6000806101b084610367565b60408051838152602081018890529294509092507ffaa617c2d8ce12c62637dbce76efcc18dae60574aa95709bdcedce7e76071693910160405180910390a19392505050565b6052546001600160a01b031633146102205760405162461bcd60e51b815260040161019b90610593565b61022a6000610486565b565b602a816028811061023c57600080fd5b0154905081565b6052546001600160a01b0316331461026d5760405162461bcd60e51b815260040161019b90610593565b600154156102b15760405162461bcd60e51b815260206004820152601160248201527063616e6e6f7420696e697469616c697a6560781b604482015260640161019b565b6102b96104d8565b605380546001600160a01b0319166001600160a01b0392909216919091179055565b6052546001600160a01b031633146103055760405162461bcd60e51b815260040161019b90610593565b6001600160a01b03811661035b5760405162461bcd60e51b815260206004820152601d60248201527f6e6577206f776e657220697320746865207a65726f2061646472657373000000604482015260640161019b565b61036481610486565b50565b60035460009081906103bb5760405162461bcd60e51b815260206004820152601a60248201527f63616c6c206265666f726520696e697469616c697a6174696f6e000000000000604482015260640161019b565b6001548360005b8215610456576103d36002846105e0565b60000361041f5781602a82602881106103ee576103ee6105ca565b01556104188260028360288110610407576104076105ca565b015460009182526020526040902090565b915061044a565b610447602a8260288110610435576104356105ca565b01548360009182526020526040902090565b91505b600192831c92016103c2565b81602a826028811061046a5761046a6105ca565b0155506000819055600180548082019091559590945092505050565b605280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60005b60286104e8826001610618565b10156103645761051960028260288110610504576105046105ca565b015460028360288110610407576104076105ca565b6002610526836001610618565b60288110610536576105366105ca565b01558061054281610631565b9150506104db565b60006020828403121561055c57600080fd5b5035919050565b60006020828403121561057557600080fd5b81356001600160a01b038116811461058c57600080fd5b9392505050565b60208082526017908201527f63616c6c6572206973206e6f7420746865206f776e6572000000000000000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000826105fd57634e487b7160e01b600052601260045260246000fd5b500690565b634e487b7160e01b600052601160045260246000fd5b8082018082111561062b5761062b610602565b92915050565b60006001820161064357610643610602565b506001019056fea26469706673582212208fb1cb9933bb17dd0a7c17de7c890919b08d2fd7eb2bede7b41caa32709b30b564736f6c63430008100033", - "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000052": "0xF9062b8a30e0d7722960e305049FA50b86ba6253" - } - }, - "0x5300000000000000000000000000000000000002": { - "balance": "0x0", - "code": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063715018a61161008c578063bede39b511610066578063bede39b51461018d578063de26c4a1146101a0578063f2fde38b146101b3578063f45e65d8146101c657600080fd5b8063715018a6146101475780638da5cb5b1461014f57806393e59dc11461017a57600080fd5b80630c18c162146100d45780633577afc5146100f05780633d0f963e1461010557806349948e0e14610118578063519b4bd31461012b5780637046559714610134575b600080fd5b6100dd60025481565b6040519081526020015b60405180910390f35b6101036100fe366004610671565b6101cf565b005b61010361011336600461068a565b610291565b6100dd6101263660046106d0565b61031c565b6100dd60015481565b610103610142366004610671565b610361565b610103610416565b600054610162906001600160a01b031681565b6040516001600160a01b0390911681526020016100e7565b600454610162906001600160a01b031681565b61010361019b366004610671565b61044c565b6100dd6101ae3660046106d0565b610533565b6101036101c136600461068a565b610595565b6100dd60035481565b6000546001600160a01b031633146102025760405162461bcd60e51b81526004016101f990610781565b60405180910390fd5b621c9c388111156102555760405162461bcd60e51b815260206004820152601760248201527f657863656564206d6178696d756d206f7665726865616400000000000000000060448201526064016101f9565b60028190556040518181527f32740b35c0ea213650f60d44366b4fb211c9033b50714e4a1d34e65d5beb9bb4906020015b60405180910390a150565b6000546001600160a01b031633146102bb5760405162461bcd60e51b81526004016101f990610781565b600480546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f22d1c35fe072d2e42c3c8f9bd4a0d34aa84a0101d020a62517b33fdb3174e5f7910160405180910390a15050565b60008061032883610533565b905060006001548261033a91906107b8565b9050633b9aca006003548261034f91906107b8565b61035991906107e5565b949350505050565b6000546001600160a01b0316331461038b5760405162461bcd60e51b81526004016101f990610781565b61039b633b9aca006103e86107b8565b8111156103e15760405162461bcd60e51b8152602060048201526014602482015273657863656564206d6178696d756d207363616c6560601b60448201526064016101f9565b60038190556040518181527f3336cd9708eaf2769a0f0dc0679f30e80f15dcd88d1921b5a16858e8b85c591a90602001610286565b6000546001600160a01b031633146104405760405162461bcd60e51b81526004016101f990610781565b61044a6000610621565b565b6004805460405163efc7840160e01b815233928101929092526001600160a01b03169063efc7840190602401602060405180830381865afa158015610495573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b99190610807565b6104fe5760405162461bcd60e51b81526020600482015260166024820152752737ba103bb434ba32b634b9ba32b21039b2b73232b960511b60448201526064016101f9565b60018190556040518181527f351fb23757bb5ea0546c85b7996ddd7155f96b939ebaa5ff7bc49c75f27f2c4490602001610286565b80516000908190815b818110156105865784818151811061055657610556610829565b01602001516001600160f81b0319166000036105775760048301925061057e565b6010830192505b60010161053c565b50506002540160400192915050565b6000546001600160a01b031633146105bf5760405162461bcd60e51b81526004016101f990610781565b6001600160a01b0381166106155760405162461bcd60e51b815260206004820152601d60248201527f6e6577206f776e657220697320746865207a65726f206164647265737300000060448201526064016101f9565b61061e81610621565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561068357600080fd5b5035919050565b60006020828403121561069c57600080fd5b81356001600160a01b03811681146106b357600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156106e257600080fd5b813567ffffffffffffffff808211156106fa57600080fd5b818401915084601f83011261070e57600080fd5b813581811115610720576107206106ba565b604051601f8201601f19908116603f01168101908382118183101715610748576107486106ba565b8160405282815287602084870101111561076157600080fd5b826020860160208301376000928101602001929092525095945050505050565b60208082526017908201527f63616c6c6572206973206e6f7420746865206f776e6572000000000000000000604082015260600190565b60008160001904831182151516156107e057634e487b7160e01b600052601160045260246000fd5b500290565b60008261080257634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561081957600080fd5b815180151581146106b357600080fd5b634e487b7160e01b600052603260045260246000fdfea26469706673582212205ea335809638809cf032c794fd966e2439020737b1dcc2218435cb438286efcf64736f6c63430008100033", - "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000000": "0xF9062b8a30e0d7722960e305049FA50b86ba6253" - } - }, - "0x5300000000000000000000000000000000000003": { - "balance": "0x0", - "code": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c8063715018a61461005c57806379586dd7146100665780638da5cb5b14610079578063efc78401146100a9578063f2fde38b146100e5575b600080fd5b6100646100f8565b005b610064610074366004610356565b610137565b60005461008c906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100d56100b736600461042d565b6001600160a01b031660009081526001602052604090205460ff1690565b60405190151581526020016100a0565b6100646100f336600461042d565b610238565b6000546001600160a01b0316331461012b5760405162461bcd60e51b81526004016101229061044f565b60405180910390fd5b61013560006102c4565b565b6000546001600160a01b031633146101615760405162461bcd60e51b81526004016101229061044f565b60005b825181101561023357816001600085848151811061018457610184610486565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055508281815181106101d5576101d5610486565b60200260200101516001600160a01b03167f8daaf060c3306c38e068a75c054bf96ecd85a3db1252712c4d93632744c42e0d83604051610219911515815260200190565b60405180910390a28061022b8161049c565b915050610164565b505050565b6000546001600160a01b031633146102625760405162461bcd60e51b81526004016101229061044f565b6001600160a01b0381166102b85760405162461bcd60e51b815260206004820152601d60248201527f6e6577206f776e657220697320746865207a65726f20616464726573730000006044820152606401610122565b6102c1816102c4565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b80356001600160a01b038116811461034157600080fd5b919050565b8035801515811461034157600080fd5b6000806040838503121561036957600080fd5b823567ffffffffffffffff8082111561038157600080fd5b818501915085601f83011261039557600080fd5b81356020828211156103a9576103a9610314565b8160051b604051601f19603f830116810181811086821117156103ce576103ce610314565b6040529283528183019350848101820192898411156103ec57600080fd5b948201945b83861015610411576104028661032a565b855294820194938201936103f1565b96506104209050878201610346565b9450505050509250929050565b60006020828403121561043f57600080fd5b6104488261032a565b9392505050565b60208082526017908201527f63616c6c6572206973206e6f7420746865206f776e6572000000000000000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600182016104bc57634e487b7160e01b600052601160045260246000fd5b506001019056fea26469706673582212203414b076e92b618bd7c3437159d7bceb2acc3a5c82f51f383465512d9c52e97064736f6c63430008100033", - "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000000": "0xF9062b8a30e0d7722960e305049FA50b86ba6253" - } - }, - "0x5300000000000000000000000000000000000004": { - "balance": "0x0", - "code": "0x6080604052600436106101025760003560e01c806370a0823111610095578063a457c2d711610064578063a457c2d7146102b4578063a9059cbb146102d4578063d0e30db0146102f4578063d505accf146102fc578063dd62ed3e1461031c57600080fd5b806370a08231146102215780637ecebe001461025757806384b0196e1461027757806395d89b411461029f57600080fd5b80632e1a7d4d116100d15780632e1a7d4d146101b0578063313ce567146101d05780633644e515146101ec578063395093511461020157600080fd5b806306fdde0314610116578063095ea7b31461014157806318160ddd1461017157806323b872dd1461019057600080fd5b366101115761010f61033c565b005b600080fd5b34801561012257600080fd5b5061012b61038d565b60405161013891906112fa565b60405180910390f35b34801561014d57600080fd5b5061016161015c366004611330565b61041f565b6040519015158152602001610138565b34801561017d57600080fd5b506002545b604051908152602001610138565b34801561019c57600080fd5b506101616101ab36600461135a565b610439565b3480156101bc57600080fd5b5061010f6101cb366004611396565b61045d565b3480156101dc57600080fd5b5060405160128152602001610138565b3480156101f857600080fd5b5061018261054e565b34801561020d57600080fd5b5061016161021c366004611330565b61055d565b34801561022d57600080fd5b5061018261023c3660046113af565b6001600160a01b031660009081526020819052604090205490565b34801561026357600080fd5b506101826102723660046113af565b61057f565b34801561028357600080fd5b5061028c61059d565b60405161013897969594939291906113ca565b3480156102ab57600080fd5b5061012b610626565b3480156102c057600080fd5b506101616102cf366004611330565b610635565b3480156102e057600080fd5b506101616102ef366004611330565b6106b0565b61010f61033c565b34801561030857600080fd5b5061010f610317366004611460565b6106be565b34801561032857600080fd5b506101826103373660046114d3565b610822565b336103478134610881565b806001600160a01b03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c3460405161038291815260200190565b60405180910390a250565b60606003805461039c90611506565b80601f01602080910402602001604051908101604052809291908181526020018280546103c890611506565b80156104155780601f106103ea57610100808354040283529160200191610415565b820191906000526020600020905b8154815290600101906020018083116103f857829003601f168201915b5050505050905090565b60003361042d818585610940565b60019150505b92915050565b600033610447858285610a65565b610452858585610adf565b506001949350505050565b336104688183610c83565b6000816001600160a01b03168360405160006040518083038185875af1925050503d80600081146104b5576040519150601f19603f3d011682016040523d82523d6000602084013e6104ba565b606091505b50509050806105065760405162461bcd60e51b81526020600482015260136024820152721dda5d1a191c985dc81155120819985a5b1959606a1b60448201526064015b60405180910390fd5b816001600160a01b03167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b658460405161054191815260200190565b60405180910390a2505050565b6000610558610db2565b905090565b60003361042d8185856105708383610822565b61057a919061153a565b610940565b6001600160a01b038116600090815260076020526040812054610433565b6000606080828080836105d17f577261707065642045746865720000000000000000000000000000000000000d6005610edd565b6105fc7f31000000000000000000000000000000000000000000000000000000000000016006610edd565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b60606004805461039c90611506565b600033816106438286610822565b9050838110156106a35760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016104fd565b6104528286868403610940565b60003361042d818585610adf565b8342111561070e5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e6500000060448201526064016104fd565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988888861073d8c610f81565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061079882610fa9565b905060006107a882878787610fd6565b9050896001600160a01b0316816001600160a01b03161461080b5760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e6174757265000060448201526064016104fd565b6108168a8a8a610940565b50505050505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60006020835110156108695761086283610ffe565b9050610433565b8161087484826115bf565b5060ff9050610433565b90565b6001600160a01b0382166108d75760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016104fd565b80600260008282546108e9919061153a565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6001600160a01b0383166109a25760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104fd565b6001600160a01b038216610a035760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104fd565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6000610a718484610822565b90506000198114610ad95781811015610acc5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016104fd565b610ad98484848403610940565b50505050565b6001600160a01b038316610b435760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104fd565b6001600160a01b038216610ba55760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104fd565b6001600160a01b03831660009081526020819052604090205481811015610c1d5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016104fd565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610ad9565b6001600160a01b038216610ce35760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016104fd565b6001600160a01b03821660009081526020819052604090205481811015610d575760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016104fd565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101610a58565b505050565b6000306001600160a01b037f000000000000000000000000530000000000000000000000000000000000000416148015610e0b57507f000000000000000000000000000000000000000000000000000000000008275046145b15610e3557507fe5b117a3cd7ae7ed3508e6e6c5a0794536b2a8dee12533c4d7524eae9c85438f90565b610558604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f00cd3d46df44f2cbb950cf84eb2e92aa2ddd23195b1a009173ea59a063357ed3918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b606060ff8314610ef0576108628361103c565b818054610efc90611506565b80601f0160208091040260200160405190810160405280929190818152602001828054610f2890611506565b8015610f755780601f10610f4a57610100808354040283529160200191610f75565b820191906000526020600020905b815481529060010190602001808311610f5857829003601f168201915b50505050509050610433565b6001600160a01b03811660009081526007602052604090208054600181018255905b50919050565b6000610433610fb6610db2565b8360405161190160f01b8152600281019290925260228201526042902090565b6000806000610fe78787878761107b565b91509150610ff48161113f565b5095945050505050565b600080829050601f81511115611029578260405163305a27a960e01b81526004016104fd91906112fa565b80516110348261167f565b179392505050565b606060006110498361128c565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156110b25750600090506003611136565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611106573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661112f57600060019250925050611136565b9150600090505b94509492505050565b6000816004811115611153576111536116a3565b0361115b5750565b600181600481111561116f5761116f6116a3565b036111bc5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104fd565b60028160048111156111d0576111d06116a3565b0361121d5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104fd565b6003816004811115611231576112316116a3565b036112895760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016104fd565b50565b600060ff8216601f81111561043357604051632cd44ac360e21b815260040160405180910390fd5b6000815180845260005b818110156112da576020818501810151868301820152016112be565b506000602082860101526020601f19601f83011685010191505092915050565b60208152600061130d60208301846112b4565b9392505050565b80356001600160a01b038116811461132b57600080fd5b919050565b6000806040838503121561134357600080fd5b61134c83611314565b946020939093013593505050565b60008060006060848603121561136f57600080fd5b61137884611314565b925061138660208501611314565b9150604084013590509250925092565b6000602082840312156113a857600080fd5b5035919050565b6000602082840312156113c157600080fd5b61130d82611314565b60ff60f81b881681526000602060e0818401526113ea60e084018a6112b4565b83810360408501526113fc818a6112b4565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b8181101561144e57835183529284019291840191600101611432565b50909c9b505050505050505050505050565b600080600080600080600060e0888a03121561147b57600080fd5b61148488611314565b965061149260208901611314565b95506040880135945060608801359350608088013560ff811681146114b657600080fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156114e657600080fd5b6114ef83611314565b91506114fd60208401611314565b90509250929050565b600181811c9082168061151a57607f821691505b602082108103610fa357634e487b7160e01b600052602260045260246000fd5b8082018082111561043357634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b601f821115610dad57600081815260208120601f850160051c810160208610156115985750805b601f850160051c820191505b818110156115b7578281556001016115a4565b505050505050565b815167ffffffffffffffff8111156115d9576115d961155b565b6115ed816115e78454611506565b84611571565b602080601f831160018114611622576000841561160a5750858301515b600019600386901b1c1916600185901b1785556115b7565b600085815260208120601f198616915b8281101561165157888601518255948401946001909101908401611632565b508582101561166f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b80516020808301519190811015610fa35760001960209190910360031b1b16919050565b634e487b7160e01b600052602160045260246000fdfea26469706673582212207f39e33e122e8e2b0381aa6abea46046f56b05ced66c556a06bb1b80be7f55cf64736f6c63430008100033", - "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000003": "0x577261707065642045746865720000000000000000000000000000000000001a", - "0x0000000000000000000000000000000000000000000000000000000000000004": "0x5745544800000000000000000000000000000000000000000000000000000008" - } - }, - "0x5300000000000000000000000000000000000005": { - "balance": "0x0", - "code": "0x6080604052600436106100ab5760003560e01c806384411d651161006457806384411d65146101845780638da5cb5b1461019a5780639e7adc79146101ba578063f2fde38b146101da578063feec756c146101fa578063ff4f35461461021a57600080fd5b80632e1a7d4d146100b75780633cb747bf146100d95780633ccfd60b14610116578063457e1a491461012b57806366d003ac1461014f578063715018a61461016f57600080fd5b366100b257005b600080fd5b3480156100c357600080fd5b506100d76100d2366004610682565b61023a565b005b3480156100e557600080fd5b506002546100f9906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561012257600080fd5b506100d76103ff565b34801561013757600080fd5b5061014160015481565b60405190815260200161010d565b34801561015b57600080fd5b506003546100f9906001600160a01b031681565b34801561017b57600080fd5b506100d761040c565b34801561019057600080fd5b5061014160045481565b3480156101a657600080fd5b506000546100f9906001600160a01b031681565b3480156101c657600080fd5b506100d76101d536600461069b565b610442565b3480156101e657600080fd5b506100d76101f536600461069b565b6104be565b34801561020657600080fd5b506100d761021536600461069b565b610547565b34801561022657600080fd5b506100d7610235366004610682565b6105c3565b6001548110156102ca5760405162461bcd60e51b815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d20776974686472616064820152691dd85b08185b5bdd5b9d60b21b608482015260a4015b60405180910390fd5b478082111561032e5760405162461bcd60e51b815260206004820152602a60248201527f4665655661756c743a20696e73756666696369656e742062616c616e636520746044820152696f20776974686472617760b01b60648201526084016102c1565b6004805483019055600354604080518481526001600160a01b0390921660208301523382820152517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1600254600354604080516020810182526000808252915163b2267a7b60e01b81526001600160a01b039485169463b2267a7b9488946103c99491909216928592906004016106cb565b6000604051808303818588803b1580156103e257600080fd5b505af11580156103f6573d6000803e3d6000fd5b50505050505050565b476104098161023a565b50565b6000546001600160a01b031633146104365760405162461bcd60e51b81526004016102c190610737565b6104406000610632565b565b6000546001600160a01b0316331461046c5760405162461bcd60e51b81526004016102c190610737565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f1c928c417a10a21c3cddad148c5dba5d710e4b1442d6d8a36de345935ad8461290600090a35050565b6000546001600160a01b031633146104e85760405162461bcd60e51b81526004016102c190610737565b6001600160a01b03811661053e5760405162461bcd60e51b815260206004820152601d60248201527f6e6577206f776e657220697320746865207a65726f206164647265737300000060448201526064016102c1565b61040981610632565b6000546001600160a01b031633146105715760405162461bcd60e51b81526004016102c190610737565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f7e1e96961a397c8aa26162fe259cc837afc95e33aad4945ddc61c18dabb7a6ad90600090a35050565b6000546001600160a01b031633146105ed5760405162461bcd60e51b81526004016102c190610737565b600180549082905560408051828152602081018490527f0d3c80219fe57713b9f9c83d1e51426792d0c14d8e330e65b102571816140965910160405180910390a15050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561069457600080fd5b5035919050565b6000602082840312156106ad57600080fd5b81356001600160a01b03811681146106c457600080fd5b9392505050565b60018060a01b038516815260006020858184015260806040840152845180608085015260005b8181101561070d5786810183015185820160a0015282016106f1565b50600060a0828601015260a0601f19601f8301168501019250505082606083015295945050505050565b60208082526017908201527f63616c6c6572206973206e6f7420746865206f776e657200000000000000000060408201526060019056fea2646970667358221220063c6c384f745ebcacfdd13320e5b9a50687aae43ff14566761f56273111b97e64736f6c63430008100033", - "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000000": "0xF9062b8a30e0d7722960e305049FA50b86ba6253", - "0x0000000000000000000000000000000000000000000000000000000000000001": "0x8ac7230489e80000", - "0x0000000000000000000000000000000000000000000000000000000000000002": "0x781e90f1c8Fc4611c9b7497C3B47F99Ef6969CbC", - "0x0000000000000000000000000000000000000000000000000000000000000003": "0x8FA3b4570B4C96f8036C13b64971BA65867eEB48" - } - } - }, - "number": "0x0", - "gasUsed": "0x0", - "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "baseFeePerGas": null -} From 881dda744d251754ed87ef6bbc839514c84da1bb Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 10 Oct 2024 00:38:40 +0800 Subject: [PATCH 69/86] add curl install --- charts/l2-sequencer/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index 870ffce0..69388aed 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -45,7 +45,7 @@ command: "-c", "mkdir -p /l2geth/data/keystore && \ mkdir -p /l2geth/data/geth && \ - apt-get install -y rsync && \ + apt-get install -y rsync curl && \ rsync -av --progress /host/snapshot/ /l2geth/data/ && \ echo ${L2GETH_PASSWORD} > /l2geth/password && \ echo ${L2GETH_KEYSTORE} > /l2geth/data/keystore/keystore.json && \ From 1c1f23f88f1381df1946be2f369e0821237eace6 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 10 Oct 2024 00:48:33 +0800 Subject: [PATCH 70/86] fix --- charts/l2-sequencer/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index 69388aed..045b68c1 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -45,7 +45,7 @@ command: "-c", "mkdir -p /l2geth/data/keystore && \ mkdir -p /l2geth/data/geth && \ - apt-get install -y rsync curl && \ + apt-get update && apt-get install -y rsync curl && \ rsync -av --progress /host/snapshot/ /l2geth/data/ && \ echo ${L2GETH_PASSWORD} > /l2geth/password && \ echo ${L2GETH_KEYSTORE} > /l2geth/data/keystore/keystore.json && \ From 647b02e2f4185df8afdaec3ca8f47a609691de14 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 10 Oct 2024 01:02:11 +0800 Subject: [PATCH 71/86] fix a bug --- charts/l2-sequencer/values.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index 045b68c1..484e2fa7 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -70,7 +70,11 @@ command: --rollup.verify \ --metrics --metrics.expensive \ $L2GETH_EXTRA_PARAMS & \ - sleep 120 && \ + while ! curl -s -X POST -H \"Content-Type: application/json\" --data '{\"jsonrpc\":\"2.0\",\"method\":\"net_version\",\"params\":[],\"id\":1}' http://localhost:$L2GETH_RPC_HTTP_PORT > /dev/null; do \ + echo \"Waiting for RPC to become available...\"; \ + sleep 10; \ + done && \ + echo \"RPC is now available. Executing debug_setHead...\" && \ curl -X POST -H \"Content-Type: application/json\" --data '{\"jsonrpc\":\"2.0\",\"method\":\"debug_setHead\",\"params\":[\"${L2_SHADOWFORK_BLOCK_NUMBER}\"],\"id\":1}' http://localhost:$L2GETH_RPC_HTTP_PORT" ] From 2c201fda1011db531b87b36f26a395c11272def9 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 10 Oct 2024 02:52:19 +0800 Subject: [PATCH 72/86] fix --- charts/l2-sequencer/values.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index 484e2fa7..ea942317 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -70,6 +70,11 @@ command: --rollup.verify \ --metrics --metrics.expensive \ $L2GETH_EXTRA_PARAMS & \ + until command -v curl > /dev/null 2>&1; do \ + echo \"Waiting for curl to be installed...\"; \ + sleep 5; \ + done && \ + echo \"curl is now available. Proceeding with RPC check...\" && \ while ! curl -s -X POST -H \"Content-Type: application/json\" --data '{\"jsonrpc\":\"2.0\",\"method\":\"net_version\",\"params\":[],\"id\":1}' http://localhost:$L2GETH_RPC_HTTP_PORT > /dev/null; do \ echo \"Waiting for RPC to become available...\"; \ sleep 10; \ From bcb97850b3f59e09a0f7e1098f3ae4e0d8cf0677 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 10 Oct 2024 03:01:23 +0800 Subject: [PATCH 73/86] fix a bug --- charts/l2-sequencer/values.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index ea942317..c71f6801 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -171,6 +171,7 @@ persistence: type: hostPath hostPath: /var/scroll/l2geth/snapshot mountPath: /host/snapshot + hostPathType: Directory serviceMonitor: main: From 215bb859f86efd22325ce4fd2d0582a86c6c9a06 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 10 Oct 2024 03:41:15 +0800 Subject: [PATCH 74/86] fix --- charts/l2-sequencer/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index c71f6801..1cb2defd 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -149,7 +149,7 @@ persistence: type: pvc mountPath: /l2geth/data/ name: l2geth-data - size: 80Gi + size: 10Gi accessMode: ReadWriteOnce env: enabled: true From b261f72cfa043a7f098ceee1abf27e12f851f0bd Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 10 Oct 2024 15:23:31 +0800 Subject: [PATCH 75/86] change configs --- charts/l2-sequencer/values.yaml | 2 +- charts/scroll-sdk/config.toml | 2 +- devnet/genesis.shadow.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index 1cb2defd..f600fe35 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -33,7 +33,7 @@ env: - name: VERBOSITY value: "3" - name: L2_SHADOWFORK_BLOCK_NUMBER - value: "0xf4233" + value: "0xe9a5" envFrom: - configMapRef: diff --git a/charts/scroll-sdk/config.toml b/charts/scroll-sdk/config.toml index 3c18e043..382d22de 100644 --- a/charts/scroll-sdk/config.toml +++ b/charts/scroll-sdk/config.toml @@ -117,7 +117,7 @@ GRAFANA_HOST = "http://grafana.scrollsdk" [shadowfork] L1_FULLNODE_RPC_ENDPOINT = "https://rpc.ankr.com/eth" -L1_SHADOWFORK_BLOCK_NUMBER = "18628557" +L1_SHADOWFORK_BLOCK_NUMBER = "18356993" L1_MAINNET_SCROLL_CHAIN_PROXY_ADDR = "0xa13BAF47339d63B743e7Da8741db5456DAc1E556" L1_MAINNET_SCROLL_OWNER_ADDR = "0x798576400F7D662961BA15C6b3F3d813447a26a6" SCROLL_RDS_ROLLUP_NODE_DSN = "xxx" diff --git a/devnet/genesis.shadow.yaml b/devnet/genesis.shadow.yaml index 5a6f7035..5e0592fd 100644 --- a/devnet/genesis.shadow.yaml +++ b/devnet/genesis.shadow.yaml @@ -21,7 +21,7 @@ scrollConfig: | "period": 3, "epoch": 30000, "relaxed_period": true, - "shadow_fork_height": 999987, + "shadow_fork_height": 59813, "shadow_fork_signer": "0x4e1f062ffab6dca974947f82a6e836e678a7d435" }, "scroll": { From 469d71d15f77fddbcff742c421c3e0214f8fb64e Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 10 Oct 2024 16:01:47 +0800 Subject: [PATCH 76/86] fix cmd --- charts/l2-sequencer/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index f600fe35..d8bd123c 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -45,8 +45,7 @@ command: "-c", "mkdir -p /l2geth/data/keystore && \ mkdir -p /l2geth/data/geth && \ - apt-get update && apt-get install -y rsync curl && \ - rsync -av --progress /host/snapshot/ /l2geth/data/ && \ + cp -r /host/snapshot/ /l2geth/data/ && \ echo ${L2GETH_PASSWORD} > /l2geth/password && \ echo ${L2GETH_KEYSTORE} > /l2geth/data/keystore/keystore.json && \ echo ${L2GETH_NODEKEY} > /l2geth/data/geth/nodekey && \ @@ -70,6 +69,7 @@ command: --rollup.verify \ --metrics --metrics.expensive \ $L2GETH_EXTRA_PARAMS & \ + apt-get update && apt-get install -y curl && \ until command -v curl > /dev/null 2>&1; do \ echo \"Waiting for curl to be installed...\"; \ sleep 5; \ From 7b6fe27f4db2cca1777c5d3a5605baf538917b4e Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 10 Oct 2024 16:28:18 +0800 Subject: [PATCH 77/86] increase resources --- charts/l2-sequencer/values.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index d8bd123c..175295d5 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -121,11 +121,11 @@ service: resources: requests: - memory: "150Mi" - cpu: "50m" + memory: "4Gi" + cpu: "1" limits: memory: "8Gi" - cpu: "100m" + cpu: "2" defaultProbes: &default_probes enabled: true From ebb7dea5892f73ed3f595120410b73c1ae1f3d17 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 10 Oct 2024 16:38:51 +0800 Subject: [PATCH 78/86] remove init datadir by genesis.json --- charts/l2-sequencer/values.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index 175295d5..06c2474c 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -49,7 +49,6 @@ command: echo ${L2GETH_PASSWORD} > /l2geth/password && \ echo ${L2GETH_KEYSTORE} > /l2geth/data/keystore/keystore.json && \ echo ${L2GETH_NODEKEY} > /l2geth/data/geth/nodekey && \ - geth --datadir \"/l2geth/data\" init /l2geth/genesis/genesis.json && \ geth --datadir \"/l2geth/data\" \ --port \"$L2GETH_P2P_PORT\" --nodiscover --syncmode full --networkid \"$CHAIN_ID\" \ --http --http.port \"$L2GETH_RPC_HTTP_PORT\" --http.addr \"0.0.0.0\" --http.vhosts=\"*\" --http.corsdomain \"*\" --http.api \"eth,scroll,net,web3,debug\" \ From dc4aa08708b8b588ab65ddeda4954039a77af696 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 10 Oct 2024 17:22:20 +0800 Subject: [PATCH 79/86] add init genesis back --- charts/l2-sequencer/values.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index 06c2474c..175295d5 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -49,6 +49,7 @@ command: echo ${L2GETH_PASSWORD} > /l2geth/password && \ echo ${L2GETH_KEYSTORE} > /l2geth/data/keystore/keystore.json && \ echo ${L2GETH_NODEKEY} > /l2geth/data/geth/nodekey && \ + geth --datadir \"/l2geth/data\" init /l2geth/genesis/genesis.json && \ geth --datadir \"/l2geth/data\" \ --port \"$L2GETH_P2P_PORT\" --nodiscover --syncmode full --networkid \"$CHAIN_ID\" \ --http --http.port \"$L2GETH_RPC_HTTP_PORT\" --http.addr \"0.0.0.0\" --http.vhosts=\"*\" --http.corsdomain \"*\" --http.api \"eth,scroll,net,web3,debug\" \ From f1becfc0936d0ed5ec3c01b329aa4e222206abdf Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 10 Oct 2024 18:15:56 +0800 Subject: [PATCH 80/86] fix --- charts/l2-sequencer/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index 175295d5..ec9eb8d8 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -45,7 +45,7 @@ command: "-c", "mkdir -p /l2geth/data/keystore && \ mkdir -p /l2geth/data/geth && \ - cp -r /host/snapshot/ /l2geth/data/ && \ + cp -r /host/snapshot/* /l2geth/data/ && \ echo ${L2GETH_PASSWORD} > /l2geth/password && \ echo ${L2GETH_KEYSTORE} > /l2geth/data/keystore/keystore.json && \ echo ${L2GETH_NODEKEY} > /l2geth/data/geth/nodekey && \ From 41823462b6539fede72a58497a38528270f3bc4d Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 10 Oct 2024 18:52:01 +0800 Subject: [PATCH 81/86] fix --- charts/l2-sequencer/values.yaml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index ec9eb8d8..0782f417 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -69,18 +69,13 @@ command: --rollup.verify \ --metrics --metrics.expensive \ $L2GETH_EXTRA_PARAMS & \ - apt-get update && apt-get install -y curl && \ - until command -v curl > /dev/null 2>&1; do \ - echo \"Waiting for curl to be installed...\"; \ - sleep 5; \ - done && \ - echo \"curl is now available. Proceeding with RPC check...\" && \ - while ! curl -s -X POST -H \"Content-Type: application/json\" --data '{\"jsonrpc\":\"2.0\",\"method\":\"net_version\",\"params\":[],\"id\":1}' http://localhost:$L2GETH_RPC_HTTP_PORT > /dev/null; do \ + until geth attach http://localhost:$L2GETH_RPC_HTTP_PORT --exec \"eth.blockNumber\" > /dev/null 2>&1; do \ echo \"Waiting for RPC to become available...\"; \ - sleep 10; \ + sleep 5; \ done && \ echo \"RPC is now available. Executing debug_setHead...\" && \ - curl -X POST -H \"Content-Type: application/json\" --data '{\"jsonrpc\":\"2.0\",\"method\":\"debug_setHead\",\"params\":[\"${L2_SHADOWFORK_BLOCK_NUMBER}\"],\"id\":1}' http://localhost:$L2GETH_RPC_HTTP_PORT" + geth attach http://localhost:$L2GETH_RPC_HTTP_PORT --exec \"debug.setHead('${L2_SHADOWFORK_BLOCK_NUMBER}')\" && \ + echo \"debug_setHead executed. Exiting.\"“ ] initContainers: From 0bd78705735c70de6f74219123960cf45a679411 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 10 Oct 2024 18:57:35 +0800 Subject: [PATCH 82/86] fix --- charts/l2-sequencer/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index 0782f417..bd84f685 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -75,7 +75,7 @@ command: done && \ echo \"RPC is now available. Executing debug_setHead...\" && \ geth attach http://localhost:$L2GETH_RPC_HTTP_PORT --exec \"debug.setHead('${L2_SHADOWFORK_BLOCK_NUMBER}')\" && \ - echo \"debug_setHead executed. Exiting.\"“ + echo \"debug_setHead executed. Exiting.\"" ] initContainers: From b21e51cf0acbf9f4294e059c0d7d36ef3569130d Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 10 Oct 2024 19:33:50 +0800 Subject: [PATCH 83/86] fix cmds --- charts/l2-sequencer/values.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index bd84f685..29636898 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -50,6 +50,13 @@ command: echo ${L2GETH_KEYSTORE} > /l2geth/data/keystore/keystore.json && \ echo ${L2GETH_NODEKEY} > /l2geth/data/geth/nodekey && \ geth --datadir \"/l2geth/data\" init /l2geth/genesis/genesis.json && \ + (until geth attach http://localhost:$L2GETH_RPC_HTTP_PORT --exec \"eth.blockNumber\" > /dev/null 2>&1; do \ + echo \"Waiting for RPC to become available...\"; \ + sleep 5; \ + done && \ + echo \"RPC is now available. Executing debug_setHead...\" && \ + geth attach http://localhost:$L2GETH_RPC_HTTP_PORT --exec \"debug.setHead('${L2_SHADOWFORK_BLOCK_NUMBER}')\" && \ + echo \"debug_setHead executed.\") & \ geth --datadir \"/l2geth/data\" \ --port \"$L2GETH_P2P_PORT\" --nodiscover --syncmode full --networkid \"$CHAIN_ID\" \ --http --http.port \"$L2GETH_RPC_HTTP_PORT\" --http.addr \"0.0.0.0\" --http.vhosts=\"*\" --http.corsdomain \"*\" --http.api \"eth,scroll,net,web3,debug\" \ @@ -68,14 +75,7 @@ command: --l1.endpoint \"$L2GETH_L1_ENDPOINT\" --l1.confirmations \"$L2GETH_L1_WATCHER_CONFIRMATIONS\" --l1.sync.startblock \"$L2GETH_L1_CONTRACT_DEPLOYMENT_BLOCK\" \ --rollup.verify \ --metrics --metrics.expensive \ - $L2GETH_EXTRA_PARAMS & \ - until geth attach http://localhost:$L2GETH_RPC_HTTP_PORT --exec \"eth.blockNumber\" > /dev/null 2>&1; do \ - echo \"Waiting for RPC to become available...\"; \ - sleep 5; \ - done && \ - echo \"RPC is now available. Executing debug_setHead...\" && \ - geth attach http://localhost:$L2GETH_RPC_HTTP_PORT --exec \"debug.setHead('${L2_SHADOWFORK_BLOCK_NUMBER}')\" && \ - echo \"debug_setHead executed. Exiting.\"" + $L2GETH_EXTRA_PARAMS" ] initContainers: From 2fec7c9a186779a732c7c771ee5512d314dde86a Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 10 Oct 2024 19:48:53 +0800 Subject: [PATCH 84/86] fix script --- charts/l2-sequencer/values.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index 29636898..ea5fcbd0 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -43,20 +43,20 @@ command: [ "bash", "-c", - "mkdir -p /l2geth/data/keystore && \ - mkdir -p /l2geth/data/geth && \ - cp -r /host/snapshot/* /l2geth/data/ && \ - echo ${L2GETH_PASSWORD} > /l2geth/password && \ - echo ${L2GETH_KEYSTORE} > /l2geth/data/keystore/keystore.json && \ - echo ${L2GETH_NODEKEY} > /l2geth/data/geth/nodekey && \ - geth --datadir \"/l2geth/data\" init /l2geth/genesis/genesis.json && \ - (until geth attach http://localhost:$L2GETH_RPC_HTTP_PORT --exec \"eth.blockNumber\" > /dev/null 2>&1; do \ + "(until geth attach http://localhost:$L2GETH_RPC_HTTP_PORT --exec \"eth.blockNumber\" > /dev/null 2>&1; do \ echo \"Waiting for RPC to become available...\"; \ sleep 5; \ done && \ echo \"RPC is now available. Executing debug_setHead...\" && \ geth attach http://localhost:$L2GETH_RPC_HTTP_PORT --exec \"debug.setHead('${L2_SHADOWFORK_BLOCK_NUMBER}')\" && \ echo \"debug_setHead executed.\") & \ + mkdir -p /l2geth/data/keystore && \ + mkdir -p /l2geth/data/geth && \ + cp -r /host/snapshot/* /l2geth/data/ && \ + echo ${L2GETH_PASSWORD} > /l2geth/password && \ + echo ${L2GETH_KEYSTORE} > /l2geth/data/keystore/keystore.json && \ + echo ${L2GETH_NODEKEY} > /l2geth/data/geth/nodekey && \ + geth --datadir \"/l2geth/data\" init /l2geth/genesis/genesis.json && \ geth --datadir \"/l2geth/data\" \ --port \"$L2GETH_P2P_PORT\" --nodiscover --syncmode full --networkid \"$CHAIN_ID\" \ --http --http.port \"$L2GETH_RPC_HTTP_PORT\" --http.addr \"0.0.0.0\" --http.vhosts=\"*\" --http.corsdomain \"*\" --http.api \"eth,scroll,net,web3,debug\" \ From 0f39c534f77f58af8ec30b1a214f9e051b272206 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 10 Oct 2024 22:07:37 +0800 Subject: [PATCH 85/86] remove --rollup.verify --- charts/l2-sequencer/values.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/charts/l2-sequencer/values.yaml b/charts/l2-sequencer/values.yaml index ea5fcbd0..27170bd6 100644 --- a/charts/l2-sequencer/values.yaml +++ b/charts/l2-sequencer/values.yaml @@ -73,7 +73,6 @@ command: --gpo.percentile 20 \ --gpo.blocks 100 \ --l1.endpoint \"$L2GETH_L1_ENDPOINT\" --l1.confirmations \"$L2GETH_L1_WATCHER_CONFIRMATIONS\" --l1.sync.startblock \"$L2GETH_L1_CONTRACT_DEPLOYMENT_BLOCK\" \ - --rollup.verify \ --metrics --metrics.expensive \ $L2GETH_EXTRA_PARAMS" ] From ad809304ffc0063328f8170a34a9a4efa1208044 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 10 Oct 2024 22:50:58 +0800 Subject: [PATCH 86/86] add block time --- charts/l1-devnet/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/l1-devnet/values.yaml b/charts/l1-devnet/values.yaml index 199b7af4..6aaee93d 100644 --- a/charts/l1-devnet/values.yaml +++ b/charts/l1-devnet/values.yaml @@ -14,7 +14,7 @@ image: tag: v0.0.4 command: - ["/bin/bash", "-c", "anvil --host 0.0.0.0 --port 8545 --chain-id ${CHAIN_ID} --fork-url ${L1_FULLNODE_RPC_ENDPOINT} --fork-block-number ${L1_SHADOWFORK_BLOCK_NUMBER} --state /data/state.json --state-interval 60 --slots-in-an-epoch 3"] + ["/bin/bash", "-c", "anvil --host 0.0.0.0 --port 8545 --chain-id ${CHAIN_ID} --fork-url ${L1_FULLNODE_RPC_ENDPOINT} --fork-block-number ${L1_SHADOWFORK_BLOCK_NUMBER} --state /data/state.json --state-interval 60 --slots-in-an-epoch 3 --block-time 12"] envFrom: - configMapRef: