Dev environment configuration
Last updated
Install Rust and Docker.
Install Solana CLI: https://docs.solanalabs.com/cli/install
Install Anchor: https://www.anchor-lang.com/docs/installation and select version 0.30.1:
avm install 0.30.1
avm use 0.30.1Generate a new keypair: solana-keygen new --no-bip39-passphrase -s -o anchor.json.
Install yarn.
Run yarn at the project root.
Run anchor test to test BTC relay program.
Run anchor build && cd block_relayer && cargo test to start E2E tests of all bridge components.
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 example configuration file.
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
Clone the repository:
Create a config.toml file in the project root directory, using the provided example as a template.
Run the desired command:
Last updated
git clone https://github.com/your-repo/yona-block-relayer.git
cd yona-block-relayercargo run -- [SUBCOMMAND]