Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix/1027 #1782

Merged
merged 12 commits into from
Mar 29, 2024
Merged

Hotfix/1027 #1782

merged 12 commits into from
Mar 29, 2024

Conversation

mustermeiszer
Copy link
Collaborator

@mustermeiszer mustermeiszer commented Mar 28, 2024

Description

  • Fixes weight for update_collection call of pallet-oracle-collection which is uncallable right now due to PoV Excess
  • Adds missing migration for Anemoy pool loans

Changes and Descriptions

[List your changes here]

Checklist:

  • I have added Rust doc comments to structs, enums, traits and functions
  • I have made corresponding changes to the documentation
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or that my feature works

@mustermeiszer
Copy link
Collaborator Author

mustermeiszer commented Mar 28, 2024

024-03-28 14:17:47 adding data for hashed prefix: , took 22.55s    
2024-03-28 14:17:47 adding data for hashed key: 3a636f6465    
2024-03-28 14:17:48 adding data for hashed key: 26aa394eea5630e07c48ae0c9558cef7f9cce9c888469bb1a0dceaa129672ef8    
2024-03-28 14:17:48 adding data for hashed key: 26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac    
2024-03-28 14:17:48 initialized state externalities with storage root 0xc513050a7b01ce62a9384c23ac6f57eb48d234cbca75d21b7305a6855fc2c846 and state_version V0    
2024-03-28 14:17:48 original spec: RuntimeString::Owned("centrifuge")-1027, code hash: b69411ac0efe924477a5d058451dfc8444c669106cd2763c220dc4b622fb88bc    
2024-03-28 14:17:48 new spec: RuntimeString::Owned("centrifuge")-1028, code hash: c4b615027372846caee4a259200099574bab216794282db31983bc928749cfc2    
2024-03-28 14:17:49 MigrateAnemoyPrices:: STARTING Migrating Anemoy Price Ids.    
2024-03-28 14:17:49 MigrateAnemoyPrices:: Registered PriceId: OracleKey::Isin([85, 83, 57, 49, 50, 55, 57, 55, 72, 81, 51, 48])    
2024-03-28 14:17:49 MigrateAnemoyPrices:: Registered PriceId: OracleKey::Isin([85, 83, 57, 49, 50, 55, 57, 55, 72, 84, 55, 56])    
2024-03-28 14:17:49 MigrateAnemoyPrices:: Registered PriceId: OracleKey::Isin([85, 83, 57, 49, 50, 55, 57, 54, 67, 88, 53, 50])    
2024-03-28 14:17:49 MigrateAnemoyPrices:: Registered PriceId: OracleKey::Isin([85, 83, 57, 49, 50, 55, 57, 55, 72, 71, 53, 55])    
2024-03-28 14:17:49 MigrateAnemoyPrices:: Registered PriceId: OracleKey::Isin([85, 83, 57, 49, 50, 55, 57, 55, 74, 84, 53, 48])    
2024-03-28 14:17:49 MigrateAnemoyPrices:: Registered PriceId: OracleKey::Isin([85, 83, 57, 49, 50, 55, 57, 55, 71, 75, 55, 56])    
2024-03-28 14:17:49 MigrateAnemoyPrices:: FINISHED Migrating Anemoy Price Ids.    
2024-03-28 14:17:49 ⚠️ ParachainSystem declares internal migrations (which *might* execute). On-chain `StorageVersion(2)` vs current storage version `StorageVersion(2)`    
2024-03-28 14:17:49 OraclePriceFeed: On chain storage version StorageVersion(0) doesn't match current storage version StorageVersion(1).    
2024-03-28 14:17:49 OraclePriceCollection: On chain storage version StorageVersion(0) doesn't match current storage version StorageVersion(1).    
2024-03-28 14:17:49 ⚠️ XcmpQueue declares internal migrations (which *might* execute). On-chain `StorageVersion(3)` vs current storage version `StorageVersion(2)`    
2024-03-28 14:17:49 XcmpQueue: On chain storage version StorageVersion(3) doesn't match current storage version StorageVersion(2).    
2024-03-28 14:17:49 ⚠️ PolkadotXcm declares internal migrations (which *might* execute). On-chain `StorageVersion(1)` vs current storage version `StorageVersion(1)`    
2024-03-28 14:17:49 ⚠️ DmpQueue declares internal migrations (which *might* execute). On-chain `StorageVersion(2)` vs current storage version `StorageVersion(1)`    
2024-03-28 14:17:49 DmpQueue: On chain storage version StorageVersion(2) doesn't match current storage version StorageVersion(1).    
2024-03-28 14:17:49 ⚠️ Ethereum declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `NoStorageVersionSet`    
2024-03-28 14:17:49 Detected multiple errors while executing `try_on_runtime_upgrade`:    
2024-03-28 14:17:49 Other("On chain and current storage version do not match. Missing runtime upgrade?")    
2024-03-28 14:17:49 Other("On chain and current storage version do not match. Missing runtime upgrade?")    
2024-03-28 14:17:49 Other("On chain and current storage version do not match. Missing runtime upgrade?")    
2024-03-28 14:17:49 Other("On chain and current storage version do not match. Missing runtime upgrade?")    
2024-03-28 14:17:49 panicked at /Users/frederikgartenmeister/Projects/centrifuge-chain/runtime/centrifuge/src/lib.rs:2853:65:
called `Result::unwrap()` on an `Err` value: Other("Detected multiple errors while executing `try_on_runtime_upgrade`, check the logs!")    
Error: Input("failed to execute TryRuntime_on_runtime_upgrade: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\nWASM backtrace:\nerror while executing at wasm backtrace:\n    0: 0x68dede - <unknown>!rust_begin_unwind\n    1: 0x5e5d5f - <unknown>!core::panicking::panic_fmt::hae09c37b9301b789\n    2: 0x5e693e - <unknown>!core::result::unwrap_failed::h22afadfa28b8acf5\n    3: 0x26fa9 - <unknown>!<centrifuge_runtime::Runtime as frame_try_runtime::runtime_decl_for_try_runtime::TryRuntimeV1<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u32,sp_runtime::traits::BlakeTwo256>,fp_self_contained::unchecked_extrinsic::UncheckedExtrinsic<sp_runtime::multiaddress::MultiAddress<<<sp_runtime::MultiSignature as sp_runtime::traits::Verify>::Signer as sp_runtime::traits::IdentifyAccount>::AccountId,()>,centrifuge_runtime::RuntimeCall,sp_runtime::MultiSignature,(frame_system::extensions::check_non_zero_sender::CheckNonZeroSender<centrifuge_runtime::Runtime>,frame_system::extensions::check_spec_version::CheckSpecVersion<centrifuge_runtime::Runtime>,frame_system::extensions::check_tx_version::CheckTxVersion<centrifuge_runtime::Runtime>,frame_system::extensions::check_genesis::CheckGenesis<centrifuge_runtime::Runtime>,frame_system::extensions::check_mortality::CheckMortality<centrifuge_runtime::Runtime>,frame_system::extensions::check_nonce::CheckNonce<centrifuge_runtime::Runtime>,frame_system::extensions::check_weight::CheckWeight<centrifuge_runtime::Runtime>,pallet_transaction_payment::ChargeTransactionPayment<centrifuge_runtime::Runtime>,runtime_common::transfer_filter::PreBalanceTransferExtension<centrifuge_runtime::Runtime>)>>>>::on_runtime_upgrade::h29ea1cb54152fb58\n    4: 0x1b8df4 - <unknown>!TryRuntime_on_runtime_upgrade\nnote: using the `WASMTIME_BACKTRACE_DETAILS=1` environment variable may show more debugging information")

@wischli wischli added I2-bug The code fails to follow expected behaviour. P7-asap Issue should be addressed in the next days. I9-release A specific release. labels Mar 28, 2024
Copy link
Contributor

@lemunozm lemunozm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mustermeiszer and @wischli for taking care of this 🙏🏻

Just a couple of minor comments, not blocked. LGTM

Comment on lines +48 to +52
Err(e) => log::info!(
"{LOG_PREFIX}: Failed to register PriceId: {:?}, with error: {:?}.",
pricing.price_id(),
e
),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should only consider it as an error if the loan is BorrowRestrictions::OraclePriceRequired. Otherwise, getting an error from register_id() is fine. But not sure if for Anemoy we have this case. If we do not see any error right now here, then we do not need to modify it.

@@ -109,7 +109,7 @@ mod benchmarks {
}

#[benchmark]
fn update_collection(n: Linear<1, 10>, m: Linear<1, 10>) -> Result<(), BenchmarkError> {
fn update_collection(n: Linear<1, 5>, m: Linear<1, 100>) -> Result<(), BenchmarkError> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 100?

@lemunozm
Copy link
Contributor

What is left in this PR?

@wischli wischli merged commit 1a9e385 into main Mar 29, 2024
12 checks passed
@wischli wischli deleted the hotfix/1027 branch March 29, 2024 07:45
@wischli
Copy link
Contributor

wischli commented Mar 29, 2024

What is left in this PR?

Nothing, just merged :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I2-bug The code fails to follow expected behaviour. I9-release A specific release. P7-asap Issue should be addressed in the next days.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants