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 finalized flag to API responses #11747

Closed
16 tasks done
rkapka opened this issue Dec 8, 2022 · 4 comments · Fixed by #11947
Closed
16 tasks done

Add finalized flag to API responses #11747

rkapka opened this issue Dec 8, 2022 · 4 comments · Fixed by #11947
Assignees
Labels
API Api related tasks Good First Issue Good for newcomers Help Wanted Extra attention is needed

Comments

@rkapka
Copy link
Contributor

rkapka commented Dec 8, 2022

🚀 Feature Request

We need to implement ethereum/beacon-APIs#254

Description

Several API endpoints must return a finalized metadata field. This issue tracks progress of the feature:

@thearyanag
Copy link

Hey @rkapka can you please assign this issue to me ?

@rkapka
Copy link
Contributor Author

rkapka commented Dec 16, 2022

Hi @thearyanag , sure. I already implemented all block endpoints. You can take care of the state ones.

@rkapka
Copy link
Contributor Author

rkapka commented Dec 19, 2022

There is a way to avoid calling HashTreeRoot on the block to check finalization. The algorithm works as follows:

you check the parent root, if it equals the finalized checkpoint you return false. If not then you check if the parent is final. If it is then you return true, otherwise false. This assumes that the block is canonical. If it's not then return false

@thearyanag
Copy link

thearyanag commented Dec 19, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Api related tasks Good First Issue Good for newcomers Help Wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants