ckb
ckb copied to clipboard
Update ckb-db's COLUMNs Key Schemas to Use `BlockNumber`
What problem does this PR solve?
This PR updates the key schema of RocksDB columns from using just the block hash to a combination of block number and block hash. By including the block number in the key, the new schema ensures that key-value pairs are ordered by block number. This reordering can improve query performance and data organization.
What is changed and how it works?
Related changes
- [x] Modified key schema in RocksDB from
block_hashtoblock_number + block_hash. - [ ] Add a layer to the read/write process from
ckb-storetockb-db, allowing old versions ofdb-schemasto read/write old version data and new versions ofdb-schemasto read/write new version data.
Check List
Tests
- Unit test
- Integration test
- Manual test (add detailed scripts or steps below)
- No code ci-runs-only: [ quick_checks,linters ]
Side effects
- Performance regression
- Breaking backward compatibility
Release note
Title Only: Include only the PR title in the release note.