How to participate in the vega network
Introduction
On June 21 2024, Starcoin launched the Vega network for Starcoin 2.0. This marks a new chapter for Starcoin, integrating FlexiDag and TurboSTM technologies to boost flexibility, performance, and transaction efficiency. This significant upgrade reflects Starcoin's commitment to continuous innovation and excellence in the blockchain space, setting the stage for future advancements and opportunities.
Windows joins vega network
1. Start
starcoin.exe --net vega ^
--disable-metrics true ^
--node-name starcoin-vega ^
--data-dir D:\starcoin\data ^
--logger-disable-file true ^
--stratum-address 0.0.0.0 --stratum-port 9880
--net
: Specifies the network.--disable-metrics
: Whether to disable the metrics monitoring service,true
to disable,false
not to disable.--node-name
: The node name is only used for display. You can choose a unique name according to your own preferences. If not specified, it will be randomly generated.--data-dir
: The data storage directory, it is recommended to choose a path that is easy to find.--logger-disable-file
: Whether to disable the file log collector,true
to disable,false
not to disable.--stratum-address
: Specify the address of the mining pool, the default is0.0.0.0
.--stratum-port
: Specify the port number of the mining pool, the default is9880
.
After entering the above command in the cmd window of Windows, press Enter, and the node will start to synchronize the block data, just wait for the synchronization to complete.
2. View the IPC file path
Drag the sidebar to the top with the mouse, and you can see that the output shows the storage path of the IPC file:
2022-05-23T16:40:06.642907500+08:00 INFO - Ipc file path: "\\\\.\\pipe\\starcoin\\vega\\starcoin.ipc
# IPC file path is:
\\\\.\\pipe\\starcoin\\vega\\starcoin.ipc
3. View node synchronization progress
If you want to know the progress of the node synchronization data, you can open a new cmd window at this time and use the IPC file to connect to the Starcoin console:
starcoin.exe -c \\.\pipe\starcoin\vega\starcoin.ipc console
In the Starcoin console enter:
node sync status
Some key information can be found in the output JSON data.
The synchronization is completed when chain_status.head.number
and state.Synchronizing.target.number
are equal.
4. View default account
Each newly started node is initialized with a default account with an empty password.
# View the default account and find the account address
account default
5. Export the private key of the default account
account export <ADDRESS>
Note: Please keep the private key safe!
6. Exit the console
exit
Linux joins vega network (recommendation)
1. Start
starcoin
The starcoin
command uses the vega
network by default, the mining client is disabled by default, the mining pool is not listened by default, and the data directory defaults to .starcoin/vega
under the vega directory.
# Data directory, ubuntu is the username of the demo, please change it according to your actual situation
2022-05-24T10:07:29.069207121+08:00 INFO - Final data-dir is : "/home/ubuntu/.starcoin/vega"
# IPC file path
2022-05-24T10:07:29.061062410+08:00 INFO - Ipc file path: "/home/ubuntu/.starcoin/vega/starcoin.ipc"
2. View node synchronization progress
Open a new command line window and enter:
starcoin -c ~/.starcoin/vega/starcoin.ipc console
In the Starcoin console enter:
node sync status
Some key information can be found in the output JSON data.
The synchronization is completed when chain_status.head.number
and state.Synchronizing.target.number
are equal.
3. View default account
Each newly started node is initialized with a default account with an empty password.
# View the default account and find the account address
account default
4. Export the private key of the default account
account export <ADDRESS>
Note: Please keep the private key safe!
5. Exit the console
exit
Docker joins vega network
1. Pull the Docker image
docker pull starcoin/starcoin:latest
If you want to use a specific version, you can change the pull tag, such as v2.0.0
:
docker pull starcoin/starcoin:v2.0.0
2. Start
The starcoin
binaries are in the /starcoin
directory in the mirror.
docker run --name starcoin -v ~/.starcoin/:/root/.starcoin/ --network host starcoin/starcoin:latest /starcoin/starcoin
--name
: Specifies the container name.-v
: Bind mounted volume for persisting data in Docker.--network
: Let the network of the Docker container be attached to the host, and the two can communicate with each other.
3. Connect to the Starcoin console via Docker
Open a new command line window and enter:
docker run --rm -it -v ~/.starcoin/:/root/.starcoin/ starcoin/starcoin:latest /starcoin/starcoin -c /root/.starcoin/vega/starcoin.ipc console
--rm
: Automatically remove the container when exiting the Starcoin console.-it
: Enter the container interactively, assigning a pseudo terminal.
If you don't want to start a new container, you can directly access the container that started Starcoin:
docker container exec -it starcoin bash
/starcoin/starcoin -c /root/.starcoin/vega/starcoin.ipc console
4. View node synchronization progress
Open a new command line window and enter:
starcoin -c ~/.starcoin/vega/starcoin.ipc console
In the Starcoin console enter:
node sync status
Some key information can be found in the output JSON data.
The synchronization is completed when chain_status.head.number
and state.Synchronizing.target.number
are equal.
5. View default account
Each newly started node is initialized with a default account with an empty password.
# View the default account and find the account address
account default
6. Export the private key of the default account
account export <ADDRESS>
Note: Please keep the private key safe!
7. Exit the console
exit
Seed Node JSON-RPC
- HTTP: http://vega.seed.starcoin.org
- HTTPS: https://vega-seed.starcoin.org
- WebSocket: ws://vega.seed.starcoin.org:9870