Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Promote latest to staging. #17

Merged
merged 2 commits into from
Mar 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/operators/becoming-a-validator/bonding.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,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 100,000 CSPR for a validating slot:
This example command uses the Casper Testnet to bid 10,000 CSPR for a validating slot:

```bash
sudo -u casper casper-client put-deploy \
Expand All @@ -77,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='$[100000 * 1000000000]'" \
--session-arg "amount:U512='$[10000 * 1000000000]'" \
--session-arg "delegation_rate:u8='10'"
```

Expand Down Expand Up @@ -137,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='$[100000 * 1000000000]'" \
--session-arg "amount:U512='$[10000 * 1000000000]'" \
--session-arg "delegation_rate:u8='10'"
```

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

- **Testnet**: `hash-93d923e336b20a4c4ca14d592b60e5bd3fe330775618290104f9beb326db7ae2`
Expand All @@ -102,7 +102,7 @@ The command will return a deploy hash, which is needed to verify the deploy's pr

:::tip

Calling the `activate_bid` entry point on the auction contract has a fixed cost of 10,000 motes.
Calling the `activate_bid` entry point on the auction contract has a fixed cost of 2,500,000,000 motes.

:::

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ It is recommended that a bonding request be sent once the node has completed the

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

## Minimum Bid Amount

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

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

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

This method submits a bid using the system auction contract. Call the existing `add_bid` entry point from the system auction contract. Using this method, you do not need to build any contracts, reducing costs and complexity.
Expand Down Expand Up @@ -88,8 +98,8 @@ sudo -u casper casper-client put-deploy \
--session-path $HOME/casper-node/target/wasm32-unknown-unknown/release/add_bid.wasm \
--session-arg "public_key:public_key='<PUBLIC_KEY_HEX>'" \
--session-arg "amount:u512='<BID-AMOUNT>'" \
--session-arg "delegation_rate:u8='<PERCENT_TO_KEEP_FROM_DELEGATORS>'"
--session-arg "minimum_delegation_amount:u64='<MINIMUM_DELEGATION_AMOUNT>'"
--session-arg "delegation_rate:u8='<PERCENT_TO_KEEP_FROM_DELEGATORS>'" \
--session-arg "minimum_delegation_amount:u64='<MINIMUM_DELEGATION_AMOUNT>'" \
--session-arg "maximum_delegation_amount:u64='<MAXIMUM_DELEGATION_AMOUNT>'"
```

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

- **Testnet**: `hash-93d923e336b20a4c4ca14d592b60e5bd3fe330775618290104f9beb326db7ae2`
Expand All @@ -102,30 +102,44 @@ The command will return a deploy hash, which is needed to verify the deploy's pr

:::tip

Calling the `activate_bid` entry point on the auction contract has a fixed cost of 10,000 motes.
Calling the `activate_bid` entry point on the auction contract has a fixed cost of 2,500,000,000 motes.

:::

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

This example uses the Casper Testnet to reactivate a bid:

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

This example uses the Casper Mainnet to reactivate a bid:

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


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

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

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


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

```bash
sudo -u casper casper-client put-deploy \
--node-address http://65.21.75.254:7777 \
--node-address https://node.mainnet.casper.network \
--secret-key /etc/casper/validator_keys/secret_key.pem \
--chain-name casper-test \
--payment-amount 5000000000 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,16 +150,58 @@ 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. `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 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 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 you will build peers from
- 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 = ''

```

## Rust Client Installation {#client-installation}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ systemctl status casper-sidecar
casper-sidecar.service - Casper Event Sidecar
Loaded: loaded (/lib/systemd/system/casper-sidecar.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2022-12-07 20:33:29 UTC; 1min 3s ago
Docs: https://docs.casperlabs.io
Docs: https://docs.casper.network
Main PID: 16707 (casper-si)
Tasks: 5 (limit: 9401)
Memory: 7.1M
Expand Down
4 changes: 2 additions & 2 deletions versioned_docs/version-2.0.0/operators/setup/install-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/openssl_1.1.1f-1ubuntu2_amd64.deb
sudo apt install ./openssl_1.1.1f-1ubuntu2_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
Expand Down
22 changes: 3 additions & 19 deletions versioned_docs/version-2.0.0/operators/setup/node-endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)
Loading