Skip to content

Commit 4c8e02e

Browse files
authored
Merge pull request #17 from casper-network/dev
Promote latest to staging.
2 parents d3b8d3a + 853e7ae commit 4c8e02e

File tree

11 files changed

+92
-166
lines changed

11 files changed

+92
-166
lines changed

docs/operators/becoming-a-validator/bonding.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Calling the `add_bid` entry point on the auction contract has a fixed cost of 2.
6666

6767
**Example:**
6868

69-
This example command uses the Casper Testnet to bid 100,000 CSPR for a validating slot:
69+
This example command uses the Casper Testnet to bid 10,000 CSPR for a validating slot:
7070

7171
```bash
7272
sudo -u casper casper-client put-deploy \
@@ -77,7 +77,7 @@ sudo -u casper casper-client put-deploy \
7777
--session-hash hash-93d923e336b20a4c4ca14d592b60e5bd3fe330775618290104f9beb326db7ae2 \
7878
--session-entry-point add_bid \
7979
--session-arg "public_key:public_key='01c297d2931fec7e22b2fb1ae3ca5afdfacc2c82ba501e8ed158eecef82b4dcdee'" \
80-
--session-arg "amount:U512='$[100000 * 1000000000]'" \
80+
--session-arg "amount:U512='$[10000 * 1000000000]'" \
8181
--session-arg "delegation_rate:u8='10'"
8282
```
8383

@@ -137,7 +137,7 @@ sudo -u casper casper-client put-deploy \
137137
--payment-amount 3000000000 \
138138
--session-path ~/casper-node/target/wasm32-unknown-unknown/release/add_bid.wasm \
139139
--session-arg "public_key:public_key='01c297d2931fec7e22b2fb1ae3ca5afdfacc2c82ba501e8ed158eecef82b4dcdee'" \
140-
--session-arg "amount:U512='$[100000 * 1000000000]'" \
140+
--session-arg "amount:U512='$[10000 * 1000000000]'" \
141141
--session-arg "delegation_rate:u8='10'"
142142
```
143143

docs/operators/becoming-a-validator/recovering.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ sudo -u casper casper-client put-deploy \
8686
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
8787
2. `secret-key` - The file name containing the secret key of the account paying for the Deploy
8888
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*
89-
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)
89+
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)
9090
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:
9191

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

103103
:::tip
104104

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

107107
:::
108108

versioned_docs/version-2.0.0/developers/writing-onchain-code/assembly-script.md

-122
This file was deleted.

versioned_docs/version-2.0.0/developers/writing-onchain-code/index.md

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ This section shows you how to write session code and smart contracts in Rust and
1414
| Title | Description |
1515
| ------------------------------------------- | ------------------------------- |
1616
|[Getting Started with Rust](./getting-started.md)| An introduction to using Rust with the Casper Platform|
17-
|[Getting Started with AssemblyScript](./assembly-script.md) | An introduction to using AssemblyScript with the Casper Platform |
1817
|[Writing a Basic Smart Contract in Rust](./simple-contract.md) | An example of a smart contract built in Rust|
1918
|[Unit Testing Smart Contracts](./testing-contracts.md) | Steps to test contract code using the unit testing framework|
2019
|[Upgrading and Maintaining Smart Contracts](./upgrading-contracts.md)| An introduction to versioning smart contracts|

versioned_docs/version-2.0.0/operators/becoming-a-validator/bonding.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ It is recommended that a bonding request be sent once the node has completed the
88

99
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.
1010

11+
## Minimum Bid Amount
12+
13+
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.
14+
15+
```toml
16+
# Minimum bid amount allowed in motes. Withdrawing one's bid to an amount strictly less than
17+
# the value specified will be treated as a full unbond of a validator and their associated delegators
18+
minimum_bid_amount = 100_000_000_000_000
19+
```
20+
1121
## Method 1: Bonding with the System Auction Contract {#bonding-system-auction}
1222

1323
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.
@@ -88,8 +98,8 @@ sudo -u casper casper-client put-deploy \
8898
--session-path $HOME/casper-node/target/wasm32-unknown-unknown/release/add_bid.wasm \
8999
--session-arg "public_key:public_key='<PUBLIC_KEY_HEX>'" \
90100
--session-arg "amount:u512='<BID-AMOUNT>'" \
91-
--session-arg "delegation_rate:u8='<PERCENT_TO_KEEP_FROM_DELEGATORS>'"
92-
--session-arg "minimum_delegation_amount:u64='<MINIMUM_DELEGATION_AMOUNT>'"
101+
--session-arg "delegation_rate:u8='<PERCENT_TO_KEEP_FROM_DELEGATORS>'" \
102+
--session-arg "minimum_delegation_amount:u64='<MINIMUM_DELEGATION_AMOUNT>'" \
93103
--session-arg "maximum_delegation_amount:u64='<MAXIMUM_DELEGATION_AMOUNT>'"
94104
```
95105

versioned_docs/version-2.0.0/operators/becoming-a-validator/recovering.md

+22-8
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ sudo -u casper casper-client put-deploy \
8686
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
8787
2. `secret-key` - The file name containing the secret key of the account paying for the Deploy
8888
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*
89-
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)
89+
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)
9090
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:
9191

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

103103
:::tip
104104

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

107107
:::
108108

109-
**Example:**
109+
**Examples:**
110110

111111
This example uses the Casper Testnet to reactivate a bid:
112112

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

124+
This example uses the Casper Mainnet to reactivate a bid:
125+
126+
```bash
127+
sudo -u casper casper-client put-deploy \
128+
--node-address https://node.mainnet.casper.network \
129+
--secret-key /etc/casper/validator_keys/secret_key.pem \
130+
--chain-name casper \
131+
--payment-amount 2500000000 \
132+
--session-hash hash-ccb576d6ce6dec84a551e48f0d0b7af89ddba44c7390b690036257a04a3ae9ea \
133+
--session-entry-point activate_bid \
134+
--session-arg "validator_public_key:public_key='$(cat /etc/casper/validator_keys/public_key_hex)'"
135+
```
136+
137+
124138
Next, [check the bid activation](#checking-the-bid-activation) status.
125139

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

128-
The second method to rejoin the network is to reactivate your bid using the `activate_bid.wasm`.
142+
The second method to rejoin the network is to reactivate your bid using the `activate_bid.wasm`.
129143

130144

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

163177
```bash
164178
sudo -u casper casper-client put-deploy \
165-
--node-address http://65.21.75.254:7777 \
179+
--node-address https://node.mainnet.casper.network \
166180
--secret-key /etc/casper/validator_keys/secret_key.pem \
167181
--chain-name casper-test \
168182
--payment-amount 5000000000 \

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

+47-5
Original file line numberDiff line numberDiff line change
@@ -150,16 +150,58 @@ Provide the path to the secret keys for the node. This path is set to `etc/caspe
150150

151151
### Networking and Gossiping {#networking--gossiping}
152152

153-
The node requires a publicly accessible IP address. `node_util.py` allows IP for network address translation (NAT) setup.
154-
Specify the public IP address of the node with the `/etc/casper/node_util.py stage_protocols [config file] --ip 'my.ip.goes.here'`.
155-
This will use the IP given rather than query for the external IP automatically.
156-
153+
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.
157154

158155
The following default values are specified in the file if you want to change them:
159156

160157
- The port that will be used for status and transactions
161158
- The port used for networking
162-
- Known_addresses - these are the bootstrap nodes you will build peers from
159+
- Known_addresses - these are the bootstrap nodes (there is no need to change these)
160+
161+
### Enabling Speculative Execution
162+
163+
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.
164+
165+
`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.
166+
167+
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.
168+
169+
#### Example Config.toml configuration with speculative execution enabled
170+
171+
```
172+
# ========================================================================
173+
# Configuration options for the speculative execution JSON-RPC HTTP server
174+
# ========================================================================
175+
[speculative_exec_server]
176+
177+
# Flag which enables the speculative execution JSON-RPC HTTP server.
178+
enable_server = true
179+
180+
# Listening address for speculative execution JSON-RPC HTTP server. If the port
181+
# is set to 0, a random port will be used.
182+
#
183+
# If the specified port cannot be bound to, a random port will be tried instead.
184+
# If binding fails, the speculative execution JSON-RPC HTTP server will not run,
185+
# but the node will be otherwise unaffected.
186+
#
187+
# The actual bound address will be reported via a log line if logging is enabled.
188+
address = '0.0.0.0:7778'
189+
190+
# The global max rate of requests (per second) before they are limited.
191+
# Request will be delayed to the next 1 second bucket once limited.
192+
qps_limit = 1
193+
194+
# Maximum number of bytes to accept in a single request body.
195+
max_body_bytes = 2_621_440
196+
197+
# Specifies which origin will be reported as allowed by speculative execution server.
198+
#
199+
# If left empty, CORS will be disabled.
200+
# If set to '*', any origin is allowed.
201+
# 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).
202+
cors_origin = ''
203+
204+
```
163205

164206
## Rust Client Installation {#client-installation}
165207

versioned_docs/version-2.0.0/operators/setup/casper-sidecar.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ systemctl status casper-sidecar
7777
casper-sidecar.service - Casper Event Sidecar
7878
Loaded: loaded (/lib/systemd/system/casper-sidecar.service; enabled; vendor preset: enabled)
7979
Active: active (running) since Wed 2022-12-07 20:33:29 UTC; 1min 3s ago
80-
Docs: https://docs.casperlabs.io
80+
Docs: https://docs.casper.network
8181
Main PID: 16707 (casper-si)
8282
Tasks: 5 (limit: 9401)
8383
Memory: 7.1M

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ casper-client : Depends: libssl1.1 (>= 1.1.0) but it is not installable
3333
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:
3434

3535
```
36-
curl -f -JLO http://security.ubuntu.com/ubuntu/pool/main/o/openssl/openssl_1.1.1f-1ubuntu2_amd64.deb
37-
sudo apt install ./openssl_1.1.1f-1ubuntu2_amd64.deb
36+
curl -f -JLO http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
37+
sudo apt install ./libssl1.1_1.1.1f-1ubuntu2_amd64.deb
3838
```
3939

4040
## Required Number of Open Files

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

+3-19
Original file line numberDiff line numberDiff line change
@@ -189,31 +189,16 @@ If this port is closed, the requests coming to this port will not be served, but
189189

190190
## Setting up Firewall Rules
191191

192-
To limit inbound traffic to the node’s endpoints, you can set firewall rules similar to the `ufw` commands below:
192+
To limit inbound traffic to the node’s endpoints, you can set firewall rules.
193193

194-
```bash
195-
sudo apt install ufw -y
196-
sudo ufw disable
197-
sudo ufw reset
198-
sudo ufw default allow outgoing
199-
sudo ufw default deny incoming
200-
sudo ufw limit ssh
201-
sudo ufw limit 7777/tcp
202-
sudo ufw limit 8888/tcp
203-
sudo ufw limit 35000/tcp
204-
sudo ufw enable
205-
```
206-
207-
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.
208-
209-
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.
194+
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).
210195

196+
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.
211197

212198
## Restricting Access for Private Networks
213199

214200
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).
215201

216-
217202
## Summary of Related Links
218203

219204
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:
229214
- [Confirming that the node is synchronized](./joining.md#step-7-confirm-the-node-is-synchronized)
230215
- [Monitoring and consuming events](../../developers/dapps/monitor-and-consume-events.md)
231216
- [Private network access control](../setup-network/create-private.md#network-access-control)
232-
- [FAQs for a basic validator node ](https://support.casperlabs.io/hc/en-gb/sections/6960448246683-Node-Operation-FAQ)
233217
- [External FAQs on Mainnet and Testnet validator node setup](https://docs.cspr.community/docs/faq-validator.html)

0 commit comments

Comments
 (0)