A custom storage engine of Nethermind, benefiting from the alignment of the underlying data structure with the layout of State & Storage trees of Ethereum.
This PR changes how RawState commits its data. Previously the algorithm was to commit data locally, therefore copying them over to a new structure and only then apply this on the database. With the new one, the data are applied directly on the batch, making ApplyRawvoid returning as no committed representation is needed. To properly construct the next block, we get the read transaction after _current.ApplyRaw and batch.Commit happens, leaving no need to actually take a dependency on the now non-existent ancestor.
If the usage of such structure shows some bottleneck around the read dependency from the database, then it's the database to blame and requires further digging in.
This PR changes how
RawState
commits its data. Previously the algorithm was to commit data locally, therefore copying them over to a new structure and only then apply this on the database. With the new one, the data are applied directly on the batch, makingApplyRaw
void
returning as no committed representation is needed. To properly construct the next block, we get the read transaction after_current.ApplyRaw
andbatch.Commit
happens, leaving no need to actually take a dependency on the now non-existent ancestor.If the usage of such structure shows some bottleneck around the
read
dependency from the database, then it's the database to blame and requires further digging in.