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

Override relay storage keys included in set_validation_data inherent #757

Closed
RomarQ opened this issue May 20, 2024 · 7 comments
Closed

Override relay storage keys included in set_validation_data inherent #757

RomarQ opened this issue May 20, 2024 · 7 comments

Comments

@RomarQ
Copy link
Contributor

RomarQ commented May 20, 2024

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?

@RomarQ
Copy link
Contributor Author

RomarQ commented May 21, 2024

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
Copy link
Member

xlc commented May 21, 2024

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

@ermalkaleci
Copy link
Collaborator

const upgradeKey = upgradeGoAheadSignal(paraId)
const pendingUpgrade = await parent.get(compactHex(meta.query.parachainSystem.pendingValidationCode()))
if (pendingUpgrade) {
// send goAhead signal
const goAhead = meta.registry.createType('UpgradeGoAhead', 'GoAhead')
newEntries.push([upgradeKey, goAhead.toHex()])
} else {
// make sure previous goAhead is removed
newEntries.push([upgradeKey, null])
}

this is how we manipulate relay-chain data

@RomarQ
Copy link
Contributor Author

RomarQ commented May 21, 2024

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

@ermalkaleci
Copy link
Collaborator

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
Copy link
Contributor Author

RomarQ commented May 21, 2024

Ok, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants