Skip to content
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
10 changes: 5 additions & 5 deletions .github/workflows/chain-spec-snapshot-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,21 @@ jobs:

- name: Generate testnet chain specifications
run: |
docker run --rm -u root ${{ steps.build.outputs.digest }} build-spec --chain gemini-3d-compiled --disable-default-bootnode > chain-spec-gemini-3d.json
docker run --rm -u root ${{ steps.build.outputs.digest }} build-spec --chain gemini-3d-compiled --disable-default-bootnode --raw > chain-spec-raw-gemini-3d.json
docker run --rm -u root ${{ steps.build.outputs.digest }} build-spec --chain gemini-3e-compiled --disable-default-bootnode > chain-spec-gemini-3e.json
docker run --rm -u root ${{ steps.build.outputs.digest }} build-spec --chain gemini-3e-compiled --disable-default-bootnode --raw > chain-spec-raw-gemini-3e.json

- name: Upload chain specifications to artifacts
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # @v3.1.1
with:
name: chain-specifications
path: |
chain-spec-gemini-3d.json
chain-spec-raw-gemini-3d.json
chain-spec-gemini-3e.json
chain-spec-raw-gemini-3e.json
if-no-files-found: error

- name: Upload chain specifications to assets
uses: alexellis/upload-assets@259de5111cb56966d046ced998941e93f91d2c93 # @0.4.0
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["chain-spec-gemini-3d.json", "chain-spec-raw-gemini-3d.json"]'
asset_paths: '["chain-spec-gemini-3e.json", "chain-spec-raw-gemini-3e.json"]'
12 changes: 6 additions & 6 deletions crates/subspace-node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,16 @@ struct GenesisParams {
confirmation_depth_k: u32,
}

pub fn gemini_3d_compiled() -> Result<ConsensusChainSpec<GenesisConfig>, String> {
pub fn gemini_3e_compiled() -> Result<ConsensusChainSpec<GenesisConfig>, String> {
Ok(ConsensusChainSpec::from_genesis(
// Name
"Subspace Gemini 3d",
"Subspace Gemini 3e",
// ID
"subspace_gemini_3d",
ChainType::Custom("Subspace Gemini 3d".to_string()),
"subspace_gemini_3e",
ChainType::Custom("Subspace Gemini 3e".to_string()),
|| {
let sudo_account =
AccountId::from_ss58check("5CZy4hcmaVZUMZLfB41v1eAKvtZ8W7axeWuDvwjhjPwfhAqt")
AccountId::from_ss58check("5DNwQTHfARgKoa2NdiUM51ZUow7ve5xG9S2yYdSbVQcnYxBA")
.expect("Wrong root account address");

let mut balances = vec![(sudo_account.clone(), 1_000 * SSC)];
Expand Down Expand Up @@ -158,7 +158,7 @@ pub fn gemini_3d_compiled() -> Result<ConsensusChainSpec<GenesisConfig>, String>
.map_err(|error| error.to_string())?,
),
// Protocol ID
Some("subspace-gemini-3d"),
Some("subspace-gemini-3e"),
None,
// Properties
Some(chain_spec_properties()),
Expand Down
12 changes: 6 additions & 6 deletions crates/subspace-node/src/domain/evm_chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ pub fn local_testnet_config() -> ExecutionChainSpec<GenesisConfig> {
)
}

pub fn gemini_3d_config() -> ExecutionChainSpec<GenesisConfig> {
pub fn gemini_3e_config() -> ExecutionChainSpec<GenesisConfig> {
ExecutionChainSpec::from_genesis(
// Name
"Subspace Gemini 3d EVM Domain",
"Subspace Gemini 3e EVM Domain",
// ID
"subspace_gemini_3d_evm_domain",
"subspace_gemini_3e_evm_domain",
ChainType::Live,
move || {
let sudo_account = AccountId::from_str("f31e60022e290708c17d6997c34de6a30d09438f")
Expand All @@ -143,7 +143,7 @@ pub fn gemini_3d_config() -> ExecutionChainSpec<GenesisConfig> {
// Telemetry
None,
// Protocol ID
Some("subspace-gemini-3d-evm-domain"),
Some("subspace-gemini-3e-evm-domain"),
None,
// Properties
Some(chain_spec_properties()),
Expand Down Expand Up @@ -193,10 +193,10 @@ pub fn devnet_config() -> ExecutionChainSpec<GenesisConfig> {
)
}

pub fn load_chain_spec(spec_id: &str) -> std::result::Result<Box<dyn sc_cli::ChainSpec>, String> {
pub fn load_chain_spec(spec_id: &str) -> Result<Box<dyn sc_cli::ChainSpec>, String> {
let chain_spec = match spec_id {
"dev" => development_config(),
"gemini-3d" => gemini_3d_config(),
"gemini-3e" => gemini_3e_config(),
"devnet" => devnet_config(),
"" | "local" => local_testnet_config(),
path => ChainSpec::from_json_file(std::path::PathBuf::from(path))?,
Expand Down
2 changes: 1 addition & 1 deletion crates/subspace-node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ impl SubstrateCli for Cli {

fn load_spec(&self, id: &str) -> Result<Box<dyn ChainSpec>, String> {
let mut chain_spec = match id {
"gemini-3d-compiled" => chain_spec::gemini_3d_compiled()?,
"gemini-3e-compiled" => chain_spec::gemini_3e_compiled()?,
"gemini-3d" => chain_spec::gemini_3d_config()?,
"devnet" => chain_spec::devnet_config()?,
"devnet-compiled" => chain_spec::devnet_config_compiled()?,
Expand Down
22 changes: 11 additions & 11 deletions docs/farming.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ If you're connected directly without any router, then again nothing needs to be
# Replace `INSERT_YOUR_ID` with a nickname you choose
# Copy all of the lines below, they are all part of the same command
.\NODE_FILE_NAME.exe `
--chain gemini-3d `
--chain gemini-3e `
--execution wasm `
--blocks-pruning archive `
--state-pruning archive `
Expand All @@ -58,7 +58,7 @@ If you're connected directly without any router, then again nothing needs to be
2022-02-03 10:52:23 Subspace
2022-02-03 10:52:23 ✌️ version 0.1.0-35cf6f5-x86_64-windows
2022-02-03 10:52:23 ❤️ by Subspace Labs <https://subspace.network>, 2021-2022
2022-02-03 10:52:23 📋 Chain specification: Subspace Gemini 3b
2022-02-03 10:52:23 📋 Chain specification: Subspace Gemini 3e
2022-02-03 10:52:23 🏷 Node name: YOUR_FANCY_NAME
2022-02-03 10:52:23 👤 Role: AUTHORITY
2022-02-03 10:52:23 💾 Database: RocksDb at C:\Users\X\AppData\Local\subspace-node-windows-x86_64-snapshot-2022-jan-05.exe\data\chains\subspace_test\db\full
Expand Down Expand Up @@ -96,7 +96,7 @@ If you're connected directly without any router, then again nothing needs to be
# Replace `INSERT_YOUR_ID` with a nickname you choose
# Copy all of the lines below, they are all part of the same command
./NODE_FILE_NAME \
--chain gemini-3d \
--chain gemini-3e \
--execution wasm \
--blocks-pruning archive \
--state-pruning archive \
Expand All @@ -110,7 +110,7 @@ If you're connected directly without any router, then again nothing needs to be
2022-02-03 10:52:23 Subspace
2022-02-03 10:52:23 ✌️ version 0.1.0-35cf6f5-x86_64-ubuntu
2022-02-03 10:52:23 ❤️ by Subspace Labs <https://subspace.network>, 2021-2022
2022-02-03 10:52:23 📋 Chain specification: Subspace Gemini 3b
2022-02-03 10:52:23 📋 Chain specification: Subspace Gemini 3e
2022-02-03 10:52:23 🏷 Node name: YOUR_FANCY_NAME
2022-02-03 10:52:23 👤 Role: AUTHORITY
2022-02-03 10:52:23 💾 Database: RocksDb at /home/X/.local/share/subspace-node-x86_64-ubuntu-20.04-snapshot-2022-jan-05/chains/subspace_test/db/full
Expand Down Expand Up @@ -151,7 +151,7 @@ After this, simply repeat the step you prompted for (step 4 or 6). This time, cl
# Replace `INSERT_YOUR_ID` with a nickname you choose
# Copy all of the lines below, they are all part of the same command
./NODE_FILE_NAME \
--chain gemini-3d \
--chain gemini-3e \
--execution wasm \
--blocks-pruning archive \
--state-pruning archive \
Expand All @@ -165,7 +165,7 @@ After this, simply repeat the step you prompted for (step 4 or 6). This time, cl
2022-02-03 10:52:23 Subspace
2022-02-03 10:52:23 ✌️ version 0.1.0-35cf6f5-x86_64-macos
2022-02-03 10:52:23 ❤️ by Subspace Labs <https://subspace.network>, 2021-2022
2022-02-03 10:52:23 📋 Chain specification: Subspace Gemini 3b
2022-02-03 10:52:23 📋 Chain specification: Subspace Gemini 3e
2022-02-03 10:52:23 🏷 Node name: YOUR_FANCY_NAME
2022-02-03 10:52:23 👤 Role: AUTHORITY
2022-02-03 10:52:23 💾 Database: RocksDb at /Users/X/Library/Application Support/subspace-node-x86_64-macos-11-snapshot-2022-jan-05/chains/subspace_test/db/full
Expand Down Expand Up @@ -214,7 +214,7 @@ services:
- "0.0.0.0:30433:30433"
restart: unless-stopped
command: [
"--chain", "gemini-3d",
"--chain", "gemini-3e",
"--base-path", "/var/subspace",
"--execution", "wasm",
"--blocks-pruning", "archive",
Expand Down Expand Up @@ -286,7 +286,7 @@ You can read logs with `docker-compose logs --tail=1000 -f`, for the rest read [

## Checking results and interacting with the network

Visit [Polkadot.js explorer](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Feu-0.gemini-3d.subspace.network%2Fws#/explorer), from there you can interact with Subspace Network as any Substrate-based blockchain.
Visit [Polkadot.js explorer](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Feu-0.gemini-3e.subspace.network%2Fws#/explorer), from there you can interact with Subspace Network as any Substrate-based blockchain.

## Switching from older/different versions of Subspace

Expand All @@ -297,7 +297,7 @@ If you were running a node previously, and want to switch to a new snapshot, ple
# Replace `FARMER_FILE_NAME` with the name of the node file you downloaded from releases
./FARMER_FILE_NAME wipe
# Replace `NODE_FILE_NAME` with the name of the node file you downloaded from releases
./NODE_FILE_NAME purge-chain --chain gemini-3d
./NODE_FILE_NAME purge-chain --chain gemini-3e
```
Does not matter if the node/farmer executable is the previous one or from the new snapshot, both will work :)
The reason we require this is, with every snapshot change, the network might get partitioned, and you may be on a different genesis than the current one.
Expand All @@ -319,8 +319,8 @@ Below are some helpful samples:

- `./FARMER_FILE_NAME --base-path /path/to/data farm ...` : will store data in `/path/to/data` instead of default location
- `./FARMER_FILE_NAME --base-path /path/to/data wipe` : erases everything related to farmer if data were stored in `/path/to/data`
- `./NODE_FILE_NAME --base-path /path/to/data --chain gemini-3d ...` : start node and store data in `/path/to/data` instead of default location
- `./NODE_FILE_NAME purge-chain --base-path /path/to/data --chain gemini-3d` : erases data related to the node if data were stored in `/path/to/data`
- `./NODE_FILE_NAME --base-path /path/to/data --chain gemini-3e ...` : start node and store data in `/path/to/data` instead of default location
- `./NODE_FILE_NAME purge-chain --base-path /path/to/data --chain gemini-3e` : erases data related to the node if data were stored in `/path/to/data`

Examples:
```bash
Expand Down