Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

RPC method for exposing extrinsics/transactions (by block) #562

@emielsebastiaan

Description

@emielsebastiaan

I started building a Polkadot Explorer (or more generalized a Substrate Explorer). Check: w3f github for details. This is the first issue posted to request for some additional JSON-RPC methods.

I am currently able to fetch all blockheaders from chaintip back to genesis. This allows for a basic block entity in the Explorer. Next step is create the transaction (extrinsics) entity in the explorer. I'd like to have an additional method available for this. Goal of this request is to allow for the Block Explorer to harvest, index, enrich and aggregate all available Txs/Extrinsics which are included in the chain.

Allowing the txs/extrinsics to be fetched by block allows for some optimizations in the block explorer harvester in case of chain reorganizations and allows for minimized number of JSON-RPC calls.

Suggestions (open for discussion): Experience with building a EVM/Ethereum explorer allows me to make additional suggestions (to minimize) the number of RPC calls. Ideally the txs/extrinsics data should be callable by blocknumber and blockhash and return an array with basic tx/extrinsic data. Perhaps similar to the Ethereum JSON-RPC method "eth_getBlock" with the flag to include txs. And in addition perhaps a aditional methods such as: getExtrinsic(hash), getExtrinsicsByBlockNumber, getExtrinsicsByBlockHash or other more elegant solutions...

Let's discuss how to best implement this.

Metadata

Metadata

Assignees

Labels

J0-enhancementAn additional feature request.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions