Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix Trusted Hash Instructions for Node Operators #1273

Merged
merged 3 commits into from
Sep 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.