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

feat: add block header by number content value #1706

Closed
wants to merge 1 commit into from

Conversation

ogenev
Copy link
Member

@ogenev ogenev commented Feb 26, 2025

What was wrong?

Block Header by Number content value implementation is missing. Here are the specs.

To reserve the 0x03 selector, we have to implement this for HistoryContentValue before ephemeral headers.

How was it fixed?

Add BlockHeaderByNumber history content value variant and update the db migration code.

It seems the BlockHeaderWithProof variant should be renamed to BlockHeaderByHash but we can discuss this and it is for another PR.

To-Do

@ogenev ogenev force-pushed the header-by-number-content branch from d8b9452 to b048e23 Compare February 26, 2025 12:54
@ogenev ogenev marked this pull request as ready for review February 26, 2025 13:08
Copy link
Member

@KolbyML KolbyML left a comment

Choose a reason for hiding this comment

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

BlockHeaderByNumber isn't a ContentValue variant, both BlockHeaderByHash and BlockHeaderByNumber both use the ContentValue BlockHeaderWithProof.

BlockHeaderByHash and BlockHeaderByNumber are ContentKey's not ContentValues. 0x3 is already reserved for BlockHeaderByNumber.

@KolbyML
Copy link
Member

KolbyML commented Feb 26, 2025

image
Notice in the spec both have different content_key's but the same content_value

@ogenev
Copy link
Member Author

ogenev commented Feb 26, 2025

Oh, yeah, this PR doesn't make sense, closing.

@ogenev ogenev closed this Feb 26, 2025
@ogenev ogenev deleted the header-by-number-content branch February 26, 2025 17:59
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