Basechain
  • About Basechain
  • Base BigBang Language
    • Introduction
    • 1. Getting started
      • 1.1 Installing BigBangNet
      • 1.2 BigBang basics
    • 2. Type
      • 2.1 Primitives
      • 2.2 Sequences
      • 2.3 Composites
    • 3. Keywords
    • 4. Storing data
      • 4.1 Constants
      • 4.2 Variables
      • 4.3 Maps
    • 5. Functions
      • 5.1 Public functions
      • 5.2 Private functions
      • 5.3 Read-only functions
  • 6. Control flow & error handling
    • 6.1 Asserts
    • 6.2 Try
    • 6.3 Unwrap flavours
    • 6.4 Response checking
  • 7. Using BigBangNet
    • 7.1 Creating a new project
    • 7.2 Writing your first contract
    • 7.3 Interacting with your contract
    • 7.4 Testing your contract
  • 8. Practice projects
    • 8.1 Time-locked wallet
    • 8.2 Smart claimant
    • 8.3 Multi-signature vault
  • 9. Traits
    • 9.1 Defining traits
    • 9.2 Implement traits
    • 9.3 Passing traits as arguments
  • 10. Building a marketplace
    • 10.1 Setup
    • 10.2 Listing & cancelling
    • 10.3 Fulfilling listings
    • 10.4 Uni tests
  • 11. Runtime cost analysis
  • Nodes & Miners
    • Run a Node with Docker
    • Run a Node with DigitalOcean
    • Run a Node with a Hosted Provider
    • Base Node Configuration
    • Mine testnet Base tokens
    • Verify Miner
    • Miner costs and fees
  • Website
  • X(Twitter)
  • Github
Powered by GitBook
On this page
  • Usage​
  • Configuration File Options​
  • Example Mainnet Follower Configuration​
  1. Nodes & Miners

Base Node Configuration

PreviousRun a Node with a Hosted ProviderNextMine testnet Base tokens

Last updated 1 year ago

Usage

base-node sub-command [--subcommand-option <value>]

Subcommands

  • mocknet: start a mocknet instance using defaults

  • testnet: start a testnet instance using defaults (chainstate is not persistent)

  • mainnet: start a mainnet instance using defaults (chainstate is not persistent)

  • start: combined with --config, starts an instance with a specified configuration file

  • version: displays binary version

  • help: displays the help message

Configuration File Options

The Base Blockchain configuration file has multiple sections under which an option may be placed.

  • node

  • events_observer

  • connection_options

  • burnchain

  • ustx_balance

Contains various configuration options for the base-node binary.

Name
Required
Description

rpc_bind

✓

IPv4 address and port to open for RPC connections

p2p_bind

✓

IPv4 address and port to open for P2P connections

working_dir

Absolute path to the directory where chainstate data will be stored

data_url

IPv4 address and port for incoming RPC connections

p2p_address

IPv4 address and port for incoming P2P connections

bootstrap_node

Public key, IPv4 address, and port to bootstrap the chainstate

wait_time_for_microblocks

The amount of time in ms to wait before trying to mine a block after catching up to the anchored chain tip

seed

The private key to use for mining. Only needed if miner is set to true

local_peer_seed

The private key to use for signing P2P messages in the networking Base

miner

Determines whether the node is running a follower (false) or a miner (true). Defaults to false

mock_miner

Simulates running a miner (typically used for debugging)

mine_microblocks

Determines whether the node will mine microblocks. Will only take effect if miner is set to true

prometheus_bind

Address and port for Prometheus metrics collection.

INFO

This section is optional and not required

However, if this section is added, all fields are required

Contains options for sending events emitted to the base-blockchain-api service.

Name
Required
Description

endpoint

✓

Address and port to a base-blockchain-api service

retry_count

✓

Number of times to retry sending events to the endpoint before failing

events_keys

✓

Event keys for which to watch. The emitted node events can be restricted by account, function name and event type. Asterix ("*") can be used to emit all events.

INFO

This section is optional and not required.

However, if this section is added, all fields are required

Specifies configuration options for others connecting to the base node.

Name
Required
Description

public_ip_address

✓

Public IPv4 to advertise to other nodes

download_interval

✓

Time (in seconds) between attempts to download blocks

walk_interval

✓

Time (in seconds) between attempts to walk the list of neighbors

read_only_call_limit_read_length

✓

Total number of bytes allowed to be read by an individual read-only function call

read_only_call_limit_read_count

✓

Total number of independent read operations permitted for an individual read-only function call

read_only_call_limit_runtime

✓

This section contains configuration options pertaining to the blockchain the base-node binds to on the backend for proof-of-transfer (BTC).

Name
Required
Description

chain

✓

The blockchain base-node binds to on the backend for proof-of-transfer. Only value supported: bitcoin

mode

✓

The profile or test phase of which to run base-node. Valid values are [ mocknet, testnet, xenon, mainnet ]

peer_host

FQDN of the host running the backend Bitcoin blockchain

rpc_port

RPC port of peer_host

peer_port

P2P port of peer_host

Name
Required
Description

burn_fee_cap

✓

Maximum amount (in sats) of "burn commitment" to broadcast for the next block's leader election

satoshis_per_byte

✓

commit_anchor_block_within

Sets the time period (in milliseconds) for commitments. Only used when mode is set to mocknet.

  • mocknet/testnet only

This section contains configuration options allocating microSTX per address in the genesis block

This section can repeat multiple times, but each section can only define a single address.

INFO

This section is only required for the testnet and mocknet networks.

However, if this section is added, all fields are required

Name
Required
Description

address

✓

Address which maintains a microSTX balance

amount

✓

The balance of microSTX given to the address at the start of the node

[node]
working_dir = "/base-blockchain"
rpc_bind = "0.0.0.0:20443"
p2p_bind = "0.0.0.0:20444"
bootstrap_node = "02da7a464ac770ae8337a343670778b93410f2f3fef6bea98dd1c3e9224459d36b@seed-0.mainnet.base.tech:20444,02afeae522aab5f8c99a00ddf75fbcb4a641e052dd48836408d9cf437344b63516@seed-1.mainnet.base.tech:20444,03652212ea76be0ed4cd83a25c06e57819993029a7b9999f7d63c36340b34a4e62@seed-2.mainnet.base.tech:20444"

[burnchain]
chain = "bitcoin"
mode = "mainnet"
peer_host = "localhost"
username = "user"
password = "pass"
rpc_port = 8332
peer_port = 8333

[[events_observer]]
endpoint = "localhost:3700"
retry_count = 255
events_keys = ["*"]

node

events_observer

connection_options

limit for an individual read-only function call

burnchain

Mining

- Used to calculate the transaction fees

ustx_balance

Example Mainnet Follower Configuration

​
​
​
​
​
​
​
​
​
​
Runtime cost
Amount (in sats) per byte