archive: Implement height, hashByHeight and call (#1582)
This PR implements: - `archive_unstable_finalized_height`: Get the height of the most recent finalized block - `archive_unstable_hash_by_height`: Get the hashes (possible empty) of blocks from the given height - `archive_unstable_call`: Call into the runtime of a block Builds on top of: https://github.com/paritytech/polkadot-sdk/pull/1560 ### Testing Done - unit tests for the methods with custom block tree for different heights / forks Closes: https://github.com/paritytech/polkadot-sdk/issues/1510 Closes: https://github.com/paritytech/polkadot-sdk/issues/1513 Closes: https://github.com/paritytech/polkadot-sdk/issues/1511 @paritytech/subxt-team --------- Signed-off-by:Alexandru Vasile <alexandru.vasile@parity.io> Co-authored-by:
Sebastian Kunert <skunert49@gmail.com>
Showing
- substrate/client/rpc-spec-v2/src/archive/api.rs 35 additions, 0 deletionssubstrate/client/rpc-spec-v2/src/archive/api.rs
- substrate/client/rpc-spec-v2/src/archive/archive.rs 111 additions, 9 deletionssubstrate/client/rpc-spec-v2/src/archive/archive.rs
- substrate/client/rpc-spec-v2/src/archive/error.rs 66 additions, 0 deletionssubstrate/client/rpc-spec-v2/src/archive/error.rs
- substrate/client/rpc-spec-v2/src/archive/mod.rs 1 addition, 0 deletionssubstrate/client/rpc-spec-v2/src/archive/mod.rs
- substrate/client/rpc-spec-v2/src/archive/tests.rs 149 additions, 4 deletionssubstrate/client/rpc-spec-v2/src/archive/tests.rs
- substrate/client/rpc-spec-v2/src/lib.rs 73 additions, 0 deletionssubstrate/client/rpc-spec-v2/src/lib.rs
Please register or sign in to comment