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

slot-based-collator: Implement dedicated block import #6481

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bkchr
Copy link
Member

@bkchr bkchr commented Nov 14, 2024

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.

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.
@bkchr bkchr added the T0-node This PR/Issue is related to the topic “node”. label Nov 14, 2024
@bkchr bkchr requested review from a team and skunert November 14, 2024 13:05
Comment on lines +107 to +111
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));
Copy link
Contributor

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.
Copy link
Contributor

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 = ();
Copy link
Contributor

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>;
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T0-node This PR/Issue is related to the topic “node”.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants