archive: Fetch body, genesisHash and header (#1560)
This PR lays the foundation for implementing the archive RPC methods.
The methods implemented by this PR:
- archive_unstable_body: Fetch the block's body (a vector of hex-encoded
scale-encoded extrinsics) from a given block hash
- archive_unstable_genesisHash: Fetch the genesis hash
- archive_unstable_header: Fetch the header from a given block hash
Added unit tests for the methods.
This PR is implementing the methods without exposing them to the RPC
layer; which are to be exposed by a follow-up PR.
Closes: https://github.com/paritytech/polkadot-sdk/issues/1509
Closes: https://github.com/paritytech/polkadot-sdk/issues/1514
@paritytech/subxt-team
---------
Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io>
Showing
- substrate/client/rpc-spec-v2/src/archive/api.rs 56 additions, 0 deletionssubstrate/client/rpc-spec-v2/src/archive/api.rs
- substrate/client/rpc-spec-v2/src/archive/archive.rs 86 additions, 0 deletionssubstrate/client/rpc-spec-v2/src/archive/archive.rs
- substrate/client/rpc-spec-v2/src/archive/mod.rs 31 additions, 0 deletionssubstrate/client/rpc-spec-v2/src/archive/mod.rs
- substrate/client/rpc-spec-v2/src/archive/tests.rs 113 additions, 0 deletionssubstrate/client/rpc-spec-v2/src/archive/tests.rs
- substrate/client/rpc-spec-v2/src/lib.rs 1 addition, 0 deletionssubstrate/client/rpc-spec-v2/src/lib.rs
Please register or sign in to comment