Skip to content

Add get_header_by_hash client method#585

Open
randomlogin wants to merge 1 commit into
2140-dev:masterfrom
randomlogin:add-get-header-by-hash
Open

Add get_header_by_hash client method#585
randomlogin wants to merge 1 commit into
2140-dev:masterfrom
randomlogin:add-get-header-by-hash

Conversation

@randomlogin

@randomlogin randomlogin commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Allows client to retrieve block header by its hash.

Motivation: when we listen for kyoto events, we receive Event::IndexedFilter which has only height value there. By the moment we process this event, the header chain could have reorganized from the canonical chain, and when we retrieve the header, we actually retrieve a stale one.

Right now we can just check if retrieved header is the right one, but we cannot get the right header via hash.

Allows client to retrieve header in case of reorg.
@rustaceanrob

Copy link
Copy Markdown
Member

IndexedFilter contains the block hash as well. Is it possible to just check if this block hash has been reorganized? I am also why the disconnection event is insufficient to undo any changes.

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