AcalaNetwork / chopsticks

Create parallel reality of your Substrate network.
Apache License 2.0
133 stars 80 forks source link

Override relay storage keys included in set_validation_data inherent #757

Closed RomarQ closed 4 months ago

RomarQ commented 4 months ago

The storage paras > upgradeCooldowns is part of the relay storage keys included with set_validation_data inherent.

Is there currently a way to remove relay storages keys when testing a parachain with chopsticks?

ermalkaleci commented 4 months ago

https://github.com/paritytech/polkadot-sdk/blob/313fe0f9a277f27a4228634f0fb15a1c3fa21271/cumulus/client/parachain-inherent/src/lib.rs#L99-L123 I don't think it is included

RomarQ commented 4 months ago

You are right, it is the relay_well_known_keys::upgrade_restriction_signal(para_id) storage key, they are related.

Is there a way in chopsticks to change the value for that storage key?

xlc commented 4 months ago

it should be possible to add a new option to dev_newBlock to pass some parameters to the inherent builder

ermalkaleci commented 4 months ago

https://github.com/AcalaNetwork/chopsticks/blob/15ef2280951b1c93baa9239f4b32721b2085afff/packages/core/src/blockchain/inherent/parachain/validation-data.ts#L260-L269 this is how we manipulate relay-chain data

RomarQ commented 4 months ago

But can I override those externally without changing the chopsticks internals?

ermalkaleci commented 4 months ago

But can I override those externally without changing the chopsticks internals?

No, there's no option to override. You need to change the code

RomarQ commented 4 months ago

Ok, thanks.