alternate availability store schema (#2237)

* alternate availability store schema

* improvements

* tweaks

* new DB schema and skeleton

* expand skeleton and tweaks

* handle backing and inclusion

* let finality be handled later

* handle finalized blocks

* implement query methods

* implement chunk storing

* StoreAvailableData

* fix an off-by-one

* implement pruning

* reinstate subsystem trait impl

* reinstate metrics

* fix warnings

* remove chunks_cache

* oops

* actually store the available data

* mockable pruning interval

* fix tests

* spacing

* fix code grumbles

* guide improvements

* make time mockable

* implement a mocked clock for testing

* return DB errors

* Update node/core/av-store/Cargo.toml

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Update roadmap/implementers-guide/src/node/utility/availability-store.md

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Update roadmap/implementers-guide/src/node/utility/availability-store.md

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* review grumbles & clarity

* fix review grumbles

* Add docs

Co-authored-by: Andronik Ordian <write@reusable.software>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Andronik Ordian <write@reusable.software>
This commit is contained in:
Robert Habermeier
2021-01-11 12:46:09 -05:00
committed by GitHub
parent f9ce261707
commit aedf089691
6 changed files with 1441 additions and 1366 deletions
+3
View File
@@ -5044,6 +5044,7 @@ name = "polkadot-node-core-av-store"
version = "0.1.0"
dependencies = [
"assert_matches",
"bitvec",
"env_logger 0.8.2",
"futures 0.3.8",
"futures-timer 3.0.2",
@@ -5052,6 +5053,7 @@ dependencies = [
"kvdb-rocksdb",
"log",
"parity-scale-codec",
"parking_lot 0.11.1",
"polkadot-erasure-coding",
"polkadot-node-subsystem",
"polkadot-node-subsystem-test-helpers",
@@ -5060,6 +5062,7 @@ dependencies = [
"polkadot-primitives",
"sc-service",
"sp-core",
"sp-keyring",
"thiserror",
"tracing",
"tracing-futures",