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 Arbitrum Mainnet(One) & Testnet (Goerli), as well as some minor fixes. The target client is bifrost-relayer.rs (Rust) that has been updated to accommodate these changes.
Client Upgrade
- V1.0.4 → V1.0.5
Please note that it is mandatory to upgrade your Relayer client and configurations if you’re operating a Relayer on our Mainnet or Testnet.
High Impact
Support Arbitrum Mainnet and Testnet
We’re thrilled to introduce all of our users that Bifrost Network has integrated with a new network, the Arbitrum Network, a Layer 2 (L2) blockchain designed to scale Ethereum. CCCP now offers users native cross-chain functionality between Arbitrum and Bifrost Network. As this support is in its early stage, only ETH, USDT and USDC from the Arbitrum Network are supported. However, we plan to include other assets from the Arbitrum Network soon.
Note that Mainnet and Testnet Relayer operators are required to prepare their own Arbitrum node or from third-party node providers. The running node must be archive-mode enabled and fully synced. Follow the steps below to upgrade the Relayer binary (for Rust) and configurations after the node is prepared.
Please make sure to correctly configure the RPC endpoint. The chain information is as below.
Name | Chain ID | Block Explorer | Environment |
---|---|---|---|
Arbitrum One | 42161 | https://arbiscan.io/ | Mainnet |
Arbitrum Goerli | 421613 | https://goerli.arbiscan.io | Testnet |
Improve bootstrap logic for Arbitrum chain
The Bifrost Relayer performs a bootstrap process upon startup to detect any missed CCCP events. This ensures that no events are overlooked, even in cases of unforeseen interruptions of Relayer such as power outages. To utilize this feature, you can activate it by adjusting the bootstrap_config
in the YAML settings.
Within the Bifrost Relayer, the bootstrap module estimates the block number for each external chain, which will then be designated as the starting block number for spotting missed events. To accomplish this, the Relayer takes the average block time of the target chain. The variable used to store this average block time was an unsigned integer. Consequently, for chains like Arbitrum (the avg.block time is 0.2~0.3 sec), this could sometimes result in the integer variable being set to zero, leading the approximated result to also be zero. To address this, we’ve modified the variable type to a float.
Low Impact
Reduce the maximum bootstrap offset
Previously, the maximum bootstrap offset was available to the past 64 rounds. In the case of Bifrost Mainnet, a single round lasts for 12 hours, which means that 64 rounds will approximately lead to the past one month blockchain data. However, we’ve determined that the value was set too high, which could unintentionally cause an overload. To avoid the overhead, we have changed the value from 64 rounds to 14 rounds.
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. When adding your Arbitrum RPC endpoint please use one of the following providers.
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
: https://github.com/bifrost-platform/bifrost-relayer.rs/blob/main/configs/config.mainnet.yaml
config.testnet.yaml
: https://github.com/bifrost-platform/bifrost-relayer.rs/blob/main/configs/config.testnet.yaml
- [Mainnet / Testnet] A new chain named
arbitrum
added to theevm_providers
section. - [Mainnet / Testnet] The chain ID of
arbitrum
added to thewatch_list
where thehandler_type
isBridgeRelay
forhandler_configs
.