Skip to content

Commit 6e725f6

Browse files
authored
Merge pull request #99 from sacherjj/updates-for-203
Updates for 2.0.0 and 2.0.3
2 parents b2f130e + a24030f commit 6e725f6

File tree

6 files changed

+85
-143
lines changed

6 files changed

+85
-143
lines changed

versioned_docs/version-2.0.0/operators/setup/basic-node-configuration.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ sudo apt install casper-node-launcher
2323

2424
You can also build [from source](https://github.com/casper-network/casper-node-launcher). However, all the setup and pull of casper-node releases will be manual.
2525

26+
`casper-node-util` is a helper script for managing a `casper-node` and installed as a debian package dependency of `casper-node-launcher`
27+
2628
:::note
2729

2830
The `casper-sidecar` component is also typically installed alongside the node to provide additional APIs and event streaming. For more information, see the [Sidecar Setup](./casper-sidecar.md) page.

versioned_docs/version-2.0.0/operators/setup/hardware.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ The following hardware specifications are recommended for the Casper [Mainnet](h
1010

1111
- 4 Cores
1212
- 32 GB Ram
13-
- 2 TB SSD
14-
- Linux machine running Ubuntu 20.04
13+
- Storage (SSD)
14+
- 2 TB (Archival Nodes)
15+
- 500 GB (TTL Nodes)
16+
- Linux machine running Ubuntu 22.04, 24.04 or Debian 13
17+
- Binaries are build on 22.04 and will run on Linux having same or higher Clib version.
1518

1619

1720
:::note Notes
@@ -20,6 +23,7 @@ The following hardware specifications are recommended for the Casper [Mainnet](h
2023

2124
- For non-archival nodes, current disc usage is significantly lower (e.g., ~500 GB is sufficient for at least 1 year). It is safe to start with lower capacity and scale up as needed.
2225

26+
- LMDB is a memory backed database. More RAM than recommended will help read performance after data is cached.
2327
:::
2428

2529
### CPU Requirements {#cpu-requirements}

versioned_docs/version-2.0.0/operators/setup/install-node.md

Lines changed: 36 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,8 @@ The following ports are used by the node:
1818
Of these `35000` is the only port required to be open for your node to function, however, opening `8888` will allow others to know general network health. For more details, see the additional information on [Node Endpoints](./node-endpoints.md).
1919

2020
## Operating System Requirements
21-
The recommended OS version is Ubuntu 20.04.
22-
23-
### Using Ubuntu 22.04 or 24.04
24-
25-
Installing using Ubuntu 22.04 or 24.04 follows the same instructions as 20.04 with one exception:
26-
27-
If you try to install packages, you will receive:
28-
29-
```
30-
casper-client : Depends: libssl1.1 (>= 1.1.0) but it is not installable
31-
```
32-
33-
This message is due to the default `openssl` moving to 3.* with Ubuntu 22.04. You need to install OpenSSL 1.* for prior versions of Ubuntu to use the Casper binaries with the following command:
34-
35-
```
36-
curl -f -JLO http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
37-
sudo apt install ./libssl1.1_1.1.1f-1ubuntu2_amd64.deb
38-
```
39-
40-
## Required Number of Open Files
41-
42-
Before beginning, [update the maximum open files limit](./open-files.md) for your system. Specifically, update the node's `/etc/security/limits.conf` file as described [here](./open-files.md#updating-limits-conf), to ensure proper node operation.
21+
The recommended OS version is Ubuntu 22.04, Ubuntu 24.04 or Debian 13.
22+
The current binary build OS is Ubuntu 22.04 and a Debian based system with Clib equal to or newer than the build system will work.
4323

4424
## Required Clean Up
4525

@@ -63,10 +43,10 @@ The following commands will set up the Casper repository for packages:
6343
```bash
6444
sudo mkdir -m 0755 -p /etc/apt/keyrings/
6545
sudo curl https://repo.casper.network/casper-repo-pubkey.gpg --output /etc/apt/keyrings/casper-repo-pubkey.gpg
66-
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/casper-repo-pubkey.gpg] https://repo.casper.network/releases focal main" | sudo tee -a /etc/apt/sources.list.d/casper.list
46+
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/casper-repo-pubkey.gpg] https://repo.casper.network/releases jammy main" | sudo tee -a /etc/apt/sources.list.d/casper.list
6747
sudo apt update
6848
```
69-
We are creating /etc/apt/keyrings if needed, so we don't have the issue with this key being trusted by all APT requests if stored in /etc/apt/trusted.gpg.d.
49+
We are creating `/etc/apt/keyrings` if needed, so we don't have the issue with this key being trusted by all APT requests if stored in `/etc/apt/trusted.gpg.d`.
7050

7151
## Required Tools
7252

@@ -85,7 +65,7 @@ It defaults to `bash` but can be changed with the `--shell` argument:
8565
--shell <STRING> The type of shell to generate the completion script for [default: bash] [possible values:
8666
zsh, bash, fish, powershell, elvish]
8767

88-
sudo casper-client generate-completion --shell powershell
68+
sudo casper-client generate-completion --shell bash
8969
```
9070

9171
You need to source the new auto completion script or log out and log in again to activate it for the current shell:
@@ -95,18 +75,22 @@ source /usr/share/bash-completion/completions/casper-client
9575

9676
Now you can use `casper-client` and press the `tab` key to get auto completion for your commands.
9777

78+
## Required Number of Open Files
79+
80+
Before beginning, [update the maximum open files limit](./open-files.md) for your system. Specifically, update the node's `/etc/security/limits.conf` file as described [here](./open-files.md#updating-limits-conf), to ensure proper node operation.
81+
9882
## Installing All Protocols
9983

10084
On **Mainnet**, run:
10185

10286
```bash
103-
sudo -u casper /etc/casper/node_util.py stage_protocols casper.conf
87+
sudo -u casper casper-node-util stage_protocols casper.conf
10488
```
10589

10690
On **Testnet**, run:
10791

10892
```bash
109-
sudo -u casper /etc/casper/node_util.py stage_protocols casper-test.conf
93+
sudo -u casper casper-node-util stage_protocols casper-test.conf
11094
```
11195

11296
## Validator Keys
@@ -163,44 +147,48 @@ If you are using the node for historical data and want to query back to genesis,
163147
sync_handling = genesis
164148
```
165149

150+
DB archives are made of networks and if you are launching an archival node, requesting these from Casper will make node setup much faster. Historical block syncing is the lowest priority in network operation and take more time as the chain grows.
151+
166152
## Starting the Node
167153

168154
Start the node using the following commands:
169155

170156
```bash
171-
sudo /etc/casper/node_util.py rotate_logs
172-
sudo /etc/casper/node_util.py start
173-
```
157+
sudo casper_node_util start
158+
```
174159

175160
### Monitoring the Synchronization Process
176161

177162
The following command will display the node synchronization details:
178163

179164
```bash
180-
/etc/casper/node_util.py watch
165+
casper_node_util watch
181166
```
182167

183-
When you first run the watch command, you may see the message `RPC: Not Ready`. Once the node is synchronized, the status will change to `RPC: Ready` and a similar output:
184-
185168
```bash
186-
Last Block: 630151 (Era: 4153)
187-
Peer Count: 297
188-
Uptime: 4days 6h 40m 18s 553ms
189-
Build: 1.4.5-a7f6a648d-casper-mainnet
190-
Key: 0147b4cae09d64ab6acd02dd0868722be9a9bcc355c2fdff7c2c244cbfcd30f158
169+
Last Block: 5473886 (Era: 19015)
170+
Peer Count: 125
171+
Uptime: 7days 15h 52m 32s
172+
Build: 2.0.3-4c7068d
173+
Key: 01b08d9184ec9daed7f1d2766674746d6cd8460ca6e0274fa48d01c3ded165da4c
191174
Next Upgrade: None
192175

193-
RPC: Ready
176+
Reactor State: KeepUp
177+
Available Block Range - Low: 0 High: 5473886
194178

195179
● casper-node-launcher.service - Casper Node Launcher
196-
Loaded: loaded (/lib/systemd/system/casper-node-launcher.service; enabled; vendor preset: enabled)
197-
Active: active (running) since Wed 2022-03-16 21:08:50 UTC; 4 days ago
198-
Docs: https://docs.casper.network
199-
Main PID: 2934 (casper-node-lau)
200-
Tasks: 12 (limit: 4915)
201-
CGroup: /system.slice/casper-node-launcher.service
202-
├─ 2934 /usr/bin/casper-node-launcher
203-
└─16842 /var/lib/casper/bin/1_4_5/casper-node validator /etc/casper/1_4_5/config.toml
180+
Loaded: loaded (/usr/lib/systemd/system/casper-node-launcher.service; enabled; preset: enabled)
181+
Active: active (running) since Wed 2025-08-13 20:41:05 UTC; 1 week 0 days ago
182+
Docs: https://docs.casper.network
183+
Main PID: 76968 (casper-node-lau)
184+
Tasks: 8 (limit: 18921)
185+
Memory: 10.2G (peak: 11.0G)
186+
CPU: 1d 17h 2min 43.802s
187+
CGroup: /system.slice/casper-node-launcher.service
188+
├─76968 /usr/bin/casper-node-launcher
189+
└─76971 /var/lib/casper/bin/2_0_3/casper-node validator /etc/casper/2_0_3/config.toml
190+
191+
Aug 13 20:41:05 ip-10-0-5-211 systemd[1]: Started casper-node-launcher.service - Casper Node Launcher.
204192
```
205193

206194
The reactor state will be in CatchUp mode until it acquires the full tip state, at which point it will shift to KeepUp mode. If you left `sync_to_genesis` as `true`, it will begin syncing back history at this time.
@@ -224,6 +212,7 @@ trie_or_chunk_timeouts 0
224212
```
225213

226214
If the node is not showing active (running) status, it is either stopped or in the process of restarting.
215+
Indexing of the DB on startup can take some time if the node is archival.
227216

228217
### Monitoring the Running Node
229218

versioned_docs/version-2.0.0/operators/setup/joining.md

Lines changed: 25 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -14,111 +14,47 @@ Visit the [Hardware Specifications](./hardware.md) section and provision your no
1414

1515
Follow the instructions on the [Node Setup](./install-node.md) page.
1616

17-
## Step 3: Building the Required Contracts {#step-3-build-contracts}
17+
## Step 3: Creating and Fund Keys for Bonding {#step-3-create--fund-keys-for-bonding}
1818

19-
Use the commands below to build all the necessary contracts for bonding, retrieving rewards, and unbonding.
19+
See the [Node Setup](./basic-node-configuration.md#create-fund-keys) instructions if you have not generated a validator key. This lives in `/etc/casper/validator_keys`.
20+
This will need funded to allow bonding.
2021

21-
1. Clone the casper-node repository.
22+
## Step 4: Updating the Trusted Hash {#step-5-update-the-trusted-hash}
2223

23-
```bash
24-
git clone https://github.com/casper-network/casper-node
25-
```
24+
The node's `config.toml` needs to be updated with a recent trusted hash.
2625

27-
2. Install these prerequisites, which are also listed [here](https://github.com/casper-network/casper-node#pre-requisites-for-building).
26+
See the [Trusted Hash for Synchronizing](./basic-node-configuration.md#trusted-hash-for-synchronizing) instructions if you have not set up a trusted hash during node installation.
2827

29-
- [Rust](../../developers/writing-onchain-code/getting-started.md#installing-rust)
30-
- [CMake](https://cgold.readthedocs.io/en/latest/first-step/installation.html)
31-
- `pkg-config` - On Ubuntu, use `sudo apt-get install pkg-config`
32-
- `openssl` - On Ubuntu, use `sudo apt-get install openssl`
33-
- `libssl-dev` - On Ubuntu, use `sudo apt-get install libssl-dev`
28+
## Step 5: Setting sync mode
3429

35-
3. Install the [Rust casper-client](../../developers/prerequisites.md#install-casper-client) and fund the [keys](../setup/basic-node-configuration.md#create-fund-keys) you will use for bonding.
30+
The default mode in config for sync is `ttl`. Available options are listed as comments in the `config.toml`. The only sync modes for an operating node are `nosync`, `ttl`, or `genesis`.
3631

37-
4. Use the following commands to build the contracts in release mode. Make sure you have [installed Rust](../../developers/writing-onchain-code/getting-started.md#installing-rust).
32+
`ttl` syncs the Time To Live data, which is the minimum history needed to operate as a validator. `nosync` would need to wait for the ttl period to get this history until possible to transition into `Validate`.
3833

39-
```bash
40-
cd casper-node
41-
make setup-rs
42-
make build-client-contracts
43-
```
34+
The sync condition needs to be met before it is possible to transition from `KeepUp` to `Validate`. There are two reasons why `ttl` is recommended for a validator.
4435

45-
These commands will build all the necessary Wasm contracts for operating as a validator:
46-
- `activate_bid.wasm` - Reactivates an ejected validator
47-
- `add_bid.wasm` - Enables bonding for validator stake
48-
- `delegate.wasm` - Delegates stake
49-
- `undelegate.wasm` - Undelegates stake
50-
- `withdraw_bid.wasm` - Enables unbonding for validator stake
36+
### Improved performance of caching
5137

52-
## Step 4: Creating and Fund Keys for Bonding {#step-4-create--fund-keys-for-bonding}
38+
`ttl` sync reduces disk space drastically compared to a `genesis` sync archive mode. This improves performance of LMDB DB as it is memory cached and gives higher probablity of cache hits.
5339

54-
See the [Node Setup](./basic-node-configuration.md#create-fund-keys) instructions if you have not generated and funded your validator keys.
40+
### Dangers of `genesis` sync archival validators
5541

56-
## Step 5: Updating the Trusted Hash {#step-5-update-the-trusted-hash}
42+
A node must sync to the tip of the chain and be in `KeepUp` state before transitioning to `Validate` state. However, prior to this transition, the historical sync operation must complete.
5743

58-
The node's `config.toml` needs to be updated with a recent trusted hash.
44+
With a `ttl` node this is the minimum state required to operate as a validator. Even if a node has been shut down for some time, acquiring this data is generally fast.
5945

60-
See the [Trusted Hash for Synchronizing](./basic-node-configuration.md#trusted-hash-for-synchronizing) instructions if you have not set up a trusted hash during node installation.
46+
If a node is in `genesis` sync mode, the historical state required is all the way back to the highest block previously synced. The node cannot transition to `Validate` mode until the full historical sync is complete. Historical sync is deprioritized, so this can cause a considerable delay in getting back operational as a validator after prolonged downtime.
6147

62-
## Step 6: Starting the Node {#step-6-start-the-node}
63-
64-
Start the node with the `casper-node-launcher`:
65-
66-
```bash
67-
sudo systemctl start casper-node-launcher
68-
```
69-
70-
The above Debian package installs a casper-node service for systemd.
71-
72-
For more information, visit [GitHub](https://github.com/casper-network/casper-node/wiki#node-operators).
73-
74-
## Step 7: Confirming the Node is Synchronized {#step-7-confirm-the-node-is-synchronized}
75-
76-
While the node is synchronizing, the `/status` endpoint is available. You will be able to compare this to another node's status endpoint `era_id` and `height` to determine if you are caught up. You will not be able to perform any `casper-client` calls to your `7777` RPC port until your node is fully caught up.
77-
78-
Towards the end of the following output, notice the `era_id` and `height` that you can use to determine if your node has completed synchronizing.
79-
80-
<details>
81-
<summary>Sample output of the <code>/status</code> endpoint</summary>
82-
83-
```json
84-
{
85-
"api_version": "1.4.3",
86-
"chainspec_name": "casper-test",
87-
"starting_state_root_hash": "e2218b6bdb8137a178f242e9de24ef5db06af7925e8e4c65fa82d41df38f4576",
88-
"peers": [
89-
{
90-
"node_id": "tls:0097..b253",
91-
"address": "18.163.249.168:35000"
92-
},
93-
...
94-
...
95-
...
96-
{
97-
"node_id": "tls:ff95..c014",
98-
"address": "93.186.201.14:35000"
99-
}
100-
],
101-
"last_added_block_info": {
102-
"hash": "8280de05cb34071f276fbe7c69a07cb325ddd373f685877911238b614bdcc5b1",
103-
"timestamp": "2022-01-04T15:33:08.224Z",
104-
"era_id": 3240,
105-
"height": 430162,
106-
"state_root_hash": "ec4ff5c4d0a9021984b56e2b6de4a57188101c24e09b765c3fee740353690076",
107-
"creator": "01ace6578907bfe6eba3a618e863bbe7274284c88e405e2857be80dd094726a223"
108-
},
109-
"our_public_signing_key": "01cb41ee07d1827e243588711d45040fe46402bf3901fb550abfd08d1341700270",
110-
"round_length": null,
111-
"next_upgrade": null,
112-
"build_version": "1.4.3-a44bed1fd-casper-mainnet",
113-
"uptime": "25days 1h 48m 22s 47ms"
114-
}
115-
```
116-
</details>
117-
118-
## Step 8: Sending the Bonding Request {#step-7-send-the-bonding-request}
48+
## Step 5: Confirming the Node is Synchronized {#step-5-confirm-the-node-is-synchronized}
11949

120-
You can submit a [bonding request](../becoming-a-validator/bonding.md) to change your synchronized node to a validating node.
50+
The `casper-node-util watch` command gives display of current node status. And example output is given on the [Node Setup](./basic-node-configuration.md#create-fund-keys) page.
12151

122-
The bonding request must be sent after the node has synchronized the protocol state and linear blockchain to avoid being ejected for liveness failures.
52+
The node has a reactor state machine displayed as `Reactor State:` in the `watch` command. This is coming from the `localhost:8888/status` endpoint.
53+
54+
Full status endpoint output can be seen with: `curl localhost:8888/status | jq`. We are piping to `jq` for clean `json` output.
12355

56+
## Step 6: Sending the Bonding Request {#step-6-send-the-bonding-request}
12457

58+
You can submit a [bonding request](../becoming-a-validator/bonding.md) to change your synchronized node to a validating node.
59+
60+
The bonding request must be sent after the node has synchronized the protocol state and linear blockchain to avoid being ejected for liveness failures.

versioned_docs/version-2.0.0/operators/setup/node-endpoints.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ Node operators can modify a node's configuration options, including the port set
1717

1818
The default endpoints for Mainnet and Testnet are open by default and are described below in more detail. If the node connects to a different network, the ports may differ depending on how the network was set up.
1919

20+
## Default IP bonding
21+
22+
On all defaults given in `config-example.toml` which generates `config.toml` have the bond all interfaces `0.0.0.0` address. If you wish to restrict interfaces, provide the correct IP for these config locations.
2023

2124
## Default Networking Port: 35000 {#35000}
2225

@@ -28,17 +31,24 @@ bind_address = '0.0.0.0:35000'
2831

2932
If the networking port is closed, the node becomes unreachable, and the node won't be discoverable in the network. If this is a validator, it will face eviction. A read-only node will be considered to be offline.
3033

31-
3234
## Default JSON-RPC HTTP Server Port: 7777 {#7777}
3335

34-
The configuration options for the JSON-RPC HTTP server are under the `rpc_server` section in the `config.toml` file. The `address` using port 7777 is the listening address for JSON-RPC HTTP server.
36+
The configuration options for the JSON-RPC HTTP server is now in `/etc/casper-sidecar/config.toml`, as the RPC service has moved outside of the node.
3537

3638
```md
37-
address = '0.0.0.0:7777'
39+
ip_address = '0.0.0.0'
40+
port = 7777
3841
```
3942

40-
DApps would use this address to [interact with the Casper JSON-RPC API](../../developers/json-rpc/index.md). Users would use this address to [interact with the network using CLI](../../developers/cli/index.md). Validators would use this address to [bond](../becoming-a-validator/bonding.md#example-bonding-transaction) or [unbond](../becoming-a-validator/unbonding.md). If this port is closed, the requests coming to this port will not be served, but the node remains unaffected.
43+
DApps would use this address to [interact with the Casper JSON-RPC API](../../developers/json-rpc/index.md). Users would use this address to [interact with the network using CLI](../../developers/cli/index.md). Validators would use this address to [bond](../becoming-a-validator/bonding.md#example-bonding-transaction) or [unbond](../becoming-a-validator/unbonding.md). If this port is closed or the `casper-sidecar` is not installed, the requests coming to this port will not be served, but the node remains unaffected.
44+
45+
## Default Binary-RPC HTTP Server Port: 7779 {#7779}
4146

47+
The node RPC moved to the `casper-sidecar` and was replaced with the binary RPC interface. This can be exposed externally if desired for direct calling to node in binary format, which is more efficient than JSON-RPC. However, single RPC calls can involve multiple binary port calls to build up expected data.
48+
49+
```md
50+
address = '0.0.0.0:7779'
51+
```
4252

4353
## Default REST HTTP Server Port: 8888 {#8888}
4454

@@ -52,6 +62,7 @@ Opening port 8888 is recommended but not required. This port allows the node to
5262

5363
One may use this port to [get a trusted hash](./basic-node-configuration.md#trusted-hash-for-synchronizing), [verify successful staging](../maintenance/upgrade.md#verifying-successful-staging) during an upgrade, or to [confirm that the node is synchronized](./joining.md#step-7-confirm-the-node-is-synchronized).
5464

65+
If restricting port 8888, it is requested that access is allowed from `3.21.239.186` for the casper-network-monitor to track overall health of the network.
5566

5667
### Example usage
5768

versioned_docs/version-2.0.0/operators/setup/node-events.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ curl -sN http://HOST:PORT/events?start_from=ID
3030
**Example:**
3131

3232
```bash
33-
curl -sN http://65.21.235.219:9999/events?start_from=29267508
33+
curl -sN http://localhost:9999/events?start_from=29267508
3434
```
3535

3636
:::note

0 commit comments

Comments
 (0)