From dbf7c12042fc29e81cd5bc1fec431e2fbd51a23d Mon Sep 17 00:00:00 2001 From: Neeraj Date: Wed, 16 Oct 2024 15:43:00 +0530 Subject: [PATCH] Update README to start nodes from contract deployed block --- ops/deployments-from-scratch.md | 15 +++++++++++++++ testnet-nitro-node.md | 1 + 2 files changed, 16 insertions(+) diff --git a/ops/deployments-from-scratch.md b/ops/deployments-from-scratch.md index 3f26698..1e67362 100644 --- a/ops/deployments-from-scratch.md +++ b/ops/deployments-from-scratch.md @@ -201,6 +201,15 @@ # } ``` +* Get the start block for Nitro Adjudicator events by executing the following command: + + ```bash + laconic-so deployment --dir nitro-contracts-deployment exec nitro-contracts "jq '.receipt.blockNumber' /app/deployment/hardhat-deployments/geth/NitroAdjudicator.json" + + # Expected output: + 101 + ``` + * Switch to `testnet-ops/nitro-bridge-setup` directory on your local machine: ```bash @@ -230,6 +239,9 @@ na_address: "" vpa_address: "" ca_address: "" + + # Specifies the block number to start looking for nitro adjudicator events + nitro_chain_start_block: 0 ``` * Update the target dir in `setup-vars.yml`: @@ -313,6 +325,8 @@ export L1_BRIDGE_MULTIADDR="/dns4/bridge.laconic.com/tcp/3005/p2p/$BRIDGE_PEER_ID" export L2_BRIDGE_MULTIADDR="/dns4/bridge.laconic.com/tcp/3006/p2p/$BRIDGE_PEER_ID" + export NITRO_CHAIN_START_BLOCK=$(laconic-so deployment --dir nitro-contracts-deployment exec nitro-contracts "jq '.receipt.blockNumber' /app/deployment/hardhat-deployments/geth/NitroAdjudicator.json") + # Create the required config file cat < nitro-node-config.yml nitro_chain_url: "wss://sepolia.laconic.com" @@ -320,6 +334,7 @@ ca_address: "$CA_ADDRESS" vpa_address: "$VPA_ADDRESS" asset_address: "${ASSET_ADDRESS}" + nitro_chain_start_block: $NITRO_CHAIN_START_BLOCK bridge_nitro_address: "$BRIDGE_NITRO_ADDRESS" nitro_l1_bridge_multiaddr: "$L1_BRIDGE_MULTIADDR" nitro_l2_bridge_multiaddr: "$L2_BRIDGE_MULTIADDR" diff --git a/testnet-nitro-node.md b/testnet-nitro-node.md index 997c0f7..7ff107d 100644 --- a/testnet-nitro-node.md +++ b/testnet-nitro-node.md @@ -36,6 +36,7 @@ # ca_address: "" # vpa_address: "" # asset_address: "" + # nitro_chain_start_block: 0 # bridge_nitro_address: "" # nitro_l1_bridge_multiaddr: "" # nitro_l2_bridge_multiaddr: ""