Skip to content

Commit

Permalink
Merge pull request #1273 from casper-network/Update_Trusted_Hash_Inst…
Browse files Browse the repository at this point in the history
…ructions

Hotfix Trusted Hash Instructions for Node Operators
  • Loading branch information
ACStone-MTS authored Sep 1, 2023
2 parents 3f9feac + 8d73ba0 commit 4ce5a5c
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions source/docs/casper/operators/setup/install-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,24 +119,34 @@ For more details, see the [Node Setup](./basic-node-configuration.md#create-fund

## Getting a Trusted Hash

To get a trusted hash, use the command below. Replace the node address with an address from a node on the network of your choice.
In the past, we have used a lower `trusted_hash`. Connecting at the tip, we now use as high of a `trusted_hash` as possible.

```bash
sudo sed -i "/trusted_hash =/c\trusted_hash = '$(casper-client get-block --node-address http://3.14.161.135:7777 -b 20 | jq -r .result.block.hash | tr -d '\n')'" /etc/casper/1_0_0/config.toml
```
### Node Address

NODE_ADDR can be set to an IP of a trusted node, or to Casper Labs' public nodes

You can find active peers at https://cspr.live/tools/peers or you can use Casper Labs' public nodes:
You can find active peers at https://cspr.live/tools/peers or use the following Casper Labs public nodes:

* Testnet - NODE_ADDR=https://rpc.testnet.casperlabs.io

* Mainnet - NODE_ADDR=https://rpc.mainnet.casperlabs.io

## Protocol Version
### Protocol Version

Protocol version should be set to the largest available protocol version you see in `ls /etc/casper`. As of writing this, it was 1_5_2:

```bash
PROTOCOL=1_5_2
```

### Load `trusted_hash` in Config.toml of the Protocol Version

Protocol version should be set to the largest available protocol version you see in `ls /etc/casper` Currently, it should be:
The following command uses the previously established NODE_ADDR and PROTOCOL to load the `trusted_hash`:

```bash
NODE_ADDR=https://rpc.mainnet.casperlabs.io
PROTOCOL=1_5_2
sudo sed -i "/trusted_hash =/c\trusted_hash = '$(casper-client get-block --node-address $NODE_ADDR | jq -r .result.block.hash | tr -d '\n')'" /etc/casper/$PROTOCOL/config.toml
```

## Syncing to Genesis
Expand Down Expand Up @@ -223,4 +233,4 @@ The community has created a few tools to monitor your node once it is running, s

The `speculative_exec_server` defaults to off and can be enabled in your *Config.toml* file.

While this is a useful tool, understand that it is also an attack vector for a node. The intent is for someone to run on their node as a tool. You ***should not*** use this if you are an active validator, as requests into this port can block execution_engine processing for legitimate network traffic.
While this is a useful tool, understand that it is also an attack vector for a node. The intent is for someone to run on their node as a tool. You ***should not*** use this if you are an active validator, as requests into this port can block execution_engine processing for legitimate network traffic.

0 comments on commit 4ce5a5c

Please sign in to comment.