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/condor/condor.sidebar.js b/condor/condor.sidebar.js index b07564c2a..52a08f115 100644 --- a/condor/condor.sidebar.js +++ b/condor/condor.sidebar.js @@ -26,6 +26,7 @@ const sidebars = { 'validator-rewards', 'zug', 'devnet-info', + 'migration-guide', ], // // { diff --git a/condor/migration-guide.md b/condor/migration-guide.md new file mode 100644 index 000000000..2be7a4b99 --- /dev/null +++ b/condor/migration-guide.md @@ -0,0 +1,142 @@ +# Casper 2.0 Migration Guide for Crypto Exchanges + +The Casper Network is in the process of upgrading to Casper 2.0, which introduces breaking changes to the node software, the protocol, and the API Interfaces. + +In order to maintain compatibility with Casper Network after the upgrade of Mainnet, which is tentatively scheduled for end of March/mid-April 2025, crypto exchanges that offer $CSPR pairs, allow for $CSPR deposits and withdrawals and/or allow their users to stake $CSPR, may need to upgrade their integration with Casper Network. This migration guide will help you determine whether, and if so - how to update your integration in preparation for the network upgrade. + +This guide will help you assess whether any changes are needed on your end and, if so, how to update your integration to ensure compatibility with Casper 2.0. + +## Should I update my integration? + +Exchanges integrate with Casper Network at different levels, offering varying $CSPR functionalities. + +Whether you need to migrate before Casper 2.0’s Mainnet launch depends on your integration. The table below can help you determine your next steps. + +| Integration Type | Required actions | +|---------------------|-------------| +| **Indirect integration via 3rd party Partner [](a "Exchanges that don’t directly integrate with Casper Network but use liquidity from other exchanges via APIs.")** | No migration required, assuming the partner updates their integration.| +| **[Running your own node](#) [](a "Exchanges that run their own node and interface with its RPC methods")** | Node software upgrade is required | +| **[SDK Integration](#) [](a "Exchanges that use the publicly available Casper SDKs(e.g. JavaScript SDK, C#.NET SDK, Go SDK, etc.)")** | Depending on the SDK language (e.g. JS, Go) and the methods you use, upgrade to a Casper 2.0 compatible version is required| + +More information about the specific changes in, and features introduced by Casper 2.0 can be found [here](https://docs.casper.network/condor/index). + +NOTE: If you have additional use cases or are using a different integration type, please contact us at exchange-support@casper.network for assistance. + +## Integration Types + +### Running your own node +If you run your own node, your migration experience will likely involve two distinct paths. + +On the one hand, as a node operator you will participate in the actual Mainnet upgrade of Casper Network, which will take place a specific date and time (you will have a number of days to stage the upgrade in advance of the activation point), while on the other hand you will have to possibly migrate the method by which you interface with your own node. Continue with the migration details provided for exchanges with direct RPC integration or SDK integration, depending on which applies to you. + +### SDK Integration +Casper 2.0 introduces changes essential for the network’s future evolution, which also include modifications to data structures that impact API responses. Since historical blockchain data cannot be altered due to cryptographic signatures, both legacy and new data structures will coexist in Casper 2.0 and be returned by the API. + +To simplify the transition for developers, we prepared new backward and forward-compatible Casper SDKs that provide a uniform data interface across both Casper 1.5.x and Casper 2.0. This ensures that developers can work with consistent data types, regardless of the network version in which the data was created. + +Upgrading to a new version of Casper SDKs makes it possible to have one integration that guarantees future compatibility with Casper 2.0 while maintaining the existing compatibility with Casper 1.5. The network upgrade will require no changes in the consumer code, ensuring no disruption in the service. + +Please see instructions below for your specific SDK language: + +**JavaScript:** +- The appropriate SDK to upgrade to is the latest v5.x release can be found [here](https://github.com/casper-ecosystem/casper-js-sdk/releases) +- Common use case examples (connect to RPC, send a transfer, etc.) can be found in [Casper JS SDK 5.0 README](https://github.com/casper-ecosystem/casper-js-sdk/tree/feat-5.0.0?tab=readme-ov-file#usage-examples) +- To upgrade your integration, follow the detailed [V2 to V5 Migration Guide](https://github.com/casper-ecosystem/casper-js-sdk/blob/feat-5.0.0/resources/migration-guide-v2-v5.md) + +**C# / .NET:** +- The appropriate SDK to upgrade to is the latest v3.x release can be found [here](https://github.com/make-software/casper-net-sdk/releases). +- Typical use case examples (connect to RPC, send a transfer, etc.) can be found in [the Examples folder](https://github.com/make-software/casper-net-sdk/tree/casper-2.0.0/Docs/Examples). +- To upgrade your integration, follow the document [Migration from Casper .NET SDK v2.x to v3.0](https://github.com/make-software/casper-net-sdk/blob/casper-2.0.0/Docs/Articles/Casper20MigrationGuide.md). + +**Go:** +- The appropriate SDK to upgrade to is the latest v2.x release found [here](https://github.com/make-software/casper-go-sdk/releases). +- Typical use case examples (connect to RPC, send a transfer, etc.) can be found in the [README](https://github.com/make-software/casper-go-sdk/blob/master/README.md). + +**Java:** +- The appropriate SDK to upgrade to is the latest v2.x release can be found [here](https://github.com/casper-network/casper-java-sdk/releases). +- Casper Java SDK in Maven Repository can be found in the link [here](https://central.sonatype.com/artifact/network.casper/casper-java-sdk/2.7.0-BETA.4/overview). + +**Other:** +- If you are using an SDK not listed in this chapter, please contact the Casper Exchange Support Team. + + +## Important changes/updates in Casper 2.0 + +Casper 2.0 introduces new block structures, transaction formats and retrograde support. More details can be found below. + +### 1. New Block Structure + +- The main difference is in record formats, but cryptographic signing remains the same. +- Exchanges must adapt to new block structure. + + +### 2. Transaction Formats + +**Transactions in Casper 2.0** + +Transactions are a higher-order concept that encapsulate both **Deploys** and **V1 transactions**. + +A **Transaction** is a polymorphic data structure that, for now, can be either: +- A **Deploy**, which remains compliant with the **1.x definition**. +- A **TransactionV1**, representing the new type of transaction, introduced alongside the `Deploy` type. + +Secondly, Casper 2.0 includes new methods, renamed methods and methods with a change in response format. + +At the same time, Casper 1.x deploys will continue to be accepted by Casper 2.0, hence if your entire integration comprises only the submission of Deploys (such as transfers in and out of accounts), you may want to take into account the below considerations prior to Mainnet activation of Casper 2.0. + +- The new transaction format provides more efficient processing and additional features. +- Exchanges must adapt new transaction formats. + +#### 2.1. Transaction Handling and API Adjustments + +- How exchanges should update their transaction processing mechanisms. +- New API endpoints and modifications to existing ones +- Expected changes in response formats + +>[!IMPORTANT] +> **Deprecation of 1.x Structures (e.g. Deploys)** +> +> **1.x structures, such as Deploys, are being deprecated.** While they will continue to function in **Casper 2.0**, they are scheduled to be phased out. +> +> Exchanges should be aware of this evolution and prepare for the transition towards **TransactionV1** as the go-forward model. + +### 3. Backward Compatibility/Retrograde Support + +### 4. Sidecar Adjustments and Integration with Exchange Systems: + +- How the sidecar configuration needs to be updated. + +- Common scenarios where the sidecar may disconnect and how to mitigate them. + +## Minimal vs. Full Migration + +It is highly recommended to switch entirely to new API endpoints and adopt new transaction formats. + +However, where full migration is not feasible in the short term, exchanges may choose to adapt minimal migration. + +Minimal migration will be adapting new block and transaction structures. + + +## Casper Exchange Support Team +As an exchange, you likely already have a shared Telegram or Slack channel with the Casper Exchange Support Team. Please keep the Casper team apprised of your progress on migration, as we want to ensure that on the one hand you receive all the possible support from us, and on the other we track ecosystem readiness for Casper 2.0, of which you are an essential component. + +If you do not have access to an open channel with the Casper Exchange Support Team, please reach out via one of the following channels: + +Telegram: Jiuhong Sun - Exchange Support Engineer: https://t.me/jiu_hong + +Email: Casper Exchange Support: exchange-support@casper.network + + +## Summary +Casper 2.0 is coming to Mainnet in the very foreseeable future, and we're honored and excited that you and your user community are part of this massively consequential event in the history of the Casper blockchain. In order to make sure you and your users are prepared for the Mainnet activation of Casper 2.0, please follow these steps: + +Determine your [current type of integration](https://docs.make.software/exchange-migration-draft#should-i-migrate-my-integration) with Casper Network + +If your integration type requires a migration, follow the [Migration Documentation](https://docs.make.software/exchange-migration-draft#integration-specific-migration-documentation) for your integration + +Actively communicate with the [Casper Exchange Support Team](https://docs.make.software/exchange-migration-draft#casper-exchange-support-team), to receive support for a successful migration, and to allow Casper to track ecosystem readiness. + + + + + diff --git a/config/sidebar.config.js b/config/sidebar.config.js index 37c392225..67c133887 100644 --- a/config/sidebar.config.js +++ b/config/sidebar.config.js @@ -124,8 +124,7 @@ module.exports = { id: "developers/writing-onchain-code/index", }, items: [ - "developers/writing-onchain-code/getting-started", - "developers/writing-onchain-code/assembly-script", + "developers/writing-onchain-code/getting-started", "developers/writing-onchain-code/simple-contract", "developers/writing-onchain-code/testing-contracts", "developers/writing-onchain-code/upgrading-contracts", 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/developers/writing-onchain-code/assembly-script.md b/docs/developers/writing-onchain-code/assembly-script.md deleted file mode 100644 index 191e4a06c..000000000 --- a/docs/developers/writing-onchain-code/assembly-script.md +++ /dev/null @@ -1,122 +0,0 @@ -# Getting Started with AssemblyScript - -Casper Labs maintains the [casper-contract](https://www.npmjs.com/package/casper-contract) to allow developers to create smart contracts using [AssemblyScript](https://www.npmjs.com/package/assemblyscript). The package source is hosted in the [main Casper Network repository](https://github.com/casper-network/casper-node/tree/master/smart_contracts/contract_as/assembly). - -## Prerequisites {#prerequisites} - -### Installing AssemblyScript {#installing-assemblyscript} - -Installation of AssemblyScript requires [Node.js](https://nodejs.org/). - -After installation of Node.js, the following command will install AssemblyScript: - -``` -npm i assemblyscript -``` - -Full instructions and details for installing AssemblyScript can be found [here](https://www.npmjs.com/package/assemblyscript). - -## Development Environment Setup {#development-environment-setup} - -### Installing the Casper Package {#installing-the-casper-package} - -The `casper-contract` package can be installed using the following command: - -``` -npm i casper-contract -``` - -The Assemblyscript contract API documentation can be found at https://www.npmjs.com/package/casper-contract. - -### Creating a Project {#creating-a-project} - -For each smart contract, it is necessary to create a project directory and initialize it. - -The `npm init` process prompts for various details about the project. Answer as you see fit, but you may safely default everything except `name`, which needs to be specified. In this guide, we will refer to the contract name as `your-contract-name`. - -```sh -mkdir project -cd project -npm init -``` - -Then install AssemblyScript and this package in the project directory. - -```sh -npm install --save-dev assemblyscript@0.9.1 -npm install --save casper-contract -``` - -### Script Entries {#script-entries} - -Add script entries for AssemblyScript to your project's `package.json`. Note that your contract name is used for the name of the Wasm file. Replace _your-contract-name_ with the name of your contract. - -```json -{ - "name": "your-contract-name", - ... - "scripts": { - "asbuild:optimized": "asc assembly/index.ts -b dist/your-contract-name.wasm --validate --optimize --use abort=", - "asbuild": "npm run asbuild:optimized", - ... - }, - ... -} -``` - -In the project root, create an `index.js` file with the following contents. Replace _your-contract-name_ with the name of your contract. - -```js -const fs = require("fs"); - -const compiled = new WebAssembly.Module(fs.readFileSync(__dirname + "/dist/your-contract-name.wasm")); - -const imports = { - env: { - abort(_msg, _file, line, column) { - console.error("abort called at index.ts:" + line + ":" + column); - }, - }, -}; - -Object.defineProperty(module, "exports", { - get: () => new WebAssembly.Instance(compiled, imports).exports, -}); -``` - -Next, create a directory called `assembly`, and in that directory, create a file called `tsconfig.json` in the following way: - -```json -{ - "extends": "../node_modules/assemblyscript/std/assembly.json", - "include": ["./**/*.ts"] -} -``` - -### Sample Smart Contract {#sample-smart-contract} - -In the `assembly` directory, also create an `index.ts` file, where the code for the contract needs to go. - -You can use the following sample snippet, which demonstrates a simple smart contract that immediately returns an error and writes a message to a block when executed on a Casper network. - -```typescript -//@ts-nocheck -import { Error, ErrorCode } from "casper-contract/error"; - -// simplest possible feedback loop -export function call(): void { - Error.fromErrorCode(ErrorCode.None).revert(); // ErrorCode: 1 -} -``` - -If you prefer a more complicated first contract, you can look at example contracts on the [Casper Ecosystem GitHub](https://github.com/casper-ecosystem) repository for inspiration. - -### Compile to Wasm {#compile-to-wasm} - -To compile the contract to Wasm, use _npm_ to run the _asbuild_ script from the project root: - -``` -npm run asbuild -``` - -If the build is successful, there will be a `dist` folder in the `root` folder and in it should be `your-contract-name.wasm`. diff --git a/docs/developers/writing-onchain-code/index.md b/docs/developers/writing-onchain-code/index.md index 0ce3907ef..690e7df38 100644 --- a/docs/developers/writing-onchain-code/index.md +++ b/docs/developers/writing-onchain-code/index.md @@ -14,7 +14,6 @@ This section shows you how to write session code and smart contracts in Rust and | Title | Description | | ------------------------------------------- | ------------------------------- | |[Getting Started with Rust](./getting-started.md)| An introduction to using Rust with the Casper Platform| -|[Getting Started with AssemblyScript](./assembly-script.md) | An introduction to using AssemblyScript with the Casper Platform | |[Writing a Basic Smart Contract in Rust](./simple-contract.md) | An example of a smart contract built in Rust| |[Unit Testing Smart Contracts](./testing-contracts.md) | Steps to test contract code using the unit testing framework| |[Upgrading and Maintaining Smart Contracts](./upgrading-contracts.md)| An introduction to versioning smart contracts| diff --git a/docs/operators/becoming-a-validator/bonding.md b/docs/operators/becoming-a-validator/bonding.md index faf764b6c..605e7c709 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. @@ -56,7 +66,7 @@ Calling the `add_bid` entry point on the auction contract has a fixed cost of 2. **Example:** -This example command uses the Casper Testnet to bid 10,000 CSPR for a validating slot: +This example command uses the Casper Testnet to bid 100,000 CSPR for a validating slot: ```bash sudo -u casper casper-client put-deploy \ @@ -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='$[100000 * 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=''" ``` @@ -127,7 +137,7 @@ sudo -u casper casper-client put-deploy \ --payment-amount 3000000000 \ --session-path ~/casper-node/target/wasm32-unknown-unknown/release/add_bid.wasm \ --session-arg "public_key:public_key='01c297d2931fec7e22b2fb1ae3ca5afdfacc2c82ba501e8ed158eecef82b4dcdee'" \ ---session-arg "amount:U512='$[10000 * 1000000000]'" \ +--session-arg "amount:U512='$[100000 * 1000000000]'" \ --session-arg "delegation_rate:u8='10'" ``` 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..43fc95fef 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: @@ -229,5 +214,4 @@ Here is a summary of the links mentioned on this page: - [Confirming that the node is synchronized](./joining.md#step-7-confirm-the-node-is-synchronized) - [Monitoring and consuming events](../../developers/dapps/monitor-and-consume-events.md) - [Private network access control](../setup-network/create-private.md#network-access-control) -- [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) 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 ```