Skip to content

Files

Failed to load latest commit information.

Latest commit

 Cannot retrieve latest commit at this time.

History

History

test-network

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

πŸš€ Connect to ibet testnet

ibet testnet is a network open to any developer who uses the ibet (or ibet for Fin) network. All developer can connect it . All developer can do the development and testing.

3 types of nodes

The ibet testnet consists of 3 types of nodes.

Validator

  • Verify the integrity of transactions.
  • The Validator nodes are connected to each other through an internal network, and the Bridge nodes are the only nodes that are externally connected.

Bridge

  • It exists as a proxy to connect the Validator and General nodes.
  • It is itself a full node; it connects to the General node via the Internet.

General

  • A node held by consortium members and used by them from their own services.
  • It is a full node and is used to send transactions and to reference blockchain data.

1. Common settings

Common to all three types of nodes, you need to set the following environment variables.

  • PRIVATE_CONFIG Only "ignore" can be set
  • rpccorsdomain Comma separated list of domains from which to accept cross origin requests (default:*)
  • rpcvhosts Comma separated list of virtual hostnames from which to accept requests (default: "localhost")
  • maxpeers Maximum number of network peers (network disabled if set to 0) (default: 50)

2. Start/Stop Validator node

Set up

Pull docker image for validator nodes.

$ docker pull ghcr.io/boostryjp/ibet-testnet/validator:{version}

Make a volume mount directory for the docker container.

$ mkdir -p {mount_directory}/geth

Move genesis.json and static-nodes.json for the Validator network.

  • {mount_directory}/genesis.json
  • {mount_directory}/genesis.json_init
  • {mount_directory}/geth/static-nodes.json

Start validator node

Initialize the node. You need to run only the first time.

$ docker run --rm --name validatorInit -e PRIVATE_CONFIG=ignore -v {mount_directory}:/eth \
    ghcr.io/boostryjp/ibet-testnet/validator:{version} \
    geth --datadir /eth init /eth/genesis.json_init

Finally, start the node as follows.

$ docker run -d --name validator -e PRIVATE_CONFIG=ignore -e nodekeyhex={nodekey} -v {mount_directory}:/eth \
    ghcr.io/boostryjp/ibet-testnet/validator:{version} run.sh 

Stop validator node

When stopping a node, simply stop the container.

$ docker stop validator

3. Start/Stop Bridge or General node

Set up

Pull docker image for general nodes. Bridge node image is exactly the same as that of the General node.

$ docker pull ghcr.io/boostryjp/ibet-testnet/general:{version}

Make a volume mount directory for the docker container.

$ mkdir -p {mount_directory}/geth

Move genesis.json and static-nodes.json.

  • {mount_directory}/genesis.json
  • {mount_directory}/genesis.json_init
  • {mount_directory}/geth/static-nodes.json

Set the boot node to be connected in the static-nodes.json file. If a Bridge node is to be connected, the Validator node must be set as the connection node; if a General node, the Bridge node must be set as the connection node.

Start node

Initialize the node. You need to run only the first time.

$ docker run --rm --name generalInit -e PRIVATE_CONFIG=ignore -v {mount_directory}:/eth \
    ghcr.io/boostryjp/ibet-testnet/general:{version} \
    geth --datadir /eth init /eth/genesis.json_init

Finally, start the node as follows.

$ docker run -d --name general -e PRIVATE_CONFIG=ignore -v {mount_direcotry}:/eth \
    ghcr.io/boostryjp/ibet-testnet/general:{version} run.sh 

Stop node

When stopping a node, simply stop the container.

$ docker stop general