Skip to content

optimise FindBlockNum (#15398)#15529

Merged
sudeepdino008 merged 5 commits into
release/3.0from
e3/findblknum_cp
Jun 12, 2025
Merged

optimise FindBlockNum (#15398)#15529
sudeepdino008 merged 5 commits into
release/3.0from
e3/findblknum_cp

Conversation

@sudeepdino008

Copy link
Copy Markdown
Member

ticket: #15209

  • ReadTxNumFunc gets maxtxnum given a blockNumber...it was also used to find blockNumber given maxTxNum..
  • add TxBlockIndex in-place of ReadTxNumFunc -- difference is that there's now a separate function to GetBlockNumber. Additionally:
  • earlier, binary search was performed over a range of block numbers, each search step queries MDBX and then fetches block from snapshot.
  • now, binary search is separated into two stages: first stage will binary_search in snapshots; second stage will do binary_search on MDBX.

ticket: #15209

- `ReadTxNumFunc` gets maxtxnum given a blockNumber...it was also used
to find blockNumber given maxTxNum..
- add `TxBlockIndex` in-place of `ReadTxNumFunc` -- difference is that
there's now a separate function to GetBlockNumber.
Additionally:
- earlier, binary search was performed over a range of block numbers,
each search step queries MDBX and then fetches block from snapshot.
- now, binary search is separated into two stages: first stage will
binary_search in snapshots; second stage will do binary_search on MDBX.
@sudeepdino008 sudeepdino008 changed the title optimise FindBlockNum (#15398) WIP: optimise FindBlockNum (#15398) Jun 11, 2025
@sudeepdino008 sudeepdino008 marked this pull request as draft June 11, 2025 09:37
@sudeepdino008 sudeepdino008 marked this pull request as ready for review June 11, 2025 09:47
@sudeepdino008 sudeepdino008 changed the title WIP: optimise FindBlockNum (#15398) optimise FindBlockNum (#15398) Jun 11, 2025
@sudeepdino008 sudeepdino008 enabled auto-merge (squash) June 11, 2025 09:47
@sudeepdino008 sudeepdino008 merged commit 9d9caf9 into release/3.0 Jun 12, 2025
8 checks passed
@sudeepdino008 sudeepdino008 deleted the e3/findblknum_cp branch June 12, 2025 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants