Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vega network docs #218

Merged
merged 1 commit into from
Jun 26, 2024
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
228 changes: 228 additions & 0 deletions docs/02-getting-started/02-setup/08-vega-network.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,228 @@
# 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**

```shell
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 is `0.0.0.0`.
- `--stratum-port`: Specify the port number of the mining pool, the default is `9880`.

Comment on lines +7 to +27
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Convert emphasis to headings for better document structure.

Using emphasis (**text**) instead of headings for sections like "Start", "View the IPC file path", etc., is not semantically correct in Markdown.

- **1. Start**
+ ## 1. Start

Apply similar changes to other emphasized sections.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## Windows joins vega network
**1. Start**
```shell
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 is `0.0.0.0`.
- `--stratum-port`: Specify the port number of the mining pool, the default is `9880`.
## Windows joins vega network
## 1. Start
```shell
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 is `0.0.0.0`.
- `--stratum-port`: Specify the port number of the mining pool, the default is `9880`.
Tools
LanguageTool

[uncategorized] ~20-~20: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...0.0.0 --stratum-port 9880 ``` - --net: Specifies the network. - `--disable-met...


[uncategorized] ~21-~21: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...ifies the network. - --disable-metrics: Whether to disable the metrics monitori...


[uncategorized] ~22-~22: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ... false not to disable. - --node-name: The node name is only used for display....


[uncategorized] ~23-~23: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...ll be randomly generated. - --data-dir: The data storage directory, it is recom...


[uncategorized] ~24-~24: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ... easy to find. - --logger-disable-file: Whether to disable the file log collect...


[uncategorized] ~25-~25: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...enot to disable. ---stratum-address`: Specify the address of the mining pool,...


[uncategorized] ~26-~26: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...default is 0.0.0.0. - --stratum-port: Specify the port number of the mining p...

Markdownlint

9-9: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading

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:

```shell
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:

```shell
starcoin.exe -c \\.\pipe\starcoin\vega\starcoin.ipc console
```

In the Starcoin console enter:

```shell
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.

```shell
# View the default account and find the account address
account default
```

**5. Export the private key of the default account**

```shell
account export <ADDRESS>
```

Note: Please keep the private key safe!

**6. Exit the console**

```shell
exit
```

## Linux joins vega network (recommendation)

**1. Start**

```shell
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.

```shell
# 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:

```shell
starcoin -c ~/.starcoin/vega/starcoin.ipc console
```

In the Starcoin console enter:

```shell
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.

```shell
# View the default account and find the account address
account default
```

**4. Export the private key of the default account**

```shell
account export <ADDRESS>
```

Note: Please keep the private key safe!

**5. Exit the console**

```shell
exit
```
Comment on lines +81 to +137
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consistency maintained across OS-specific instructions.

The Linux setup instructions are well-aligned with the Windows section, ensuring consistency. However, the same markdown issue with emphasis applies here.

- **1. Start**
+ ## 1. Start

Apply similar changes to other emphasized sections.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## Linux joins vega network (recommendation)
**1. Start**
```shell
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.
```shell
# 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:
```shell
starcoin -c ~/.starcoin/vega/starcoin.ipc console
```
In the Starcoin console enter:
```shell
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.
```shell
# View the default account and find the account address
account default
```
**4. Export the private key of the default account**
```shell
account export <ADDRESS>
```
Note: Please keep the private key safe!
**5. Exit the console**
```shell
exit
```
## Linux joins vega network (recommendation)
## 1. Start
```shell
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.
```shell
# 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:
```shell
starcoin -c ~/.starcoin/vega/starcoin.ipc console
```
In the Starcoin console enter:
```shell
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.
```shell
# View the default account and find the account address
account default
```
## 4. Export the private key of the default account
```shell
account export <ADDRESS>
```
Note: Please keep the private key safe!
## 5. Exit the console
```shell
exit
```
Tools
LanguageTool

[uncategorized] ~89-~89: Possible missing preposition found. (AI_EN_LECTOR_MISSING_PREPOSITION)
Context: ...efault, the mining pool is not listened by default, and the data directory default...

Markdownlint

83-83: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


99-99: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


116-116: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


125-125: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


133-133: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


## Docker joins vega network

**1. Pull the [Docker image](https://hub.docker.com/r/starcoin/starcoin/)**

```shell
docker pull starcoin/starcoin:latest
```

If you want to use a specific version, you can change the pull tag, such as `v2.0.0`:

```shell
docker pull starcoin/starcoin:v2.0.0
```

**2. Start**

The `starcoin` binaries are in the `/starcoin` directory in the mirror.

```shell
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:

```shell
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:

```shell
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:

```shell
starcoin -c ~/.starcoin/vega/starcoin.ipc console
```

In the Starcoin console enter:

```shell
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.

```shell
# View the default account and find the account address
account default
```

**6. Export the private key of the default account**

```shell
account export <ADDRESS>
Comment on lines +139 to +213
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docker instructions are clear and concise.

The Docker setup instructions are detailed and provide specific commands for users to follow. However, the document structure could be improved by using proper headings.

- **1. Pull the [Docker image](https://hub.docker.com/r/starcoin/starcoin/)**
+ ## 1. Pull the [Docker image](https://hub.docker.com/r/starcoin/starcoin/)

Apply similar changes to other emphasized sections.

Committable suggestion was skipped due to low confidence.

Tools
LanguageTool

[uncategorized] ~161-~161: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...atest /starcoin/starcoin ``` - --name: Specifies the container name. - `-v`: B...


[uncategorized] ~162-~162: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...e: Specifies the container name. - -v`: Bind mounted volume for persisting data...


[uncategorized] ~163-~163: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...persisting data in Docker. - --network: Let the network of the Docker container...


[uncategorized] ~173-~173: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: .../vega/starcoin.ipc console ``` - --rm: Automatically remove the container when...


[uncategorized] ~174-~174: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...en exiting the Starcoin console. - -it: Enter the container interactively, assi...

Markdownlint

153-153: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


165-165: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


184-184: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


201-201: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


210-210: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading

```

Note: Please keep the private key safe!

**7. Exit the console**

```shell
exit
```

## Seed Node JSON-RPC

- HTTP: http://vega.seed.starcoin.org
- HTTPS: https://vega-seed.starcoin.org
- WebSocket: ws://vega.seed.starcoin.org:9870
Comment on lines +225 to +228
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Address bare URLs in the document.

Markdown guidelines suggest avoiding bare URLs. Adding descriptions can improve readability and accessibility.

- - HTTP: http://vega.seed.starcoin.org
+ - HTTP: [Vega Seed Node - HTTP](http://vega.seed.starcoin.org)
- - HTTPS: https://vega-seed.starcoin.org
+ - HTTPS: [Vega Seed Node - HTTPS](https://vega-seed.starcoin.org)
- - WebSocket: ws://vega.seed.starcoin.org:9870
+ - WebSocket: [Vega Seed Node - WebSocket](ws://vega.seed.starcoin.org:9870)
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- HTTP: http://vega.seed.starcoin.org
- HTTPS: https://vega-seed.starcoin.org
- WebSocket: ws://vega.seed.starcoin.org:9870
- HTTP: [Vega Seed Node - HTTP](http://vega.seed.starcoin.org)
- HTTPS: [Vega Seed Node - HTTPS](https://vega-seed.starcoin.org)
- WebSocket: [Vega Seed Node - WebSocket](ws://vega.seed.starcoin.org:9870)
Tools
Markdownlint

226-226: null (MD034, no-bare-urls)
Bare URL used


227-227: null (MD034, no-bare-urls)
Bare URL used

Loading
Loading