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

[Feature] Allow querying blocks by hash #384

Open
austinabell opened this issue Jan 11, 2025 · 1 comment
Open

[Feature] Allow querying blocks by hash #384

austinabell opened this issue Jan 11, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@austinabell
Copy link
Contributor

Feature

Blocks can currently be queried by height or tag, where it would be nice to also have hash

pub enum BlockNumberOrTag {
/// The most recent block in the canonical chain observed by the client.
#[default]
Latest,
/// The parent of the most recent block in the canonical chain observed by the client.
/// This is equivalent to `Latest - 1`.
Parent,
/// The most recent block considered "safe" by the client. This typically refers to a block
/// that is sufficiently deep in the chain to be considered irreversible.
Safe,
/// The most recent finalized block in the chain. Finalized blocks are guaranteed to be
/// part of the canonical chain.
Finalized,
/// A specific block number in the canonical chain.
Number(u64),
}

Motivation

Some users have a block hash, and doing the lookup/sanity check is a bit unideal

Implementation

@austinabell austinabell added the enhancement New feature or request label Jan 11, 2025
Copy link

linear bot commented Jan 11, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant