diff --git a/README.md b/README.md index 35428c73f98..88e2232d2f9 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Gear Protocol is a Substrate-based solution for developers, enabling anyone to r # - +
[![CI][c1]][c2] @@ -41,7 +41,7 @@ Gear Protocol is a Substrate-based solution for developers, enabling anyone to r 1. :open_hands: The easiest way to get started with Gear Protocol is by using the demo environment at [https://idea.gear-tech.io](https://idea.gear-tech.io). -2. :wrench: Follow the instructions from ["Getting started in 5 minutes"](https://wiki.gear-tech.io/docs/getting-started-in-5-minutes/) to compile the Rust test program to Wasm. :running: Upload and run the program on the Vara Network Testnet via [Gear Idea](https://idea.gear-tech.io/programs?node=wss%3A%2F%2Ftestnet.vara-network.io), send a message to a program, check how it is going. +2. :wrench: Follow the instructions from ["Getting started in 5 minutes"](https://wiki.gear-tech.io/docs/getting-started-in-5-minutes/) to compile the Rust test program to Wasm. :running: Upload and run the program on the Vara Network Testnet via [Gear Idea](https://idea.gear-tech.io/programs?node=wss%3A%2F%2Ftestnet.vara.network), send a message to a program, check how it is going. 3. :scroll: Write your own program or use one from the comprehensive [examples library](https://github.com/gear-foundation/dapps) as a basis for a convenient and swift onboarding process. @@ -140,8 +140,8 @@ Go to https://docs.gear.rs to dive into the documentation on Gear Protocol crate ### Main capabilities - - Gear Protocol enables anyone to create and run a custom-logic **decentralized programs**. - - Programs can support business logic of any other projects running in the **Gear-powered network** (such as the [Vara Network](https://vara-network.io/)) and interact with them. + - Gear Protocol enables anyone to create and run a custom-logic **decentralized programs**. + - Programs can support business logic of any other projects running in the **Gear-powered network** (such as the [Vara Network](https://vara.network/)) and interact with them. - Establish cross-chain communications between other Substrate-supported blockchains, allowing anyone to run a dApp in the Dotsama ecosystem in a very **cost-less** manner. - A Gear node can run as a standalone instance running microservices, middleware, open API and more. @@ -216,7 +216,7 @@ Gear Protocol is licensed under [GPL v3.0 with a classpath linking exception](LI Events • - + Vara Network

diff --git a/gclient/src/api/mod.rs b/gclient/src/api/mod.rs index 65d35869e8b..b411873c62e 100644 --- a/gclient/src/api/mod.rs +++ b/gclient/src/api/mod.rs @@ -106,9 +106,9 @@ impl GearApi { } /// Create and init a new `GearApi` instance that will be used with the - /// public Gear testnet. - pub async fn gear() -> Result { - Self::init(WSAddress::gear()).await + /// public Vara testnet node. + pub async fn vara_testnet() -> Result { + Self::init(WSAddress::vara_testnet()).await } /// Create and init a new `GearApi` instance that will be used with the diff --git a/gclient/src/ws.rs b/gclient/src/ws.rs index a612e13e22b..6a91bd203cd 100644 --- a/gclient/src/ws.rs +++ b/gclient/src/ws.rs @@ -42,12 +42,14 @@ impl WSAddress { // Local dev node. const LOCALHOST: &'static str = "ws://127.0.0.1"; - // Gear testnet. - const GEAR: &'static str = "wss://rpc-node.gear-tech.io"; - const GEAR_PORT: u16 = 443; + // Default secure WebSocket port. + const WSS_DEFAULT_PORT: u16 = 443; + + // Vara testnet. + const VARA_TESTNET: &'static str = "wss://testnet.vara.network"; // Vara network. - const VARA: &'static str = "wss://rpc.vara-network.io"; + const VARA: &'static str = "wss://rpc.vara.network"; /// Create a new `WSAddress` from a host `domain` and `port`. /// @@ -114,18 +116,18 @@ impl WSAddress { Self::new(Self::LOCALHOST, port) } - /// Return the default address of the public Gear testnet node. + /// Return the default address of the public Vara testnet node. /// /// # Examples /// /// ``` /// use gclient::WSAddress; /// - /// let address = WSAddress::gear(); - /// assert_eq!(address, WSAddress::new("wss://rpc-node.gear-tech.io", 443)); + /// let address = WSAddress::vara_testnet(); + /// assert_eq!(address, WSAddress::new("wss://testnet.vara.network", 443)); /// ``` - pub fn gear() -> Self { - Self::new(Self::GEAR, Self::GEAR_PORT) + pub fn vara_testnet() -> Self { + Self::new(Self::VARA_TESTNET, Self::WSS_DEFAULT_PORT) } /// Return the default address of the public Vara node. @@ -136,7 +138,7 @@ impl WSAddress { /// use gclient::WSAddress; /// /// let address = WSAddress::vara(); - /// assert_eq!(address.url(), "wss://rpc.vara-network.io"); + /// assert_eq!(address.url(), "wss://rpc.vara.network"); /// ``` pub fn vara() -> Self { Self::new(Self::VARA, None) diff --git a/gsdk/src/client.rs b/gsdk/src/client.rs index 71c2cd95128..c34a332b1b3 100644 --- a/gsdk/src/client.rs +++ b/gsdk/src/client.rs @@ -45,7 +45,7 @@ use subxt::{ error::RpcError, }; -const DEFAULT_GEAR_ENDPOINT: &str = "wss://rpc.vara-network.io:443"; +const DEFAULT_GEAR_ENDPOINT: &str = "wss://rpc.vara.network:443"; const DEFAULT_TIMEOUT: u64 = 60_000; const ONE_HUNDRED_MEGA_BYTES: u32 = 100 * 1024 * 1024; diff --git a/gsdk/tests/rpc.rs b/gsdk/tests/rpc.rs index 9fc05db6bda..307f679b76e 100644 --- a/gsdk/tests/rpc.rs +++ b/gsdk/tests/rpc.rs @@ -233,7 +233,7 @@ async fn test_runtime_wasm_blob_version() -> Result<()> { #[tokio::test] async fn test_runtime_wasm_blob_version_history() -> Result<()> { - let api = Api::new(Some("wss://archive-rpc.vara-network.io:443")).await?; + let api = Api::new(Some("wss://archive-rpc.vara.network:443")).await?; { let no_method_block_hash = sp_core::H256::from_str( diff --git a/utils/gear-replay-cli/README.md b/utils/gear-replay-cli/README.md index e6e59291ece..7d2b8c52ea1 100644 --- a/utils/gear-replay-cli/README.md +++ b/utils/gear-replay-cli/README.md @@ -38,7 +38,7 @@ Other than that it's a good tool. - current latest finalized block on Vara chain ```bash - gear try-runtime --chain=vara --runtime vara_runtime.compact.compressed.wasm execute-block live --uri wss://archive-rpc.vara-network.io:443 + gear try-runtime --chain=vara --runtime vara_runtime.compact.compressed.wasm execute-block live --uri wss://archive-rpc.vara.network:443 ``` - at block `$HASH` @@ -46,7 +46,7 @@ Other than that it's a good tool. ```bash export HASH=0x8dc1e32576c1ad4e28dc141769576efdbc19d0170d427b69edb2261cfc36e905 - gear try-runtime --chain=vara --runtime vara_runtime.compact.compressed.wasm execute-block live --uri wss://archive-rpc.vara-network.io:443 --at "$HASH" + gear try-runtime --chain=vara --runtime vara_runtime.compact.compressed.wasm execute-block live --uri wss://archive-rpc.vara.network:443 --at "$HASH" ``` _Note:_ The `--at` parameter provides the hash of the block which determines the current state of the blockchain. Then the following block is fetched and applied to this state. Therefore if we want to replay extrinsics from the block `N` we must provide the hash of the block `N-1` as the height. @@ -60,7 +60,7 @@ Other than that it's a good tool. ```bash export HASH=0x8dc1e32576c1ad4e28dc141769576efdbc19d0170d427b69edb2261cfc36e905 - gear try-runtime --chain=vara --runtime existing create-snapshot --uri wss://archive-rpc.vara-network.io:443 [--at "$HASH"] [$SNAPSHOT_PATH] + gear try-runtime --chain=vara --runtime existing create-snapshot --uri wss://archive-rpc.vara.network:443 [--at "$HASH"] [$SNAPSHOT_PATH] ``` If `$SNAPSHOT_PATH` is not provided the default filename for a snapshot would be `$chain`-`$spec_version`@`$block_hash`.snap (for instance, `vara-140@8dc1e32576c1ad4e28dc141769576efdbc19d0170d427b69edb2261cfc36e905.snap` or `vara-140@latest.snap`). @@ -70,14 +70,14 @@ Other than that it's a good tool. ```bash export SNAPSHOT="vara-140@8dc1e32576c1ad4e28dc141769576efdbc19d0170d427b69edb2261cfc36e905.snap" - gear try-runtime --chain=vara --runtime vara_runtime.compact.compressed.wasm execute-block --block-ws-uri wss://archive-rpc.vara-network.io:443 snap --snapshot-path "$SNAPSHOT" + gear try-runtime --chain=vara --runtime vara_runtime.compact.compressed.wasm execute-block --block-ws-uri wss://archive-rpc.vara.network:443 snap --snapshot-path "$SNAPSHOT" ``` Warning: By default the `try-runtime execute-block` command runs with the `--try-state` option value set to `all`, that is it will try to validate the state of all the pallets in the snapshot. This may result in an error caused by inconsistencies in some pallets storage (for instance, at the moment of this writing the `BagsList` pallet has inconsistent data). This is, of course, something to look into, but it goes beyond the scope of the problem in question. Since this doesn't affect the internal logic of the Gear flow we want to reproduce, we might consider either completely omitting setting the `try_state` by setting the respective option to `none` ```bash - gear try-runtime --chain=vara --runtime vara_runtime.compact.compressed.wasm execute-block --try-state none live --uri wss://archive-rpc.vara-network.io:443 + gear try-runtime --chain=vara --runtime vara_runtime.compact.compressed.wasm execute-block --try-state none live --uri wss://archive-rpc.vara.network:443 ``` or enumerate a number of pallets in the runtime we are only concerned with: @@ -85,7 +85,7 @@ Other than that it's a good tool. ```bash export TRY_PALLETS=System,Babe,Grandpa,Balances,Staking,Vesting,Gear,GearGas,GearProgram,GearMessenger,GearScheduler,GearPayment,StakingRewards - gear try-runtime --chain=vara --runtime vara_runtime.compact.compressed.wasm execute-block --try-state "$TRY_PALLETS" live --uri wss://archive-rpc.vara-network.io:443 + gear try-runtime --chain=vara --runtime vara_runtime.compact.compressed.wasm execute-block --try-state "$TRY_PALLETS" live --uri wss://archive-rpc.vara.network:443 ```
@@ -118,7 +118,7 @@ General command format and available subcommand are: help Print this message or the help of the given subcommand(s) Options: - -u, --uri The RPC url [default: wss://archive-rpc.vara-network.io:443] + -u, --uri The RPC url [default: wss://archive-rpc.vara.network:443] -l, --log [...] Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug -h, --help Print help (see more with '--help') ``` @@ -130,7 +130,7 @@ Currently supported cases include: - current latest finalized block on Vara chain ```bash - gear-replay-cli --uri wss://archive-rpc.vara-network.io:443 -lgear::runtime,pallet_gear,gear_common,pallet_gear_scheduler=debug replay-block + gear-replay-cli --uri wss://archive-rpc.vara.network:443 -lgear::runtime,pallet_gear,gear_common,pallet_gear_scheduler=debug replay-block ``` - block with `$HASH` or `$BLOCK_NUM` @@ -139,8 +139,8 @@ Currently supported cases include: export HASH=0x8dc1e32576c1ad4e28dc141769576efdbc19d0170d427b69edb2261cfc36e905 export BLOCK_NUM=2000000 - gear-replay-cli --uri wss://archive-rpc.vara-network.io:443 -lgear::runtime,pallet_gear,gear_common=debug replay-block --block "$HASH" - gear-replay-cli --uri wss://archive-rpc.vara-network.io:443 -lgear::runtime,pallet_gear,gear_common=debug replay-block --block "$BLOCK_NUM" + gear-replay-cli --uri wss://archive-rpc.vara.network:443 -lgear::runtime,pallet_gear,gear_common=debug replay-block --block "$HASH" + gear-replay-cli --uri wss://archive-rpc.vara.network:443 -lgear::runtime,pallet_gear,gear_common=debug replay-block --block "$BLOCK_NUM" ```
diff --git a/utils/gear-replay-cli/src/lib.rs b/utils/gear-replay-cli/src/lib.rs index 1f54a00d61f..573ad8a5efb 100644 --- a/utils/gear-replay-cli/src/lib.rs +++ b/utils/gear-replay-cli/src/lib.rs @@ -59,7 +59,7 @@ pub struct SharedParams { short, long, value_parser = parse::url, - default_value = "wss://archive-rpc.vara-network.io:443" + default_value = "wss://archive-rpc.vara.network:443" )] uri: String,