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

CustomSectionsPresenceMismatch - Error on adding parachain #595

Closed
Douglasacost opened this issue May 23, 2023 · 3 comments · Fixed by #607
Closed

CustomSectionsPresenceMismatch - Error on adding parachain #595

Douglasacost opened this issue May 23, 2023 · 3 comments · Fixed by #607

Comments

@Douglasacost
Copy link

Douglasacost commented May 23, 2023

Hello. While adding a parachain chainSpec (e.x: Nodle parachain) to smoldot client versions from v1.0.3 to v1.0.6, the following error is logged and the client get stoped

[smoldot] Smoldot v1.0.6 rococo_:: init [smoldot] Chain initialization complete for rococo_v2_2. Name: "Rococo". Genesis hash: 0x6408…063e. State root hash: 0x8ad9dafeef04674f627ec2112f2206ed271b7270da5143fd11a943872c19f0da. Network identity: 12D3KooWMZPvLihSBdaenqyvHyQS5fqgnxGuWmNSxnhq3cTZfKGL. Chain specification or database starting at: 0xd5e1…d2b7 (#5137882) /Users/douglasacosta/nodle/smoldot-play/node_modules/smoldot/dist/cjs/internals/client.js:8 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } ^ AddChainError: Failed to build genesis chain information: Error when initializing the virtual machine: Error in runtime spec Wasm sections: CustomSectionsPresenceMismatch at /Users/douglasacosta/nodle/smoldot-play/node_modules/smoldot/dist/cjs/internals/client.js:282:23 at Generator.next (<anonymous>) at fulfilled (/Users/douglasacosta/nodle/smoldot-play/node_modules/smoldot/dist/cjs/internals/client.js:8:58)

While on the browser with the version of smoldot client v1.0.2 I got this error below
image

Chain info:
parachain chainspec: https://github.com/NodleCode/chain/blob/2.0.30/node/res/eden-testing.json
relay: rococo_v2_2
Platform:
Smoldot version: v1.0.3 - v1.0.6
Node version: v16.15.0
Processor: M1

@tomaka
Copy link
Contributor

tomaka commented May 25, 2023

I've opened paritytech/substrate#14223

Basically, there are two ways to determine the version of a runtime, the legacy way and the newer way. Your runtime is in a weird in-between state, and smoldot doesn't really know this should be handled so it returns an error.
Assuming that my diagnostic is correct, this is a Substrate bug.
I can easily add a work-around in smoldot, but I'd like to confirm that this is the case based on the comments on that Substrate issue first.

@tomaka
Copy link
Contributor

tomaka commented May 25, 2023

NodleCode/chain#749 should fix it for your chain. Since your genesis runtime and that the Rococo genesis runtime are affected, I'll need to add a work-around anyway.

@tomaka
Copy link
Contributor

tomaka commented May 25, 2023

#607 adds a work-around for the problem, and it should now work.

@Douglasacost Douglasacost changed the title CustomSectionsPresenceMismatch - Error on adding parachian CustomSectionsPresenceMismatch - Error on adding parachain May 25, 2023
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

Successfully merging a pull request may close this issue.

2 participants