Tags: erigontech/silkworm
Tags
datastore: DomainGetLatestQuery for snapshots and datastore (#2656) DomainGetLatestQuery was implemented only for kvdb before. This implements DomainGetLatestQuery for snapshots and combines both queries on the datastore. The example usages are updated in LocalState. DomainGetLatestQuery uses BloomFilter existence index. Previously BloomFilter only accepted uint64_t as a lookup key. Now it is able to lookup using any ByteView key much like RecSplit/AccessorIndex. Hashing this key requires having a salt from "salt-state.txt". This file is read by SnapshotRepository::reopen_folder() and passed along to the BloomFilter constructor. If a SnapshotRepository is externally managed (via CAPI), the index_salt is expected to be passed on construction via CAPI. Additional changes: * disable domain accessor index by default - it is unused in Erigon 3 ATM * move murmur_hash3 to snapshots/common - to reuse in BloomFilterKeyHasher * "Snapshots" is added into snapshots codec names to distinguish from KVDB codecs, necessary codecs added
capi: Fix batch size control (#2308) On db::Buffer::MemoryLimitError the block has already been popped from the block_buffer. Then in the next iteration we would get the next block and the assert SILKWORM_ASSERT(block->header.number == block_number) would fail. For this to work we need to re-insert the failed block in the exception handler.
PreviousNext