Update transfer token gas and fee#7947
Conversation
Co-authored-by: Adrian Catangiu <adrian@parity.io>
| /// Needs to be more than fee calculated from DefaultFeeConfig FeeConfigRecord in snowbridge:parachain/pallets/outbound-queue/src/lib.rs | ||
| /// Polkadot uses 10 decimals, Kusama and Rococo 12 decimals. | ||
| pub const DefaultBridgeHubEthereumBaseFee: Balance = 2_750_872_500_000; | ||
| pub const DefaultBridgeHubEthereumBaseFee: Balance = 3_833_568_200_000; |
There was a problem hiding this comment.
Could probably add the value here and then reuse: https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/parachains/runtimes/constants/src/westend.rs#L172 Not a major issue though
|
@alistair-singh when/where would you want to deploy this? do we backport to 2503 and it comes with snowbridge v2? or do you want it earlier so we also backport to 2412? |
Backport to 2412 please. I want to get it out asap. Its blocking some token transfer cases for Hydration. |
13cb4a3
|
Created backport PR for
Please cherry-pick the changes locally and resolve any conflicts. git fetch origin backport-7947-to-stable2412
git worktree add --checkout .worktree/backport-7947-to-stable2412 backport-7947-to-stable2412
cd .worktree/backport-7947-to-stable2412
git reset --hard HEAD^
git cherry-pick -x 13cb4a31f77a14ea1bec880a7369a59432afaec9
git push --force-with-lease |
|
Created backport PR for
Please cherry-pick the changes locally and resolve any conflicts. git fetch origin backport-7947-to-stable2503
git worktree add --checkout .worktree/backport-7947-to-stable2503 backport-7947-to-stable2503
cd .worktree/backport-7947-to-stable2503
git reset --hard HEAD^
git cherry-pick -x 13cb4a31f77a14ea1bec880a7369a59432afaec9
git push --force-with-lease |
Update the gas allowance of the `TransferToken` related commands. This
also means that the default fee needs to be increased as well as a
migration.
# Migration
In production mainnet to ensure no downtime, instead of increasing the
fee to account for the new gas fee, we will instead decrease the gas
cost so that it will not require a fee increase.
The pre remote fee in Wei:
```python
(185_000 + 100_000) * 10_000_000_000 + 250_000_000_000_000
> 3100000000000000
```
We are increasing the gas to 200k.
The post remote fee Wei:
```python
(185_000 + 200_000) * 10_000_000_000 + 250_000_000_000_000
> 4100000000000000
```
This effectively increases the price for the end users transaction by
32%. Taking the inverse of 32 percent means we can decrease the gas cost
by ~74%. The migration script plays it safe and decreases it to 70%. The
post migration `try-runtime` check asserts that the new fee calculated
with the increased gas can is less than or equal to the old fee pre the
gas change.
# TODO
- [x] Add migration to half fee on bridge on start-up
- [x] Test in prod with chopsticks
# Testing
Tested with chopsticks on westend.
```console
$ npx @acala-network/chopsticks try-runtime \
--endpoint wss://westend-bridge-hub-rpc-tn.dwellir.com \
--runtime bridge_hub_westend_runtime.compact.wasm \
--checks PreAndPost \
--db westend-cache.sqllite \
--disable-spec-check
```
Output
```console
$ cat output.log | grep ethereum_system
ethereum_system::migration INFO: Agents and channels are initialized. Initialization will not run.
ethereum_system::migration INFO: Ethereum system already initialized. Skipping.
ethereum_system::migration INFO: Pre fee per gas migration: pricing parameters = PricingParameters { exchange_rate: , rewards: Rewards { local: 1000000000000, remote: 1000000000000000 }, fee_per_gas: 20000000000, multiplier: }, remote_fee_v1 = 8700000000000000, remote_fee_v2 = 5000000000000000
ethereum_system::migration INFO: Fee per gas migrated from 20000000000 to 14000000000.
ethereum_system::migration INFO: Post fee per gas migration: pricing parameters = PricingParameters { exchange_rate: , rewards: Rewards { local: 1000000000000, remote: 1000000000000000 }, fee_per_gas: 14000000000, multiplier: } remote_fee_v1 = 6390000000000000 remote_fee_v2 = 3800000000000000
```
---------
Co-authored-by: Adrian Catangiu <adrian@parity.io>
Co-authored-by: ron <yrong1997@gmail.com>
Backport #7947 into `stable2412` from alistair-singh. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. <!-- # To be used by other automation, do not modify: original-pr-number: #${pull_number} --> --------- Co-authored-by: Alistair Singh <alistair.singh7@gmail.com> Co-authored-by: Adrian Catangiu <adrian@parity.io>
Backport #7947 into `stable2503` from alistair-singh. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. <!-- # To be used by other automation, do not modify: original-pr-number: #${pull_number} --> --------- Co-authored-by: Alistair Singh <alistair.singh7@gmail.com> Co-authored-by: Clara van Staden <claravanstaden64@gmail.com> Co-authored-by: Ron <yrong1997@gmail.com> Co-authored-by: Adrian Catangiu <adrian@parity.io>
Merges backport paritytech/polkadot-sdk#8270 of paritytech/polkadot-sdk#7947 - [x] Test with chopsticks ## Testing ``` $ npx @acala-network/chopsticks try-runtime \ --endpoint wss://polkadot-bridge-hub-rpc-tn.dwellir.com \ --runtime wasms/bridge_hub_polkadot_runtime.compact.wasm \ --checks PreAndPost \ --db westend-cache.sqllite \ --disable-spec-check -------------------------------------------------------------------------------- Current runtime spec_name: bridge-hub-polkadot, spec_version: 1004003 New runtime spec_name: bridge-hub-polkadot, spec_version: 1005000 -------------------------------------------------------------------------------- chopsticks::executor TRACE: [1] Calling TryRuntime_on_runtime_upgrade ethereum_system::migration INFO: [1] Pre fee per gas migration: pricing parameters = PricingParameters { exchange_rate: , rewards: Rewards { local: 100000000, remote: 250000000000000 }, fee_per_gas: 10000000000, multiplier: }, remote_fee = 4100000000000000 frame_support::migrations INFO: [1] 🚚 Pallet "EthereumSystem" VersionedMigration migrating storage version from 0 to 1. ethereum_system::migration INFO: [1] Fee per gas migrated from 10000000000 to 7000000000. ethereum_system::migration INFO: [1] Post fee per gas migration: pricing parameters = PricingParameters { exchange_rate: , rewards: Rewards { local: 100000000, remote: 250000000000000 }, fee_per_gas: 7000000000, multiplier: } remote_fee = 2945000000000000 runtime::xcm::pallet_xcm::migrate_data_to_xcm_version INFO: [1] Migrating `Queries` query_id=1 new_data=QueryStatus::VersionNotifier { origin: V5(Location { parents: 1, interior: X1([Parachain(1000)]) }), is_active: true } runtime::xcm::pallet_xcm::migrate_data_to_xcm_version INFO: [1] Migrating `Queries` query_id=0 new_data=QueryStatus::VersionNotifier { origin: V5(Location { parents: 1, interior: Here }), is_active: true } runtime::xcm::pallet_xcm::migrate_data_to_xcm_version INFO: [1] Migrating `Queries` query_id=2 new_data=QueryStatus::VersionNotifier { origin: V5(Location { parents: 1, interior: X1([Parachain(1001)]) }), is_active: true } runtime::frame-support DEBUG: [1] ✅ no migration for System runtime::frame-support DEBUG: [1] ✅ no migration for ParachainSystem runtime::frame-support DEBUG: [1] ✅ no migration for Timestamp runtime::frame-support DEBUG: [1] ✅ no migration for ParachainInfo runtime::frame-support DEBUG: [1] ✅ no migration for Balances runtime::frame-support DEBUG: [1] ✅ no migration for TransactionPayment runtime::frame-support DEBUG: [1] ✅ no migration for Authorship runtime::frame-support DEBUG: [1] ✅ no migration for CollatorSelection runtime::frame-support DEBUG: [1] ✅ no migration for Session runtime::frame-support DEBUG: [1] ✅ no migration for Aura runtime::frame-support DEBUG: [1] ✅ no migration for AuraExt runtime::frame-support DEBUG: [1] ✅ no migration for XcmpQueue runtime::frame-support DEBUG: [1] ✅ no migration for PolkadotXcm runtime::frame-support DEBUG: [1] ✅ no migration for CumulusXcm runtime::frame-support DEBUG: [1] ✅ no migration for Utility runtime::frame-support DEBUG: [1] ✅ no migration for Multisig runtime::frame-support DEBUG: [1] ✅ no migration for BridgeRelayers runtime::frame-support DEBUG: [1] ✅ no migration for BridgeKusamaGrandpa runtime::frame-support DEBUG: [1] ✅ no migration for BridgeKusamaParachains runtime::frame-support DEBUG: [1] ✅ no migration for BridgeKusamaMessages runtime::frame-support DEBUG: [1] ✅ no migration for XcmOverBridgeHubKusama runtime::frame-support DEBUG: [1] ✅ no migration for EthereumInboundQueue runtime::frame-support DEBUG: [1] ✅ no migration for EthereumOutboundQueue runtime::frame-support DEBUG: [1] ✅ no migration for EthereumBeaconClient runtime::frame-support DEBUG: [1] ✅ no migration for EthereumSystem runtime::frame-support DEBUG: [1] ✅ no migration for MessageQueue runtime::try-decode-state DEBUG: [1] trying to decode pallet: System runtime::try-decode-state DEBUG: [1] trying to decode storage: System::Account < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::AllExtrinsicsLen < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::AuthorizedUpgrade < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::BlockHash < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::BlockWeight < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::Digest < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::EventCount < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::EventTopics < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::ExecutionPhase < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::ExtrinsicCount < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::ExtrinsicData < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::InherentsApplied < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::LastRuntimeUpgrade < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::Number < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::ParentHash < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::UpgradedToTripleRefCount < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::UpgradedToU32RefCount < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: ParachainSystem runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::AggregatedUnincludedSegment < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::AnnouncedHrmpMessagesPerCandidate < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::CustomValidationHeadData < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::DidSetValidationCode < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::HrmpOutboundMessages < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::HrmpWatermark < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::LastDmqMqcHead < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::LastHrmpMqcHeads < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::LastRelayChainBlockNumber < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::NewValidationCode < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::PendingUpwardMessages < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::PendingValidationCode < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::ProcessedDownwardMessages < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::RelayStateProof < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::RelevantMessagingState < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::ReservedDmpWeightOverride < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::ReservedXcmpWeightOverride < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::UnincludedSegment < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::UpgradeGoAhead < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::UpgradeRestrictionSignal < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::UpwardDeliveryFeeFactor < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::UpwardMessages < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::ValidationData < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: Timestamp runtime::try-decode-state DEBUG: [1] trying to decode storage: Timestamp::DidUpdate < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: Timestamp::Now < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: ParachainInfo runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainInfo::ParachainId < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: Balances runtime::try-decode-state DEBUG: [1] trying to decode storage: Balances::Account < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: Balances::Freezes < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: Balances::Holds < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: Balances::InactiveIssuance < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: Balances::Locks < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: Balances::Reserves < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: Balances::TotalIssuance < T, I > runtime::try-decode-state DEBUG: [1] trying to decode pallet: TransactionPayment runtime::try-decode-state DEBUG: [1] trying to decode storage: TransactionPayment::NextFeeMultiplier < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: TransactionPayment::StorageVersion < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: Authorship runtime::try-decode-state DEBUG: [1] trying to decode storage: Authorship::Author < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: CollatorSelection runtime::try-decode-state DEBUG: [1] trying to decode storage: CollatorSelection::CandidacyBond < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: CollatorSelection::CandidateList < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: CollatorSelection::DesiredCandidates < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: CollatorSelection::Invulnerables < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: CollatorSelection::LastAuthoredBlock < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: Session runtime::try-decode-state DEBUG: [1] trying to decode storage: Session::CurrentIndex < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: Session::DisabledValidators < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: Session::KeyOwner < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: Session::NextKeys < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: Session::QueuedChanged < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: Session::QueuedKeys < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: Session::Validators < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: Aura runtime::try-decode-state DEBUG: [1] trying to decode storage: Aura::Authorities < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: Aura::CurrentSlot < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: AuraExt runtime::try-decode-state DEBUG: [1] trying to decode storage: AuraExt::Authorities < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: AuraExt::SlotInfo < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: XcmpQueue runtime::try-decode-state DEBUG: [1] trying to decode storage: XcmpQueue::DeliveryFeeFactor < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: XcmpQueue::InboundXcmpSuspended < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: XcmpQueue::OutboundXcmpMessages < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: XcmpQueue::OutboundXcmpStatus < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: XcmpQueue::QueueConfig < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: XcmpQueue::QueueSuspended < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: XcmpQueue::SignalMessages < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: PolkadotXcm runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::AssetTraps < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::CurrentMigration < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::LockedFungibles < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::Queries < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::QueryCounter < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::RecordedXcm < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::RemoteLockedFungibles < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::SafeXcmVersion < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::ShouldRecordXcm < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::SupportedVersion < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::VersionDiscoveryQueue < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::VersionNotifiers < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::VersionNotifyTargets < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::XcmExecutionSuspended < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: CumulusXcm runtime::try-decode-state DEBUG: [1] trying to decode pallet: Utility runtime::try-decode-state DEBUG: [1] trying to decode pallet: Multisig runtime::try-decode-state DEBUG: [1] trying to decode storage: Multisig::Multisigs < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: BridgeRelayers runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeRelayers::RegisteredRelayers < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeRelayers::RelayerRewards < T, I > runtime::try-decode-state DEBUG: [1] trying to decode pallet: BridgeKusamaGrandpa runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaGrandpa::BestFinalized < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaGrandpa::CurrentAuthoritySet < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaGrandpa::FreeHeadersRemaining < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaGrandpa::ImportedHashes < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaGrandpa::ImportedHashesPointer < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaGrandpa::ImportedHeaders < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaGrandpa::InitialHash < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaGrandpa::PalletOperatingMode < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaGrandpa::PalletOwner < T, I > runtime::try-decode-state DEBUG: [1] trying to decode pallet: BridgeKusamaParachains runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaParachains::ImportedParaHashes < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaParachains::ImportedParaHeads < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaParachains::PalletOperatingMode < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaParachains::PalletOwner < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaParachains::ParasInfo < T, I > runtime::try-decode-state DEBUG: [1] trying to decode pallet: BridgeKusamaMessages runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaMessages::InboundLanes < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaMessages::OutboundLanes < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaMessages::OutboundMessages < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaMessages::PalletOperatingMode < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaMessages::PalletOwner < T, I > runtime::try-decode-state DEBUG: [1] trying to decode pallet: XcmOverBridgeHubKusama runtime::try-decode-state DEBUG: [1] trying to decode storage: XcmOverBridgeHubKusama::Bridges < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: XcmOverBridgeHubKusama::LaneToBridge < T, I > runtime::try-decode-state DEBUG: [1] trying to decode pallet: EthereumInboundQueue runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumInboundQueue::Nonce < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumInboundQueue::OperatingMode < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: EthereumOutboundQueue runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumOutboundQueue::MessageLeaves < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumOutboundQueue::Messages < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumOutboundQueue::Nonce < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumOutboundQueue::OperatingMode < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: EthereumBeaconClient runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumBeaconClient::CurrentSyncCommittee < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumBeaconClient::FinalizedBeaconState < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumBeaconClient::FinalizedBeaconStateIndex < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumBeaconClient::FinalizedBeaconStateMapping < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumBeaconClient::InitialCheckpointRoot < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumBeaconClient::LatestFinalizedBlockRoot < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumBeaconClient::LatestSyncCommitteeUpdatePeriod < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumBeaconClient::NextSyncCommittee < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumBeaconClient::OperatingMode < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumBeaconClient::ValidatorsRoot < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: EthereumSystem runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumSystem::Agents < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumSystem::Channels < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumSystem::ForeignToNativeId < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumSystem::NativeToForeignId < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumSystem::PricingParameters < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: MessageQueue runtime::try-decode-state DEBUG: [1] trying to decode storage: MessageQueue::BookStateFor < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: MessageQueue::Pages < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: MessageQueue::ServiceHead < T > runtime::executive INFO: [1] ✅ Entire runtime state decodes without error. 853193 bytes total. chopsticks::executor TRACE: [1] Completed TryRuntime_on_runtime_upgrade ```
Merges backport paritytech/polkadot-sdk#8270 of paritytech/polkadot-sdk#7947 - [x] Test with chopsticks ## Testing ``` $ npx @acala-network/chopsticks try-runtime \ --endpoint wss://polkadot-bridge-hub-rpc-tn.dwellir.com \ --runtime wasms/bridge_hub_polkadot_runtime.compact.wasm \ --checks PreAndPost \ --db westend-cache.sqllite \ --disable-spec-check -------------------------------------------------------------------------------- Current runtime spec_name: bridge-hub-polkadot, spec_version: 1004003 New runtime spec_name: bridge-hub-polkadot, spec_version: 1005000 -------------------------------------------------------------------------------- chopsticks::executor TRACE: [1] Calling TryRuntime_on_runtime_upgrade ethereum_system::migration INFO: [1] Pre fee per gas migration: pricing parameters = PricingParameters { exchange_rate: , rewards: Rewards { local: 100000000, remote: 250000000000000 }, fee_per_gas: 10000000000, multiplier: }, remote_fee = 4100000000000000 frame_support::migrations INFO: [1] 🚚 Pallet "EthereumSystem" VersionedMigration migrating storage version from 0 to 1. ethereum_system::migration INFO: [1] Fee per gas migrated from 10000000000 to 7000000000. ethereum_system::migration INFO: [1] Post fee per gas migration: pricing parameters = PricingParameters { exchange_rate: , rewards: Rewards { local: 100000000, remote: 250000000000000 }, fee_per_gas: 7000000000, multiplier: } remote_fee = 2945000000000000 runtime::xcm::pallet_xcm::migrate_data_to_xcm_version INFO: [1] Migrating `Queries` query_id=1 new_data=QueryStatus::VersionNotifier { origin: V5(Location { parents: 1, interior: X1([Parachain(1000)]) }), is_active: true } runtime::xcm::pallet_xcm::migrate_data_to_xcm_version INFO: [1] Migrating `Queries` query_id=0 new_data=QueryStatus::VersionNotifier { origin: V5(Location { parents: 1, interior: Here }), is_active: true } runtime::xcm::pallet_xcm::migrate_data_to_xcm_version INFO: [1] Migrating `Queries` query_id=2 new_data=QueryStatus::VersionNotifier { origin: V5(Location { parents: 1, interior: X1([Parachain(1001)]) }), is_active: true } runtime::frame-support DEBUG: [1] ✅ no migration for System runtime::frame-support DEBUG: [1] ✅ no migration for ParachainSystem runtime::frame-support DEBUG: [1] ✅ no migration for Timestamp runtime::frame-support DEBUG: [1] ✅ no migration for ParachainInfo runtime::frame-support DEBUG: [1] ✅ no migration for Balances runtime::frame-support DEBUG: [1] ✅ no migration for TransactionPayment runtime::frame-support DEBUG: [1] ✅ no migration for Authorship runtime::frame-support DEBUG: [1] ✅ no migration for CollatorSelection runtime::frame-support DEBUG: [1] ✅ no migration for Session runtime::frame-support DEBUG: [1] ✅ no migration for Aura runtime::frame-support DEBUG: [1] ✅ no migration for AuraExt runtime::frame-support DEBUG: [1] ✅ no migration for XcmpQueue runtime::frame-support DEBUG: [1] ✅ no migration for PolkadotXcm runtime::frame-support DEBUG: [1] ✅ no migration for CumulusXcm runtime::frame-support DEBUG: [1] ✅ no migration for Utility runtime::frame-support DEBUG: [1] ✅ no migration for Multisig runtime::frame-support DEBUG: [1] ✅ no migration for BridgeRelayers runtime::frame-support DEBUG: [1] ✅ no migration for BridgeKusamaGrandpa runtime::frame-support DEBUG: [1] ✅ no migration for BridgeKusamaParachains runtime::frame-support DEBUG: [1] ✅ no migration for BridgeKusamaMessages runtime::frame-support DEBUG: [1] ✅ no migration for XcmOverBridgeHubKusama runtime::frame-support DEBUG: [1] ✅ no migration for EthereumInboundQueue runtime::frame-support DEBUG: [1] ✅ no migration for EthereumOutboundQueue runtime::frame-support DEBUG: [1] ✅ no migration for EthereumBeaconClient runtime::frame-support DEBUG: [1] ✅ no migration for EthereumSystem runtime::frame-support DEBUG: [1] ✅ no migration for MessageQueue runtime::try-decode-state DEBUG: [1] trying to decode pallet: System runtime::try-decode-state DEBUG: [1] trying to decode storage: System::Account < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::AllExtrinsicsLen < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::AuthorizedUpgrade < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::BlockHash < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::BlockWeight < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::Digest < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::EventCount < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::EventTopics < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::ExecutionPhase < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::ExtrinsicCount < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::ExtrinsicData < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::InherentsApplied < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::LastRuntimeUpgrade < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::Number < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::ParentHash < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::UpgradedToTripleRefCount < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: System::UpgradedToU32RefCount < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: ParachainSystem runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::AggregatedUnincludedSegment < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::AnnouncedHrmpMessagesPerCandidate < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::CustomValidationHeadData < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::DidSetValidationCode < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::HrmpOutboundMessages < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::HrmpWatermark < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::LastDmqMqcHead < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::LastHrmpMqcHeads < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::LastRelayChainBlockNumber < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::NewValidationCode < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::PendingUpwardMessages < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::PendingValidationCode < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::ProcessedDownwardMessages < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::RelayStateProof < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::RelevantMessagingState < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::ReservedDmpWeightOverride < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::ReservedXcmpWeightOverride < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::UnincludedSegment < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::UpgradeGoAhead < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::UpgradeRestrictionSignal < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::UpwardDeliveryFeeFactor < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::UpwardMessages < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainSystem::ValidationData < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: Timestamp runtime::try-decode-state DEBUG: [1] trying to decode storage: Timestamp::DidUpdate < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: Timestamp::Now < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: ParachainInfo runtime::try-decode-state DEBUG: [1] trying to decode storage: ParachainInfo::ParachainId < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: Balances runtime::try-decode-state DEBUG: [1] trying to decode storage: Balances::Account < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: Balances::Freezes < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: Balances::Holds < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: Balances::InactiveIssuance < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: Balances::Locks < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: Balances::Reserves < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: Balances::TotalIssuance < T, I > runtime::try-decode-state DEBUG: [1] trying to decode pallet: TransactionPayment runtime::try-decode-state DEBUG: [1] trying to decode storage: TransactionPayment::NextFeeMultiplier < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: TransactionPayment::StorageVersion < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: Authorship runtime::try-decode-state DEBUG: [1] trying to decode storage: Authorship::Author < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: CollatorSelection runtime::try-decode-state DEBUG: [1] trying to decode storage: CollatorSelection::CandidacyBond < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: CollatorSelection::CandidateList < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: CollatorSelection::DesiredCandidates < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: CollatorSelection::Invulnerables < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: CollatorSelection::LastAuthoredBlock < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: Session runtime::try-decode-state DEBUG: [1] trying to decode storage: Session::CurrentIndex < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: Session::DisabledValidators < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: Session::KeyOwner < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: Session::NextKeys < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: Session::QueuedChanged < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: Session::QueuedKeys < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: Session::Validators < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: Aura runtime::try-decode-state DEBUG: [1] trying to decode storage: Aura::Authorities < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: Aura::CurrentSlot < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: AuraExt runtime::try-decode-state DEBUG: [1] trying to decode storage: AuraExt::Authorities < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: AuraExt::SlotInfo < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: XcmpQueue runtime::try-decode-state DEBUG: [1] trying to decode storage: XcmpQueue::DeliveryFeeFactor < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: XcmpQueue::InboundXcmpSuspended < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: XcmpQueue::OutboundXcmpMessages < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: XcmpQueue::OutboundXcmpStatus < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: XcmpQueue::QueueConfig < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: XcmpQueue::QueueSuspended < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: XcmpQueue::SignalMessages < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: PolkadotXcm runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::AssetTraps < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::CurrentMigration < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::LockedFungibles < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::Queries < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::QueryCounter < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::RecordedXcm < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::RemoteLockedFungibles < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::SafeXcmVersion < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::ShouldRecordXcm < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::SupportedVersion < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::VersionDiscoveryQueue < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::VersionNotifiers < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::VersionNotifyTargets < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: PolkadotXcm::XcmExecutionSuspended < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: CumulusXcm runtime::try-decode-state DEBUG: [1] trying to decode pallet: Utility runtime::try-decode-state DEBUG: [1] trying to decode pallet: Multisig runtime::try-decode-state DEBUG: [1] trying to decode storage: Multisig::Multisigs < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: BridgeRelayers runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeRelayers::RegisteredRelayers < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeRelayers::RelayerRewards < T, I > runtime::try-decode-state DEBUG: [1] trying to decode pallet: BridgeKusamaGrandpa runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaGrandpa::BestFinalized < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaGrandpa::CurrentAuthoritySet < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaGrandpa::FreeHeadersRemaining < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaGrandpa::ImportedHashes < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaGrandpa::ImportedHashesPointer < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaGrandpa::ImportedHeaders < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaGrandpa::InitialHash < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaGrandpa::PalletOperatingMode < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaGrandpa::PalletOwner < T, I > runtime::try-decode-state DEBUG: [1] trying to decode pallet: BridgeKusamaParachains runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaParachains::ImportedParaHashes < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaParachains::ImportedParaHeads < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaParachains::PalletOperatingMode < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaParachains::PalletOwner < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaParachains::ParasInfo < T, I > runtime::try-decode-state DEBUG: [1] trying to decode pallet: BridgeKusamaMessages runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaMessages::InboundLanes < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaMessages::OutboundLanes < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaMessages::OutboundMessages < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaMessages::PalletOperatingMode < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: BridgeKusamaMessages::PalletOwner < T, I > runtime::try-decode-state DEBUG: [1] trying to decode pallet: XcmOverBridgeHubKusama runtime::try-decode-state DEBUG: [1] trying to decode storage: XcmOverBridgeHubKusama::Bridges < T, I > runtime::try-decode-state DEBUG: [1] trying to decode storage: XcmOverBridgeHubKusama::LaneToBridge < T, I > runtime::try-decode-state DEBUG: [1] trying to decode pallet: EthereumInboundQueue runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumInboundQueue::Nonce < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumInboundQueue::OperatingMode < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: EthereumOutboundQueue runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumOutboundQueue::MessageLeaves < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumOutboundQueue::Messages < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumOutboundQueue::Nonce < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumOutboundQueue::OperatingMode < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: EthereumBeaconClient runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumBeaconClient::CurrentSyncCommittee < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumBeaconClient::FinalizedBeaconState < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumBeaconClient::FinalizedBeaconStateIndex < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumBeaconClient::FinalizedBeaconStateMapping < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumBeaconClient::InitialCheckpointRoot < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumBeaconClient::LatestFinalizedBlockRoot < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumBeaconClient::LatestSyncCommitteeUpdatePeriod < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumBeaconClient::NextSyncCommittee < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumBeaconClient::OperatingMode < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumBeaconClient::ValidatorsRoot < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: EthereumSystem runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumSystem::Agents < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumSystem::Channels < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumSystem::ForeignToNativeId < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumSystem::NativeToForeignId < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: EthereumSystem::PricingParameters < T > runtime::try-decode-state DEBUG: [1] trying to decode pallet: MessageQueue runtime::try-decode-state DEBUG: [1] trying to decode storage: MessageQueue::BookStateFor < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: MessageQueue::Pages < T > runtime::try-decode-state DEBUG: [1] trying to decode storage: MessageQueue::ServiceHead < T > runtime::executive INFO: [1] ✅ Entire runtime state decodes without error. 853193 bytes total. chopsticks::executor TRACE: [1] Completed TryRuntime_on_runtime_upgrade ```
Update the gas allowance of the `TransferToken` related commands. This
also means that the default fee needs to be increased as well as a
migration.
# Migration
In production mainnet to ensure no downtime, instead of increasing the
fee to account for the new gas fee, we will instead decrease the gas
cost so that it will not require a fee increase.
The pre remote fee in Wei:
```python
(185_000 + 100_000) * 10_000_000_000 + 250_000_000_000_000
> 3100000000000000
```
We are increasing the gas to 200k.
The post remote fee Wei:
```python
(185_000 + 200_000) * 10_000_000_000 + 250_000_000_000_000
> 4100000000000000
```
This effectively increases the price for the end users transaction by
32%. Taking the inverse of 32 percent means we can decrease the gas cost
by ~74%. The migration script plays it safe and decreases it to 70%. The
post migration `try-runtime` check asserts that the new fee calculated
with the increased gas can is less than or equal to the old fee pre the
gas change.
# TODO
- [x] Add migration to half fee on bridge on start-up
- [x] Test in prod with chopsticks
# Testing
Tested with chopsticks on westend.
```console
$ npx @acala-network/chopsticks try-runtime \
--endpoint wss://westend-bridge-hub-rpc-tn.dwellir.com \
--runtime bridge_hub_westend_runtime.compact.wasm \
--checks PreAndPost \
--db westend-cache.sqllite \
--disable-spec-check
```
Output
```console
$ cat output.log | grep ethereum_system
ethereum_system::migration INFO: Agents and channels are initialized. Initialization will not run.
ethereum_system::migration INFO: Ethereum system already initialized. Skipping.
ethereum_system::migration INFO: Pre fee per gas migration: pricing parameters = PricingParameters { exchange_rate: , rewards: Rewards { local: 1000000000000, remote: 1000000000000000 }, fee_per_gas: 20000000000, multiplier: }, remote_fee_v1 = 8700000000000000, remote_fee_v2 = 5000000000000000
ethereum_system::migration INFO: Fee per gas migrated from 20000000000 to 14000000000.
ethereum_system::migration INFO: Post fee per gas migration: pricing parameters = PricingParameters { exchange_rate: , rewards: Rewards { local: 1000000000000, remote: 1000000000000000 }, fee_per_gas: 14000000000, multiplier: } remote_fee_v1 = 6390000000000000 remote_fee_v2 = 3800000000000000
```
---------
Co-authored-by: Adrian Catangiu <adrian@parity.io>
Co-authored-by: ron <yrong1997@gmail.com>
Backport paritytech#7947 into `stable2503` from alistair-singh. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. <!-- # To be used by other automation, do not modify: original-pr-number: #${pull_number} --> --------- Co-authored-by: Alistair Singh <alistair.singh7@gmail.com> Co-authored-by: Clara van Staden <claravanstaden64@gmail.com> Co-authored-by: Ron <yrong1997@gmail.com> Co-authored-by: Adrian Catangiu <adrian@parity.io>
Update the gas allowance of the
TransferTokenrelated commands. This also means that the default fee needs to be increased as well as a migration.Migration
In production mainnet to ensure no downtime, instead of increasing the fee to account for the new gas fee, we will instead decrease the gas cost so that it will not require a fee increase.
The pre remote fee in Wei:
We are increasing the gas to 200k.
The post remote fee Wei:
This effectively increases the price for the end users transaction by 32%. Taking the inverse of 32 percent means we can decrease the gas cost by ~74%. The migration script plays it safe and decreases it to 70%. The post migration
try-runtimecheck asserts that the new fee calculated with the increased gas can is less than or equal to the old fee pre the gas change.TODO
Testing
Tested with chopsticks on westend.
Output