Update README to start nodes from contract deployed block

This commit is contained in:
Neeraj 2024-10-16 15:43:00 +05:30
parent 92e91ec50c
commit dbf7c12042
2 changed files with 16 additions and 0 deletions

View File

@ -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: * Switch to `testnet-ops/nitro-bridge-setup` directory on your local machine:
```bash ```bash
@ -230,6 +239,9 @@
na_address: "" na_address: ""
vpa_address: "" vpa_address: ""
ca_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`: * 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 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 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 # Create the required config file
cat <<EOF > nitro-node-config.yml cat <<EOF > nitro-node-config.yml
nitro_chain_url: "wss://sepolia.laconic.com" nitro_chain_url: "wss://sepolia.laconic.com"
@ -320,6 +334,7 @@
ca_address: "$CA_ADDRESS" ca_address: "$CA_ADDRESS"
vpa_address: "$VPA_ADDRESS" vpa_address: "$VPA_ADDRESS"
asset_address: "${ASSET_ADDRESS}" asset_address: "${ASSET_ADDRESS}"
nitro_chain_start_block: $NITRO_CHAIN_START_BLOCK
bridge_nitro_address: "$BRIDGE_NITRO_ADDRESS" bridge_nitro_address: "$BRIDGE_NITRO_ADDRESS"
nitro_l1_bridge_multiaddr: "$L1_BRIDGE_MULTIADDR" nitro_l1_bridge_multiaddr: "$L1_BRIDGE_MULTIADDR"
nitro_l2_bridge_multiaddr: "$L2_BRIDGE_MULTIADDR" nitro_l2_bridge_multiaddr: "$L2_BRIDGE_MULTIADDR"

View File

@ -36,6 +36,7 @@
# ca_address: "" # ca_address: ""
# vpa_address: "" # vpa_address: ""
# asset_address: "" # asset_address: ""
# nitro_chain_start_block: 0
# bridge_nitro_address: "" # bridge_nitro_address: ""
# nitro_l1_bridge_multiaddr: "" # nitro_l1_bridge_multiaddr: ""
# nitro_l2_bridge_multiaddr: "" # nitro_l2_bridge_multiaddr: ""