-
Notifications
You must be signed in to change notification settings - Fork 163
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 archive sync panic #1051
Fix archive sync panic #1051
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to have the substitute in the ChainSpec
builder or in the function producing the chain spec instead. It's more reliable and doesn't require patching. If it's possible.
Probably this could help: https://paritytech.github.io/polkadot-sdk/master/sc_chain_spec/fn.set_code_substitute_in_json_chain_spec.html |
@ales-otf I tried this but couldn't figure it out. It seems the |
BTW, it looks like we can omit using the script and just hardcode everything, as there is with_code method. |
@ales-otf that is the genesis JSON not the chain spec JSON |
yeah, I've updated my comment |
Good spot! I will have a go at this.
I don't think |
Yeah, that's exactly what I meant. We now need to use this script to keep the genesis mostly because of the genesis code. The rest comes frome that Opened an issue for this. |
This is definitely out of scope of this PR. I've just spotted the method and this idea came to mind. |
A bit hacky but figured out a solution for setting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, look the comment - this change is important.
And just an additional not much important styling thing, which would improve readability and debugging — to encapsulate this whole part related to setting the substitute into a separate function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
2585477
due to panic by adding acodeSubstitute
that patches the buggy code with one that doesn't panic.node/src/chain_spec/finney.rs
so Finney chainspec always builds with thecodeSubstitues
field.