Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

feat: clarify who can run a bridge #286

Merged
merged 2 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion .github/styles/Vocab/Ronin/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
archive node
bridge
bridge operator
bridge operator node
bridge node
delegator
EVM
full node
Expand Down
6 changes: 3 additions & 3 deletions docs/basics/contribute/style-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ terms and their usage.
| archive node | An archive node retains all historical data right back to genesis. |
| bridge | Run a validator and a bridge together. |
| bridge operator | A bridge operator is a type of node used for acknowledging events on Ronin Bridge. |
| bridge operator node | Each validator is expected to run two nodes—a validator node and a bridge operator node. |
| bridge node | Each validator is expected to run two nodes—a validator node and a bridge node node. |
| delegator | To become a delegator, go to **RON Staking > All validators > Delegate**. |
| full node | Validator and non-validator are considered _full_ nodes—they store full blockchain data. |
| Governing Validator | Beside the 12 Governing Validators, top 10 Validator Candidates with the highest staked amount are selected as Standard Validators. |
| Katana | Katana, also known as the Katana DEX, is a decentralized exchange for Ronin. |
| mainnet | To run a node on the mainnet, make sure to comply with the minimum hardware requirements. |
| node | Each validator is expected to run two nodes—a validator node and a bridge operator node. |
| node | Each validator is expected to run two nodes—a validator node and a bridge node. |
| node operator | A node operator is an individual or institution that sets up and configure nodes for the validator. |
| non-validator node | A non-validator node is also known as an RPC node. |
| RON | Deposit 50 RON to your bridge address. |
Expand All @@ -46,7 +46,7 @@ terms and their usage.
| Saigon testnet | Run a validator node on the Saigon testnet. |
| Standard Validator | Beside the 12 Governing Validators, top 10 Validator Candidates with the highest staked amount are selected as Standard Validators. |
| testnet | The testnet has different hardware requirements for running a node. |
| validator | Each validator is expected to run two nodes—a validator node and a bridge operator node. |
| validator | Each validator is expected to run two nodes—a validator node and a bridge node. |
| Validator Candidate | Beside the 12 Governing Validators, top 10 Validator Candidates with the highest staked amount are selected as Standard Validators. |
| Validator Dashboard | To view your performance analytics, go to **Validator Dashboard > Analytics**. |
| validator node | Run a validator node on the Ronin mainnet. |
Expand Down
7 changes: 3 additions & 4 deletions docs/basics/key-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ A mainnet is a fully developed and released version of a blockchain network. Thi

### Node

A node is a computer that performs a certain function on a blockchain network
A node is essentially a computer that performs a certain function on a blockchain network
and runs client software in order to do so. Some nodes validate transactions,
while others observe activity on the blockchain. Nodal network structure is
also a key aspect of maintaining security on a blockchain network.
Expand All @@ -155,10 +155,9 @@ On Ronin, the node types are as follows:
* Validator node
* Non-validator node
* Archive node
* Bridge operator node
* Bridge node

For more information about the Ronin nodes and the bridge operator, see
[Nodes](nodes.md).
For more information about nodes, see [Nodes](nodes.md).

## P

Expand Down
10 changes: 5 additions & 5 deletions docs/basics/nodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ There are two types of nodes on Ronin:
* Non-validator node
* Validator node
* Archive node
* Bridge operator node
* Bridge node

The following section describes each type in detail.

## What is a Ronin node?

The Ronin node ([GitHub](https://github.com/axieinfinity/ronin)) is the building block of the Ronin network infrastructure. Nodes connect together to conduct consensus on transactions, maintain the ledger, and provide other useful functions.
A Ronin node ([GitHub](https://github.com/axieinfinity/ronin)) is the building block of the Ronin network infrastructure. Nodes connect together to conduct consensus on transactions, maintain the ledger, and provide other useful functions.

The Ronin node can be configured in three different ways depending on the purpose:

Expand All @@ -29,8 +29,8 @@ subsequent block, and earning RON tokens as a reward. These are the nodes that a

Validator and non-validator are considered *full* nodes—they store full blockchain data, which is periodically pruned so the node does not store all state data back to genesis. The archive node, on the other hand, stores all of the information that a full node does but also builds an archive of historical states all the way back to genesis.

A validator node starts life as a full node, but has also “registered” itself to the network as a validator, which means that it may now accept RON token stake and potentially be included in the validator set that conduct network consensus.
A validator node starts its life as a full node, but has also “registered” itself to the network as a validator, which means that it may now accept RON token stake and potentially be included in the validator set that conduct network consensus.

## What is a bridge operator node?
## What is a bridge node?

A *bridge operator node* ([GitHub](https://github.com/axieinfinity/bridge-v2)), also referred to as the bridge operator, is a type of node used for acknowledging deposit and withdrawal events on Ronin Bridge—the blockchain bridge that facilitates asset transfers between Ronin and other EVM-based chains.
A *bridge node* ([GitHub](https://github.com/axieinfinity/bridge-v2)) is a type of node used for acknowledging deposit and withdrawal events on Ronin Bridge—the blockchain bridge that facilitates asset transfers between Ronin and Ethereum.
12 changes: 6 additions & 6 deletions docs/basics/roles.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,23 +65,23 @@ Validators who fail to fulfill their responsibilities are subject to [slashing](

## Bridge operator

A bridge operator is someone who runs a *bridge operator node* to manage deposit and withdrawal events on Ronin Bridge. The purpose of Ronin Bridge is facilitating asset transfers between Ronin and other Ethereum Virtual Machine (EVM)-based chains.
A bridge operator is someone who runs a *bridge node* to listen for deposit and withdrawal events on Ronin Bridge and relay the events to other users, and govern the bridge with the other bridge operators through a governance process.

### Bridge operator responsibilities

Bridge operators are in charge of the following:

* Operating a bridge operator node.
* Operating a bridge node.
* Governing Ronin Bridge.

#### Operating a bridge operator node
#### Operating a bridge node

Bridge operators run a bridge operator node and keep the node's software up to date.
Bridge operators run a bridge node and keep the node's software up to date.

### Governance

Bridge operators can propose and vote on changes to Ronin Bridge, such as pausing the bridge and adding or removing other bridge operators.
Bridge operators can propose and vote on changes to the Ronin Bridge, such as pausing the bridge and adding or removing other bridge operators.

### Slashing rules

Bridge operators who fail to fulfill their responsibilities are subject to [slashing](./../bridge-operators/slashing.md).
Bridge operators who fail to fulfill their responsibilities are subject to [slashing](./../bridge-operators/slashing.md).
8 changes: 4 additions & 4 deletions docs/bridge-operators/index.mdx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
---
title: Bridge operators
description: Learn how to run a bridge operator, participate in governance, and more.
description: Learn how to run a bridge node, participate in governance, and more.
---

import DocCardList from '@theme/DocCardList';
import {findSidebarItem} from '@site/src/sidebarUtils';

## Run a bridge operator
## Run a bridge node

<DocCardList items={[
findSidebarItem('/bridge-operators/setup/run-bridge-operator'),
findSidebarItem('/bridge-operators/setup/upgrade-bridge-operator'),
findSidebarItem('/bridge-operators/setup/run-bridge'),
findSidebarItem('/bridge-operators/setup/upgrade-bridge'),
]} />

## Slashing for bridge operators
Expand Down
22 changes: 13 additions & 9 deletions docs/bridge-operators/setup/overview.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
---
description: Hardware recommendations and methods of installation for bridge operator nodes.
title: Bridge operator node
description: Hardware recommendations and methods of installation for bridge nodes.
title: Bridge node
---

## Overview

A *bridge operator node* ([GitHub](https://github.com/axieinfinity/bridge-v2)), also referred to as the bridge operator, is a type of node used for acknowledging deposit and withdrawal events on Ronin Bridge—the blockchain bridge that facilitates asset transfers between Ronin and Ethereum.
A *bridge node* ([GitHub](https://github.com/axieinfinity/bridge-v2)) is a type of node used for acknowledging deposit and withdrawal events on Ronin Bridge—the blockchain bridge that facilitates asset transfers between Ronin and Ethereum.

## Installation methods
## Who can run a bridge node

We offer two different methods of installing nodes:
Bridge nodes are run by a fixed set of bridge operators selected by Sky Mavis and community. To run a bridge node, you need to go through a governance process that requires approval of at least 70% of the current bridge operators.

* The [Docker](/tags/docker-mainnet) method describes the installation of Ronin nodes as Docker instances, for those comfortable with Docker.
* The [CLI](/tags/cli) (command line interface) method uses a CLI tool to compile your own node binary from source. For more information, see [Build your node using Ronin CLI](./../../validators/setup/cli.md).
## Node installlation

## Next steps
We offer two different methods of installing the bridge:

* [Run a bridge operator](run-bridge-operator.md)
* Using Docker: if you're familiar with Docker, install and run the bridge as a Docker instance. For instructions, see [Run a bridge node](run-bridge.md).
* Manually: if you're more comfortable using the command line, compile your own bridge binary from the [source code on GitHub](https://github.com/axieinfinity/bridge-v2?tab=readme-ov-file#manually).

## Node upgrade

Keep the node's software up-to-date by upgarding to the latest version as described in [Upgrade bridge software](upgrade-bridge.md).
RodinGolodin marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor Author

@RodinGolodin RodinGolodin Apr 12, 2024

Choose a reason for hiding this comment

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

@minh-bq @huyngopt1994 Please help review the Docker compose config and the env file.

Original file line number Diff line number Diff line change
@@ -1,36 +1,47 @@
---
description: Run a bridge operator node on the Ronin mainnet.
title: Run a bridge operator
description: Run a bridge node on the Ronin mainnet.
title: Run a bridge node
tags:
- docker-mainnet
---

## Overview

This guide demonstrates how to run a bridge operator node on the mainnet using Docker.
This guide demonstrates how to run a bridge node on the Ronin mainnet using Docker.

## Before you start
To be eligible for running a bridge node, you need to go through a governance process that requires approval of at least 70% of the current bridge operators.
Only the bridge operators selected by Sky Mavis and community can run bridge nodes.

## Prerequisites

### Docker

* [Docker Engine](https://docs.docker.com/engine/install/)
* [Docker Compose plugin](https://docs.docker.com/compose/install/)
* [Zstandard](https://github.com/facebook/zstd)
Install Docker Engine and the Docker Compose plugin:

* [Docker Engine](https://docs.docker.com/engine/)
* [Docker Compose](https://docs.docker.com/compose/)

### RPC endpoints

### Ethereum endpoint
Have two RPC endpoints:

You need an Ethereum RPC endpoint to listen for events from Ethereum chain and send events to Ethereum. This can be an [Alchemy](https://www.alchemy.com/overviews/private-rpc-endpoint), Infura or any other Ethereum RPC endpoint.
* Ronin RPC endpoint for listening and sending events on the Ronin chain.
* Ronin mainnet: `https://api.roninchain.com/rpc`
* Saigon testnet: `https://saigon-testnet.roninchain.com/rpc`
* Ethereum RPC endpoint for listening and sending events on the Ethereum chain, such as [Alchemy](https://www.alchemy.com/overviews/private-rpc-endpoint) or Infura.

### Private keys

Generate two private keys as described in [Generate keys](./../../validators/setup/generate-keys.md):
Generate private keys:

* One key for the bridge voter (if you're a governor)
* One key for the bridge operator
* Generate a key for the bridge operator.
* If you're a Governing Validator, generate one more key for the bridge voter.
RodinGolodin marked this conversation as resolved.
Show resolved Hide resolved

For instructions, see [Generate keys](./../../validators/setup/generate-keys.md).

### System requirements

Recommended system requirements for running a bridge operator on the mainnet:
Recommended system requirements for running a bridge on the mainnet:

* 4-core CPU
* 8 GB RAM
Expand All @@ -39,38 +50,20 @@ Recommended system requirements for running a bridge operator on the mainnet:

These requirements are rough guidelines, and each node operator
should monitor their node to ensure good performance for the intended task.
The size of your Ronin node will also grow over time.

## Run the node

1. Create a bridge directory:

```bash
mkdir ~/ronin-bridge
```

Go to the newly created directory:

```bash
cd ~/ronin-bridge
```

Create a directory for bridge data:

```bash
mkdir -p data
```

1. Create a file called `docker-compose.yml`:
1. Set up a directory for the bridge and two nested directories for its data and the Docker configuration:

```bash
vim docker-compose.yml
mkdir -p ~/ronin-bridge/{data,docker}
cd ~/ronin-bridge/docker/
```

1. Paste the following into `docker-compose.yml`:
2. In the `docker` directory, create a `docker-compose.yaml` file with the following configuration:

```yaml
version: "3"
version: "3.1"
services:
db:
image: postgres:14.3
Expand Down Expand Up @@ -111,42 +104,36 @@ The size of your Ronin node will also grow over time.
- db
```

This compose file defines three services:
This compose file defines two services:

* `bridge`, which pulls a bridge image.
* `db`, which builds a Postgres database for the bridge.
* `bridge` that build the bridge service.
RodinGolodin marked this conversation as resolved.
Show resolved Hide resolved
* `db` that builds a Postgres database for the bridge.

1. Create an `.env` file to store configuration parameters for the services:

```bash
vim .env
```

1. Paste the following into `.env` and replace placeholder values (like *`BRIDGE_STATS_NODE_NAME`*) with your bridge's information:
3. In the same directory, create an `.env` file and add the following content, replacing the `<...>` placeholder values with your information:

```text
# Your Ethereum RPC endpoint
LISTENERS__ETHEREUM__RPCURL=LISTENERS__ETHEREUM__RPCURL
LISTENERS__ETHEREUM__RPCURL=<your_ethereum_rpc_endpoint>

# The latest version of the bridge's image as listed in https://docs.roninchain.com/bridge-operators/setup/upgrade-bridge-operator
BRIDGE_IMAGE=BRIDGE_IMAGE
# The latest version of the bridge's image as listed in https://docs.roninchain.com/bridge-operators/setup/upgrade-bridge
BRIDGE_IMAGE=<your_bridge_image_version>

# Your bridge operator private key without the 0x prefix
LISTENERS__RONIN__SECRET__BRIDGEOPERATOR__PLAINPRIVATEKEY=LISTENERS__RONIN__SECRET__BRIDGEOPERATOR__PLAINPRIVATEKEY
LISTENERS__RONIN__SECRET__BRIDGEOPERATOR__PLAINPRIVATEKEY=<your_bridge_operator_private_key>

# If you're a governor, uncomment this line and replace with your bridge voter key, without the 0x prefix
# BRIDGE_VOTER_PRIVATE_KEY=BRIDGE_VOTER_PRIVATE_KEY
# BRIDGE_VOTER_PRIVATE_KEY=<your_bridge_voter_private_key>
RodinGolodin marked this conversation as resolved.
Show resolved Hide resolved

DATABASE__DBNAME=bridge
DATABASE__USER=postgres

# The Postgres database password
DATABASE__PASSWORD=DATABASE__PASSWORD
DATABASE__PASSWORD=<your_db_password>

CONFIG_PATH=config.mainnet.json
VERBOSITY=3

LISTENERS__RONIN__RPCURL=<replace_your_rpc_endpoint>
LISTENERS__RONIN__RPCURL=<your_ronin_rpc_endpoint>

LISTENERS__RONIN__TASKINTERVAL=3s
LISTENERS__RONIN__TRANSACTIONCHECKPERIOD=50s
Expand All @@ -159,15 +146,16 @@ The size of your Ronin node will also grow over time.
LISTENERS__RONIN__STATS__SECRET=WSyDMrhRBe111
```

1. Start the bridge operator
4. Start the bridge node:

```bash
cd ~/ronin-bridge && docker-compose up -d
```

This command pulls a Ronin node image, a bridge image, a Postgres database, and starts the services you defined.
1. After a few minutes, check the status of your node on the [Ronin Network Status](https://ronin-stats.roninchain.com/) page. If it's green, the node is connected and up to date with the network.
1. Review the log for the bridge.
This command pulls the bridge image and a Postgres database, and starts the services you defined.

5. After a few minutes, check the status of your node on the [Ronin Network Status](https://ronin-stats.roninchain.com/) page. If it's green, the node is connected and up to date with the network.
6. Review the log for the bridge.

```bash
docker logs node -f --tail 100
Expand All @@ -182,9 +170,11 @@ Whenever you wish to verify that your node is working, run the following comman
docker-compose logs bridge | head -n 20
```

Verify that the operator account address in the response matches your registered
Make sure that the "Operator account" address in the response matches your registered
bridge operator address. If you're a Governing Validator, also check that the
voter account address matches the registered bridge voter address.
"Voter account" address matches your registered bridge voter address.
RodinGolodin marked this conversation as resolved.
Show resolved Hide resolved

Here's an example:

```bash
bridge | INFO [03-22|07:59:10.368] [RoninListener] Operator account address=0x2e82D2b56f858f79DeeF11B160bFC4631873da2B
Expand Down
Loading
Loading