Yona Network
  • Introduction
    • What is Yona Network
    • Use Cases
    • How to contribute
  • Yona Tech
    • Yona Architecture
    • Execution Nodes
    • Bitcoin Settlement and Finality
  • Testnet
    • RPC Information
    • Faucet
    • Wallet
    • Deploy your first smart contract
    • Yona Testnet supported programs
  • Yona BTC Canonical Bridge
    • Yona BTC Canonical Bridge explained
    • Yona BTC Canonical Bridge flow
    • Bridge Nodes
    • Yona BTC Bridge testnet guideline
    • Dev environment configuration
  • Information and links
    • Official Links
    • Tools
Powered by GitBook
On this page
  • Instructions for launching a bridge instance for developers:
  • Block relayer
  1. Yona BTC Canonical Bridge

Dev environment configuration

PreviousYona BTC Bridge testnet guidelineNextOfficial Links

Last updated 8 months ago

Instructions for launching a bridge instance for developers:

  1. Install Rust and Docker.

  2. Install Solana CLI:

  3. Install Anchor: and select version 0.30.1:

avm install 0.30.1
avm use 0.30.1
  1. Generate a new keypair: solana-keygen new --no-bip39-passphrase -s -o anchor.json.

  2. Install yarn.

  3. Run yarn at the project root.

  4. Run anchor test to test BTC relay program.

  5. Run anchor build && cd block_relayer && cargo test to start E2E tests of all bridge components.

Block relayer

The Block Relayer uses a TOML configuration format. On startup, it attempts to open a config.toml file in its working directory. For detailed configuration options, refer to the .

The Block Relayer is a command-line tool with several subcommands:

block-relayer [SUBCOMMAND]

Available subcommands:

  • init-deposit: Initialize a BTC deposit to the Relay program's PDA (currently unimplemented)

  • init-program: Initialize the BTC relay program on the Yona network

  • relay-blocks: Start relaying Bitcoin blocks to the Yona network

  • relay-transactions: Start the transaction relaying service

Getting Started

  1. Clone the repository:

    git clone https://github.com/your-repo/yona-block-relayer.git
    cd yona-block-relayer
  2. Run the desired command:

    cargo run -- [SUBCOMMAND]

Create a config.toml file in the project root directory, using the provided as a template.

https://docs.solanalabs.com/cli/install
https://www.anchor-lang.com/docs/installation
example configuration file
example