Skip to content

RelayAgere is an alpha agere that builds an Oracle network for blockchains. It supports Bitcoin light nodes via GEB’s relay, with minimal setup required.

License

Notifications You must be signed in to change notification settings

GEBcore/RelayAgere

Repository files navigation

Relay Agere

RelayAgere is a agere in the Alpha phase, and its main goal is to build an Oracle network to provide Oracle services to any blockchain. At present, this agere implements the Relay function of the GEB network, assisting GEB to implement the functions of Bitcoin light nodes.

Note: This is a simple agere for alpha launch. Any user can run this agere with minimal configuration requirements.

Role Overview

Auditor

Core Responsibilities

  • Evaluate GEB-related transactions submitted by executors
  • Verify transaction compliance with GEB specifications
  • Ensure successful transaction execution

Incentive Mechanism

  • Rewards based on evaluation fairness
  • Consensus-driven fairness guarantee
  • Stake-based competition for top 64 positions

Executor

Core Responsibilities

  • Identify and submit GEB-related Bitcoin transactions
  • Manage gas fees for transaction priority
  • Handle transaction failure risks

Incentive Mechanism

  • Revenue based on successful transaction verification
  • Strategic gas fee management
  • First-come-first-served reward system

Competition Example

When executors A, B, and C submit identical transactions:

  1. Executor A: 0.01 GEB gas
  2. Executor B: 0.02 GEB gas
  3. Executor C: 0.015 GEB gas

→ Executor B wins, A and C lose gas fees

Role Comparison

Aspect Auditor Executor
Core Action Transaction validation Transaction submission
Revenue Model Stable staking returns Transaction-based rewards
Cost Type Opportunity cost Gas fee risk
Key Skills Evaluation accuracy Detection speed & gas strategy

Requirements

System: Ubuntu 22.04 LTS + Python: 3.10 +

Note: If you don't have Git installed on Ubuntu/Debian-based systems:

# If you are root
apt-get update && apt-get install git

# If you are a normal user
sudo apt-get update && sudo apt-get install git

How to join the agere

Step 1: Clone the repository

git clone https://github.com/GEBcore/RelayAgere.git && cd RelayAgere

Step 2: Install dependencies

./install.sh

Step 3: Activate virtual environment

source .venv/bin/activate

Step 4: Create or Import wallet

Run the following command:

./wallet.sh <cold_wallet_name>

You will be prompted to:

  1. Choose between creating a new wallet or importing an existing one
  2. If creating new: The script will generate new cold and hot keys
  3. If importing: Enter your existing 12-word mnemonic phrases for both cold and hot keys

Example output:

Please choose an option:
1. Create new wallet
2. Import existing wallet
Enter your choice (1 or 2): 

Step 5: Register to agere

Please deposit at least 10 tokens into your cold wallet to register and join the agere.

./register.sh <cold_wallet_name>

Note: Before running the program, you need to deposit some tokens into your hot address as a transaction fee.

For signet test network:

./register.sh -n signet <cold_wallet_name>

Check wallet balance

./get_balance.sh <cold_wallet_name>

For signet test network:

./get_balance.sh -n signet <cold_wallet_name>

Run as Auditor

To become a auditor, you need to:

  1. Stake enough tokens to your hot address
  2. Ensure your stake ranks in the top 64 in the agere

Stake your tokens:

./stake.sh add <cold_wallet_name>

Run auditor:

./auditor.sh [-d] <cold_wallet_name>
Options:
  -d    Run in daemon mode (background)

For signet test network:

./auditor.sh [-d] -n signet <cold_wallet_name>

Run as Executor

Configure RPC Settings

Before running an executor, configure your RPC settings based on your preferred type:

  1. Copy the example environment file:
cp .env.example .env
  1. Edit .env file based on your RPC type:
  • For node RPC:
    • Set BTC_RPC_USER
    • Set BTC_RPC_PASSWORD
    • Set BTC_RPC_ENDPOINT (ip:port)
  • For ankr RPC:
    • Set ANKR_API_KEY
  • For mempool RPC:
    • No configuration needed

Run executor

./executor.sh [-d] [-t tip_value] [-r rpc_type] <cold_wallet_name>
Options:
  -d          Run in daemon mode (background)
  -t value    Specify tip value (default: 0)
  -r type     Bitcoin RPC type (node/mempool/ankr, default: mempool)

Examples:

# Run with ankr RPC
./executor.sh -r ankr <cold_wallet_name>

# Run with node RPC and tips
./executor.sh -d -t 100 -r node <cold_wallet_name>

# Run on signet test network
./executor.sh -n signet <cold_wallet_name>

Close and Update

To stop all running processes and update the code:

./close.sh

This will:

  • Stop all running auditor and executor processes
  • Pull the latest code from the repository

After doing this, refer to the above documentation and rerun the auditor or executor.

License

This project is licensed under the MIT License - see the LICENSE file for details.

This project was originally forked from bittensor-subnet-template.

About

RelayAgere is an alpha agere that builds an Oracle network for blockchains. It supports Bitcoin light nodes via GEB’s relay, with minimal setup required.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages