Remove hardcoded PKs from instructions

This commit is contained in:
Prathamesh Musale 2024-10-30 17:28:29 +05:30
parent d83fa024a9
commit a8094b7501
3 changed files with 21 additions and 4 deletions

View File

@ -18,9 +18,9 @@ Stacks to run a node for laconic testnet
Follow steps in [testnet-onboarding-validator.md](./testnet-onboarding-validator.md) to onboard your participant and join as a validator on the LORO testnet Follow steps in [testnet-onboarding-validator.md](./testnet-onboarding-validator.md) to onboard your participant and join as a validator on the LORO testnet
## Join SAPO testnet ## SAPO testnet
Follow steps in [Upgrade to SAPO testnet](./testnet-onboarding-validator.md#upgrade-to-sapo-testnet) to upgrade your LORO testnet node for SAPO testnet Follow steps in [Upgrade to SAPO testnet](./testnet-onboarding-validator.md#upgrade-to-sapo-testnet) for upgrading your LORO testnet node to SAPO testnet
## Run testnet Nitro Node ## Run testnet Nitro Node

View File

@ -1419,6 +1419,13 @@
cp contract-vars.example.yml contract-vars.yml cp contract-vars.example.yml contract-vars.yml
``` ```
* Get a funded account's private key from fixturenet-eth deployment:
```bash
FUNDED_ACCOUNT_PK=$(curl --silent localhost:9898/accounts.csv | awk -F',' 'NR==1 {gsub(/^0x/, "", $NF); print $NF}')
echo $FUNDED_ACCOUNT_PK
```
* Edit [`contract-vars.yml`](./contract-vars.yml) and fill in the following values: * Edit [`contract-vars.yml`](./contract-vars.yml) and fill in the following values:
```bash ```bash
@ -1431,7 +1438,7 @@
# Private key for a funded L1 account, to be used for contract deployment on L1 # Private key for a funded L1 account, to be used for contract deployment on L1
# Required since this private key will be utilized by both L1 and L2 nodes of the bridge # Required since this private key will be utilized by both L1 and L2 nodes of the bridge
geth_deployer_pk: "888814df89c4358d7ddb3fa4b0213e7331239a80e1f013eaa7b2deca2a41a218" geth_deployer_pk: "<funded-account-pk>"
# Custom token to be deployed # Custom token to be deployed
token_name: "TestToken" token_name: "TestToken"
@ -1561,6 +1568,13 @@
# } # }
``` ```
* Get a funded account's private key from fixturenet-eth deployment:
```bash
FUNDED_ACCOUNT_PK=$(curl --silent localhost:9898/accounts.csv | awk -F',' 'NR==1 {gsub(/^0x/, "", $NF); print $NF}')
echo $FUNDED_ACCOUNT_PK
```
* 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
@ -1584,7 +1598,7 @@
# Private key should correspond to a funded account on L1 and this account must own the Nitro contracts # Private key should correspond to a funded account on L1 and this account must own the Nitro contracts
# It also needs to hold L1 tokens to fund Nitro channels # It also needs to hold L1 tokens to fund Nitro channels
nitro_chain_pk: "888814df89c4358d7ddb3fa4b0213e7331239a80e1f013eaa7b2deca2a41a218" nitro_chain_pk: "<funded-account-pk>"
# Deployed Nitro contract addresses # Deployed Nitro contract addresses
na_address: "" na_address: ""

View File

@ -41,6 +41,9 @@ else
echo "Node data dir $NODE_HOME/data already exists, skipping initialization..." echo "Node data dir $NODE_HOME/data already exists, skipping initialization..."
fi fi
# Enable cors
sed -i 's/cors_allowed_origins.*$/cors_allowed_origins = ["*"]/' $HOME/.laconicd/config/config.toml
# Update config with persistent peers # Update config with persistent peers
sed -i "s/^persistent_peers *=.*/persistent_peers = \"$CERC_PEERS\"/g" $NODE_HOME/config/config.toml sed -i "s/^persistent_peers *=.*/persistent_peers = \"$CERC_PEERS\"/g" $NODE_HOME/config/config.toml