The following report is a set of changes that deserves to be highlighted due to their impact on the Bifrost Network. For more information on setting up your node please follow our official documentations.
Summary
This report presents the latest modifications to the Bifrost Network’s Node client and runtime. The key highlights of the new version includes resolving state inconsistencies between the runtime and Frontier EVM engine, alongside fixing minor bugs. For more information, refer to the detailed descriptions below.
Client Upgrade
- V1.2.4 → V1.2.5
Runtime Upgrades
- TESTNET : V461 (upgraded at
#12,293,859
) - MAINNET : V2018 (upgraded at
#9,636,216
)
Runtime Changes
[Frontier] Runtime-API: Fix inconsistent gas weight mapping for WeightV2
Ref:
Previously, the Bifrost Node had applied the Substrate’s WeightV2 implementation to its runtime. WeightV2 was first introduced due to handle “parachains” proof verifications more accurately in a better way. But for “solo-chains” such as us, it doesn’t have any use and impact on proof verifications, so it didn’t matter much for us.
However, the Substrate-level logic worked fine, but in the Frontier-level, there were some inconsistencies in the gas weight mapping logic. This eventually led to miscalculations on gas estimations. For example, the estimated gas was way much less than the actual required amount to be used. This issue influenced applications failing on transaction requests that had submitted with the estimated gas.
This issue has been resolved by considering WeightV2 on gas estimation using binary search (basically the Ethereum call
runtime API)
[Frontier] Fix inconsistent evm
crate versions
Ref
In our previous version, we encountered some unexpected issues when requesting ethapi’s (such as debug
, trace
, txpool
namespace methods). Our team discovered that there were version inconsistencies of the evm
crate in our project. The root workspace was using the commit based on b7b82c7
; however, one of our modules related to the ethapis was using version 0.37.0
. This led to data parsing issues due to the format differences between the two distinct versions.
This issue has been resolved by using the root workspace when specifying crate versions.
[Frontier] Fix inconsistent transferable balance
Ref:
-
fix: resolve balance inconsistency by dnjscksdn98 · Pull Request #27 · bifrost-platform/bifrost-node
Previously, the Bifrost Node had applied the major update on the balance implementation. This change had resulted in balance inconsistency between the Substrate-level and Frontier-level. Our team had inspected that there were some incorrect trait bounds implemented to pallet_evm
that was impacted by the prior major balance update.
This issue has been resolved by correctly fixing the trait bound used on pallet_evm
, and adding trait methods to the legacy currency
trait to support compatibility between the two balances. The related PR is mentioned above.
[Native] Remove pallet::without_storage_info
macros
Ref:
Previously, there were some updates required in the runtime storage, that was to bound the maximum instance size it can hold. Alongside, the update had a deprecation on pallet::without_storage_info
macro. This macro makes all of the storage items in the pallet unbounded, so it should have been removed.
This issue has been resolved by removing the mentioned macro from every native pallet, and specifically adding pallet::unbounded
macro to size-undefined storage items.
[Native] Fix address update logic
Ref:
The Bifrost Node allows operators to update their controller and relayer addresses. The selected validators and relayers vector must be sorted in order to perform binary search values inside. However, when address modification applies, the re-sort of the address vector was missing.
This issue has been resolved by re-sorting the vector on address modifications.
Client Changes
[Native] Build on stable Rust version
Ref:
The Rust toolchain version has been updated to the stable version.
[Substrate] Increase maximum instance count
Ref:
-
v0.9.43 update by alstjd0921 · Pull Request #5 · bifrost-platform/bifrost-substrate
-
sc-executor: Increase maximum instance count by bkchr · Pull Request #1856 · paritytech/polkadot-sdk
Cherry-picked the polkadot-sdk#1856 to increase the maximum instance count for wasmtime
.
Process to update node client
Please follow the steps below to update your node client.
Step 1.
First, stop your bifrost-node service and remove the installed executable binary file.
systemctl stop bifrost-node.service
rm /var/lib/bifrost-data/bifrost-node
Step 2.
Then, re-download the latest bifrost-node binary.
wget "https://github.com/bifrost-platform/bifrost-node/releases/latest/download/bifrost-node"
Step 3.
Now, the installed binary must be granted execution permission and moved to your chain data directory.
chmod +x bifrost-node
chown BIFROST_SERVICE bifrost-node
mv bifrost-node /var/lib/bifrost-data
Step 4.
At last, restart your bifrost-node service.