BIFROST Network
  • Introduction
  • Bifrost Network Architecture
    • Consensus
    • Cross-Chain Communication Protocol (CCCP)
    • Oracle Service
  • Running a Node
    • Basic-Node Requirements
    • Full-Node Requirements
    • Validator Account Management
    • Guide for Operators
      • Setting up an Endpoint Node
        • Using Docker
        • Using Systemd
      • Setting up a Validator Node
        • Using Docker
        • Using Systemd
      • Setting up a Relayer
        • bifrost-relayer.rs
        • bifrost-relayer.py (Deprecated)
      • Chain Data Snapshots
      • Trouble Shooting
        • Testnet Chain Sync Issue
    • System Monitoring
      • Prometheus and Grafana
      • Sentry
  • Nominators
  • Developer Documentations
    • Ethereum API
      • Ethereum Precompiled Contracts
      • Libraries
      • Developer Environments
    • Bifrost Precompiled Contracts
      • Staking
      • Governance
      • RelayManager
    • Pallet Interfaces
      • BfcStaking
      • BfcUtility
      • BfcOffences
      • RelayManager
    • Client API
      • JSON-RPC API
        • author
        • chain
        • childstate
        • debug
        • eth
        • grandpa
        • net
        • offchain
        • payment
        • rpc
        • state
        • system
        • trace
        • txpool
        • web3
      • Explorer API
      • Runtime API
    • Cross-Chain Transaction and Oracle API
      • Price Oracle Contract API
      • Socket Contract API
    • Testnet Faucet
  • Governance
  • Security
  • Tokens & Assets
    • Unified Token
    • Inflation Model
  • Add Network
    • Pockie
    • MetaMask
  • Bridge
    • Bridge Guide
      • Depositing to the Bifrost Network
      • Withdrawing to another network
    • Glossary
  • Staking
    • Staking Guide
      • Stake BFC
      • Unstake BFC
    • Glossary
      • All Validators
      • My Staking Status
  • Language
    • 바이프로스트 네트워크 가이드
Powered by GitBook
On this page
  • Description
  • Extrinsics
  • Storage Values
  • Constants
  1. Developer Documentations
  2. Pallet Interfaces

RelayManager

Description

Full node operators on the Bifrost Network must additionally operate the relayer program. Therefore, carefully managing and tracking the state of all relayers is crucial to maintaining the stability of the network. The core implementation for relayer management is defined in pallet_relay_manager.

Extrinsics

set_storage_cache_lifetime(new: u32)

  • interface: api.tx.relayManager.setStorageCacheLifetime

  • summary: Sets the StorageCacheLifetime round length. The origin should be the root.

set_heartbeat_offence_activation(is_active: bool)

  • interface: api.tx.relayManager.setHeartbeatOffenceActivation

  • summary: Sets the activation of relayer heartbeat management. The origin should be the root.

set_heartbeat_slash_fraction(new: Perbill)

  • interface: api.tx.relayManager.setHeartbeatSlashFraction

  • summary: Sets a new slash fraction for heartbeat offences. The origin should be the root.

set_relayer(new: AccountId)

  • interface: api.tx.relayManager.setRelayer

  • summary: (Re-)sets the bonded relayer account. The origin must be the bonded controller account. The state reflection will be immediately applied.

heartbeat()

  • interface: api.tx.relayManager.heartbeat

  • summary: Sends a new heartbeat to manage relayer liveness for the current session. The origin must be the registered relayer account, and only the selected relayers can request.

Storage Values

StorageCacheLifetime(): u32

  • interface: api.query.relayManager.storageCacheLifetime

  • summary: The maximum storage lifetime for storage data to be cached.

Round(): RoundIndex

  • interface: api.query.relayManager.round

  • summary: The current round index.

BondedController(AccountId): Option<AccountId>

  • interface: api.query.relayManager.bondedController

  • summary: Mapped controller accounts to the relayer account.

RelayerPool(): Vec<Relayer<AccountId>>

  • interface: api.query.relayManager.relayerPool

  • summary: The pool of relayers of the current round (including selected and non-selected relayers).

RelayerState(): Option<RelayerMetadata<AccountId>>

  • interface: api.query.relayManager.relayerState

  • summary: The current state of a specific relayer.

SelectedRelayers(): Vec<AccountId>

  • interface: api.query.relayManager.selectedRelayers

  • summary: The active relayer set selected for the current round.

InitialSelectedRelayers(): Vec<AccountId>

  • interface: api.query.relayManager.initialSelectedRelayers

  • summary: The active relayer set selected at the beginning of the current round.

CachedSelectedRelayers(): Vec<(RoundIndex, Vec<AccountId>)>

  • interface: api.query.relayManager.cachedSelectedRelayers

  • summary: The cached active relayer set selected from previous rounds.

CachedInitialSelectedRelayers(): Vec<(RoundIndex, Vec<AccountId>)>

  • interface: api.query.relayManager.cachedInitialSelectedRelayers

  • summary: The cached active relayer set selected from the beginning of each previous round.

Majority(): u32

  • interface: api.query.relayManager.majority

  • summary: The majority of the current active relayer set.

InitialMajority(): u32

  • interface: api.query.relayManager.initialMajority

  • summary: The majority of the current active relayer set at the beginning of the current round.

CachedMajority(): Vec<(RoundIndex, u32)>

  • interface: api.query.relayManager.cachedMajority

  • summary: The cached majority based on the active relayer set selected from previous rounds.

CachedInitialMajority(): Vec<(RoundIndex, u32)>

  • interface: api.query.relayManager.cachedInitialMajority

  • summary: The cached majority based on the active relayer set selected from the beginning of each previous rounds.

ReceivedHeartbeats(AccountId): bool

  • interface: api.query.relayManager.receivedHeartbeats

  • summary: The received heartbeats of a specific relayer in the current session.

IsHeartbeatOffenceActive(): bool

  • interface: api.query.relayManager.isHeartbeatOffenceActive

  • summary: The activation of relayer heartbeat offence management.

HeartbeatSlashFraction(): Perbill

  • interface: api.query.relayManager.heartbeatSlashFraction

  • summary: The slash fraction for heartbeat offences.

Constants

StorageCacheLifetimeInRounds: u32

  • interface: api.consts.relayManager.storageCacheLifetimeInRounds

  • summary: The maximum lifetime in rounds for storage data to be cached.

IsHeartbeatOffenceActive: bool

  • interface: api.consts.relayManager.isHeartbeatOffenceActive

  • summary: The activation of relayer heartbeat offence management.

DefaultHeartbeatSlashFraction: Perbill

  • interface: api.consts.relayManager.defaultHeartbeatSlashFraction

  • summary: The default slash fraction for heartbeat offences.

PreviousBfcOffencesNextClient API

Last updated 1 year ago