-
Notifications
You must be signed in to change notification settings - Fork 690
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
Investigate peregrine
syncing issue when using the polkadot-parachain
binary
#4787
Comments
I'm seeing a lot of errors that go like:
Not sure if they are related to the issue so far |
The problem is that I recompiled
|
This issue has been mentioned on Polkadot Forum. There might be relevant details there: https://forum.polkadot.network/t/polkadot-parachain-omni-node-gathering-ideas-and-feedback/7823/20 |
We've hit this issue of a fixed |
I think foremost you should migrate the blocknumber in your current node and runtime to be u32, and then solving the rest would be easier. Within the runtime, you'd have to see all the places where you might have stored a block number in the state, and migrate it over. Although, assuming no blocknumber is above u32::max, decoding a u64 into a u32 is the same. |
This is not true. U32 is only 4 byte, while u64 is 8 byte. This can very easily break decoding of other stuff. |
But why is that? Why can't we simply use a pub trait BlockNumber:
Member
+ MaybeSerializeDeserialize
+ MaybeFromStr
+ Debug
+ sp_std::hash::Hash
+ Copy
+ MaybeDisplay
+ AtLeast32BitUnsigned
+ Into<U256>
+ TryFrom<U256>
+ Default
+ TypeInfo
+ MaxEncodedLen
+ FullCodec |
I suspect the early versions of the omni-node will not be configurable will use u32 block number as it is more commmonly used. |
True, my advice is very much a shutgun as it only applies if you |
@kianenigma I see, so perhaps we just identified one more requirement for the upcoming omni-node 😄 |
If you change the block number there, the decoding will be completely broken. This is not related to
The point being that every interaction between the node and the runtime, plus any usage of block number in the node requires to know the type of the blocknumber. It is generic over the block number, but only generic at compile time and not generic at runtime. |
@bkchr I am not sure I understand 100% what you are saying, sorry 😀 Are you saying that it's not possible to know at compile time which block number type to use for a given runtime? Or does your point apply to a generic node that must run all runtimes, regardless of their block number type? |
My comment applies to this. |
Related to #4787 The main changes in this PR are the following: - making the NodeSpec logic generic on the Block type - adding an omni-node variant with u64 block number Apart from this, the PR also moves some of the logic in `service.rs` to the `common` subfolder The omni-node variant with u64 block number is not used yet. We have to either expose the option in the CLI or to read the block number from the chain spec somehow. Will do it in a future PR.
Related to #4787 The main changes in this PR are the following: - making the NodeSpec logic generic on the Block type - adding an omni-node variant with u64 block number Apart from this, the PR also moves some of the logic in `service.rs` to the `common` subfolder The omni-node variant with u64 block number is not used yet. We have to either expose the option in the CLI or to read the block number from the chain spec somehow. Will do it in a future PR.
Last step before we can close this on our side: KILTprotocol/kilt-node#716 |
Amazing. We will check it out. Thanks a lot @kianenigma! |
The
polkadot-parachain
bin should be able to run custom parachains that satisfy some assumptions, mainly using the aura consensus.peregrine
should be such a parachain but it doesn't work withpolkadot-parachain
. More details here: https://forum.polkadot.network/t/polkadot-parachain-omni-node-gathering-ideas-and-feedback/7823/18The text was updated successfully, but these errors were encountered: