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

Add Block Origin to BlockData #3004

Closed
kishansagathiya opened this issue Dec 13, 2022 · 2 comments
Closed

Add Block Origin to BlockData #3004

kishansagathiya opened this issue Dec 13, 2022 · 2 comments
Assignees
Labels
C-complex Complex changes across multiple modules. Possibly will require additional research. P-low this is mostly nice to have.

Comments

@kishansagathiya
Copy link
Contributor

kishansagathiya commented Dec 13, 2022

Issue summary

We are not supposed to report equivocation if they happen during initial sync, because they could be stale.

To check if we are in initial sync, we need something like block origin. Block origin tells about where did we import this block. It could be things like we got it in the initial sync, was broadcasted in the network, genesis block, got it from a file, etc.
The best place to add that would be in BlockData (

type BlockData struct {
). Going through our codebase, we don't have logic to find. We need to add that logic and populate block data with block origin.

Once we have support for block origins, we can just add a condition such that if block origin is initial sync don't report equivocation.

Other information and links

@EclesioMeloJunior EclesioMeloJunior self-assigned this Jul 3, 2023
@P1sar P1sar added C-complex Complex changes across multiple modules. Possibly will require additional research. P-low this is mostly nice to have. and removed BABE labels Jan 15, 2024
@timwu20
Copy link
Contributor

timwu20 commented Jun 20, 2024

@EclesioMeloJunior can you create an epic to house block importing improvements.

@EclesioMeloJunior
Copy link
Member

Closing this issue in favor of #4208

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. P-low this is mostly nice to have.
Projects
None yet
Development

No branches or pull requests

6 participants