-
Notifications
You must be signed in to change notification settings - Fork 242
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
docs: testnet 5 documentation for Babylon validators #369
Open
samricotta
wants to merge
22
commits into
main
Choose a base branch
from
sam/bbn-test-5
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
0c9b468
Create README.md
samricotta fa80df0
Update README.md
samricotta 72e3b67
Update README.md
samricotta 12bf5c0
Update README.md
samricotta a652464
Update README.md
samricotta bbb9eed
Update README.md
samricotta f2d4734
Update README.md
samricotta 0d86a88
Update README.md
samricotta a21af5e
Update pages node and validator
samricotta f2a855b
update to formatting
samricotta 25c8d75
Update README.md
samricotta 17c63eb
Update README.md
samricotta 931b9b5
Review comments part 1
samricotta 43a0dc7
Update README.md
samricotta b9de762
Update README.md
samricotta 9c5d79f
Update README.md
samricotta eaf6943
updates to secuity and monitoring
samricotta d3765c7
update security and monitoring
samricotta 35145f8
networks landing page
samricotta c887828
review updates
samricotta b1ccfcf
update sections - review
samricotta 0974f3b
Update README.md
samricotta File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,36 @@ | ||
# Networks | ||
# Babylon Networks | ||
|
||
This repository contains information about networks launched by Babylon Labs. | ||
Welcome to the Babylon Networks repository. This is your central hub | ||
for network participation information, whether you're running a node, | ||
operating as a validator, providing finality services, or participating | ||
in the covenant committee. | ||
|
||
|
||
## Network Participants | ||
|
||
### Node Operators | ||
Run a Babylon node to participate in the network | ||
- [Node Setup Guide](babylon-node/README.md) | ||
|
||
### Validators | ||
Help secure the network by running a validator node and participating in consensus. | ||
- [Validator Setup Guide](babylon-validators/README.md) | ||
|
||
### Finality Providers | ||
Provide finality services for the Babylon network. | ||
- [Registration and Phase 2 Guide](https://github.com/babylonlabs-io/finality-provider/blob/sam/docs-fp/docs/finality-provider-phase2.md) | ||
- [Network Information](finality-providers/README.md) | ||
- [Finality Provider Registry](finality-providers/registry/) | ||
- [Finality Provider Signatures](finality-providers/sigs/) | ||
<!-- add the registry and sigs in when we have it --> | ||
|
||
### Covenant Committee | ||
Information for the Babylon Bitcoin Covenant Committee. | ||
- [Committee Overview](covenant-committee/README.md) | ||
|
||
## Additional Resources | ||
- [Documentation](https://docs.babylonlabs.io) | ||
- [Discord Community](https://discord.gg/babylonchain) | ||
- [GitHub Repository](https://github.com/babylonlabs-io) | ||
|
||
<!-- update links when we have them --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,196 @@ | ||
# Babylon Node Setup | ||
|
||
# Babylon Node Setup | ||
|
||
## Table of Contents | ||
|
||
1. [Install Babylon Binary](#install-babylon-binary) | ||
2. [Setup Node Home Directory and Configuration](#setup-your-node-home-directory-and-configuration) | ||
3. [Sync Node](#sync-node) | ||
4. [Monitoring Your Node](#monitoring-your-node) | ||
5. [Security Recommendations](#security-recommendations) | ||
6. [Next Steps](#next-steps) | ||
|
||
## Install Babylon Binary | ||
|
||
1. Install [Golang 1.23](https://go.dev/dl) | ||
2. Verify installation: | ||
|
||
```shell | ||
go version | ||
``` | ||
|
||
3. Clone and build Babylon: | ||
```shell | ||
git clone [email protected]:babylonlabs-io/babylon.git | ||
cd babylon | ||
git checkout bbn-test-5 | ||
make install | ||
``` | ||
<!-- TODO: testnet tag to be defined --> | ||
This command does the following: | ||
- Builds the daemon | ||
- Compiles all the Go packages in the project | ||
- Installs the binary | ||
- Makes the `babylond` command globally accessible from your terminal | ||
|
||
Now that the binary has been successfully installed, | ||
let's check the available actions through the `babylond` command: | ||
|
||
```shell | ||
babylond | ||
Available Commands: | ||
add-genesis-account Add a genesis account to genesis.json | ||
collect-gentxs Collect genesis txs and output a genesis.json file | ||
comet CometBFT subcommands | ||
config Utilities for managing application configuration | ||
... | ||
``` | ||
|
||
If the `babylond` command isn't found, ensure `$GOPATH/bin` is in your shell's | ||
`$PATH`. Add it with: | ||
|
||
```shell | ||
echo 'export PATH=$HOME/go/bin:$PATH' >> ~/.profile | ||
``` | ||
|
||
## Setup your node, home directory, and configuration | ||
|
||
Initialize your node and create the necessary configuration directory. | ||
This command will generate several important configuration files | ||
including `app.toml`, `client.toml`, and `genesis.json`: | ||
|
||
```shell | ||
babylond init <moniker> --chain-id bbn-test-5 --home <path> | ||
``` | ||
|
||
The `<moniker>` is a unique identifier for your node (e.g. `node0`). | ||
The `--home` flag specifies the directory where your node files will be stored (e.g. `--home ./nodeDir`). | ||
|
||
After initialization, you'll need to modify the following configuration files: | ||
|
||
1. First, open `app.toml` and update these the following settings: | ||
|
||
```shell | ||
# Base configuration | ||
minimum-gas-prices = "0.005ubbn" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here, we should explain that these settings will disable IAVL cache to make the node utilize less memory. |
||
iavl-cache-size = 0 | ||
iavl-disable-fastnode=true | ||
samricotta marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
[btc-config] | ||
|
||
# Configures which bitcoin network should be used for checkpointing | ||
# valid values are: [mainnet, testnet, simnet, signet, regtest] | ||
network = "signet" # The Babylon testnet connects to the signet Bitcoin network | ||
``` | ||
|
||
Navigate to `config.toml`. Add in your seed, as shown below: | ||
|
||
```shell | ||
#P2P Configuration Options | ||
|
||
# Comma separated list of seed nodes to connect to | ||
seeds = "[email protected]:26656" # This is only an example of the testnet seed and should be replaced with the actual seed node. | ||
``` | ||
Please head to [Nodes.Guru](https://nodes.guru) for the latest seed node. | ||
<!-- update with link to seed node when available --> | ||
|
||
Next, you'll need to obtain the network's genesis file. This file contains | ||
the initial state of the blockchain and is crucial for successfully syncing | ||
your node. You can get it from: | ||
|
||
1. The official Babylon Networks repository: [bbn-test-5](https://github.com/babylonlabs-io/networks/tree/main/bbn-test-5) | ||
|
||
2. Or download directly using these commands: | ||
|
||
```shell | ||
wget https://github.com/babylonlabs-io/networks/raw/main/bbn-test-5/genesis.tar.bz2 # TODO: update this file name if necessary | ||
tar -xjf genesis.tar.bz2 && rm genesis.tar.bz2 | ||
mv genesis.json <path>/config/genesis.json #insert your --home <path> | ||
``` | ||
|
||
>Note: Verify that the `chain-id` in the genesis file matches the one used in | ||
your initialization command (`bbn-test-5`). This ensures your node connects | ||
to the correct network. | ||
|
||
## Sync Node | ||
|
||
We are now ready to sync the node. | ||
samricotta marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
```shell | ||
babylond start --chain-id bbn-test-5 --home <path> --x-crisis-skip-assert-invariants | ||
``` | ||
|
||
Lets go through the flags of the above command: | ||
|
||
- `start`: This is the command to start the Babylon node. | ||
- `--chain-id`: Specifies the ID of the blockchain network you're connecting to. | ||
- `--home`: Sets the directory for the node's data and configuration files and | ||
is dependant on where the files were generated for you from the initialization (e.g. `--home ./nodeDir`) | ||
|
||
### Options for Syncing | ||
samricotta marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<!-- TODO: update accordingly with the new sync method when available --> | ||
|
||
You have two options for syncing your node: | ||
|
||
1. **Sync through Network Peers** | ||
- Use the seed node configuration mentioned earlier in `config.toml` | ||
- Additional peers can be added under the `persistent_peers` setting | ||
<!-- Add peer list when available --> | ||
|
||
2. **Sync from Snapshot** | ||
- For faster syncing, you can use a snapshot instead of syncing from genesis | ||
- Snapshots are periodic backups of the chain state | ||
- Find available snapshots at: <!-- Add link when available --> | ||
|
||
>Note: Always verify snapshot sources and checksums before using them to ensure security. | ||
|
||
## Monitoring Your Node | ||
|
||
Your Babylon node exposes metrics through two Prometheus endpoints: | ||
- `Port 1317`: API metrics | ||
- `Port 26660`: CometBFT metrics | ||
|
||
To enable metric collection, modify your `app.toml`: | ||
``` | ||
[telemetry] | ||
enabled = true | ||
prometheus-retention-time = 600 # 10 minutes | ||
[api] | ||
enable = true | ||
address = "0.0.0.0:1317" | ||
``` | ||
|
||
Basic health monitoring should check: | ||
- Node synchronization status | ||
- Block height compared to network | ||
- Connected peers count | ||
- System resource usage (CPU, RAM, Disk) | ||
|
||
## Security Recommendations | ||
|
||
1. **Secure Key Management** | ||
- Store keys in a separate, encrypted storage system | ||
- Currently no secure keyring backend is supported for production use | ||
- Offline backups | ||
|
||
2. **Network Security** | ||
- Only expose necessary gRPC, REST, and CometBFT Endpoints in app.toml and config.toml | ||
as seen [here](https://docs.cosmos.network/main/learn/advanced/grpc_rest) | ||
- Configure rate limiting in your reverse proxy (nginx/caddy) for public endpoints | ||
- Use SSL/TLS certificates when exposing endpoints externally | ||
|
||
3. **System Security** | ||
- Keep the host system updated | ||
- Monitor system logs for suspicious activity | ||
|
||
4. **Performance Considerations** | ||
- The node handles approximately 2,500 RPS on the native Cosmos SDK RPC endpoints | ||
- Monitor resource usage during peak periods | ||
- Ensure adequate disk space for chain growth | ||
- Set up alerts for resource thresholds | ||
|
||
## Next Steps | ||
|
||
For information about becoming a Finality Provider in the Babylon network, | ||
samricotta marked this conversation as resolved.
Show resolved
Hide resolved
|
||
see our [Finality Provider Guide](../babylon-validators/README.md). |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a cross-platform command?