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 header chain prover #357

Open
wants to merge 162 commits into
base: dev
Choose a base branch
from
Open

Add header chain prover #357

wants to merge 162 commits into from

Conversation

ceyhunsen
Copy link
Member

Description

This PR adds header chain prover.

Linked Issues

Testing

New tests are going to be added.

Docs

New docs are going to be added.

@ceyhunsen ceyhunsen self-assigned this Oct 18, 2024
@ceyhunsen
Copy link
Member Author

ceyhunsen commented Oct 22, 2024

Using new RPC functions that mock-rpc doesn't support. It is expected that mock-rpc tests fail.

Mock-rpc will need a new release with the new calls implemented.

Edit: It is added and tests are enabled again.

Copy link
Member

@ekrembal ekrembal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make sync blockchain a single function, it will go back from the last block and go to previous block, until it finds a block in db, then add them to the db. (it would be great if we can use batch insertion to db here). If the tip is 100 blocks or more than the current max in our db, then it should start going back from current_max + 90.

We should add prev_block_hash to our db schema, our previous db query is wrong, there can be duplicate blocks with the same height

core/src/header_chain_prover.rs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants