From 39147562c0c1cce3ccf65ceb5b16ff15b0ab655b Mon Sep 17 00:00:00 2001 From: Joe Sacher <321623+sacherjj@users.noreply.github.com> Date: Tue, 11 Mar 2025 11:21:26 -0400 Subject: [PATCH] Updating references from old to new infra. Correcting various cost and other example issues. --- README/STANDARDS.md | 2 - config/theme.footer.config.js | 5 -- docs/concepts/glossary/A.md | 2 +- .../cli/transfers/direct-token-transfer.md | 4 +- .../cli/transfers/multisig-deploy-transfer.md | 4 +- .../cli/transfers/verify-transfer.md | 12 +-- .../operators/becoming-a-validator/bonding.md | 16 +++- .../becoming-a-validator/recovering.md | 28 +++++-- .../maintenance/archiving-and-restoring.md | 2 +- .../operators/setup-network/create-private.md | 1 - .../staging-files-for-new-network.md | 12 +-- .../setup/basic-node-configuration.md | 22 ++---- docs/operators/setup/casper-sidecar.md | 2 +- docs/operators/setup/install-node.md | 32 ++++---- docs/operators/setup/node-endpoints.md | 21 +----- .../advanced/multi-sig/multi-sig-workflow.md | 58 +++++++-------- docs/resources/advanced/storage-workflow.md | 2 +- docs/resources/beginner/querying-network.md | 4 +- .../cli/transfers/direct-token-transfer.md | 4 +- .../cli/transfers/multisig-deploy-transfer.md | 4 +- .../cli/transfers/verify-transfer.md | 12 +-- .../version-1.5.X/developers/prerequisites.md | 2 +- .../staging-files-for-new-network.md | 23 ++---- .../setup/basic-node-configuration.md | 7 +- .../operators/setup/install-node.md | 8 +- .../advanced/multi-sig/multi-sig-workflow.md | 58 +++++++-------- .../resources/beginner/querying-network.md | 4 +- .../interacting-with-NFTs.md | 2 +- .../version-2.0.0/concepts/glossary/A.md | 2 +- .../cli/transfers/direct-token-transfer.md | 4 +- .../cli/transfers/multisig-deploy-transfer.md | 4 +- .../cli/transfers/verify-transfer.md | 12 +-- .../maintenance/archiving-and-restoring.md | 2 +- .../operators/setup-network/create-private.md | 1 - .../staging-files-for-new-network.md | 12 +-- .../setup/basic-node-configuration.md | 74 ++++--------------- .../operators/setup/install-node.md | 32 ++++---- .../advanced/multi-sig/multi-sig-workflow.md | 58 +++++++-------- .../resources/advanced/storage-workflow.md | 2 +- .../resources/beginner/querying-network.md | 4 +- 40 files changed, 239 insertions(+), 321 deletions(-) diff --git a/README/STANDARDS.md b/README/STANDARDS.md index e100e3c38..91166e6cb 100644 --- a/README/STANDARDS.md +++ b/README/STANDARDS.md @@ -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. diff --git a/config/theme.footer.config.js b/config/theme.footer.config.js index dbff01f19..a75f55403 100644 --- a/config/theme.footer.config.js +++ b/config/theme.footer.config.js @@ -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", diff --git a/docs/concepts/glossary/A.md b/docs/concepts/glossary/A.md index b7a9bafc2..983856a6a 100644 --- a/docs/concepts/glossary/A.md +++ b/docs/concepts/glossary/A.md @@ -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} diff --git a/docs/developers/cli/transfers/direct-token-transfer.md b/docs/developers/cli/transfers/direct-token-transfer.md index e660b5758..f676a7cb0 100644 --- a/docs/developers/cli/transfers/direct-token-transfer.md +++ b/docs/developers/cli/transfers/direct-token-transfer.md @@ -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 \ @@ -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 ``` diff --git a/docs/developers/cli/transfers/multisig-deploy-transfer.md b/docs/developers/cli/transfers/multisig-deploy-transfer.md index 61105dee1..8ab0abbd9 100644 --- a/docs/developers/cli/transfers/multisig-deploy-transfer.md +++ b/docs/developers/cli/transfers/multisig-deploy-transfer.md @@ -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 | diff --git a/docs/developers/cli/transfers/verify-transfer.md b/docs/developers/cli/transfers/verify-transfer.md index 58c48c75a..99bf05de4 100644 --- a/docs/developers/cli/transfers/verify-transfer.md +++ b/docs/developers/cli/transfers/verify-transfer.md @@ -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 ```
@@ -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 ``` @@ -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 ``` @@ -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 ``` @@ -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 ``` @@ -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 ``` diff --git a/docs/operators/becoming-a-validator/bonding.md b/docs/operators/becoming-a-validator/bonding.md index faf764b6c..21dde28f7 100644 --- a/docs/operators/becoming-a-validator/bonding.md +++ b/docs/operators/becoming-a-validator/bonding.md @@ -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. @@ -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'" ``` @@ -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=''" \ --session-arg "amount:u512=''" \ ---session-arg "delegation_rate:u8=''" ---session-arg "minimum_delegation_amount:u64=''" +--session-arg "delegation_rate:u8=''" \ +--session-arg "minimum_delegation_amount:u64=''" \ --session-arg "maximum_delegation_amount:u64=''" ``` diff --git a/docs/operators/becoming-a-validator/recovering.md b/docs/operators/becoming-a-validator/recovering.md index 5a333d7fc..ca602a8c0 100644 --- a/docs/operators/becoming-a-validator/recovering.md +++ b/docs/operators/becoming-a-validator/recovering.md @@ -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` @@ -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 @@ -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 \ diff --git a/docs/operators/maintenance/archiving-and-restoring.md b/docs/operators/maintenance/archiving-and-restoring.md index 40a3d287b..54a94f184 100644 --- a/docs/operators/maintenance/archiving-and-restoring.md +++ b/docs/operators/maintenance/archiving-and-restoring.md @@ -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. ::: diff --git a/docs/operators/setup-network/create-private.md b/docs/operators/setup-network/create-private.md index 3d2957e01..e9c7bf56b 100644 --- a/docs/operators/setup-network/create-private.md +++ b/docs/operators/setup-network/create-private.md @@ -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 diff --git a/docs/operators/setup-network/staging-files-for-new-network.md b/docs/operators/setup-network/staging-files-for-new-network.md index d04409301..77203c59f 100644 --- a/docs/operators/setup-network/staging-files-for-new-network.md +++ b/docs/operators/setup-network/staging-files-for-new-network.md @@ -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 diff --git a/docs/operators/setup/basic-node-configuration.md b/docs/operators/setup/basic-node-configuration.md index 43ef9d409..706ac2f76 100644 --- a/docs/operators/setup/basic-node-configuration.md +++ b/docs/operators/setup/basic-node-configuration.md @@ -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: @@ -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/` and `/etc/casper/` -- `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: @@ -98,15 +95,16 @@ sudo -u casper /etc/casper/node_util.py stage_protocols For ``, 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} @@ -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} diff --git a/docs/operators/setup/casper-sidecar.md b/docs/operators/setup/casper-sidecar.md index c84ca25b0..5cc83a4f7 100644 --- a/docs/operators/setup/casper-sidecar.md +++ b/docs/operators/setup/casper-sidecar.md @@ -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 diff --git a/docs/operators/setup/install-node.md b/docs/operators/setup/install-node.md index 61700dea0..975018905 100644 --- a/docs/operators/setup/install-node.md +++ b/docs/operators/setup/install-node.md @@ -20,9 +20,9 @@ Of these `35000` is the only port required to be open for your node to function, ## Operating System Requirements The recommended OS version is Ubuntu 20.04. -### Using Ubuntu 22.04 +### Using Ubuntu 22.04 or 24.04 -Installing using Ubuntu 22.04 follows the same instructions as 20.04 with one exception: +Installing using Ubuntu 22.04 or 24.04 follows the same instructions as 20.04 with one exception: If you try to install packages, you will receive: @@ -33,8 +33,8 @@ casper-client : Depends: libssl1.1 (>= 1.1.0) but it is not installable 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: ``` -curl -f -JLO http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb -sudo apt install ./libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb +curl -f -JLO http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb +sudo apt install ./libssl1.1_1.1.1f-1ubuntu2_amd64.deb ``` ## Required Number of Open Files @@ -46,25 +46,27 @@ Before beginning, [update the maximum open files limit](./open-files.md) for you If you were running a previous node on this box, this will clean up state. If packages are not installed, the `apt remove` may give errors, but this is not a problem. ```bash -sudo systemctl stop casper-node-launcher.service +sudo /etc/casper/node_util.py stop sudo apt remove -y casper-client sudo apt remove -y casper-node sudo apt remove -y casper-node-launcher sudo rm /etc/casper/casper-node-launcher-state.toml sudo rm -rf /etc/casper/1_* +sudo rm -rf /etc/casper/2_* sudo rm -rf /var/lib/casper/* ``` ## Required Packages -The following commands will set up the Casper Labs repository for packages: +The following commands will set up the Casper repository for packages: ```bash -echo "deb [arch=amd64] https://repo.casperlabs.io/releases focal main" | sudo tee -a /etc/apt/sources.list.d/casper.list -curl -O https://repo.casperlabs.io/casper-repo-pubkey.asc -sudo apt-key add casper-repo-pubkey.asc +sudo mkdir -m 0755 -p /etc/apt/keyrings/ +sudo curl https://repo.casper.network/casper-repo-pubkey.gpg --output /etc/apt/keyrings/casper-repo-pubkey.gpg +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 sudo apt update ``` +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. ## Required Tools @@ -127,16 +129,16 @@ 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 use the following Casper Labs public nodes: -* Testnet - NODE_ADDR=https://rpc.testnet.casperlabs.io +* Testnet - NODE_ADDR=https://node.testnet.casper.network -* Mainnet - NODE_ADDR=https://rpc.mainnet.casperlabs.io +* Mainnet - NODE_ADDR=https://node.mainnet.casper.network ### 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: +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_8: ```bash -PROTOCOL=1_5_2 +PROTOCOL=1_5_8 ``` ### Load `trusted_hash` in Config.toml of the Protocol Version @@ -144,8 +146,8 @@ PROTOCOL=1_5_2 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 +NODE_ADDR=https://node.mainnet.casper.network +PROTOCOL=1_5_8 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 ``` diff --git a/docs/operators/setup/node-endpoints.md b/docs/operators/setup/node-endpoints.md index fdf149a3f..6e9490857 100644 --- a/docs/operators/setup/node-endpoints.md +++ b/docs/operators/setup/node-endpoints.md @@ -189,31 +189,16 @@ If this port is closed, the requests coming to this port will not be served, but ## Setting up Firewall Rules -To limit inbound traffic to the node’s endpoints, you can set firewall rules similar to the `ufw` commands below: +To limit inbound traffic to the node’s endpoints, you can set firewall rules. -```bash -sudo apt install ufw -y -sudo ufw disable -sudo ufw reset -sudo ufw default allow outgoing -sudo ufw default deny incoming -sudo ufw limit ssh -sudo ufw limit 7777/tcp -sudo ufw limit 8888/tcp -sudo ufw limit 35000/tcp -sudo ufw enable -``` - -These commands will limit requests to the available ports of your node. Port 35000 should be left open, although you can limit traffic, as it is crucial for node-to-node communication. - -If you have any concerns, questions, or issues, please [submit a request](https://support.casperlabs.io/hc/en-gb/requests/new) to the Casper support team. +Two example files are available: [firewall.sh](https://genesis.casper.network/firewall.sh) and more restrictive [firewall_only_node_to_node.sh](https://genesis.casper.network/firewall_only_node_to_node.sh). +Both of these include `8888` access from casper-network-monitor IP for tracking status of the network. More information is included in the comments of the files. ## Restricting Access for Private Networks Any node can join Mainnet and Testnet and communicate with the nodes in the network. Private networks may wish to restrict access for new nodes joining the network as described [here](../setup-network/create-private.md#network-access-control). - ## Summary of Related Links Here is a summary of the links mentioned on this page: diff --git a/docs/resources/advanced/multi-sig/multi-sig-workflow.md b/docs/resources/advanced/multi-sig/multi-sig-workflow.md index a8b2a5534..aa986c0f7 100644 --- a/docs/resources/advanced/multi-sig/multi-sig-workflow.md +++ b/docs/resources/advanced/multi-sig/multi-sig-workflow.md @@ -78,7 +78,7 @@ casper-client account-address --public-key Update the weight of the primary key to 3 by calling the `update_associated_keys.wasm`. ```bash -casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ +casper-client put-deploy --node-address https://node.testnet.casper.network \ --chain-name "casper-test" \ --payment-amount 500000000 \ --secret-key $PATH/secret_key.pem \ @@ -90,16 +90,16 @@ casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ Verify that the deploy ran successfully. ```bash -casper-client get-deploy --node-address https://rpc.testnet.casperlabs.io/ +casper-client get-deploy --node-address https://node.testnet.casper.network ``` Retrieve the latest state root hash and check the primary account details. ```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 casper-client query-global-state \ ---node-address https://rpc.testnet.casperlabs.io/ \ +--node-address https://node.testnet.casper.network \ --state-root-hash \ --key account-hash- ``` @@ -143,7 +143,7 @@ Set up a multi-signature scheme for the account by updating the `deployment` and ```bash casper-client put-deploy \ ---node-address https://rpc.testnet.casperlabs.io \ +--node-address https://node.testnet.casper.network \ --chain-name casper-test \ --payment-amount 500000000 \ --secret-key $PATH/secret_key.pem \ @@ -155,16 +155,16 @@ casper-client put-deploy \ Verify that the deploy ran successfully. ```bash -casper-client get-deploy --node-address https://rpc.testnet.casperlabs.io/ +casper-client get-deploy --node-address https://node.testnet.casper.network ``` Retrieve the latest state root hash and check the primary account details. ```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 casper-client query-global-state \ ---node-address https://rpc.testnet.casperlabs.io/ \ +--node-address https://node.testnet.casper.network \ --state-root-hash \ --key account-hash- ``` @@ -217,7 +217,7 @@ The table below summarizes the updates. To add an associated key to the primary account, use the `add_account.wasm` provided. This example adds two keys to the primary account (`account-hash-d89c*`): `user_1` with `account-hash-e2d0*`, and `user_2` with `account-hash-04a9*`. ```bash -casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ +casper-client put-deploy --node-address https://node.testnet.casper.network \ --chain-name "casper-test" \ --payment-amount 500000000 \ --secret-key $PATH/secret_key.pem \ @@ -229,11 +229,11 @@ casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ Verify that the deploy ran successfully. ```bash -casper-client get-deploy --node-address https://rpc.testnet.casperlabs.io/ +casper-client get-deploy --node-address https://node.testnet.casper.network ``` ```bash -casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ +casper-client put-deploy --node-address https://node.testnet.casper.network \ --chain-name "casper-test" \ --payment-amount 500000000 \ --secret-key $PATH/secret_key.pem \ @@ -245,16 +245,16 @@ casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ Verify that the deploy ran successfully. ```bash -casper-client get-deploy --node-address https://rpc.testnet.casperlabs.io/ +casper-client get-deploy --node-address https://node.testnet.casper.network ``` Retrieve the latest state root hash and check the primary account details. ```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 casper-client query-global-state \ ---node-address https://rpc.testnet.casperlabs.io/ \ +--node-address https://node.testnet.casper.network \ --state-root-hash \ --key account-hash- ``` @@ -325,16 +325,16 @@ casper-client put-deploy --chain-name casper-test \ Verify that the deploy ran successfully. ```bash -casper-client get-deploy --node-address https://rpc.testnet.casperlabs.io/ +casper-client get-deploy --node-address https://node.testnet.casper.network ``` Retrieve the latest state root hash and check the primary account details. ```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 casper-client query-global-state \ ---node-address https://rpc.testnet.casperlabs.io/ \ +--node-address https://node.testnet.casper.network \ --state-root-hash \ --key account-hash- ``` @@ -384,22 +384,22 @@ casper-client sign-deploy -i hello_world_one_signature -k $PATH/user_2_secret_ke The deploy can be sent to the network using the `send-deploy` command: ```bash -casper-client send-deploy --node-address https://rpc.testnet.casperlabs.io -i hello_world_two_signatures +casper-client send-deploy --node-address https://node.testnet.casper.network -i hello_world_two_signatures ``` Verify that the deploy ran successfully. ```bash -casper-client get-deploy --node-address https://rpc.testnet.casperlabs.io/ +casper-client get-deploy --node-address https://node.testnet.casper.network ``` Retrieve the latest state root hash and check the primary account details. ```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 casper-client query-global-state \ ---node-address https://rpc.testnet.casperlabs.io/ \ +--node-address https://node.testnet.casper.network \ --state-root-hash \ --key account-hash- ``` @@ -421,7 +421,7 @@ Before removing a key, ensure the remaining associated keys can combine their we Given the current setup, the primary account will add an associated key, and then remove it. In other use cases, associated keys may need to combine their signatures to send a multi-sig deploy that removes a key. ```bash -casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ +casper-client put-deploy --node-address https://node.testnet.casper.network \ --chain-name "casper-test" \ --payment-amount 500000000 \ --secret-key $PATH/secret_key.pem \ @@ -433,16 +433,16 @@ casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ Verify that the deploy ran successfully. ```bash -casper-client get-deploy --node-address https://rpc.testnet.casperlabs.io/ +casper-client get-deploy --node-address https://node.testnet.casper.network ``` Retrieve the latest state root hash and check the primary account details. ```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 casper-client query-global-state \ ---node-address https://rpc.testnet.casperlabs.io/ \ +--node-address https://node.testnet.casper.network \ --state-root-hash \ --key account-hash- ``` @@ -496,7 +496,7 @@ The table below summarizes the updates after calling the `add_account.wasm`. The `remove_account.wasm` will remove the newly added account to demonstrate the possibility of removing associated keys that may have been compromised. ```bash -casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ +casper-client put-deploy --node-address https://node.testnet.casper.network \ --chain-name "casper-test" \ --payment-amount 500000000 \ --secret-key $PATH/secret_key.pem \ @@ -507,16 +507,16 @@ casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ Verify that the deploy ran successfully. ```bash -casper-client get-deploy --node-address https://rpc.testnet.casperlabs.io/ +casper-client get-deploy --node-address https://node.testnet.casper.network/ ``` Retrieve the latest state root hash and check the primary account details. ```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/ casper-client query-global-state \ ---node-address https://rpc.testnet.casperlabs.io/ \ +--node-address https://node.testnet.casper.network/ \ --state-root-hash \ --key account-hash- ``` diff --git a/docs/resources/advanced/storage-workflow.md b/docs/resources/advanced/storage-workflow.md index 4e6c58367..801f6738c 100644 --- a/docs/resources/advanced/storage-workflow.md +++ b/docs/resources/advanced/storage-workflow.md @@ -18,7 +18,7 @@ Both the [`put_key`](https://docs.rs/casper-contract/latest/casper_contract/cont ### `storage::write` / `storage::read` -[`storage::write`](https://docs.rs/casper-contract/latest/casper_contract/contract_api/storage/fn.write.html) writes a given value to a previously established URef (created using [`storage::new_uref`](https://docs.rs/casper-contract/latest/casper_contract/contract_api/storage/fn.new_uref.html)). Unlike `put_key`, this value is not one of the `Key` types listed above, but rather any of the potential [`CLType`](https://docs.casperlabs.io/developers/json-rpc/types_cl/#cltype)s as outlined. [`storage::read`](https://docs.rs/casper-contract/latest/casper_contract/contract_api/storage/fn.read.html) provides a method to retrieve these values from the associated URef. +[`storage::write`](https://docs.rs/casper-contract/latest/casper_contract/contract_api/storage/fn.write.html) writes a given value to a previously established URef (created using [`storage::new_uref`](https://docs.rs/casper-contract/latest/casper_contract/contract_api/storage/fn.new_uref.html)). Unlike `put_key`, this value is not one of the `Key` types listed above, but rather any of the potential [`CLType`](https://docs.casper.network/developers/json-rpc/types_cl)s as outlined. [`storage::read`](https://docs.rs/casper-contract/latest/casper_contract/contract_api/storage/fn.read.html) provides a method to retrieve these values from the associated URef. ### `storage:dictionary_put` / `storage::dictionary_get` diff --git a/docs/resources/beginner/querying-network.md b/docs/resources/beginner/querying-network.md index e8b2b5e8f..1d8872cda 100644 --- a/docs/resources/beginner/querying-network.md +++ b/docs/resources/beginner/querying-network.md @@ -92,7 +92,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 a306a9cf869e52fe9eacdc28aade94215112cc04b6737b3669c35568a47a7dc2 \ --key 01360af61b50cdcb7b92cffe2c99315d413d34ef77fadee0c105cc4f1d4120f986 ``` @@ -219,7 +219,7 @@ The `-v` option generates verbose output, printing the RPC request and response ```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 a306a9cf869e52fe9eacdc28aade94215112cc04b6737b3669c35568a47a7dc2 \ --purse-identifier 01360af61b50cdcb7b92cffe2c99315d413d34ef77fadee0c105cc4f1d4120f986 ``` diff --git a/versioned_docs/version-1.5.X/developers/cli/transfers/direct-token-transfer.md b/versioned_docs/version-1.5.X/developers/cli/transfers/direct-token-transfer.md index facc82587..6cabc5ccf 100644 --- a/versioned_docs/version-1.5.X/developers/cli/transfers/direct-token-transfer.md +++ b/versioned_docs/version-1.5.X/developers/cli/transfers/direct-token-transfer.md @@ -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 \ @@ -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 ``` diff --git a/versioned_docs/version-1.5.X/developers/cli/transfers/multisig-deploy-transfer.md b/versioned_docs/version-1.5.X/developers/cli/transfers/multisig-deploy-transfer.md index cfab179e7..75173e38f 100644 --- a/versioned_docs/version-1.5.X/developers/cli/transfers/multisig-deploy-transfer.md +++ b/versioned_docs/version-1.5.X/developers/cli/transfers/multisig-deploy-transfer.md @@ -246,12 +246,12 @@ Towards the end of the following output, you can observe that there is an **appr ### Sending the deploy {#sending-the-deploy} -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 | diff --git a/versioned_docs/version-1.5.X/developers/cli/transfers/verify-transfer.md b/versioned_docs/version-1.5.X/developers/cli/transfers/verify-transfer.md index d69040719..9d09af2ec 100644 --- a/versioned_docs/version-1.5.X/developers/cli/transfers/verify-transfer.md +++ b/versioned_docs/version-1.5.X/developers/cli/transfers/verify-transfer.md @@ -23,7 +23,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 ```
@@ -89,7 +89,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 ``` @@ -172,7 +172,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 ``` @@ -237,7 +237,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 ``` @@ -319,7 +319,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 ``` @@ -374,7 +374,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 ``` diff --git a/versioned_docs/version-1.5.X/developers/prerequisites.md b/versioned_docs/version-1.5.X/developers/prerequisites.md index db785cf0e..50d989e83 100644 --- a/versioned_docs/version-1.5.X/developers/prerequisites.md +++ b/versioned_docs/version-1.5.X/developers/prerequisites.md @@ -265,7 +265,7 @@ The node address is the IP address or URL of a peer node. Casper Labs provides public Casper node JSON-RPC endpoints for each network: * Mainnet: https://rpc.mainnet.casperlabs.io/rpc -* Testnet: https://rpc.testnet.casperlabs.io/rpc +* Testnet: https://node.testnet.casper.networkrpc * Integration network: https://rpc.integration.casperlabs.io/rpc Additionally, both the official Testnet and Mainnet provide block explorers that list the IP addresses of nodes on their respective networks. diff --git a/versioned_docs/version-1.5.X/operators/setup-network/staging-files-for-new-network.md b/versioned_docs/version-1.5.X/operators/setup-network/staging-files-for-new-network.md index d04409301..b7ad25831 100644 --- a/versioned_docs/version-1.5.X/operators/setup-network/staging-files-for-new-network.md +++ b/versioned_docs/version-1.5.X/operators/setup-network/staging-files-for-new-network.md @@ -43,32 +43,23 @@ This is a description of Mainnet protocol version hosting (with network name: `c At the root of the hosting server directory for a given network, a `protocol_versions` file exists. This holds the valid protocol versions for a network. -We can look at this manually on Mainnet using *curl*. As of writing this, `1.4.6` is the latest version and the contents of this file will change. +We can look at this manually on Mainnet using *curl*. As of writing this, `1_5_8` is the latest version and the contents of this file will change. ```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 -1_4_5 -1_4_6 +$ curl -s genesis.casper.network/casper/protocol_versions +1_5_8 ``` We should find `bin.tar.gz` and `config.tar.gz` in those directories under `casper`. +Since 1.5 `casper-node` version, the network syncs with `fast-sync` protocol where historical nodes are not needed. The only time multiple protocols are needed is during and upgrade staging period. However, it is typical that `protocol_versions` is updated only when a new version is staged, so usually the current and previous version are help in `protocol_versions`. + ## Protocol Version -The protocol version of a network is not related to the `casper-node` version. In Mainnet, these have often been the same. However, with a new network, you would use the latest `casper-node` version for your -`1.0.0` protocol. +The protocol version of a network is not related to the `casper-node` version. In Mainnet, these have often been the same. +However, with a new network, you would use the latest `casper-node` version for your `1.0.0` protocol. ## Network Configuration File diff --git a/versioned_docs/version-1.5.X/operators/setup/basic-node-configuration.md b/versioned_docs/version-1.5.X/operators/setup/basic-node-configuration.md index ac9f38d6a..7c4c763b8 100644 --- a/versioned_docs/version-1.5.X/operators/setup/basic-node-configuration.md +++ b/versioned_docs/version-1.5.X/operators/setup/basic-node-configuration.md @@ -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](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](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: @@ -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/` and `/etc/casper/` -- `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: @@ -129,7 +126,7 @@ When joining the network, the system will start from the hash of a recent block 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 +sudo sed -i "/trusted_hash =/c\trusted_hash = '$(casper-client get-block --node-address http://3.14.161.135:7777 | jq -r .result.block.hash | tr -d '\n')'" /etc/casper/1_0_0/config.toml ``` ### Known Addresses {#known-addresses} diff --git a/versioned_docs/version-1.5.X/operators/setup/install-node.md b/versioned_docs/version-1.5.X/operators/setup/install-node.md index 61700dea0..7774e7c22 100644 --- a/versioned_docs/version-1.5.X/operators/setup/install-node.md +++ b/versioned_docs/version-1.5.X/operators/setup/install-node.md @@ -60,9 +60,9 @@ sudo rm -rf /var/lib/casper/* The following commands will set up the Casper Labs repository for packages: ```bash -echo "deb [arch=amd64] https://repo.casperlabs.io/releases focal main" | sudo tee -a /etc/apt/sources.list.d/casper.list -curl -O https://repo.casperlabs.io/casper-repo-pubkey.asc -sudo apt-key add casper-repo-pubkey.asc +sudo mkdir -m 0755 -p /etc/apt/keyrings/ +sudo curl https://repo.casper.network/casper-repo-pubkey.gpg --output /etc/apt/keyrings/casper-repo-pubkey.gpg +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 sudo apt update ``` @@ -127,7 +127,7 @@ 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 use the following Casper Labs public nodes: -* Testnet - NODE_ADDR=https://rpc.testnet.casperlabs.io +* Testnet - NODE_ADDR=https://node.testnet.casper.network * Mainnet - NODE_ADDR=https://rpc.mainnet.casperlabs.io diff --git a/versioned_docs/version-1.5.X/resources/advanced/multi-sig/multi-sig-workflow.md b/versioned_docs/version-1.5.X/resources/advanced/multi-sig/multi-sig-workflow.md index a8b2a5534..fe08afdbf 100644 --- a/versioned_docs/version-1.5.X/resources/advanced/multi-sig/multi-sig-workflow.md +++ b/versioned_docs/version-1.5.X/resources/advanced/multi-sig/multi-sig-workflow.md @@ -78,7 +78,7 @@ casper-client account-address --public-key Update the weight of the primary key to 3 by calling the `update_associated_keys.wasm`. ```bash -casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ +casper-client put-deploy --node-address https://node.testnet.casper.network \ --chain-name "casper-test" \ --payment-amount 500000000 \ --secret-key $PATH/secret_key.pem \ @@ -90,16 +90,16 @@ casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ Verify that the deploy ran successfully. ```bash -casper-client get-deploy --node-address https://rpc.testnet.casperlabs.io/ +casper-client get-deploy --node-address https://node.testnet.casper.network ``` Retrieve the latest state root hash and check the primary account details. ```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 casper-client query-global-state \ ---node-address https://rpc.testnet.casperlabs.io/ \ +--node-address https://node.testnet.casper.network \ --state-root-hash \ --key account-hash- ``` @@ -143,7 +143,7 @@ Set up a multi-signature scheme for the account by updating the `deployment` and ```bash casper-client put-deploy \ ---node-address https://rpc.testnet.casperlabs.io \ +--node-address https://node.testnet.casper.network \ --chain-name casper-test \ --payment-amount 500000000 \ --secret-key $PATH/secret_key.pem \ @@ -155,16 +155,16 @@ casper-client put-deploy \ Verify that the deploy ran successfully. ```bash -casper-client get-deploy --node-address https://rpc.testnet.casperlabs.io/ +casper-client get-deploy --node-address https://node.testnet.casper.network ``` Retrieve the latest state root hash and check the primary account details. ```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 casper-client query-global-state \ ---node-address https://rpc.testnet.casperlabs.io/ \ +--node-address https://node.testnet.casper.network \ --state-root-hash \ --key account-hash- ``` @@ -217,7 +217,7 @@ The table below summarizes the updates. To add an associated key to the primary account, use the `add_account.wasm` provided. This example adds two keys to the primary account (`account-hash-d89c*`): `user_1` with `account-hash-e2d0*`, and `user_2` with `account-hash-04a9*`. ```bash -casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ +casper-client put-deploy --node-address https://node.testnet.casper.network \ --chain-name "casper-test" \ --payment-amount 500000000 \ --secret-key $PATH/secret_key.pem \ @@ -229,11 +229,11 @@ casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ Verify that the deploy ran successfully. ```bash -casper-client get-deploy --node-address https://rpc.testnet.casperlabs.io/ +casper-client get-deploy --node-address https://node.testnet.casper.network ``` ```bash -casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ +casper-client put-deploy --node-address https://node.testnet.casper.network \ --chain-name "casper-test" \ --payment-amount 500000000 \ --secret-key $PATH/secret_key.pem \ @@ -245,16 +245,16 @@ casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ Verify that the deploy ran successfully. ```bash -casper-client get-deploy --node-address https://rpc.testnet.casperlabs.io/ +casper-client get-deploy --node-address https://node.testnet.casper.network ``` Retrieve the latest state root hash and check the primary account details. ```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 casper-client query-global-state \ ---node-address https://rpc.testnet.casperlabs.io/ \ +--node-address https://node.testnet.casper.network \ --state-root-hash \ --key account-hash- ``` @@ -325,16 +325,16 @@ casper-client put-deploy --chain-name casper-test \ Verify that the deploy ran successfully. ```bash -casper-client get-deploy --node-address https://rpc.testnet.casperlabs.io/ +casper-client get-deploy --node-address https://node.testnet.casper.network ``` Retrieve the latest state root hash and check the primary account details. ```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 casper-client query-global-state \ ---node-address https://rpc.testnet.casperlabs.io/ \ +--node-address https://node.testnet.casper.network \ --state-root-hash \ --key account-hash- ``` @@ -384,22 +384,22 @@ casper-client sign-deploy -i hello_world_one_signature -k $PATH/user_2_secret_ke The deploy can be sent to the network using the `send-deploy` command: ```bash -casper-client send-deploy --node-address https://rpc.testnet.casperlabs.io -i hello_world_two_signatures +casper-client send-deploy --node-address https://node.testnet.casper.network -i hello_world_two_signatures ``` Verify that the deploy ran successfully. ```bash -casper-client get-deploy --node-address https://rpc.testnet.casperlabs.io/ +casper-client get-deploy --node-address https://node.testnet.casper.network ``` Retrieve the latest state root hash and check the primary account details. ```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 casper-client query-global-state \ ---node-address https://rpc.testnet.casperlabs.io/ \ +--node-address https://node.testnet.casper.network \ --state-root-hash \ --key account-hash- ``` @@ -421,7 +421,7 @@ Before removing a key, ensure the remaining associated keys can combine their we Given the current setup, the primary account will add an associated key, and then remove it. In other use cases, associated keys may need to combine their signatures to send a multi-sig deploy that removes a key. ```bash -casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ +casper-client put-deploy --node-address https://node.testnet.casper.network \ --chain-name "casper-test" \ --payment-amount 500000000 \ --secret-key $PATH/secret_key.pem \ @@ -433,16 +433,16 @@ casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ Verify that the deploy ran successfully. ```bash -casper-client get-deploy --node-address https://rpc.testnet.casperlabs.io/ +casper-client get-deploy --node-address https://node.testnet.casper.network ``` Retrieve the latest state root hash and check the primary account details. ```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/ casper-client query-global-state \ ---node-address https://rpc.testnet.casperlabs.io/ \ +--node-address https://node.testnet.casper.network/ \ --state-root-hash \ --key account-hash- ``` @@ -496,7 +496,7 @@ The table below summarizes the updates after calling the `add_account.wasm`. The `remove_account.wasm` will remove the newly added account to demonstrate the possibility of removing associated keys that may have been compromised. ```bash -casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ +casper-client put-deploy --node-address https://node.testnet.casper.network/ \ --chain-name "casper-test" \ --payment-amount 500000000 \ --secret-key $PATH/secret_key.pem \ @@ -507,16 +507,16 @@ casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ Verify that the deploy ran successfully. ```bash -casper-client get-deploy --node-address https://rpc.testnet.casperlabs.io/ +casper-client get-deploy --node-address https://node.testnet.casper.network/ ``` Retrieve the latest state root hash and check the primary account details. ```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/ casper-client query-global-state \ ---node-address https://rpc.testnet.casperlabs.io/ \ +--node-address https://node.testnet.casper.network/ \ --state-root-hash \ --key account-hash- ``` diff --git a/versioned_docs/version-1.5.X/resources/beginner/querying-network.md b/versioned_docs/version-1.5.X/resources/beginner/querying-network.md index e8b2b5e8f..1d8872cda 100644 --- a/versioned_docs/version-1.5.X/resources/beginner/querying-network.md +++ b/versioned_docs/version-1.5.X/resources/beginner/querying-network.md @@ -92,7 +92,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 a306a9cf869e52fe9eacdc28aade94215112cc04b6737b3669c35568a47a7dc2 \ --key 01360af61b50cdcb7b92cffe2c99315d413d34ef77fadee0c105cc4f1d4120f986 ``` @@ -219,7 +219,7 @@ The `-v` option generates verbose output, printing the RPC request and response ```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 a306a9cf869e52fe9eacdc28aade94215112cc04b6737b3669c35568a47a7dc2 \ --purse-identifier 01360af61b50cdcb7b92cffe2c99315d413d34ef77fadee0c105cc4f1d4120f986 ``` diff --git a/versioned_docs/version-1.5.X/resources/tokens/cep78/using-casper-client/interacting-with-NFTs.md b/versioned_docs/version-1.5.X/resources/tokens/cep78/using-casper-client/interacting-with-NFTs.md index 4bff0040d..b6b162302 100644 --- a/versioned_docs/version-1.5.X/resources/tokens/cep78/using-casper-client/interacting-with-NFTs.md +++ b/versioned_docs/version-1.5.X/resources/tokens/cep78/using-casper-client/interacting-with-NFTs.md @@ -271,7 +271,7 @@ To check an account's balance, get the latest state root hash and query the `bal Casper client commands without comments ```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 casper-client get-dictionary-item -n http://localhost:11101/rpc/ \ --state-root-hash f22e8ecfb3d2700d5f902c83da456c32f130b73d0d35037fe89b2d4b4933673f \ diff --git a/versioned_docs/version-2.0.0/concepts/glossary/A.md b/versioned_docs/version-2.0.0/concepts/glossary/A.md index b7a9bafc2..983856a6a 100644 --- a/versioned_docs/version-2.0.0/concepts/glossary/A.md +++ b/versioned_docs/version-2.0.0/concepts/glossary/A.md @@ -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} diff --git a/versioned_docs/version-2.0.0/developers/cli/transfers/direct-token-transfer.md b/versioned_docs/version-2.0.0/developers/cli/transfers/direct-token-transfer.md index e660b5758..f676a7cb0 100644 --- a/versioned_docs/version-2.0.0/developers/cli/transfers/direct-token-transfer.md +++ b/versioned_docs/version-2.0.0/developers/cli/transfers/direct-token-transfer.md @@ -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 \ @@ -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 ``` diff --git a/versioned_docs/version-2.0.0/developers/cli/transfers/multisig-deploy-transfer.md b/versioned_docs/version-2.0.0/developers/cli/transfers/multisig-deploy-transfer.md index 61105dee1..8ab0abbd9 100644 --- a/versioned_docs/version-2.0.0/developers/cli/transfers/multisig-deploy-transfer.md +++ b/versioned_docs/version-2.0.0/developers/cli/transfers/multisig-deploy-transfer.md @@ -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 | diff --git a/versioned_docs/version-2.0.0/developers/cli/transfers/verify-transfer.md b/versioned_docs/version-2.0.0/developers/cli/transfers/verify-transfer.md index 58c48c75a..99bf05de4 100644 --- a/versioned_docs/version-2.0.0/developers/cli/transfers/verify-transfer.md +++ b/versioned_docs/version-2.0.0/developers/cli/transfers/verify-transfer.md @@ -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 ```
@@ -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 ``` @@ -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 ``` @@ -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 ``` @@ -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 ``` @@ -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 ``` diff --git a/versioned_docs/version-2.0.0/operators/maintenance/archiving-and-restoring.md b/versioned_docs/version-2.0.0/operators/maintenance/archiving-and-restoring.md index 40a3d287b..54a94f184 100644 --- a/versioned_docs/version-2.0.0/operators/maintenance/archiving-and-restoring.md +++ b/versioned_docs/version-2.0.0/operators/maintenance/archiving-and-restoring.md @@ -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. ::: diff --git a/versioned_docs/version-2.0.0/operators/setup-network/create-private.md b/versioned_docs/version-2.0.0/operators/setup-network/create-private.md index 3d2957e01..e9c7bf56b 100644 --- a/versioned_docs/version-2.0.0/operators/setup-network/create-private.md +++ b/versioned_docs/version-2.0.0/operators/setup-network/create-private.md @@ -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 diff --git a/versioned_docs/version-2.0.0/operators/setup-network/staging-files-for-new-network.md b/versioned_docs/version-2.0.0/operators/setup-network/staging-files-for-new-network.md index d04409301..77203c59f 100644 --- a/versioned_docs/version-2.0.0/operators/setup-network/staging-files-for-new-network.md +++ b/versioned_docs/version-2.0.0/operators/setup-network/staging-files-for-new-network.md @@ -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 diff --git a/versioned_docs/version-2.0.0/operators/setup/basic-node-configuration.md b/versioned_docs/version-2.0.0/operators/setup/basic-node-configuration.md index 43ef9d409..366da0451 100644 --- a/versioned_docs/version-2.0.0/operators/setup/basic-node-configuration.md +++ b/versioned_docs/version-2.0.0/operators/setup/basic-node-configuration.md @@ -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: @@ -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/` and `/etc/casper/` -- `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: @@ -98,15 +95,16 @@ sudo -u casper /etc/casper/node_util.py stage_protocols For ``, 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} @@ -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} @@ -156,58 +150,16 @@ Provide the path to the secret keys for the node. This path is set to `etc/caspe ### Networking and Gossiping {#networking--gossiping} -The node requires a publicly accessible IP address. The `config_from_example.sh` and `node_util.py` both allow IP for network address translation (NAT) setup. Specify the public IP address of the node. If you use the `config_from_example.sh` external services are called to find your IP and this is inserted into the `config.toml` created. +The node requires a publicly accessible IP address. `node_util.py` allows IP for network address translation (NAT) setup. +Specify the public IP address of the node with the `/etc/casper/node_util.py stage_protocols [config file] --ip 'my.ip.goes.here'`. +This will use the IP given rather than query for the external IP automatically. + The following default values are specified in the file if you want to change them: - The port that will be used for status and transactions - The port used for networking -- Known_addresses - these are the bootstrap nodes (there is no need to change these) - -### Enabling Speculative Execution - -The `speculative_exec` endpoint provides a method to execute a transaction without committing its execution effects to global state. This can be used by developers to roughly estimate the gas costs of sending the transaction in question. By default, `speculative_exec` is disabled on a node. - -`speculative_exec` can be enabled within *config.toml* by changing `enable_server` to `true` under the configuration options for the speculative execution JSON-RPC HTTP server. - -Node operators may also change the incoming request port for speculative execution, which defaults to `7778`. Further, you can choose to alter the `qps_limit` and `max_body_bytes`, which limit the amount and size of requests to the speculative execution server. - -#### Example Config.toml configuration with speculative execution enabled - -``` -# ======================================================================== -# Configuration options for the speculative execution JSON-RPC HTTP server -# ======================================================================== -[speculative_exec_server] - -# Flag which enables the speculative execution JSON-RPC HTTP server. -enable_server = true - -# Listening address for speculative execution JSON-RPC HTTP server. If the port -# is set to 0, a random port will be used. -# -# If the specified port cannot be bound to, a random port will be tried instead. -# If binding fails, the speculative execution JSON-RPC HTTP server will not run, -# but the node will be otherwise unaffected. -# -# The actual bound address will be reported via a log line if logging is enabled. -address = '0.0.0.0:7778' - -# The global max rate of requests (per second) before they are limited. -# Request will be delayed to the next 1 second bucket once limited. -qps_limit = 1 - -# Maximum number of bytes to accept in a single request body. -max_body_bytes = 2_621_440 - -# Specifies which origin will be reported as allowed by speculative execution server. -# -# If left empty, CORS will be disabled. -# If set to '*', any origin is allowed. -# Otherwise, only a specified origin is allowed. The given string must conform to the [origin scheme](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin). -cors_origin = '' - -``` +- Known_addresses - these are the bootstrap nodes you will build peers from ## Rust Client Installation {#client-installation} diff --git a/versioned_docs/version-2.0.0/operators/setup/install-node.md b/versioned_docs/version-2.0.0/operators/setup/install-node.md index 61700dea0..70873d5b4 100644 --- a/versioned_docs/version-2.0.0/operators/setup/install-node.md +++ b/versioned_docs/version-2.0.0/operators/setup/install-node.md @@ -20,9 +20,9 @@ Of these `35000` is the only port required to be open for your node to function, ## Operating System Requirements The recommended OS version is Ubuntu 20.04. -### Using Ubuntu 22.04 +### Using Ubuntu 22.04 or 24.04 -Installing using Ubuntu 22.04 follows the same instructions as 20.04 with one exception: +Installing using Ubuntu 22.04 or 24.04 follows the same instructions as 20.04 with one exception: If you try to install packages, you will receive: @@ -33,8 +33,8 @@ casper-client : Depends: libssl1.1 (>= 1.1.0) but it is not installable 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: ``` -curl -f -JLO http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb -sudo apt install ./libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb +curl -f -JLO http://security.ubuntu.com/ubuntu/pool/main/o/openssl/openssl_1.1.1f-1ubuntu2_amd64.deb +sudo apt install ./openssl_1.1.1f-1ubuntu2_amd64.deb ``` ## Required Number of Open Files @@ -46,25 +46,27 @@ Before beginning, [update the maximum open files limit](./open-files.md) for you If you were running a previous node on this box, this will clean up state. If packages are not installed, the `apt remove` may give errors, but this is not a problem. ```bash -sudo systemctl stop casper-node-launcher.service +sudo /etc/casper/node_util.py stop sudo apt remove -y casper-client sudo apt remove -y casper-node sudo apt remove -y casper-node-launcher sudo rm /etc/casper/casper-node-launcher-state.toml sudo rm -rf /etc/casper/1_* +sudo rm -rf /etc/casper/2_* sudo rm -rf /var/lib/casper/* ``` ## Required Packages -The following commands will set up the Casper Labs repository for packages: +The following commands will set up the Casper repository for packages: ```bash -echo "deb [arch=amd64] https://repo.casperlabs.io/releases focal main" | sudo tee -a /etc/apt/sources.list.d/casper.list -curl -O https://repo.casperlabs.io/casper-repo-pubkey.asc -sudo apt-key add casper-repo-pubkey.asc +sudo mkdir -m 0755 -p /etc/apt/keyrings/ +sudo curl https://repo.casper.network/casper-repo-pubkey.gpg --output /etc/apt/keyrings/casper-repo-pubkey.gpg +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 sudo apt update ``` +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. ## Required Tools @@ -127,16 +129,16 @@ 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 use the following Casper Labs public nodes: -* Testnet - NODE_ADDR=https://rpc.testnet.casperlabs.io +* Testnet - NODE_ADDR=https://node.testnet.casper.network -* Mainnet - NODE_ADDR=https://rpc.mainnet.casperlabs.io +* Mainnet - NODE_ADDR=https://node.mainnet.casper.network ### 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: +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_8: ```bash -PROTOCOL=1_5_2 +PROTOCOL=1_5_8 ``` ### Load `trusted_hash` in Config.toml of the Protocol Version @@ -144,8 +146,8 @@ PROTOCOL=1_5_2 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 +NODE_ADDR=https://node.mainnet.casper.network +PROTOCOL=1_5_8 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 ``` diff --git a/versioned_docs/version-2.0.0/resources/advanced/multi-sig/multi-sig-workflow.md b/versioned_docs/version-2.0.0/resources/advanced/multi-sig/multi-sig-workflow.md index a8b2a5534..aa986c0f7 100644 --- a/versioned_docs/version-2.0.0/resources/advanced/multi-sig/multi-sig-workflow.md +++ b/versioned_docs/version-2.0.0/resources/advanced/multi-sig/multi-sig-workflow.md @@ -78,7 +78,7 @@ casper-client account-address --public-key Update the weight of the primary key to 3 by calling the `update_associated_keys.wasm`. ```bash -casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ +casper-client put-deploy --node-address https://node.testnet.casper.network \ --chain-name "casper-test" \ --payment-amount 500000000 \ --secret-key $PATH/secret_key.pem \ @@ -90,16 +90,16 @@ casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ Verify that the deploy ran successfully. ```bash -casper-client get-deploy --node-address https://rpc.testnet.casperlabs.io/ +casper-client get-deploy --node-address https://node.testnet.casper.network ``` Retrieve the latest state root hash and check the primary account details. ```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 casper-client query-global-state \ ---node-address https://rpc.testnet.casperlabs.io/ \ +--node-address https://node.testnet.casper.network \ --state-root-hash \ --key account-hash- ``` @@ -143,7 +143,7 @@ Set up a multi-signature scheme for the account by updating the `deployment` and ```bash casper-client put-deploy \ ---node-address https://rpc.testnet.casperlabs.io \ +--node-address https://node.testnet.casper.network \ --chain-name casper-test \ --payment-amount 500000000 \ --secret-key $PATH/secret_key.pem \ @@ -155,16 +155,16 @@ casper-client put-deploy \ Verify that the deploy ran successfully. ```bash -casper-client get-deploy --node-address https://rpc.testnet.casperlabs.io/ +casper-client get-deploy --node-address https://node.testnet.casper.network ``` Retrieve the latest state root hash and check the primary account details. ```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 casper-client query-global-state \ ---node-address https://rpc.testnet.casperlabs.io/ \ +--node-address https://node.testnet.casper.network \ --state-root-hash \ --key account-hash- ``` @@ -217,7 +217,7 @@ The table below summarizes the updates. To add an associated key to the primary account, use the `add_account.wasm` provided. This example adds two keys to the primary account (`account-hash-d89c*`): `user_1` with `account-hash-e2d0*`, and `user_2` with `account-hash-04a9*`. ```bash -casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ +casper-client put-deploy --node-address https://node.testnet.casper.network \ --chain-name "casper-test" \ --payment-amount 500000000 \ --secret-key $PATH/secret_key.pem \ @@ -229,11 +229,11 @@ casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ Verify that the deploy ran successfully. ```bash -casper-client get-deploy --node-address https://rpc.testnet.casperlabs.io/ +casper-client get-deploy --node-address https://node.testnet.casper.network ``` ```bash -casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ +casper-client put-deploy --node-address https://node.testnet.casper.network \ --chain-name "casper-test" \ --payment-amount 500000000 \ --secret-key $PATH/secret_key.pem \ @@ -245,16 +245,16 @@ casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ Verify that the deploy ran successfully. ```bash -casper-client get-deploy --node-address https://rpc.testnet.casperlabs.io/ +casper-client get-deploy --node-address https://node.testnet.casper.network ``` Retrieve the latest state root hash and check the primary account details. ```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 casper-client query-global-state \ ---node-address https://rpc.testnet.casperlabs.io/ \ +--node-address https://node.testnet.casper.network \ --state-root-hash \ --key account-hash- ``` @@ -325,16 +325,16 @@ casper-client put-deploy --chain-name casper-test \ Verify that the deploy ran successfully. ```bash -casper-client get-deploy --node-address https://rpc.testnet.casperlabs.io/ +casper-client get-deploy --node-address https://node.testnet.casper.network ``` Retrieve the latest state root hash and check the primary account details. ```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 casper-client query-global-state \ ---node-address https://rpc.testnet.casperlabs.io/ \ +--node-address https://node.testnet.casper.network \ --state-root-hash \ --key account-hash- ``` @@ -384,22 +384,22 @@ casper-client sign-deploy -i hello_world_one_signature -k $PATH/user_2_secret_ke The deploy can be sent to the network using the `send-deploy` command: ```bash -casper-client send-deploy --node-address https://rpc.testnet.casperlabs.io -i hello_world_two_signatures +casper-client send-deploy --node-address https://node.testnet.casper.network -i hello_world_two_signatures ``` Verify that the deploy ran successfully. ```bash -casper-client get-deploy --node-address https://rpc.testnet.casperlabs.io/ +casper-client get-deploy --node-address https://node.testnet.casper.network ``` Retrieve the latest state root hash and check the primary account details. ```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 casper-client query-global-state \ ---node-address https://rpc.testnet.casperlabs.io/ \ +--node-address https://node.testnet.casper.network \ --state-root-hash \ --key account-hash- ``` @@ -421,7 +421,7 @@ Before removing a key, ensure the remaining associated keys can combine their we Given the current setup, the primary account will add an associated key, and then remove it. In other use cases, associated keys may need to combine their signatures to send a multi-sig deploy that removes a key. ```bash -casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ +casper-client put-deploy --node-address https://node.testnet.casper.network \ --chain-name "casper-test" \ --payment-amount 500000000 \ --secret-key $PATH/secret_key.pem \ @@ -433,16 +433,16 @@ casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ Verify that the deploy ran successfully. ```bash -casper-client get-deploy --node-address https://rpc.testnet.casperlabs.io/ +casper-client get-deploy --node-address https://node.testnet.casper.network ``` Retrieve the latest state root hash and check the primary account details. ```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 casper-client query-global-state \ ---node-address https://rpc.testnet.casperlabs.io/ \ +--node-address https://node.testnet.casper.network \ --state-root-hash \ --key account-hash- ``` @@ -496,7 +496,7 @@ The table below summarizes the updates after calling the `add_account.wasm`. The `remove_account.wasm` will remove the newly added account to demonstrate the possibility of removing associated keys that may have been compromised. ```bash -casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ +casper-client put-deploy --node-address https://node.testnet.casper.network \ --chain-name "casper-test" \ --payment-amount 500000000 \ --secret-key $PATH/secret_key.pem \ @@ -507,16 +507,16 @@ casper-client put-deploy --node-address https://rpc.testnet.casperlabs.io/ \ Verify that the deploy ran successfully. ```bash -casper-client get-deploy --node-address https://rpc.testnet.casperlabs.io/ +casper-client get-deploy --node-address https://node.testnet.casper.network/ ``` Retrieve the latest state root hash and check the primary account details. ```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/ casper-client query-global-state \ ---node-address https://rpc.testnet.casperlabs.io/ \ +--node-address https://node.testnet.casper.network/ \ --state-root-hash \ --key account-hash- ``` diff --git a/versioned_docs/version-2.0.0/resources/advanced/storage-workflow.md b/versioned_docs/version-2.0.0/resources/advanced/storage-workflow.md index 4e6c58367..801f6738c 100644 --- a/versioned_docs/version-2.0.0/resources/advanced/storage-workflow.md +++ b/versioned_docs/version-2.0.0/resources/advanced/storage-workflow.md @@ -18,7 +18,7 @@ Both the [`put_key`](https://docs.rs/casper-contract/latest/casper_contract/cont ### `storage::write` / `storage::read` -[`storage::write`](https://docs.rs/casper-contract/latest/casper_contract/contract_api/storage/fn.write.html) writes a given value to a previously established URef (created using [`storage::new_uref`](https://docs.rs/casper-contract/latest/casper_contract/contract_api/storage/fn.new_uref.html)). Unlike `put_key`, this value is not one of the `Key` types listed above, but rather any of the potential [`CLType`](https://docs.casperlabs.io/developers/json-rpc/types_cl/#cltype)s as outlined. [`storage::read`](https://docs.rs/casper-contract/latest/casper_contract/contract_api/storage/fn.read.html) provides a method to retrieve these values from the associated URef. +[`storage::write`](https://docs.rs/casper-contract/latest/casper_contract/contract_api/storage/fn.write.html) writes a given value to a previously established URef (created using [`storage::new_uref`](https://docs.rs/casper-contract/latest/casper_contract/contract_api/storage/fn.new_uref.html)). Unlike `put_key`, this value is not one of the `Key` types listed above, but rather any of the potential [`CLType`](https://docs.casper.network/developers/json-rpc/types_cl)s as outlined. [`storage::read`](https://docs.rs/casper-contract/latest/casper_contract/contract_api/storage/fn.read.html) provides a method to retrieve these values from the associated URef. ### `storage:dictionary_put` / `storage::dictionary_get` diff --git a/versioned_docs/version-2.0.0/resources/beginner/querying-network.md b/versioned_docs/version-2.0.0/resources/beginner/querying-network.md index e8b2b5e8f..1d8872cda 100644 --- a/versioned_docs/version-2.0.0/resources/beginner/querying-network.md +++ b/versioned_docs/version-2.0.0/resources/beginner/querying-network.md @@ -92,7 +92,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 a306a9cf869e52fe9eacdc28aade94215112cc04b6737b3669c35568a47a7dc2 \ --key 01360af61b50cdcb7b92cffe2c99315d413d34ef77fadee0c105cc4f1d4120f986 ``` @@ -219,7 +219,7 @@ The `-v` option generates verbose output, printing the RPC request and response ```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 a306a9cf869e52fe9eacdc28aade94215112cc04b6737b3669c35568a47a7dc2 \ --purse-identifier 01360af61b50cdcb7b92cffe2c99315d413d34ef77fadee0c105cc4f1d4120f986 ```