Introduce storage attr macro #[disable_try_decode_storage] and set it on System::Events and ParachainSystem::HostConfiguration#3454
Conversation
| .storages | ||
| .iter() | ||
| .filter_map(|storage| { | ||
| if storage.cfg_attrs.is_empty() { |
There was a problem hiding this comment.
@kianenigma do you remember why we check if storage.cfg_attrs.is_empty() here?
There was a problem hiding this comment.
It seems it's to avoid this compile error https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5317738
I wonder if there's a better way to handle that.
There was a problem hiding this comment.
Yea we should probably re-expand the attributes here.
It seems to be only used only for testing.
#[disable_try_decode_storage] and set it on System::Events#[disable_try_decode_storage] and set it on System::Events
franciscoaguirre
left a comment
There was a problem hiding this comment.
The whole macro changes look good
|
I thought an off-band discussion concluded that we don't want to expose this to the end-user facing API, and just hardcode somewhere that This PR is not doing that, but it is neatly done. I would like to see:
Before merge tho |
Basti requested this to be done as an attribute macro rather than a hardcoded exception for |
|
@liamaharon can you quote it instead of private link |
|
My point basically was/is that the same thing can happen to downstream users. Like some storage item that is always deleted at the beginning of the next block. Thus, you don't really care if you can still decode it. |
|
In that case it is the try runtime tool should call initialize hook before validate storage entries. |
83c339a to
06ff03b
Compare
…om:paritytech/polkadot-sdk into liam-disable-try-decode-storage-attr-macro
…om:paritytech/polkadot-sdk into liam-disable-try-decode-storage-attr-macro
#[disable_try_decode_storage] and set it on System::Events#[disable_try_decode_storage] and set it on System::Events and ParachainSystem::HostConfiguration
xlc
left a comment
There was a problem hiding this comment.
It will be great if you can help address my concerns before merge #2560 (comment)
…head-data * origin/master: (51 commits) Runtime Upgrade ref docs and Single Block Migration example pallet (#1554) Collator overseer builder unification (#3335) Introduce storage attr macro `#[disable_try_decode_storage]` and set it on `System::Events` and `ParachainSystem::HostConfiguration` (#3454) Add Polkadotters bootnoders per IBP application (#3423) Add documentation around FRAME Origin (#3362) Bridge zombienet tests: Check amount received at destination (#3490) Snowbridge benchmark tests fix (#3424) fix(zombienet): increase timeout in download artifacts (#3376) Cleanup String::from_utf8 (#3446) [prdoc] Validate crate names (#3467) Limit max execution time for `test-linux-stable` CI jobs (#3483) Introduce Notification block pinning limit (#2935) frame-support: Improve error reporting when having too many pallets (#3478) add Encointer as trusted teleporter for Westend (#3411) [pallet-xcm] Adjust benchmarks (teleport_assets/reserve_transfer_assets) not relying on ED (#3464) Add more debug logs to understand if statement-distribution misbehaving (#3419) Remove redundant parachains assigner pallet. (#3457) Use generic hash for runtime wasm in resolve_state_version_from_wasm (#3447) Runtime: allow backing multiple candidates of same parachain on different cores (#3231) Bridge zombienet tests: move all "framework" files under one folder (#3462) ...
…it on `System::Events` and `ParachainSystem::HostConfiguration` (paritytech#3454) Closes paritytech#2560 Allows marking storage items with `#[disable_try_decode_storage]`, and uses it with `System::Events`. Question: what's the recommended way to write a test for this? I couldn't find a test for similar existing macro `#[whitelist_storage]`.
Closes #2560
Allows marking storage items with
#[disable_try_decode_storage], and uses it withSystem::Events.Question: what's the recommended way to write a test for this? I couldn't find a test for similar existing macro
#[whitelist_storage].