mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 07:37:57 +00:00
01ac54db29
The [archive](https://github.com/paritytech/json-rpc-interface-spec/blob/main/src/api/archive.md) API is unstable and subject to change. This PR enables the `archive` class of the RPC-V2 spec to substrate based chains. The `archive` API is enabled for archive nodes: - the state of the blocks is in archive mode - the block's bodies are in archive mode While at it, this PR extends the `BlocksPrunning` enum with an `is_archive` helper to check if the pruning mode keeps the block's bodies for long enough. Defaults used for the `archive` API: - a maximum of 5 responses are provided for descendants queries (this is similar to chainHead) - a maximum of 8 item queries are accepted at a time Before stabilizing the API we should look into these defaults and adjust after collecting some data. --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Client backend that is backed by a database.
Canonicality vs. Finality
Finality indicates that a block will not be reverted, according to the consensus algorithm, while canonicality indicates that the block may be reverted, but we will be unable to do so, having discarded heavy state that will allow a chain reorganization.
Finality implies canonicality but not vice-versa.
License: GPL-3.0-or-later WITH Classpath-exception-2.0