Close the database and free resources.
Notify the backend about newly finalized blocks, in ancestor-first order.
Backends that share data between states (e.g. a content-addressed values DB)
use this to move the blocks' references from speculative to finalized.
MUST be called before markUnused of the same finality round, otherwise
the newly finalized blocks would be treated as dead forks and values still
referenced by the finalized state could be dropped.
Retrieve posterior state of given header.
Compute a state root for given state.
Insert a full state into the database.
Mark state as no longer needed. Backend may remove it asynchronously.
Apply & commit a state update.
NOTE: for efficiency, the implementation MAY alter given state object.
Staticnew
Interface for accessing states stored in the database.
NOTE that the design of this interface is heavily influenced by the LMDB implementation, so that we can implement it efficiently.
See the documentation there for more detailed reasoning.