You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LMDB correctness in the base node is currently untested. Create a reproducible test chain (genesis block, 10 main-chain blocks, and a 10-block fork from block 5) and write two unit tests: one that writes the chain to a new LMDB file and bit-compares it against a reference, and one that loads the LMDB file and verifies all headers, blocks, outputs, inputs, kernels, and accumulated data can be fetched correctly through the full range of query methods.
Acceptance Criteria
A test chain is created with a genesis block, 10 main-chain blocks, and a 10-block fork from block 5
All block data is saved in a JSON file for reproducibility
A write test creates a new LMDB file from the JSON data and bit-compares it against the reference file
A read test loads the LMDB file and verifies all 15 main-chain headers, 5 reorged headers, and all blocks can be fetched
The read test verifies per-block queries: outputs by header_hash, inputs by header_hash, kernels by header_hash, output by hash, unspent output by commitment, output by payref, outputs with spend state at height, kernel by excess sig, and header containing kernel by MMR position
Bounty: Create LMDB Unit Tests
Tier: M — 60,000 XTM
Description
LMDB correctness in the base node is currently untested. Create a reproducible test chain (genesis block, 10 main-chain blocks, and a 10-block fork from block 5) and write two unit tests: one that writes the chain to a new LMDB file and bit-compares it against a reference, and one that loads the LMDB file and verifies all headers, blocks, outputs, inputs, kernels, and accumulated data can be fetched correctly through the full range of query methods.
Acceptance Criteria
Context
base_layer/core/src/chain_storage/lmdb_db/How to Claim
Notes