Skip to content

Commit

Permalink
Update node CLI with ws params removal
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinonard committed Jul 24, 2023
1 parent da9ef98 commit 6c187a7
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 43 deletions.
6 changes: 3 additions & 3 deletions docs/build/EVM/developer-tooling/own-RPC.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ The EVM RPC server is disabled by default. To enable it, append the `--enable-ev
:::

```
astar-collator --chain=shiden --enable-evm-rpc --unsafe-rpc-external --unsafe-ws-external
astar-collator --chain=shiden --enable-evm-rpc --unsafe-rpc-external
```

The launch string above will start an Astar Collator on Shiden network, open up an HTTP endpoint on port `9933`, and a WS endpoint on port `9944`.
The launch string above will start an Astar Collator on Shiden network, open up an WS/HTTP endpoint on port `9944`.

We also recommend paying attention to the `--ws-max-connections` parameter. By default this value is relatively small, so it may be beneficial to increase it to a few thousand.
We also recommend paying attention to the `--rpc-max-connections` parameter. By default this value is relatively small, so it may be beneficial to increase it to a few thousand.
6 changes: 3 additions & 3 deletions docs/build/EVM/evm-debug-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ For example, for the `debug_traceTransaction` method, you can make the following
:::

```
curl http://127.0.0.1:9933 -H "Content-Type:application/json;charset=utf-8" -d \
curl http://127.0.0.1:9944 -H "Content-Type:application/json;charset=utf-8" -d \
'{
"jsonrpc":"2.0",
"id":1,
Expand All @@ -85,7 +85,7 @@ The node responds with the step-by-step replayed transaction information.
For the `trace_filter` call, you can make the following JSON RPC request in your terminal (in this case, the filter is from block 20000 to 25000, only for transactions where the recipient is 0x4E0078423a39EfBC1F8B5104540aC2650a756577, it will start with a zero offset and provide the first 20 traces):

```
curl http://127.0.0.1:9933 -H "Content-Type:application/json;charset=utf-8" -d \
curl http://127.0.0.1:9944 -H "Content-Type:application/json;charset=utf-8" -d \
'{
"jsonrpc":"2.0",
"id":1,
Expand All @@ -106,7 +106,7 @@ Let's get pool status using `curl` HTTP POST request.
:::

```
curl http://127.0.0.1:9933 -H "Content-Type:application/json;charset=utf-8" -d \
curl http://127.0.0.1:9944 -H "Content-Type:application/json;charset=utf-8" -d \
'{
"jsonrpc":"2.0",
"id":1,
Expand Down
2 changes: 1 addition & 1 deletion docs/build/EVM/first-contract/metamask.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ It's easy to configure MetaMask to interact with the Astar/Shiden network family
| Properties | Network Details |
| ----------------------------- | ------------------------------ |
| Network Name | My Network (anything you want) |
| New RPC URL | http://127.0.0.1:9933 |
| New RPC URL | http://127.0.0.1:9944 |
| Chain ID | 4369 |
| Currency Symbol | ASTL |
| Block Explorer URL (Optional) | |
Expand Down
7 changes: 3 additions & 4 deletions docs/build/builder-guides/astar_features/run_local_network.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,13 @@ Please rename the binary file to `astar`, for illustration purposes the consiste

Run the local network with the following configurations:
- `--port 30333`: use `port 30333` for P2P TCP connection
- `--ws-port 9944`: use `port 9944` for WebSocket connection
- `--rpc-port 9933`: use `port 9933` for RPC
- `--rpc-port 9944`: use `port 9944` for RPC, both WS(s) and HTTP(s)
- `--rpc-cors all`: accept any origins for HTTP and WebSocket connections
- `--alice`: enable `Alice` session keys
- `--dev`: launch the network in development mode

```jsx
./astar --port 30333 --ws-port 9944 --rpc-port 9933 --rpc-cors all --alice --dev
./astar --port 30333 --rpc-port 9944 --rpc-cors all --alice --dev
```

You will be able to see the local Astar collator node info and new blocksafter successfully running it.
Expand Down Expand Up @@ -119,7 +118,7 @@ When using the local blockchain with other dev tools including MetaMask, Hardhat

| Network Name | Local Astar Testnet 0 |
| --- | --- |
| New RPC URL | http://127.0.0.1:9933 |
| New RPC URL | http://127.0.0.1:9944 |
| Chain ID | 4369 |
| Currency Symbol | ASTL |

Expand Down
5 changes: 2 additions & 3 deletions docs/build/environment/local-network.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,13 @@ You should then be able to execute the binary. To see whether you can run the n
You are now ready to run the local network, using the following command:

```sh
./astar --port 30333 --ws-port 9944 --rpc-port 9933 --rpc-cors all --alice --dev
./astar --port 30333 --rpc-port 9944 --rpc-cors all --alice --dev
```

What this command means:

- Use port 30333 for P2P TCP connection
- Use port 9944 for WebSocket connection
- Use port 9933 for RPC
- Use port 9944 for WebSocket/Http connection
- Accept any origin for HTTP and WebSocket connections
- Enable Alice session keys
- Launch network in development mode
Expand Down
4 changes: 2 additions & 2 deletions docs/build/wasm/swanky-suite/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Swanky Node enables both Manual seal and Instant seal.
We can tell the node to author a block by calling the `engine_createBlock` RPC.

```bash
$ curl http://localhost:9933 -H "Content-Type:application/json;charset=utf-8" -d '{
$ curl http://localhost:9944 -H "Content-Type:application/json;charset=utf-8" -d '{
"jsonrpc":"2.0",
"id":1,
"method":"engine_createBlock",
Expand All @@ -172,7 +172,7 @@ $ curl http://localhost:9933 -H "Content-Type:application/json;charset=utf-8" -d
In addition to finalizing blocks at the time of creating them, they may also be finalized later by using the RPC call `engine_finalizeBlock`.

```bash
$ curl http://localhost:9933 -H "Content-Type:application/json;charset=utf-8" -d '{
$ curl http://localhost:9944 -H "Content-Type:application/json;charset=utf-8" -d '{
"jsonrpc":"2.0",
"id":1,
"method":"engine_finalizeBlock",
Expand Down
5 changes: 1 addition & 4 deletions docs/nodes/archive-node/binary.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ ExecStart=/usr/local/bin/astar-collator \
--chain astar \
--base-path /var/lib/astar \
--rpc-external \
--ws-external \
--rpc-methods Safe \
--rpc-max-request-size 1 \
--rpc-max-response-size 1 \
Expand Down Expand Up @@ -110,7 +109,6 @@ ExecStart=/usr/local/bin/astar-collator \
--chain shiden \
--base-path /var/lib/astar \
--rpc-external \
--ws-external \
--rpc-methods Safe \
--rpc-max-request-size 1 \
--rpc-max-response-size 1 \
Expand Down Expand Up @@ -141,7 +139,6 @@ ExecStart=/usr/local/bin/astar-collator \
--chain shibuya \
--base-path /var/lib/astar \
--rpc-external \
--ws-external \
--rpc-methods Safe \
--rpc-max-request-size 1 \
--rpc-max-response-size 1 \
Expand Down Expand Up @@ -182,7 +179,7 @@ sudo systemctl enable astar.service
You can test the node health through the RPC port with this command:

```sh
curl -H "Content-Type: application/json" --data '{ "jsonrpc":"2.0", "method":"system_health", "params":[],"id":1 }' localhost:9933
curl -H "Content-Type: application/json" --data '{ "jsonrpc":"2.0", "method":"system_health", "params":[],"id":1 }' localhost:9944
```

## Next steps
Expand Down
8 changes: 1 addition & 7 deletions docs/nodes/archive-node/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ docker run -d \
--name astar-container \
-u $(id -u astar):$(id -g astar) \
-p 30333:30333 \
-p 9933:9933 \
-p 9944:9944 \
-v "/var/lib/astar/:/data" \
staketechnologies/astar-collator:latest \
Expand All @@ -50,7 +49,6 @@ astar-collator \
--chain astar \
--base-path /data \
--rpc-external \
--ws-external \
--rpc-methods Safe \
--rpc-max-request-size 1 \
--rpc-max-response-size 1 \
Expand All @@ -66,7 +64,6 @@ docker run -d \
--name shiden-container \
-u $(id -u astar):$(id -g astar) \
-p 30333:30333 \
-p 9933:9933 \
-p 9944:9944 \
-v "/var/lib/astar/:/data" \
staketechnologies/astar-collator:latest \
Expand All @@ -77,7 +74,6 @@ astar-collator \
--chain astar \
--base-path /data \
--rpc-external \
--ws-external \
--rpc-methods Safe \
--rpc-max-request-size 1 \
--rpc-max-response-size 1 \
Expand All @@ -93,7 +89,6 @@ docker run -d \
--name shibuya-container \
-u $(id -u astar):$(id -g astar) \
-p 30333:30333 \
-p 9933:9933 \
-p 9944:9944 \
-v "/var/lib/astar/:/data" \
staketechnologies/astar-collator:latest \
Expand All @@ -104,7 +99,6 @@ astar-collator \
--chain astar \
--base-path /data \
--rpc-external \
--ws-external \
--rpc-methods Safe \
--rpc-max-request-size 1 \
--rpc-max-response-size 1 \
Expand All @@ -117,7 +111,7 @@ astar-collator \
Test the node health via the RPC port with this command:

```sh
curl -H "Content-Type: application/json" --data '{ "jsonrpc":"2.0", "method":"system_health", "params":[],"id":1 }' localhost:9933
curl -H "Content-Type: application/json" --data '{ "jsonrpc":"2.0", "method":"system_health", "params":[],"id":1 }' localhost:9944
```

## Next steps
Expand Down
3 changes: 1 addition & 2 deletions docs/nodes/archive-node/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ The Astar node runs in parachain configuration, meaning they will listen at diff
|Description| Parachain Port | Relaychain Port | Custom Port Flag |
|---|---|---|---|
| P2P | 30333 | 30334 | `--port` |
| WS | 9944 | 9945 | `--ws-port` |
| RPC | 9933 | 9934 | `--rpc-port` |
| RPC | 9944 | 9945 | `--rpc-port` |
| Prometheus | 9615 | 9616 | `--prometheus-port` |

For all types of nodes, ports `30333` and `30334` need to be opened for incoming traffic at the Firewall.
Expand Down
2 changes: 1 addition & 1 deletion docs/nodes/archive-node/nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ server {
```
:::info
In the example above, note that port 9944 is used in proxy_pass. This is the WS port.
Change this to 9933 to pass the RPC port.
Change this to 9944 to pass the RPC port.
:::

Check and restart nginx:
Expand Down
2 changes: 1 addition & 1 deletion docs/nodes/collator/spinup_collator.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ journalctl -f -u shibuya-node -n100
Run the following command to author session keys:

```
curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}' http://localhost:9933
curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}' http://localhost:9944
```

The result will look like this (you just need to copy the key):
Expand Down
3 changes: 0 additions & 3 deletions docs/nodes/evm-tracing-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ ExecStart=/usr/local/bin/astar-collator \
--base-path /var/lib/astar \
--state-pruning archive \
--blocks-pruning archive \
--ws-external \
--rpc-methods Safe \
--rpc-max-request-size 10 \
--rpc-max-response-size 10 \
Expand Down Expand Up @@ -110,7 +109,6 @@ ExecStart=/usr/local/bin/astar-collator \
--base-path /var/lib/astar \
--state-pruning archive \
--blocks-pruning archive \
--ws-external \
--rpc-methods Safe \
--rpc-max-request-size 10 \
--rpc-max-response-size 10 \
Expand Down Expand Up @@ -145,7 +143,6 @@ ExecStart=/usr/local/bin/astar-collator \
--base-path /var/lib/astar \
--state-pruning archive \
--blocks-pruning archive \
--ws-external \
--rpc-methods Safe \
--rpc-max-request-size 10 \
--rpc-max-response-size 10 \
Expand Down
9 changes: 0 additions & 9 deletions docs/nodes/node-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ ExecStart=/usr/local/bin/astar-collator \
--chain astar \
--base-path /var/lib/astar \
--rpc-external \
--ws-external \
--rpc-methods Safe \
--rpc-max-request-size 1 \
--rpc-max-response-size 1 \
Expand Down Expand Up @@ -220,7 +219,6 @@ ExecStart=/usr/local/bin/astar-collator \
--chain shiden \
--base-path /var/lib/astar \
--rpc-external \
--ws-external \
--rpc-methods Safe \
--rpc-max-request-size 1 \
--rpc-max-response-size 1 \
Expand Down Expand Up @@ -251,7 +249,6 @@ ExecStart=/usr/local/bin/astar-collator \
--chain shibuya \
--base-path /var/lib/astar \
--rpc-external \
--ws-external \
--rpc-methods Safe \
--rpc-max-request-size 1 \
--rpc-max-response-size 1 \
Expand All @@ -277,7 +274,6 @@ docker run -d \
--name astar-container \
-u $(id -u astar):$(id -g astar) \
-p 30333:30333 \
-p 9933:9933 \
-p 9944:9944 \
-v "/var/lib/astar/:/data" \
staketechnologies/astar-collator:latest \
Expand All @@ -288,7 +284,6 @@ astar-collator \
--chain astar \
--base-path /data \
--rpc-external \
--ws-external \
--rpc-methods Safe \
--rpc-max-request-size 1 \
--rpc-max-response-size 1 \
Expand All @@ -303,7 +298,6 @@ docker run -d \
--name shiden-container \
-u $(id -u astar):$(id -g astar) \
-p 30333:30333 \
-p 9933:9933 \
-p 9944:9944 \
-v "/var/lib/astar/:/data" \
staketechnologies/astar-collator:latest \
Expand All @@ -314,7 +308,6 @@ astar-collator \
--chain astar \
--base-path /data \
--rpc-external \
--ws-external \
--rpc-methods Safe \
--rpc-max-request-size 1 \
--rpc-max-response-size 1 \
Expand All @@ -329,7 +322,6 @@ docker run -d \
--name shibuya-container \
-u $(id -u astar):$(id -g astar) \
-p 30333:30333 \
-p 9933:9933 \
-p 9944:9944 \
-v "/var/lib/astar/:/data" \
staketechnologies/astar-collator:latest \
Expand All @@ -340,7 +332,6 @@ astar-collator \
--chain astar \
--base-path /data \
--rpc-external \
--ws-external \
--rpc-methods Safe \
--rpc-max-request-size 1 \
--rpc-max-response-size 1 \
Expand Down

0 comments on commit 6c187a7

Please sign in to comment.