79788c01d4
This significantly speeds up block import at the cost of less protection against invalid data, potentially resulting in an invalid database getting stored. The risk is small given that import is used only for validated data - evaluating the right level of of validation vs performance is left for a future PR. A side effect of this approach is that there is no cached stated root in the database - computing it currently requires a lot of memory since the intermediate roots get cached in memory in full while the computation is ongoing - a future PR will need to address this deficiency, for example by streaming the already-computed hashes directly to the database. |
||
---|---|---|
.. | ||
chain_desc.nim | ||
forked_chain.nim | ||
persist_blocks.nim |