-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fix node syncing #137
Merged
Merged
Fix node syncing #137
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DmitriVT
requested changes
Jul 19, 2024
DmitriVT
approved these changes
Jul 19, 2024
hrls
approved these changes
Jul 19, 2024
ales-tsurko
force-pushed
the
fix/node-wont-sync
branch
from
July 22, 2024 17:23
2f352bc
to
88fb586
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently our nodes panic (1 2) when we try to sync them from scratch. The issue is happened because of multiple issues:
pallet_democracy
and because our nodes couldn't produce blocks without the patch, we usedcodeSubstitutes
in the chainspec.All those upgrades happened at the same spec version and without spec version update. And it turned out, it's only possible to have a single substitute per spec version, thus using another substitute for the first upgrade provides random substitute usage (either the first or the second one), but not both.
This PR provides:
WasmExecutor
as suggested in 2 asNativeElseWasm
may lead to similar issues;polkadot-sdk
, whereWasmSubstitutes
can hold multiple substitutes per the same spec version;frontier
, because it depends onpolkadot-sdk
repo, but we need it to use our fork (it's easier to update Cargo.toml in the fork, than find out which dependencies we need to patch);pallet-democracy-patched
as the fix is now in the forked substrate.Intention behind the fork is caused by the lack of related substrate API, which is neither parametrized nor public. Particularly
WasmSubstitute
and parts ofWasmSubstitutes
which holds a map with the spec version as a key and the substitute as a value.