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

Zeitgeist parachain integration - unknown consensus engine. #2475

Closed
yornaath opened this issue Jul 6, 2022 · 4 comments · Fixed by #2481
Closed

Zeitgeist parachain integration - unknown consensus engine. #2475

yornaath opened this issue Jul 6, 2022 · 4 comments · Fixed by #2481

Comments

@yornaath
Copy link

yornaath commented Jul 6, 2022

We at zeitgeist are trying to integrate substrate-connect(smoldot) into our frontend application layer using the extension, but running into the following errors:

[runtime-zeitgeist] Failed to decode header from sync service: Unknown consensus engine specified in a digest log: [110, 109, 98, 115]
[runtime-zeitgeist] Failed to download :code and :heappages of blocks 0xa800…4f96: Couldn't decode header: Unknown consensus engine specified in a digest log: [110, 109, 98, 115]

We are building of the purestake/substrate fork and using nimbus to implement our consensus layer, if we are using the same algorithm and format exactly as moonbeam is beyond my awareness atm, but maybe @sea212 have some more info that is relevant.

Ref
Frontend instantiation of Scprovider
Para chain spec
Runtime creation

@sea212
Copy link

sea212 commented Jul 6, 2022

We use Nimbus for parachain consensus and parachain-staking pallet for managing candidate sets, staking and determining the active set.

Current snapshot of the crate versions used:

nimbus-primitives = { branch = "moonbeam-polkadot-v0.9.19", default-features = false, git = "https://github.com/purestake/nimbus", optional = true }
pallet-author-inherent = { branch = "moonbeam-polkadot-v0.9.19", default-features = false, git = "https://github.com/purestake/nimbus", optional = true }
pallet-author-mapping = { rev = "78db06c0203f61b35059304f7194ed5c10dcfda8", default-features = false, git = "https://github.com/purestake/moonbeam", optional = true }
pallet-author-slot-filter = { branch = "moonbeam-polkadot-v0.9.19", default-features = false, git = "https://github.com/purestake/nimbus", optional = true }
parachain-staking = { rev = "78db06c0203f61b35059304f7194ed5c10dcfda8", default-features = false, git = "https://github.com/purestake/moonbeam", optional = true }

@sea212
Copy link

sea212 commented Jul 6, 2022

Related to #2139 (comment)

@tomaka
Copy link
Contributor

tomaka commented Jul 6, 2022

So I believe (but could be wrong) that Nimbus is not really compatible with light clients.
Due to the fact that light clients don't execute blocks, they can't know whether a Nimbus block is valid or not.
The fact that anyone can generate a valid header (but not necessarily a valid body) violates many assumptions about DoS resilience.

However, that's problematic only for standalone chains/relay chains.
When it comes to parachains, the source of truth is the relay chain and thus we can ignore the consensus engine. It is already the case that smoldot ignores the consensus engine of parachains, and all that is needed to support Nimbus is being able to parse the headers.

It's unfortunately not necessarily as simple as allow parsing Nimbus headers. This is all a bit complicated, and I probably need to tweak the blocks verification code as well. I want to avoid fuck ups where blocks accidentally don't get verified and that kind of things.

@yornaath
Copy link
Author

yornaath commented Jul 7, 2022

@tomaka is this something you want to work on and if so do you have a very rough eta on when it could be implemented? I could also have a look, but just learning some rust so the learning curve for something like this would be a bit steep ^^

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.

3 participants