Store states efficiently in the hot database (#746)

* Sparse hot DB and block root tree

* Fix store_tests

* Ensure loads of hot states on boundaries are fast

* Milder error for unaligned finalized blocks
This commit is contained in:
Michael Sproul
2020-01-08 13:58:01 +11:00
committed by GitHub
parent 26dde26c48
commit f36a5a15d6
18 changed files with 953 additions and 226 deletions

View File

@@ -1,5 +1,5 @@
use crate::chunked_vector::ChunkError;
use crate::hot_cold_store::HotColdDbError;
use crate::hot_cold_store::HotColdDBError;
use ssz::DecodeError;
use types::BeaconStateError;
@@ -9,7 +9,7 @@ pub enum Error {
VectorChunkError(ChunkError),
BeaconStateError(BeaconStateError),
PartialBeaconStateError,
HotColdDbError(HotColdDbError),
HotColdDBError(HotColdDBError),
DBError { message: String },
}
@@ -25,9 +25,9 @@ impl From<ChunkError> for Error {
}
}
impl From<HotColdDbError> for Error {
fn from(e: HotColdDbError) -> Error {
Error::HotColdDbError(e)
impl From<HotColdDBError> for Error {
fn from(e: HotColdDBError) -> Error {
Error::HotColdDBError(e)
}
}