Skip to content

Conversation

@golddydev
Copy link
Collaborator

Description

Implement /epochs/{number}/blocks endpoint using chain_store module.

Changes

  • Added GetBlockHashesByNumberRange query to block query enum

Related Issue(s)

Closes #185

How was this tested?

Tested with omnibus process

Checklist

  • My code builds and passes local tests
  • I added/updated tests for my changes, where applicable
  • I updated documentation (if applicable)
  • CI is green for this PR

Impact / Side effects

No

Reviewer notes / Areas to focus

chain_store.rs

Note

For now /epochs/{number}/blocks is missing one block hash (EBB) since we don't handle EBB.

block = make_rolled_back_block(0);
let mut state = history.lock().await.get_rolled_back_state(block.number);
state.handle_mint(&block, b"issuer_2");
state.handle_mint(&block, Some(b"issuer_2"));
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: do we want a case where there isn't an the issuer_vkey is None?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@golddydev golddydev requested a review from whankinsiv November 19, 2025 13:40
@golddydev golddydev merged commit 2448acb into main Nov 19, 2025
2 checks passed
@golddydev golddydev deleted the gd/epochs-blocks-endpoint branch November 19, 2025 18:50
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.

Update /epochs/{number}/blocks endpoint to return block hashes

4 participants