nervosnetwork / ckb

The Nervos CKB is a public permissionless blockchain, and the layer 1 of Nervos network.
https://www.nervos.org
MIT License
1.15k stars 228 forks source link

Update ckb-db's COLUMNs Key Schemas to Use `BlockNumber` #4503

Open eval-exec opened 3 months ago

eval-exec commented 3 months ago

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

Check List

Tests

Side effects

Release note

Title Only: Include only the PR title in the release note.