diff --git a/docker-compose-mainnetv2-with-historical.yml b/docker-compose-mainnetv2-with-historical.yml index a54df4f..437e1d7 100644 --- a/docker-compose-mainnetv2-with-historical.yml +++ b/docker-compose-mainnetv2-with-historical.yml @@ -54,7 +54,7 @@ services: - --metrics.port=9001 - --snapshot=false - --rollup.sequencerhttp=https://rpc.mantle.xyz - - --rollup.historicalrpc=https://rpc-moon.mantle.xyz/v1/OTFjNjk2ODA5Yjk5MGE1MzA0N2E2MDc1 + - --rollup.historicalrpc=https://rpc.mantle.xyz - --config=/config/config.toml volumes: - ./mainnet/config.toml:/config/config.toml @@ -102,7 +102,7 @@ services: OP_NODE_P2P_PEERSTORE_PATH: '/op-node/opnode_peerstore_db' OP_NODE_INDEXER_SOCKET: 'da-indexer-api.mantle.xyz:80' OP_NODE_INDEXER_ENABLE: 'true' - OP_NODE_L2_BACKUP_UNSAFE_SYNC_RPC: https://rpc-moon.mantle.xyz/v1/OTFjNjk2ODA5Yjk5MGE1MzA0N2E2MDc1 + OP_NODE_L2_BACKUP_UNSAFE_SYNC_RPC: https://rpc.mantle.xyz OP_NODE_P2P_STATIC: '/dns4/peer0.mantle.xyz/tcp/9003/p2p/16Uiu2HAmKVKzUAns2gLhZAz1PYcbnhY3WpxNxUZYeTN1x29tNBAW,/dns4/peer1.mantle.xyz/tcp/9003/p2p/16Uiu2HAm1AiZtVp8f5C8LvpSTAXC6GtwqAVKnB3VLawWYSEBmcFN,/dns4/peer2.mantle.xyz/tcp/9003/p2p/16Uiu2HAm2UHVKiPXpovs8VbbUQVPr7feBAqBJdFsH1z5XDiLEvHT' OP_NODE_SEQUENCER_ENABLED: 'false' OP_NODE_P2P_AGENT: 'mantle' diff --git a/docker-compose-sepolia-upgrade-beacon.yml b/docker-compose-sepolia-upgrade-beacon.yml index 939ee5e..0b4a73e 100644 --- a/docker-compose-sepolia-upgrade-beacon.yml +++ b/docker-compose-sepolia-upgrade-beacon.yml @@ -9,7 +9,7 @@ x-healthcheck: &healthcheck services: op-geth: - image: mantlenetworkio/op-geth:v1.0.1 + image: mantlenetworkio/mantle-op-geth:v1.1.0 pull_policy: always deploy: resources: @@ -64,7 +64,7 @@ services: - ${VERIFIER_WS_PORT:-8546}:8546 - ${VERIFIER_AUTH_PORT:-8551}:8551 op-node: - image: mantlenetworkio/op-node:v1.0.1 + image: mantlenetworkio/mantle-op-node:v1.1.0 pull_policy: always deploy: resources: @@ -78,11 +78,12 @@ services: condition: on-failure depends_on: - op-geth + - eigenda-proxy volumes: - ./sepolia/secret:/secret - ./sepolia/rollup.json:/config/rollup.json environment: - OP_NODE_L1_ETH_RPC: 'wss://sepolia.gateway.tenderly.co' #change this + OP_NODE_L1_ETH_RPC: $L1_RPC_SEPOLIA OP_NODE_L2_ENGINE_RPC: 'http://op-geth:8551' OP_NODE_L2_ENGINE_AUTH: /secret/jwt_secret_txt OP_NODE_ROLLUP_CONFIG: '/config/rollup.json' @@ -111,9 +112,38 @@ services: OP_NODE_L2_SKIP_SYNC_START_CHECK: 'true' OP_NODE_P2P_SYNC_REQ_RESP: 'true' OP_NODE_DA_RPC: 'disperser-holesky.eigenda.xyz:443' - OP_NODE_L1_BEACON: 'beaconrpc_fixme' #change this + OP_NODE_L1_BEACON: $L1_BEACON_SEPOLIA OP_NODE_RETRIEVER_SOCKET: retriever.sepolia.mantle.xyz:8000 OP_NODE_GRAPH_PROVIDER: https://graphnode.sepolia.mantle.xyz/subgraphs/name/datalayr OP_NODE_RETRIEVER_TIMEOUT: 120s + OP_NODE_EIGENDA_PROXY_URL: 'http://eigenda-proxy:3100' + OP_NODE_EIGENDA_DISPERSER_URL: 'disperser-holesky.eigenda.xyz:443' ports: - ${NODE_RPC_PORT:-9545}:8545 + eigenda-proxy: + image: mantlenetworkio/eigenda-proxy:v1.5.0 + pull_policy: always + deploy: + resources: + limits: + cpus: '1' + memory: 2000M + reservations: + cpus: '1' + memory: 2000M + restart_policy: + condition: on-failure + environment: + EIGENDA_PROXY_ADDR: "0.0.0.0" + EIGENDA_PROXY_PORT: "3100" + EIGENDA_PROXY_EIGENDA_DISPERSER_RPC: "disperser-holesky.eigenda.xyz:443" + EIGENDA_PROXY_EIGENDA_ETH_RPC: $L1_RPC_HOLESKY + EIGENDA_PROXY_EIGENDA_ETH_CONFIRMATION_DEPTH: "6" + EIGENDA_PROXY_EIGENDA_SERVICE_MANAGER_ADDR: "0xD4A7E1Bd8015057293f0D0A557088c286942e84b" + EIGENDA_PROXY_EIGENDA_MAX_BLOB_LENGTH: "4MiB" + EIGENDA_PROXY_METRICS_ENABLED: "true" + EIGENDA_PROXY_METRICS_PORT: "7300" + EIGENDA_PROXY_EIGENDA_STATUS_QUERY_TIMEOUT: "20m0s" + EIGENDA_PROXY_EIGENDA_CERT_VERIFICATION_DISABLED: "true" + ports: + - 3100:3100 \ No newline at end of file diff --git a/docker-compose-sepolia-upgrade-da-indexer.yml b/docker-compose-sepolia-upgrade-da-indexer.yml index b565ac8..b05b41c 100644 --- a/docker-compose-sepolia-upgrade-da-indexer.yml +++ b/docker-compose-sepolia-upgrade-da-indexer.yml @@ -9,7 +9,7 @@ x-healthcheck: &healthcheck services: op-geth: - image: mantlenetworkio/op-geth:v1.0.1 + image: mantlenetworkio/mantle-op-geth:v1.1.0 pull_policy: always deploy: resources: @@ -64,7 +64,7 @@ services: - ${VERIFIER_WS_PORT:-8546}:8546 - ${VERIFIER_AUTH_PORT:-8551}:8551 op-node: - image: mantlenetworkio/op-node:v1.0.1 + image: mantlenetworkio/mantle-op-node:v1.1.0 pull_policy: always deploy: resources: @@ -82,7 +82,7 @@ services: - ./sepolia/secret:/secret - ./sepolia/rollup.json:/config/rollup.json environment: - OP_NODE_L1_ETH_RPC: 'wss://sepolia.gateway.tenderly.co' #change this + OP_NODE_L1_ETH_RPC: $L1_RPC_SEPOLIA OP_NODE_L2_ENGINE_RPC: 'http://op-geth:8551' OP_NODE_L2_ENGINE_AUTH: /secret/jwt_secret_txt OP_NODE_ROLLUP_CONFIG: '/config/rollup.json' diff --git a/docker-compose-sepolia.yml b/docker-compose-sepolia.yml index b565ac8..aa51a65 100644 --- a/docker-compose-sepolia.yml +++ b/docker-compose-sepolia.yml @@ -9,7 +9,7 @@ x-healthcheck: &healthcheck services: op-geth: - image: mantlenetworkio/op-geth:v1.0.1 + image: mantlenetworkio/mantle-op-geth:v1.1.0 pull_policy: always deploy: resources: @@ -64,16 +64,16 @@ services: - ${VERIFIER_WS_PORT:-8546}:8546 - ${VERIFIER_AUTH_PORT:-8551}:8551 op-node: - image: mantlenetworkio/op-node:v1.0.1 + image: mantlenetworkio/mantle-op-node:v1.1.0 pull_policy: always deploy: resources: limits: - cpus: '4' - memory: 8000M + cpus: '2' + memory: 4000M reservations: - cpus: '4' - memory: 8000M + cpus: '2' + memory: 4000M restart_policy: condition: on-failure depends_on: @@ -82,7 +82,7 @@ services: - ./sepolia/secret:/secret - ./sepolia/rollup.json:/config/rollup.json environment: - OP_NODE_L1_ETH_RPC: 'wss://sepolia.gateway.tenderly.co' #change this + OP_NODE_L1_ETH_RPC: $L1_RPC_SEPOLIA OP_NODE_L2_ENGINE_RPC: 'http://op-geth:8551' OP_NODE_L2_ENGINE_AUTH: /secret/jwt_secret_txt OP_NODE_ROLLUP_CONFIG: '/config/rollup.json' diff --git a/run-node-sepolia.md b/run-node-sepolia.md index 4554ddf..7dcb31b 100644 --- a/run-node-sepolia.md +++ b/run-node-sepolia.md @@ -83,17 +83,11 @@ chaindata #### 4.1 Start with mantle da-indexer(recommend) -use mantle da-indexer to pull the data for rollup node, and you need to edit +use mantle da-indexer to pull the data for rollup node, and you need to set up L1_RPC_SEPOLIA -``` -docker-compose-sepolia-upgrade-da-indexer.yml -``` - -replace **OP\_NODE\_L1\_ETH\_RPC** to your own l1 rpc (not beacon ) - -then , start rpc ``` +export L1_RPC_SEPOLIA='https://rpc.ankr.com/eth_sepolia' #please replace docker-compose -f docker-compose-sepolia-upgrade-da-indexer.yml up -d ``` @@ -103,17 +97,17 @@ Congratulations, the node has been deployed! #### 4.2 Start with EigenDA and L1 beacon chain -use EigenDA and L1 beacon chain to pull the data for rollup node, and you need to edit - -``` -edit docker-compose-sepolia-upgrade-beacon.yml -``` - -replace **OP\_NODE\_L1\_BEACON** to your own beacon rpc, replace **OP\_NODE\_L1\_ETH\_RPC** to your own l1 rpc (not beacon ) +use EigenDA and L1 beacon chain to pull the data for rollup node, +you need set up L1_BEACON_SEPOLIA and L1_RPC_SEPOLIA ,L1_RPC_HOLESKY -then start with +L1_BEACON_SEPOLIA is for querying data from eth blob if eigenda failed +L1_RPC_HOLESKY is for eigenda (eigenda only support holesky test network) ``` +export L1_RPC_SEPOLIA='https://rpc.ankr.com/eth_sepolia' #please replace +export L1_RPC_HOLESKY='https://rpc.ankr.com/eth_holesky' #please replace +export L1_BEACON_SEPOLIA='https://eth-beacon-chain-sepolia.drpc.org/rest/' #please replace + docker-compose -f docker-compose-sepolia-upgrade-beacon.yml up -d ``` @@ -153,6 +147,13 @@ cast rpc optimism_syncStatus --rpc-url localhost:9545 |jq .finalized_l2.number cast rpc optimism_syncStatus --rpc-url localhost:9545 |jq .safe_l2.number ``` + +query data from eigenproxy to confirm eigenproxy working (eigenda) + +``` +curl -v http://127.0.0.1:3100/get/010000f901d5f850f842a0004b89b64c9068bcc5ee718469089461cc9d15176ec1774ded8deeb760f5d637a006a489746934a07df74d7089f141b41a3a9ad03338d729f9fb7380cb536252ad02cac480213701c401213701f901808301cf9872f873eba0b3442b9d2aebd5915bf535d3b43ac8888f2c9b0e54b9794f7c7c14b76926d56e820001826464832f5559a01520df76db0371961b3013d95a7a086e56643b6cc89b5afbf81a1d5c01868cc900832f55b0a090fbee953715da92a591f532409802012bc699d48ca72408a23b3884608e0b01b9010088b880e114817d065490b3945c80b827b710325dc50a768010f83855be9018070c249a7a314aed552c6beb02a5246d6598dca0b07f0cff206cbc881e36972b849339086457ff43cc0931213139c0703c16bb0de8ae6312d2cf440021aef44302e66e3504e989765d23d9cd805ee0fcb8c29e622f6c26a7306759875a007cb5a9b8692a97e2b2cf450a64df1bb75d95cef816e3b768834c22dc7d682087d89e10aeee6e3989d50b6cbd8fef1f1df57478eb6a61b10204125a74561231452eeaf70bef1800f79eaa6db6eec2a51ace404c8636c1b1b207675a842efbc69b9fd1bec79b8087a3dca0c15e3f42209f610dc84f5a532dd0ebff43d12eb8a79899abc4820001 +``` + ## Other useful commands for Operator ### 1 Stop @@ -193,12 +194,13 @@ docker-compose pull Will download the latest images for any services where you haven't hard-coded a service version. Updates are regularly pushed to improve the stability of Mantle nodes or to introduce new quality-of-life features like better logging and better metrics. I recommend that you run this command every once in a while (once a week should be more than enough). -# 2024-07-10 Upgrade for historical user +# 2025-01-16 Upgrade for historical user ## 1 Stop historical node ``` docker-compose -f docker-compose-sepolia.yml down +docker-compose -f docker-compose-sepolia-upgrade-da-indexer.yml down ``` ## 2 Pull the latest code of this repo @@ -209,53 +211,34 @@ docker-compose -f docker-compose-sepolia.yml down git pull ``` -this upgrade updates three files - -* sepolia/rollup.json - - * modify the address of L1 rollup contract for EigenDA data - -* docker-compose-sepolia-upgrade-da-indexer.yml - - * start with mantle da-indexer, it will use mantle da-indexer to pull the data for rollup node, the function of da-indexer is caching the rollup data of EigenDA and blobs, making it available for third-party use - -* docker-compose-sepolia-upgrade-beacon.yml - - * start with EigenDA and L1 beacon chain, op-node will pull data from EigenDA and beacon chain directly - **If you start the node using your own way, please refer to the three files from this upgrade. Otherwise, it may cause irreversible damage to the node.** ## 3 Operating the Node ### 3.1 start with mantle da-indexer(recommend) -use mantle da-indexer to pull the data for rollup node, and you need to edit - -``` -docker-compose-sepolia-upgrade-da-indexer.yml -``` - -replace **OP\_NODE\_L1\_ETH\_RPC** to your own l1 rpc (not beacon ) - -then , start rpc ``` +export L1_RPC_SEPOLIA='https://rpc.ankr.com/eth_sepolia' #please replace docker-compose -f docker-compose-sepolia-upgrade-da-indexer.yml up -d ``` ### 3.2 start with EigenDA and L1 beacon chain -use EigenDA and L1 beacon chain to pull the data for rollup node, and you need to edit +use EigenDA and L1 beacon chain to pull the data for rollup node, -``` -edit docker-compose-sepolia-upgrade-beacon.yml -``` +you need to edit L1_BEACON_SEPOLIA and L1_RPC_SEPOLIA ,L1_RPC_HOLESKY + +L1_BEACON_SEPOLIA is for querying data from eth blob if eigenda failed -replace **OP\_NODE\_L1\_BEACON** to your own beacon rpc, replace **OP\_NODE\_L1\_ETH\_RPC** to your own l1 rpc (not beacon ) +L1_RPC_HOLESKY is for eigenda (eigenda only support holesky test network) then start with ``` +export L1_RPC_SEPOLIA='https://rpc.ankr.com/eth_sepolia' #please replace +export L1_RPC_HOLESKY='https://rpc.ankr.com/eth_holesky' #please replace +export L1_BEACON_SEPOLIA='https://eth-beacon-chain-sepolia.drpc.org/rest/' #please replace docker-compose -f docker-compose-sepolia-upgrade-beacon.yml up -d ``` diff --git a/run-node-testnet.md b/run-node-testnet.md deleted file mode 100644 index 73562a1..0000000 --- a/run-node-testnet.md +++ /dev/null @@ -1,148 +0,0 @@ -# Simple Mantle Node - -## Required Software - -- [docker](https://docs.docker.com/engine/install/) -- [node](https://nodejs.org/en/download/) -- [foundry](https://github.com/foundry-rs/foundry/releases) - -## Recommended Hardware - -- 16GB+ RAM -- 8C+ CPU -- 1000GB+ disk (HDD works for now, SSD is better) -- 10mb/s+ download - -## Installation and Setup Instructions - - -### Init to generate the 'jwt_secret_txt' file and the 'p2p_node_key_txt' - -```sh -cd networks/ - - -mkdir goerli/secret - -node -e "console.log(require('crypto').randomBytes(32).toString('hex'))" > goerli/secret/jwt_secret_txt - -cast w n |grep -i "Private Key" |awk -F ": " '{print $2}' |sed 's/0x//' > goerli/secret/p2p_node_key_txt -``` - -### Operating the Node - -#### Download latest snapshot from mantle - -We recommend that you start the node with latest shapshot, so that you don't need to wait a long time to sync data. - -example: - -```sh -mkdir -p ./data/testnet-geth - -# latest snapshot tarball -linux: -date=$(date -d "2 days ago" +%Y%m%d) -mac: -date=$(date -v-2d +%Y%m%d) - -tarball="$date-testnet1-chaindata.tar" - -wget https://s3.ap-southeast-1.amazonaws.com/snapshot.sepolia.mantle.xyz/20240228-testnet1-chaindata.tar - - -tar xf ${tarball} -C ./data/testnet-geth - -``` - -Check the data was unarchived successfully: -```sh -$ ls ./data/testnet-geth -chaindata -``` - -#### Start - -```sh -docker-compose -f docker-compose-testnet.yml up -d -``` - -Will start the node in a detatched shell (`-d`), meaning the node will continue to run in the background. -You will need to run this again if you ever turn your machine off. - -The first time you start the node it synchronizes from regenesis (December 1th, 2022) to the present. -This process takes hours. - -#### Stop - -```sh -docker-compose -f docker-compose-testnet.yml down -``` - -Will shut down the node without wiping any volumes. -You can safely run this command and then restart the node again. - -#### Wipe - -```sh -docker-compose -f docker-compose-testnet.yml down -v -``` - -Will completely wipe the node by removing the volumes that were created for each container. -Note that this is a destructive action, be very careful! - -#### Logs - -```sh -docker-compose logs -``` - -Will display the logs for a given service. -You can also follow along with the logs for a service in real time by adding the flag `-f`. - -The available services are: -- [`op-geth`](#mantle-node) -- [`op-node`](#mantle-node) - - -#### Update - -```sh -docker-compose pull -``` - -Will download the latest images for any services where you haven't hard-coded a service version. -Updates are regularly pushed to improve the stability of Mantle nodes or to introduce new quality-of-life features like better logging and better metrics. -I recommend that you run this command every once in a while (once a week should be more than enough). - -## How To Check If The Deployment Is Successful - -### Check Service - -If the service status is 'up,' it means that the service has started without any issues. - -```sh -docker-compose -f docker-compose-testnet.yml ps -``` - -### Check Data - -Use the command 'cast bn' to execute multiple times and check if the height increases. - -example: - -```sh -cast bn -cast bn --rpc-url https://rpc.testnet.mantle.xyz -``` - -Use the command 'cast rpc optimism_syncStatus' to execute multiple times and check if the safe_l2 and inalized_l2 increases. -It may need to be increased after thirty minutes - -example: - -```sh -cast rpc optimism_syncStatus --rpc-url localhost:9545 |jq .finalized_l2.number - -cast rpc optimism_syncStatus --rpc-url localhost:9545 |jq .safe_l2.number -``` \ No newline at end of file