Skip to content

[FEAT] - Add Functionality to Query Full Block Details by Hash #1481

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

Open
CarlosLopezDeLara opened this issue Apr 23, 2025 · 0 comments
Open

Comments

@CarlosLopezDeLara
Copy link
Contributor

Internal/External
Internal

Describe the feature you'd like
Provide a mechanism, accessible via Node-to-Client to query the Cardano node for detailed information about a specific block using its hash.

Motivation:

Currently, developers and builders (such as those behind cardanoscan.io, typhonwallet.io, and potentially DEXs) desire a more direct way to retrieve block data from the node than relying on tools like db-sync.

This functionality would mirror capabilities found in other blockchains, such as Bitcoin's getblock RPC call, making development and block exploration more straightforward.

The need exists to query both historical blocks and the current chain tip.

Desired Information (Output):

Given a block hash, the query should return comprehensive block details, including (but not limited to):

Transactions within the block
Slot number
Previous block hash
Block depth (confirmation count)
Block size

Previous discussions:

@jasagredo suggested that the most viable node-based solution appears to be exposing the existing BlockFetch protocol (currently used for Node-to-Node communication - NTN) through the Node-to-Client (NTC) interface

Rationale: BlockFetch already interacts with the immutable database (which acts as the necessary index) to retrieve blocks. Exposing it via NTC would allow trusted local clients to request specific blocks directly, potentially simplifying implementation compared to NTN which involves inter-node trust assumptions.

This would be complemented by native RPC implementation described in IntersectMBO/cardano-node#6185 and also through API and CLI

Additional context / screenshots

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🔖 Ready
Development

No branches or pull requests

1 participant