-
Notifications
You must be signed in to change notification settings - Fork 694
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
slot-based-collator: Implement dedicated block import #6481
base: master
Are you sure you want to change the base?
Conversation
The `SlotBasedBlockImport` job is to collect the storage proofs of all blocks getting imported. These storage proofs alongside the block are being forwarded to the collation task. Right now they are just being thrown away. More logic will follow later. Basically this will be required to include multiple blocks into one `PoV` which will then be done by the collation task.
runtime_api.record_proof(); | ||
let recorder = runtime_api | ||
.proof_recorder() | ||
.expect("Proof recording is enabled in the line above; qed."); | ||
runtime_api.register_extension(ProofSizeExt::new(recorder)); |
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.
nit: there could be an util function to call record_proof
and register recorder extension. Seems that this pattern starts spreading across the codebase.
handle_collation_message(message, &collator_service, &mut overseer_handle).await; | ||
}, | ||
block_import_msg = block_import_handle.next().fuse() => { | ||
// TODO: Implement me. |
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.
nit: is there some ticket number to refer here?
RuntimeApi: Send + ConstructNodeRuntimeApi<Block, ParachainClient<Block, RuntimeApi>>, | ||
{ | ||
type BlockImport = Arc<ParachainClient<Block, RuntimeApi>>; | ||
type ExtraReturnValue = (); |
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.
nit: maybe BlockImportAuxiliaryData
would be a better naming?
And also generic type in ParachainService
could be BIAuxiliaryData
?
<Self::WrapBlockImport as InitBlockImport<Self::Block, Self::RuntimeApi>>::BlockImport, | ||
>; | ||
|
||
type WrapBlockImport: InitBlockImport<Self::Block, Self::RuntimeApi>; |
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.
nit: naming again: maybe WrappedBlockImport
?
The
SlotBasedBlockImport
job is to collect the storage proofs of all blocks getting imported. These storage proofs alongside the block are being forwarded to the collation task. Right now they are just being thrown away. More logic will follow later. Basically this will be required to include multiple blocks into onePoV
which will then be done by the collation task.