Skip to content

Infra swap updates and correcting errors in examples #8

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

Merged
merged 1 commit into from
Mar 17, 2025
Merged
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions README/STANDARDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ The Casper Writing and Editing Style Guide aims to establish a set of standards

* Use Casper not casper.

* Use Casper Labs instead of CasperLabs, casper labs, casperLabs, casperlabs, or any other variation.

* Use Casper Network (the initial letter of both words capitalized) while referring to the Casper blockchain network.

* Use ERC-20 while referring to the ‘Ethereum request for comment’ standard.
Expand Down
5 changes: 0 additions & 5 deletions config/theme.footer.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ module.exports = {

copyright: `Copyright © ${new Date().getFullYear()} Casper Association. Built with Docusaurus.`,
links: [
{
href: "https://support.casperlabs.io/",
label: "Support",
position: "right",
},
{
href: "https://discord.com/invite/casperblockchain",
label: "Discord",
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/glossary/A.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ An Account is a structure that represents a user on a Casper network. Informatio

## Account Hash {#account-hash}

The account hash is a 32-byte hash of the public key representing the user account. Information on generating an account hash can be found [here](https://support.casperlabs.io/hc/en-gb/articles/13781616975131-How-do-I-generate-an-account-hash-).
The account hash is a 32-byte hash of the public key representing the user account. This can be generated with the casper-client-rs tool.

## Addressable Entity {#addressable-entity}

Expand Down
4 changes: 2 additions & 2 deletions docs/developers/cli/transfers/direct-token-transfer.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Save the returned _deploy_hash_ from the output to query information about the t
casper-client transfer -v \
--id 3 \
--transfer-id 11102023 \
--node-address https://rpc.testnet.casperlabs.io/ \
--node-address https://node.testnet.casper.network \
--amount 5000000000 \
--secret-key ~/KEYS/secret_key.pem \
--chain-name casper-test \
Expand Down Expand Up @@ -188,7 +188,7 @@ Transfer addresses use a `transfer-` string prefix.

```bash
casper-client get-deploy \
--node-address https://rpc.testnet.casperlabs.io
--node-address https://node.testnet.casper.network
1f17a0bdeaaf71abd03492c854cdf97f746432751721ce555e95b9cefe641e3c
```

Expand Down
4 changes: 2 additions & 2 deletions docs/developers/cli/transfers/multisig-deploy-transfer.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,12 @@ Towards the end of the following output, you can observe that there is an **appr

### Sending the deploy {#sending-the-transaction}

The next step is to send the deploy for processing on the network. As described in the [Prerequisites](#prerequisites) section, you need to get an active node address from the corresponding network to complete this task. The following example uses the node `https://rpc.testnet.casperlabs.io/` from the Testnet.
The next step is to send the deploy for processing on the network. As described in the [Prerequisites](#prerequisites) section, you need to get an active node address from the corresponding network to complete this task. The following example uses the node `https://node.testnet.casper.network` from the Testnet.

```bash
casper-client send-deploy \
--input transfer2.deploy \
--node-address https://rpc.testnet.casperlabs.io/
--node-address https://node.testnet.casper.network
```

| Parameter | Description |
Expand Down
12 changes: 6 additions & 6 deletions docs/developers/cli/transfers/verify-transfer.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ casper-client get-state-root-hash --node-address [NODE_SERVER_ADDRESS]
**Example Query:**

```bash
casper-client get-state-root-hash --node-address https://rpc.testnet.casperlabs.io
casper-client get-state-root-hash --node-address https://node.testnet.casper.network
```

<details>
Expand Down Expand Up @@ -85,7 +85,7 @@ The `-v` option generates verbose output, printing the RPC request and response
```bash
casper-client query-global-state -v \
--id 3 \
--node-address https://rpc.testnet.casperlabs.io/ \
--node-address https://node.testnet.casper.network \
--state-root-hash fdb1474d441ec0fcbf2e088f1630dbf98d3bcf7f7a7fe298303797f35b8cb4e1 \
--key transfer-ab3e11fd612ccf9ddf5ddb3e5c0b3d3b5e5c0921fd1b45e8c657a63f01d6adcb
```
Expand Down Expand Up @@ -168,7 +168,7 @@ casper-client query-global-state \
```bash
casper-client query-global-state -v \
--id 4 \
--node-address https://rpc.testnet.casperlabs.io/ \
--node-address https://node.testnet.casper.network \
--state-root-hash fdb1474d441ec0fcbf2e088f1630dbf98d3bcf7f7a7fe298303797f35b8cb4e1 \
--key 0154d828baafa6858b92919c4d78f26747430dcbecb9aa03e8b44077dc6266cabf
```
Expand Down Expand Up @@ -233,7 +233,7 @@ Repeat the same step to query information about the _Target_ account:
```bash
casper-client query-global-state -v \
--id 5 \
--node-address https://rpc.testnet.casperlabs.io/ \
--node-address https://node.testnet.casper.network \
--state-root-hash fdb1474d441ec0fcbf2e088f1630dbf98d3bcf7f7a7fe298303797f35b8cb4e1 \
--key 01360af61b50cdcb7b92cffe2c99315d413d34ef77fadee0c105cc4f1d4120f986
```
Expand Down Expand Up @@ -315,7 +315,7 @@ casper-client query-balance \

```bash
casper-client query-balance -v --id 6 \
--node-address https://rpc.testnet.casperlabs.io/ \
--node-address https://node.testnet.casper.network \
--state-root-hash fdb1474d441ec0fcbf2e088f1630dbf98d3bcf7f7a7fe298303797f35b8cb4e1 \
--purse-identifier account-hash-e70dbca48c2d31bc2d754e51860ceaa8a1a49dc627b20320b0ecee1b6d9ce655
```
Expand Down Expand Up @@ -370,7 +370,7 @@ casper-client get-balance \

```bash
casper-client query-balance -v --id 7 \
--node-address https://rpc.testnet.casperlabs.io/ \
--node-address https://node.testnet.casper.network \
--state-root-hash fdb1474d441ec0fcbf2e088f1630dbf98d3bcf7f7a7fe298303797f35b8cb4e1 \
--purse-identifier account-hash-1ed5a1c39bea93c105f2d22c965a84b205b36734a377d05dbb103b6bfaa595a7
```
Expand Down
16 changes: 13 additions & 3 deletions docs/operators/becoming-a-validator/bonding.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ It is recommended that a bonding request be sent once the node has completed the

In the Testnet, era durations are approximately two hours. The entire process takes approximately 3 eras. Therefore, **the time for bid submission to inclusion in the validator set is a minimum of six hours**. Bonding requests (bids) are transactions like any other. Because they are generic transactions, they are more resistant to censorship.

## Minimum Bid Amount

There is a minimum defined bid amount in the `chainspec.toml`. This value is currently 100,000 CSPR as seen as the extract from `chainspec.toml` below.

```toml
# Minimum bid amount allowed in motes. Withdrawing one's bid to an amount strictly less than
# the value specified will be treated as a full unbond of a validator and their associated delegators
minimum_bid_amount = 100_000_000_000_000
```

## Method 1: Bonding with the System Auction Contract {#bonding-system-auction}

This method submits a bid using the system auction contract. Call the existing `add_bid` entry point from the system auction contract. Using this method, you do not need to build any contracts, reducing costs and complexity.
Expand Down Expand Up @@ -67,7 +77,7 @@ sudo -u casper casper-client put-deploy \
--session-hash hash-93d923e336b20a4c4ca14d592b60e5bd3fe330775618290104f9beb326db7ae2 \
--session-entry-point add_bid \
--session-arg "public_key:public_key='01c297d2931fec7e22b2fb1ae3ca5afdfacc2c82ba501e8ed158eecef82b4dcdee'" \
--session-arg "amount:U512='$[10000 * 1000000000]'" \
--session-arg "amount:U512='$[100000000 * 1000000000]'" \
--session-arg "delegation_rate:u8='10'"
```

Expand All @@ -88,8 +98,8 @@ sudo -u casper casper-client put-deploy \
--session-path $HOME/casper-node/target/wasm32-unknown-unknown/release/add_bid.wasm \
--session-arg "public_key:public_key='<PUBLIC_KEY_HEX>'" \
--session-arg "amount:u512='<BID-AMOUNT>'" \
--session-arg "delegation_rate:u8='<PERCENT_TO_KEEP_FROM_DELEGATORS>'"
--session-arg "minimum_delegation_amount:u64='<MINIMUM_DELEGATION_AMOUNT>'"
--session-arg "delegation_rate:u8='<PERCENT_TO_KEEP_FROM_DELEGATORS>'" \
--session-arg "minimum_delegation_amount:u64='<MINIMUM_DELEGATION_AMOUNT>'" \
--session-arg "maximum_delegation_amount:u64='<MAXIMUM_DELEGATION_AMOUNT>'"
```

Expand Down
28 changes: 21 additions & 7 deletions docs/operators/becoming-a-validator/recovering.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ sudo -u casper casper-client put-deploy \
1. `node-address` - An IP address of a peer on the network. The default port of nodes' JSON-RPC servers on Mainnet and Testnet is 7777
2. `secret-key` - The file name containing the secret key of the account paying for the Deploy
3. `chain-name` - The chain-name to the network where you wish to send the Deploy. For Mainnet, use *casper*. For Testnet, use *casper-test*
4. `payment-amount` - The payment for the Deploy in motes. You must check the network's chainspec. For example, this entry point call needs 10,000 motes for node version [1.5.1](https://github.com/casper-network/casper-node/blob/release-1.5.1/resources/production/chainspec.toml)
4. `payment-amount` - The payment for the Deploy in motes. You must check the network's chainspec. For example, this entry point call needs 2,500,000,000 motes for node version [1.5.1](https://github.com/casper-network/casper-node/blob/release-1.5.1/resources/production/chainspec.toml)
5. `session-hash` - Hex-encoded hash of the stored auction contract, which depends on the network you are using. For Casper's Mainnet and Testnet, the hashes are:

- **Testnet**: `hash-93d923e336b20a4c4ca14d592b60e5bd3fe330775618290104f9beb326db7ae2`
Expand All @@ -106,26 +106,40 @@ Calling the `activate_bid` entry point on the auction contract has a fixed cost

:::

**Example:**
**Examples:**

This example uses the Casper Testnet to reactivate a bid:

```bash
sudo -u casper casper-client put-deploy \
--node-address http://65.21.75.254:7777 \
--node-address https://node.testnet.casper.network \
--secret-key /etc/casper/validator_keys/secret_key.pem \
--chain-name casper-test \
--payment-amount 10000 \
--payment-amount 2500000000 \
--session-hash hash-93d923e336b20a4c4ca14d592b60e5bd3fe330775618290104f9beb326db7ae2 \
--session-entry-point activate_bid \
--session-arg "validator_public_key:public_key='$(cat /etc/casper/validator_keys/public_key_hex)'"
```

This example uses the Casper Mainnet to reactivate a bid:

```bash
sudo -u casper casper-client put-deploy \
--node-address https://node.mainnet.casper.network \
--secret-key /etc/casper/validator_keys/secret_key.pem \
--chain-name casper \
--payment-amount 2500000000 \
--session-hash hash-ccb576d6ce6dec84a551e48f0d0b7af89ddba44c7390b690036257a04a3ae9ea \
--session-entry-point activate_bid \
--session-arg "validator_public_key:public_key='$(cat /etc/casper/validator_keys/public_key_hex)'"
```


Next, [check the bid activation](#checking-the-bid-activation) status.

### Method 2: Activating the Bid with Compiled Wasm {#activating-compiled-wasm}
### Method 2: Activating the Bid with Compiled Wasm {#activating-compiled-wasm} (Not recommended)

The second method to rejoin the network is to reactivate your bid using the `activate_bid.wasm`.
The second method to rejoin the network is to reactivate your bid using the `activate_bid.wasm`.


```bash
Expand Down Expand Up @@ -162,7 +176,7 @@ Here is an example that reactivates a bid using the `activate_bid.wasm`. You mus

```bash
sudo -u casper casper-client put-deploy \
--node-address http://65.21.75.254:7777 \
--node-address https://node.mainnet.casper.network \
--secret-key /etc/casper/validator_keys/secret_key.pem \
--chain-name casper-test \
--payment-amount 5000000000 \
Expand Down
2 changes: 1 addition & 1 deletion docs/operators/maintenance/archiving-and-restoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This documentation describes processes for the compression and decompression of

:::note

The values presented in this document assume that the `trie-compact` tool was run on a Mainnet database for compression. Contact the [support team](https://support.casperlabs.io/hc/en-gb) if you have questions.
The values presented in this document assume that the `trie-compact` tool was run on a Mainnet database for compression.

:::

Expand Down
1 change: 0 additions & 1 deletion docs/operators/setup-network/create-private.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ Use the below guides to set up and manage validator nodes.
- [Set up Mainnet and Testnet validator nodes](https://docs.cspr.community/): A set of guides for Mainnet and Testnet node-operators on setting up and configuring their Casper network validator nodes.

Use these FAQ collections for tips and details for validators.
- [FAQs for a basic validator node ](https://support.casperlabs.io/hc/en-gb/sections/6960448246683-Node-Operation-FAQ)
- [External FAQs on Mainnet and Testnet validator node setup](https://docs.cspr.community/docs/faq-validator.html)

## Step 2. Setting up the Directory
Expand Down
12 changes: 1 addition & 11 deletions docs/operators/setup-network/staging-files-for-new-network.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,7 @@ We can look at this manually on Mainnet using *curl*. As of writing this, `1.4.

```bash

$ curl -s genesis.casperlabs.io/casper/protocol_versions
1_0_0
1_1_0
1_1_2
1_2_0
1_2_1
1_3_2
1_3_4
1_4_1
1_4_3
1_4_4
$ curl -s genesis.casper.network/casper/protocol_versions
1_4_5
1_4_6

Expand Down
22 changes: 8 additions & 14 deletions docs/operators/setup/basic-node-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A node is usually run by executing the `casper-node-launcher`, which executes th

The `casper-node-launcher` can be installed via a Debian package, which also creates the `casper` user and directory structures and sets up a `systemd` unit and logging.

The `casper-node-launcher` Debian package can be obtained from https://repo.casperlabs.io. You only need to run the steps detailed there once.
The `casper-node-launcher` Debian package can be obtained from https://repo.casper.network. You only need to run the steps detailed there once.

Then, proceed to install the `casper-node-launcher` by running these commands:

Expand Down Expand Up @@ -50,9 +50,6 @@ The default location for executables from the Debian package install is `/usr/bi

This is the default location for configuration files. It can be overwritten with the `CASPER_CONFIG_DIR` environment variable. The paths in this document assume the default configuration file location of `/etc/casper`. The data is organized as follows:

- `delete_local_db.sh` - Removes `*.lmdb*` files from `/var/lib/casper/casper-node`
- `pull_casper_node_version.sh` - Pulls `bin.tar.gz` and `config.tar.gz` from [genesis.casperlabs.io](https://genesis.casperlabs.io/) for a specified protocol version and extracts them into `/var/lib/bin/<protocol_version>` and `/etc/casper/<protocol_version>`
- `config_from_example.sh` - Gets external IP to replace and create the `config.toml` from `config-example.toml`
- `node_util.py` - A script that will be replacing other scripts and is the preferred method of performing the actions of `pull_casper_node_version.sh`, `config_from_example.sh`, and `delete_local_db.sh`. Other scripts will be deprecated in future releases of `casper-node-launcher`.
- `casper-node-launcher-state.toml` - The local state for the `casper-node-launcher` which is created during the first run
- `validator_keys/` - The default folder for node keys, containing:
Expand Down Expand Up @@ -98,15 +95,16 @@ sudo -u casper /etc/casper/node_util.py stage_protocols <NETWORK_CONFIG>

For `<NETWORK_CONFIG>`, we use `casper.conf` for Mainnet and `casper-test.conf` for Testnet. This will install all currently released protocols in one step.

This command will do the following:
- Create `/var/lib/casper/bin/1_0_2/` and expand the `bin.tar.gz` containing at a minimum `casper-node`
- Create `/etc/casper/1_0_2/` and expand the `config.tar.gz` containing `chainspec.toml`, `config-example.toml`, and possibly `accounts.csv` and other files
- Remove the archive files and run `/etc/casper/config_from_example.sh 1_0_2` to create a `config.toml` from the `config-example.toml`
This command will do the following for each protocol not installed with `1_5_8` as example here:
- Create `/var/lib/casper/bin/1_5_8/` and expand the `bin.tar.gz` containing at a minimum `casper-node`
- Create `/etc/casper/1_5_8/` and expand the `config.tar.gz` containing `chainspec.toml`, `config-example.toml`, and possibly `accounts.csv` and other files
- Remove the archive files
- Run the equivalent of `/etc/casper/node_util.py config_from_example 1_5_8` to create a `config.toml` from the `config-example.toml`

Release versions are invoked using the underscore format, such as:

```bash
sudo -u casper /etc/casper/pull_casper_node_version.sh 1_0_2
sudo -u casper /etc/casper/pull_casper_node_version.sh 1_5_8
```

## The Node Configuration File {#config-file}
Expand All @@ -126,11 +124,7 @@ When joining the network, the system will start from the hash of a recent block
- Obtain the hash of a block from the status endpoint
- Update the `config.toml` for the node to include the trusted hash. There is a field dedicated to this near the top of the file

Here is an example command for obtaining a trusted hash. Replace the node address with an updated address from a node on the network.

```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
```
This page has an example of using [sed to automatically update the trusted hash](https://docs.casper.network/operators/setup/install-node#getting-a-trusted-hash)

### Known Addresses {#known-addresses}

Expand Down
2 changes: 1 addition & 1 deletion docs/operators/setup/casper-sidecar.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ systemctl status casper-sidecar
casper-sidecar.service - Casper Event Sidecar
Loaded: loaded (/lib/systemd/system/casper-sidecar.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2022-12-07 20:33:29 UTC; 1min 3s ago
Docs: https://docs.casperlabs.io
Docs: https://docs.casper.network
Main PID: 16707 (casper-si)
Tasks: 5 (limit: 9401)
Memory: 7.1M
Expand Down
Loading