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

Having a single import block entrypoint #3798

Open
EclesioMeloJunior opened this issue Mar 13, 2024 · 1 comment
Open

Having a single import block entrypoint #3798

EclesioMeloJunior opened this issue Mar 13, 2024 · 1 comment
Assignees
Labels
C-complex Complex changes across multiple modules. Possibly will require additional research. Epic Issue used to track development status of a complex feature, aggregates several issues S-babe issues related to block production functionality.

Comments

@EclesioMeloJunior
Copy link
Member

Issue summary

  • Currently Gossamer has 2 main points where a block is imported, if the block is acquired through the network then we start the importing in the sync package, do the validations, execution and then pass it to core.HandleBlockImport to finish the block import handling block consensus messages and applying forced changes if needed. However, if the block was produced by the node the import is partially done in the babe package and then passed to core.HandleProducedBlock
  • What I'm proposing here is to have a single point to handle/import blocks no matter how we acquire them, that way we can add a pipeline of checks and modifications (for example check if epochs were skipped) without repeating the logic in different places.
  • In Substrate, this approach is used, also while importing the block is passed a set of parameters that help the import function to configure the import pipeline properly to a given block.
func (...) Import(block *types.Block, importParams *BlockImportParams) error {
  ...
}
@P1sar P1sar added S-babe issues related to block production functionality. C-complex Complex changes across multiple modules. Possibly will require additional research. labels Mar 14, 2024
@EclesioMeloJunior EclesioMeloJunior added the Epic Issue used to track development status of a complex feature, aggregates several issues label Apr 23, 2024
@EclesioMeloJunior
Copy link
Member Author

Turning this issue into an epic given that we need to conduct research on how to implement it, also on how the refactor should be done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-complex Complex changes across multiple modules. Possibly will require additional research. Epic Issue used to track development status of a complex feature, aggregates several issues S-babe issues related to block production functionality.
Projects
None yet
Development

No branches or pull requests

2 participants