Skip to content
Snippets Groups Projects
user avatar
Alexandru Vasile authored
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: default avatarAlexandru Vasile <alexandru.vasile@parity.io>
01ac54db

Substrate

GitHub license GitLab Status PRs Welcome Stack Exchange

Substrate is a next-generation framework for blockchain innovation 🚀.

Getting Started

Head to docs.substrate.io and follow the installation instructions. Then try out one of the tutorials. Refer to the Docker instructions to quickly run Substrate, Substrate Node Template, Subkey, or to build a chain spec.

Community & Support

Join the highly active and supportive community on the Substrate Stack Exchange to ask questions about use and problems you run into using this software. Please do report bugs and issues here for anything you suspect requires action in the source.

Contributions & Code of Conduct

Please follow the contributions guidelines as outlined in docs/contributor/CONTRIBUTING.md. In all communications and contributions, this project follows the Contributor Covenant Code of Conduct.

Security

The security policy and procedures can be found in docs/contributor/SECURITY.md.

License

The reason for the split-licensing is to ensure that for the vast majority of teams using Substrate to create feature-chains, then all changes can be made entirely in Apache2-licensed code, allowing teams full freedom over what and how they release and giving licensing clarity to commercial teams.

In the interests of the community, we require any deeper improvements made to Substrate's core logic (e.g. Substrate's internal consensus, crypto or database code) to be contributed back so everyone can benefit.