Skip to content

Latest commit

 

History

History
99 lines (80 loc) · 4.92 KB

File metadata and controls

99 lines (80 loc) · 4.92 KB

Node Setup

Note: Irys is currently in a closed testnet, which means you cannot run a miner to connect to the official testnet without contacting us (Irys).
You can, however, run a localnet - for that, see localnet quickstart.

Building

Supported platforms: Linux, MacOS
Rust version: 1.86+ (stable)
Other dependencies:

  • clang & a C/C++ build toolchain
  • gmp
  • pkg-config

The NVIDIA feature flag/CUDA accelerated matrix packing requires the latest CUDA toolkit (12.6+)
and GCC-13 (as well as g++ 13).
See .devcontainer/setup.sh for more information.

Configuring

You can get the default configuration file (./config.toml) from crates/config/templates/testnet_config.toml you should rename this to config.toml and place in the directory you want to run the Irys node in.

Config file overview

The config file is comprised of header sections, such as [category.subcategory(...)].
All the config options under the [consensus(...)] category must be the same between all nodes in the network.
All other configuration options are per-node and can be freely changed.
There is a secondary config, .irys_submodules.toml that is autogenerated in the data dir (default: ./.irys/.irys_submodules.toml) that defines the path to each storage module the node should use for storage.
You can optionally provide links to mounted filesystems, which will be automatically symlinked into the submodules data dir subfolder, if is_using_hardcoded_paths = false .

Logging

The node supports tracing_subscriber env_filter RUST_LOG directives
e.g RUST_LOG="debug" cargo run --bin irys --release will enable debug and higher level logging.

Notable configuration options

These are the configuration options you should change when configuring a new node:

  • mode: either Genesis, PeerSync or TrustedPeerSync
    • If you are running a local network, use Genesis - otherwise, use PeerSync
    • to join a network you must also specify the genesis block hash. This will be used for validating the genesis block that you will receive from a trusted peer.
  • base_directory: The fully qualified path to where the Irys node should store all it's data.
    • Note: Changing this will require you to manually move your existing data directory.
  • mining_key: Hex encoded EVM private key that the node uses to interact with the network.
  • trusted_peers: A list of trusted peers that the node should use to bootstrap
    • Note: Currently, all peers you wish to connect with must have an entry in trusted_peers.
  • reward_address: The EVM address that should receive block rewards.
  • stake_pledge_drives: Whether to automatically stake & pledge drives to enable mining on startup.
    • Note: If you are a genesis node, this is automatically done for you
  • public_ip, public_port, bind_ip, bind_port (both http and gossip categories):
    • These control the public ip:port that other nodes can connect to access this node, and the ip:port the node should bind to locally.
    • Ensure that the public ip:port is fully accessible, otherwise P2P will not function.
  • cpu_packing_concurrency: The maximum number of CPU threads to allocate to data matrix packing (more = faster packing).
    • This only affects mining nodes.

Notable consensus options

num_chunks_in_partition - This controls the number of chunks per partition - if you have limited storage for your localnet, set this value lower.
Storage consumption is (chunk_size * num_chunks_in_partition * (number of partitions)).
For localnets, the default number of partitions is 3.

Localnet quickstart:

  • Run the node: cargo run --bin irys --release
  • Open the config ./config.toml
  • Set mode to Genesis
  • Set num_chunks_in_partition to 800
  • Run the node: cargo run --bin irys --release
    This will run a small, low-capacity localnet node that you can interact with:
  • HTTP API: http://localhost:8080
  • Eth JSON-RPC API: http://localhost:8080/v1/execution-rpc

Joining a network quickstart

  • Get the trusted peer info from the peer(s) you want to connect to. Note: the trusted peers section template is:
node_mode = "Peer"

[[trusted_peers]]
gossip = "<public IP>:<public port>"
api = "<public IP>:<public port>"

[trusted_peers.execution]
peering_tcp_addr = "<public IP>:<public port>"
peer_id = "..."

[[trusted_peers]]
gossip = ""<public IP>:<public port>""
api = "<public IP>:<public port>""

[trusted_peers.execution]
peering_tcp_addr = ""<public IP>:<public port>""
peer_id = "..."
  • Add your peer's info to the other peer's configurations as a trusted peer.
  • Make sure your [consensus(...)] sections are identical.
  • Set mode to PeerSync.
  • Perform any other required setup (port forwarding, loading in EVM genesis state snapshots, etc).
  • Start the node!

These docs are a WIP - PRs welcome!