Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit d800122

Browse files
Merge pull request #101 from ava-labs/improved-tutorial
Improved Demo Tutorial
2 parents 7a8c0ac + 9aafa35 commit d800122

File tree

1 file changed

+106
-5
lines changed

1 file changed

+106
-5
lines changed

README.md

Lines changed: 106 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -513,11 +513,109 @@ _Can use this to get the current fee rate._
513513
To build the VM (and `spaces-cli`), run `./scripts/build.sh`.
514514

515515
### Joining the Spaces Demo
516-
If you'd like to become a validator on the demo, reach out to @\_patrickogrady on Twitter
517-
after you've joined the network and synced to tip. Please send a screenshot
518-
indicating you've done this successfully.
516+
If you'd like to validate the [Spaces Subnet Demo] on Fuji, please follow the following
517+
steps:
519518

520-
You can find the genesis used for the Spaces Demo in `networks/42`.
519+
_You can find the genesis used for the Spaces Demo in `networks/42/*`._
520+
521+
#### Download and Build SpacesVM
522+
```bash
523+
git clone https://github.com/ava-labs/spacesvm.git;
524+
cd spacesvm;
525+
./scripts/build.sh
526+
```
527+
528+
Running the above commands will generate a binary and save it at
529+
`~/spacesvm/build/sqja3uK17MJxfC7AN8nGadBw9JK5BcrsNwNynsqP5Gih8M5Bm`.
530+
531+
#### Move Binary
532+
Once the SpacesVM binary is built, you'll need to move it to AvalancheGo's
533+
plugin directory (within the `--build-dir`) so it can be run by your node.
534+
When building from source, this defaults to `~/avalanchego/build/plugins`.
535+
This build directory is structured as:
536+
```
537+
build-dir
538+
|_avalanchego
539+
|_plugins
540+
|_evm
541+
```
542+
543+
To put the SpacesVM binary in the right place, run the following command
544+
(assuming the `avalanchego` and `spacesvm` repos are in the same folder):
545+
```bash
546+
mv ./spacesvm/build/sqja3uK17MJxfC7AN8nGadBw9JK5BcrsNwNynsqP5Gih8M5Bm ./avalanchego/build/plugins;
547+
```
548+
549+
#### Add Subnet to Whitelist
550+
Next, you'll need to provide the `whitelisted-subnets` argument by
551+
modifying your config file or providing an argument on
552+
startup (which tells your node to connect to the Spaces Subnet Demo).
553+
554+
Example Config File:
555+
```json
556+
{
557+
"network-id":"fuji",
558+
"health-check-frequency":"2s",
559+
"log-display-level":"INFO",
560+
"log-level":"INFO",
561+
"whitelisted-subnets":"Ai42MkKqk8yjXFCpoHXw7rdTWSHiKEMqh5h8gbxwjgkCUfkrk"
562+
}
563+
```
564+
565+
Example Node Args:
566+
```bash
567+
--whitelisted-subnets=Ai42MkKqk8yjXFCpoHXw7rdTWSHiKEMqh5h8gbxwjgkCUfkrk --network-id=fuji
568+
```
569+
570+
#### Restart Node
571+
Once you've performed the following steps, you'll need to restart your
572+
AvalancheGo node for the changes to take effect.
573+
574+
If you completed the steps successfully, you'll see the node print out:
575+
```bash
576+
INFO [01-25|16:47:04] chains/manager.go#246: creating chain:
577+
ID: 2AM3vsuLoJdGBGqX2ibE8RGEq4Lg7g4bot6BT1Z7B9dH5corUD
578+
VMID:sqja3uK17MJxfC7AN8nGadBw9JK5BcrsNwNynsqP5Gih8M5Bm
579+
INFO [01-25|16:47:04] api/server/server.go#203: adding route /ext/bc/2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm/events
580+
INFO [01-25|16:47:04] api/server/server.go#203: adding route /ext/bc/2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm
581+
INFO [01-25|16:47:04] api/server/server.go#203: adding route /ext/bc/2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm/wallet
582+
INFO [01-25|16:47:04] <2AM3vsuLoJdGBGqX2ibE8RGEq4Lg7g4bot6BT1Z7B9dH5corUD Chain> snow/engine/snowman/transitive.go#67: initializing consensus engine
583+
INFO [01-25|16:47:04] <2AM3vsuLoJdGBGqX2ibE8RGEq4Lg7g4bot6BT1Z7B9dH5corUD Chain> snow/engine/snowman/bootstrap/bootstrapper.go#225: Starting bootstrap...
584+
INFO [01-25|16:47:04] <P Chain> snow/engine/snowman/bootstrap/bootstrapper.go#458: waiting for the remaining chains in this subnet to finish syncing
585+
INFO [01-25|16:47:04] api/server/server.go#203: adding route /ext/bc/2AM3vsuLoJdGBGqX2ibE8RGEq4Lg7g4bot6BT1Z7B9dH5corUD/public
586+
INFO [01-25|16:47:04] <2AM3vsuLoJdGBGqX2ibE8RGEq4Lg7g4bot6BT1Z7B9dH5corUD Chain> snow/engine/common/bootstrapper.go#235: Bootstrapping started syncing with 2 vertices in the accepted frontier
587+
INFO [01-25|16:47:05] <2AM3vsuLoJdGBGqX2ibE8RGEq4Lg7g4bot6BT1Z7B9dH5corUD Chain> snow/engine/snowman/bootstrap/bootstrapper.go#419: bootstrapping fetched 69 blocks. Executing state transitions...
588+
INFO [01-25|16:47:06] <2AM3vsuLoJdGBGqX2ibE8RGEq4Lg7g4bot6BT1Z7B9dH5corUD Chain> snow/engine/common/queue/jobs.go#181: executed 69 operations
589+
INFO [01-25|16:47:06] <2AM3vsuLoJdGBGqX2ibE8RGEq4Lg7g4bot6BT1Z7B9dH5corUD Chain> snow/engine/snowman/transitive.go#354: bootstrapping finished with 2DUxceCx71L5TLTeLpKUQxSBVm8vTKPmFs2usAyRnusUzs4Q4M as the last accepted block
590+
```
591+
592+
If you didn't put the SpacesVM binary in the right place, you'll see something
593+
like:
594+
```bash
595+
INFO [01-26|05:54:19] chains/manager.go#246: creating chain:
596+
ID: 2AM3vsuLoJdGBGqX2ibE8RGEq4Lg7g4bot6BT1Z7B9dH5corUD
597+
VMID:sqja3uK17MJxfC7AN8nGadBw9JK5BcrsNwNynsqP5Gih8M5Bm
598+
ERROR[01-26|05:54:19] chains/manager.go#270: error creating chain 2AM3vsuLoJdGBGqX2ibE8RGEq4Lg7g4bot6BT1Z7B9dH5corUD: error while looking up VM: there is no ID with alias sqja3uK17MJxfC7AN8nGadBw9JK5BcrsNwNynsqP5Gih8M5Bm
599+
```
600+
601+
#### Become a Fuji Validator
602+
Once your node is up and running with the SpacesVM, you'll need to [become a Fuji Validator].
603+
This is the exact same flow as Mainnet except you only need to stake
604+
`1 AVAX` instead of `2000 AVAX`.
605+
606+
Recall, **only validators on the Primary Network (in this case Fuji) can become
607+
validators of subnets.**
608+
609+
#### Submit a Validator Request
610+
Once you've completed the above steps and your node is fully bootstrapped, submit a
611+
[Spaces Demo Validator Request] to be considered as a validator (everyone will
612+
be approved).
613+
614+
The Spaces Subnet Demo is a Permissioned Subnet and requires explicit approval from the
615+
creator to validate. In the near future, it will be possible to create permissionless
616+
subnets that anyone can join.
617+
618+
If you have any questions, reach out to @\_patrickogrady on Twitter!
521619
522620
### Running a local network
523621
[`scripts/run.sh`](scripts/run.sh) automatically installs [avalanchego], sets up a local network,
@@ -597,4 +695,7 @@ or by using the [subnet-cli].
597695
[subnet-cli]: https://github.com/ava-labs/subnet-cli
598696
[Coreth]: https://github.com/ava-labs/coreth
599697
[C-Chain]: https://docs.avax.network/learn/platform-overview/#contract-chain-c-chain
600-
[Subnet]: https://docs.avax.network/learn/platform-overview/#subnets
698+
[Subnet]: https://docs.avax.network/learn/platform-overview/#subnets
699+
[Spaces Subnet Demo]: https://tryspaces.xyz
700+
[Spaces Demo Validator Request]: https://forms.gle/aDFWBLEP9GvHwaFG6
701+
[become a Fuji Validator]: https://docs.avax.network/build/tutorials/nodes-and-staking/staking-avax-by-validating-or-delegating-with-the-avalanche-wallet

0 commit comments

Comments
 (0)