From 6c187a76703b1522c011b9f748f05df3f7d5cb9b Mon Sep 17 00:00:00 2001 From: Dino Pacandi Date: Mon, 24 Jul 2023 17:55:55 +0200 Subject: [PATCH] Update node CLI with ws params removal --- docs/build/EVM/developer-tooling/own-RPC.md | 6 +++--- docs/build/EVM/evm-debug-api.md | 6 +++--- docs/build/EVM/first-contract/metamask.md | 2 +- .../builder-guides/astar_features/run_local_network.md | 7 +++---- docs/build/environment/local-network.md | 5 ++--- docs/build/wasm/swanky-suite/node.md | 4 ++-- docs/nodes/archive-node/binary.md | 5 +---- docs/nodes/archive-node/docker.md | 8 +------- docs/nodes/archive-node/index.md | 3 +-- docs/nodes/archive-node/nginx.md | 2 +- docs/nodes/collator/spinup_collator.md | 2 +- docs/nodes/evm-tracing-node.md | 3 --- docs/nodes/node-commands.md | 9 --------- 13 files changed, 19 insertions(+), 43 deletions(-) diff --git a/docs/build/EVM/developer-tooling/own-RPC.md b/docs/build/EVM/developer-tooling/own-RPC.md index 1d350f4d8330..e493150d67aa 100644 --- a/docs/build/EVM/developer-tooling/own-RPC.md +++ b/docs/build/EVM/developer-tooling/own-RPC.md @@ -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. \ No newline at end of file +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. \ No newline at end of file diff --git a/docs/build/EVM/evm-debug-api.md b/docs/build/EVM/evm-debug-api.md index a81c82eb8e5b..8a3621daa6f0 100644 --- a/docs/build/EVM/evm-debug-api.md +++ b/docs/build/EVM/evm-debug-api.md @@ -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, @@ -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, @@ -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, diff --git a/docs/build/EVM/first-contract/metamask.md b/docs/build/EVM/first-contract/metamask.md index b407aed6625e..07895b83d888 100644 --- a/docs/build/EVM/first-contract/metamask.md +++ b/docs/build/EVM/first-contract/metamask.md @@ -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) | | diff --git a/docs/build/builder-guides/astar_features/run_local_network.md b/docs/build/builder-guides/astar_features/run_local_network.md index 28b8f357decb..180113fc6ab7 100644 --- a/docs/build/builder-guides/astar_features/run_local_network.md +++ b/docs/build/builder-guides/astar_features/run_local_network.md @@ -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. @@ -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 | diff --git a/docs/build/environment/local-network.md b/docs/build/environment/local-network.md index 78c6c9b867ef..97648a8cbc6f 100644 --- a/docs/build/environment/local-network.md +++ b/docs/build/environment/local-network.md @@ -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 diff --git a/docs/build/wasm/swanky-suite/node.md b/docs/build/wasm/swanky-suite/node.md index 309aac07b676..c9d69a91f11a 100644 --- a/docs/build/wasm/swanky-suite/node.md +++ b/docs/build/wasm/swanky-suite/node.md @@ -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", @@ -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", diff --git a/docs/nodes/archive-node/binary.md b/docs/nodes/archive-node/binary.md index f2485d8f8c7b..373a83187656 100644 --- a/docs/nodes/archive-node/binary.md +++ b/docs/nodes/archive-node/binary.md @@ -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 \ @@ -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 \ @@ -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 \ @@ -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 diff --git a/docs/nodes/archive-node/docker.md b/docs/nodes/archive-node/docker.md index d87fd22e0640..ee4d1d10114e 100644 --- a/docs/nodes/archive-node/docker.md +++ b/docs/nodes/archive-node/docker.md @@ -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 \ @@ -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 \ @@ -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 \ @@ -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 \ @@ -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 \ @@ -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 \ @@ -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 diff --git a/docs/nodes/archive-node/index.md b/docs/nodes/archive-node/index.md index 04fddd0c273c..6ad4416138f2 100644 --- a/docs/nodes/archive-node/index.md +++ b/docs/nodes/archive-node/index.md @@ -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. diff --git a/docs/nodes/archive-node/nginx.md b/docs/nodes/archive-node/nginx.md index 0d6ec4d32ee8..f589473aefbb 100644 --- a/docs/nodes/archive-node/nginx.md +++ b/docs/nodes/archive-node/nginx.md @@ -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: diff --git a/docs/nodes/collator/spinup_collator.md b/docs/nodes/collator/spinup_collator.md index 91781fdebf72..3823e5886323 100644 --- a/docs/nodes/collator/spinup_collator.md +++ b/docs/nodes/collator/spinup_collator.md @@ -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): diff --git a/docs/nodes/evm-tracing-node.md b/docs/nodes/evm-tracing-node.md index 4bc43fc415ca..b75dcd72127e 100644 --- a/docs/nodes/evm-tracing-node.md +++ b/docs/nodes/evm-tracing-node.md @@ -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 \ @@ -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 \ @@ -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 \ diff --git a/docs/nodes/node-commands.md b/docs/nodes/node-commands.md index 51bd92afb43b..68470d0665c5 100644 --- a/docs/nodes/node-commands.md +++ b/docs/nodes/node-commands.md @@ -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 \ @@ -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 \ @@ -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 \ @@ -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 \ @@ -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 \ @@ -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 \ @@ -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 \ @@ -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 \ @@ -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 \