Skip to content

Commit

Permalink
chore: MC to BEAM additional fixes (#97)
Browse files Browse the repository at this point in the history
* chore: change network name to match chainlist

* chore: add network upgrade instructions

* chore: add mainnet faucet

* chore: add sphere and beamos to overview
  • Loading branch information
0x0sub authored Nov 7, 2023
1 parent 94cc313 commit 2b61cf7
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 24 deletions.
2 changes: 1 addition & 1 deletion components/network-button/network-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const NETWORK_PARAMS = {
},
4337: {
chainId: "0x10f1",
chainName: "Beam Mainnet",
chainName: "Beam",
nativeCurrency: {
name: "Beam",
symbol: "BEAM",
Expand Down
5 changes: 5 additions & 0 deletions pages/chain/beam-ecosystem.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,15 @@ Delve deeper into the Beam ecosystem. Here's an overview of the tools and resour
## External Tools & dApps

- [Beam AMM Swap](https://swap.onbeam.com): Beam's official decentralized exchange to swap tokens.

- [Beam LayerZero Bridge](https://bridge.onbeam.com): Enables bridging of assets between Beam mainnet, testnet, and other networks.

- [Beam Mainnet Subnets Explorer](https://subnets.avax.network/beam): A tool to explore transactions and more on the Beam Mainnet.

- [Beam Testnet Subnets Explorer](https://subnets-test.avax.network/beam): An explorer dedicated to Beam's Testnet for developers and testers.

- [Sphere](https://sphere.market/): Beam’s designated marketplace for buying, selling, and discovering unique gaming NFTs.

- [BeamOS](https://os.onbeam.com/): BeamOS serves as your gateway into the Beam ecosystem.

Browse and use the above apps to enrich your experience in the Beam ecosystem.
85 changes: 63 additions & 22 deletions pages/chain/nodes/beam-node.mdx
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
---
description: 'Guide to setting up a Beam Node on the Beam, detailing installation and monitoring steps for optimum node functionality.'
description: "Guide to setting up a Beam Node on the Beam, detailing installation and monitoring steps for optimum node functionality."
---
import { Callout } from 'nextra/components'
import { Steps } from 'nextra-theme-docs'

import { Callout } from "nextra/components";
import { Steps } from "nextra-theme-docs";

# Beam Node

To run your own Beam Node, no matter if you plan to run a validator node or a non-validating node, you have to install AvalancheGo. The easiest method is using the installer which you can find [here](https://docs.avax.network/nodes/build/set-up-node-with-installer).

Once you have a running AvalancheGo installation, you need to add the Beam Subnet-EVM to track the Beam Subnet in your node.


## Installing the Beam Subnet-EVM

<Steps>
### Downloading the Subnet-EVM


First we have to download the Subnet-EVM binary from [Ava-Labs Github](https://github.com/ava-labs/subnet-evm) and copy it into the AvalancheGo plugin directory. The plugin folder is the default folder when using the AvalancheGo Installer.

```bash /kLPs8zGsTVZ28DhP1VefPCFbCgS7o5bDNez8JUxPVw9E6Ubbz/
Expand All @@ -28,33 +27,38 @@ cp subnet-evm ~/.avalanchego/plugins/kLPs8zGsTVZ28DhP1VefPCFbCgS7o5bDNez8JUxPVw9
```

<Callout type="info">
Please check if you download the latest [Subnet-EVM release](https://github.com/ava-labs/subnet-evm/releases).
Please check if you download the latest [Subnet-EVM
release](https://github.com/ava-labs/subnet-evm/releases).
</Callout>

The long string `kLPs8zGsTVZ28DhP1VefPCFbCgS7o5bDNez8JUxPVw9E6Ubbz` is the CB58 encoded VMID of the Beam Subnet-EVM. AvalancheGo will use the name of this file to determine what VMs are available to run from the plugins directory.
The long string `kLPs8zGsTVZ28DhP1VefPCFbCgS7o5bDNez8JUxPVw9E6Ubbz` is the CB58 encoded VMID of the Beam Subnet-EVM. AvalancheGo will use the name of this file to determine what VMs are available to run from the plugins directory.

### Tracking the Beam Subnet

To start tracking the Beam Subnet update your node config in your favorite editor.

<Callout type="info">
The installation script creates the node configuration file at `~/.avalanchego/configs/node.json`. If AvalancheGo is built from source, no default file is created; you would need to create it manually if needed.
The installation script creates the node configuration file at
`~/.avalanchego/configs/node.json`. If AvalancheGo is built from source, no
default file is created; you would need to create it manually if needed.
</Callout>

```bash copy
nano ~/.avalanchego/configs/node.json
```

Add the "`track-subnets`" option to node config.
Add the "`track-subnets`" option to node config.

```json
{
<OTHER-CONFIGURATIONS>
"track-subnets": "eYwmVU67LmSfZb1RwqCMhBYkFyG8ftxn6jAwqzFmxC9STBWLC"
}
```
If you want to track more than one subnet, you can add them as comma separated list.

As an alternative to the config file you can pass the subnet ID as parameter during the node start-up with `--track-subnets eYwmVU67LmSfZb1RwqCMhBYkFyG8ftxn6jAwqzFmxC9STBWLC`.
If you want to track more than one subnet, you can add them as comma separated list.

As an alternative to the config file you can pass the subnet ID as parameter during the node start-up with `--track-subnets eYwmVU67LmSfZb1RwqCMhBYkFyG8ftxn6jAwqzFmxC9STBWLC`.

### Apply Network Upgrades

Expand All @@ -72,41 +76,43 @@ wget https://raw.githubusercontent.com/Merit-Circle/beam-subnet/main/subnets/bea

If you haven't used the installer, your config directory may be located elsewhere. In that case, place the file in `{chain-config-dir}/2tmrrBo1Lgt1mzzvPSFt73kkQKFas5d1AP88tv9cicwoFp8BSn/`, where `2tmrrBo1Lgt1mzzvPSFt73kkQKFas5d1AP88tv9cicwoFp8BSn` is the `{blockchainID}`.


### Restarting the Node

After you have updated your config, you have to restart your node to start tracking the Beam subnet.
After you have updated your config, you have to restart your node to start tracking the Beam subnet.

**Commands for Node Management:**
**Commands for Node Management:**

Restart your node:

```bash copy
sudo systemctl restart avalanchego
```

Stop your node:
Stop your node:

```bash copy
sudo systemctl stop avalanchego
```

Start your node:

```bash copy
sudo systemctl start avalanchego
```

Check node status:
Check node status:

```bash copy
sudo systemctl status avalanchego
```

To follow the log use (ctrl-c to stop):

```bash copy
sudo journalctl -u avalanchego -f
```
</Steps>



</Steps>

## Monitoring Your Node

Expand All @@ -127,12 +133,11 @@ For an explanation of the response, check the [API docs](https://docs.avax.netwo

If you want to understand your Subnet better, take a look at the blockchain log. Normally, you can find this log in `~/.avalanchego/logs/ChainID.log{:bash}`. Just replace "`ChainID`" with the real ID of your blockchain in your Subnet.

Beam Mainnet example logfile location:
Beam Mainnet example logfile location:
`~/.avalanchego/logs/2tmrrBo1Lgt1mzzvPSFt73kkQKFas5d1AP88tv9cicwoFp8BSn.log{:bash}`

To better understand how your Node and Subnet are working, you can set up a tool called Prometheus+Grafana. This tool helps you monitor their performance and comes with easy-to-read charts for regular operations and specific Subnet data. There's a [step-by-step guide](https://docs.avax.network/nodes/maintain/setting-up-node-monitoring) available to help you get it all set up.


## Next Steps

Now that you've launched your Beam node, what should you do next?
Expand All @@ -141,6 +146,30 @@ Your Beam node will perform consensus on its own, but it is not yet a validator

Take a look at the [AVAX Maintenance](https://docs.avax.network/nodes#maintain) section to understand how to maintain your node.

## Network Upgrades

To keep your node up-to-date with a network upgrade you need to keep the latest upgrade.json in the config directory. It should be placed in `{chain-config-dir}/{blockchainID}/upgrade.json{:bash}`, when using the installer the folder for Beam is:

- Mainnet `~/.avalanchego/configs/chains/2tmrrBo1Lgt1mzzvPSFt73kkQKFas5d1AP88tv9cicwoFp8BSn/{:bash}`
- Testnet `~/.avalanchego/configs/chains/y97omoP2cSyEVfdSztQHXD9EnfnVP9YKjZwAxhUfGbLAPYT9t/{:bash}`

<Steps>

### Download latest upgrade.json

```bash copy
cd ~/.avalanchego/configs/chains/2tmrrBo1Lgt1mzzvPSFt73kkQKFas5d1AP88tv9cicwoFp8BSn/
curl -o upgrade.json https://raw.githubusercontent.com/Merit-Circle/beam-subnet/main/subnets/beam-mainnet/upgrade.json
```

### Restart your Node

```bash copy
sudo systemctl restart avalanchego
```

</Steps>

## Commands for Beam Testnet Node

Here are the commands for a Beam Testnet node:
Expand All @@ -167,6 +196,7 @@ nano ~/.avalanchego/configs/node.json
```bash copy
mkdir ~/.avalanchego/configs/chains/y97omoP2cSyEVfdSztQHXD9EnfnVP9YKjZwAxhUfGbLAPYT9t
```

```bash copy
wget https://raw.githubusercontent.com/Merit-Circle/beam-subnet/main/subnets/beam-testnet/upgrade.json
```
Expand All @@ -184,4 +214,15 @@ curl -X POST --data '{
},
"id": 1
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/P
```
```

### Testnet Network Upgrade

```bash copy
cd ~/.avalanchego/configs/chains/y97omoP2cSyEVfdSztQHXD9EnfnVP9YKjZwAxhUfGbLAPYT9t/
curl -o upgrade.json https://raw.githubusercontent.com/Merit-Circle/beam-subnet/main/subnets/beam-testnet/upgrade.json
```

```bash copy
sudo systemctl restart avalanchego
```
4 changes: 3 additions & 1 deletion pages/chain/resources.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ import { Cards, Card } from "nextra-theme-docs";

</Cards>

- [Beam Testnet Faucet](https://core.app/tools/testnet-faucet/?subnet=beam&token=beam): A Testnet Faucet for obtaining $BEAM for testing purposes on the Beam Testnet.
- [Beam Faucet](https://faucet.onbeam.com/): A faucet for obtaining $BEAM on the Beam Mainnet.
- [Beam Testnet Faucet](https://core.app/tools/testnet-faucet/?subnet=beam&token=beam) ([Alternative Faucet](https://faucet.onbeam.com/)): A testnet faucet for obtaining $BEAM for testing purposes on the Beam Testnet.
- [Verify Contract](https://subnets.avax.network/tools/verify-contract): A tool for verifying smart contracts on the official block explorer.
- [Avatools](https://avatools.io): Offers helpful tools for interacting with the Beam Subnet, such as converting hex to cb58.
- [buildonbeam community @ Reddit](https://www.reddit.com/r/buildonbeam/): A place where devs can share ideas, programming knowledge, learn & help others while building on Beam.
- [Smart Contract UI](https://xtools-at.github.io/smartcontract-ui): A UI to read and write a smart contract's data.

## Brand Identity Kit

Expand Down

1 comment on commit 2b61cf7

@vercel
Copy link

@vercel vercel bot commented on 2b61cf7 Nov 7, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

beam-docs – ./

beam-docs-merit-circle.vercel.app
beam-docs-git-main-merit-circle.vercel.app
docs.onbeam.com

Please sign in to comment.