Bifrost Relayer Release Analysis v1.1.0

:warning: The following report is a set of changes that deserves to be highlighted due to their impact on the Bifrost Network. Highlights are categorized into High Impact, Medium Impact, and Low Impact for ease of navigation.

For more information on setting up your relayer please follow our official documentations.

Summary

This report analyzes the recent updates to the Bifrost Network’s (CCCP) Relayer. The primary feature of this release is its support for BTC oracle price feeds and Sepolia support due to Goerli deprecation. Additionally, this update also brings some performance enhancements to specific features such as sending transaction requests. The target client is bifrost-relayer.rs (Rust) that has been updated to accommodate these changes.

Client Upgrade

  • V1.0.5 → V1.1.0

:warning: Please note that it is mandatory to upgrade your client and configurations if you’re operating a Relayer on Bifrost Mainnet or Testnet. The details about configuration updates are mentioned below in the “Configuration updates required”.

:fire: High Impact

Support new Oracle assets: BTC, WBTC, BTCB

Ref:

Bifrost Network has incorporated support for BTC, WBTC, and also BTCB to function as a price oracle asset. This update aims to pave the way to support BTC as a CCCP asset and also seamlessly cooperate the ongoing development of BTCFi.

Migrate Goerli to Sepolia

Ref:

Previously, CCCP has been supporting Goerli-based chains (Goerli, Base-Goerli, Arbitrum-Goerli) on the Bifrost Testnet. However, due to the deprecation of the pre-mentioned chains, we have successfully migrated our CCCP infrastructure from Goerli to Sepolia. So, please note that Goerli-based chains have been totally shutdown from CCCP and will now continue support on Sepolia-based chains.

Relayer operators on Bifrost Testnet must update their configuration YAML file based on the “Configuration updates required” section on the bottom of this page.

Name Chain ID Block Explorer
Sepolia 11155111 https://sepolia.etherscan.io/
Base Sepolia 84532 https://sepolia.basescan.org/
Arbitrum Sepolia 421614 https://sepolia.arbiscan.io/

:hammer_and_wrench: Medium Impact

Send transactions concurrently

Ref:

Internally, the Bifrost Relayer performs many transaction requests to multiple blockchains, such as CCCP related actions or Oracle price feeds. These actions have been performed by the TransactionManager. However, every transaction request for a certain chain has been executed in a single-threaded process. In other words, every single execution of a transaction will be processed one by one like a queue, that could cause a bottleneck whenever any execution takes some time.

To address this problem, the TransactionManager now spawn transaction tasks through multi-threaded processes to allow concurrent system actions. This will significantly boost the throughput and performance of transaction requests with zero bottlenecks.

Improve socket rollback sequence

Ref:

CCCP has a request rollback protocol that is performed by Bifrost Relayer’s among the network to safely maintain unexpected system failures and refund assets back to the user. The protocol is now managed and handled by a dedicated component, the SocketRollbackHandler.

Whenever a user initiates a CCCP request, the SocketRollbackHandler will track the request’s current status on every interval. If the request fails to be committed, after multiple status checks, the request will be rollbacked.

Improve pending transaction’s gas escalation

Ref:

Previously, the TransactionManager that sends legacy-typed transactions (usually spawned for BSC chain), implements the GasEscalatorMiddleware generated by ethers.rs to handle pending transactions. However, this middleware seems to misbehave such as not escalating the pending transaction’s gas price. To address this issue, we had decided to entirely remove the middleware and added codes to manually handle pending transactions.

Process to update bifrost-relayer.rs client

Please follow the steps below to update your relayer client.

Step 1.

First, update your configuration YAML file based on the “Configuration updates required” section below.

Step 2.

Then, remove or backup the previous bifrost-relayer binary file.

rm <PATH_TO_BIFROST_RELAYER_BINARY>

Step 3.

Next, install the latest version of bifrost-relayer into the same directory and update permissions. (In case of directory changes, the Systemd configuration file should be modified as well)

wget "https://github.com/bifrost-platform/bifrost-relayer.rs/releases/latest/download/bifrost-relayer"
chmod +x bifrost-relayer

Step 4.

At last, restart the Systemd service.

sudo systemctl restart bifrost-relayer

Configuration updates required

config.mainnet.yaml: bifrost-relayer.rs/configs/config.mainnet.yaml at main · bifrost-platform/bifrost-relayer.rs · GitHub

config.testnet.yaml: bifrost-relayer.rs/configs/config.testnet.yaml at main · bifrost-platform/bifrost-relayer.rs · GitHub

  • [Testnet]
    • Goerli-based chains (Goerli, Base Goerli, Arbitrum Goerli) have been replaced to Sepolia-based chains (Sepolia, Base Sepolia, Arbitrum Sepolia). Replace each Goerli-based chains from your evm_providers to Sepolia-based chains.
    • Add chainlink_btc_usd_address and chainlink_wbtc_usd_address to evm_providers that is mapped to BSC testnet and Mumbai. (The address must match with the one specified above in config.testnet.yaml)
  • [Mainnet]
    • Add chainlink_btc_usd_address and chainlink_wbtc_usd_address to evm_providers that is mapped to Ethereum. (The address must match with the one specified above in config.mainnet.yaml)
  • [Mainnet / Testnet]
    • Replace handler_type name from BridgeRelay to Socket
    • Remove vault_address from each evm_providers