-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: keep block transfer index for faster transfers per block #260
Conversation
Vercel deployment URL: https://ordinals-k1sduu5ea-blockstack.vercel.app 🚀 |
Codecov Report
@@ Coverage Diff @@
## beta #260 +/- ##
==========================================
+ Coverage 95.23% 95.25% +0.01%
==========================================
Files 59 60 +1
Lines 6151 6176 +25
Branches 548 552 +4
==========================================
+ Hits 5858 5883 +25
Misses 289 289
Partials 4 4
|
## [2.0.0-beta.3](v2.0.0-beta.2...v2.0.0-beta.3) (2023-11-02) ### Bug Fixes * keep block transfer index ([#260](#260)) ([0e33a64](0e33a64))
🎉 This PR is included in version 2.0.0-beta.3 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
## [2.0.0](v1.2.6...v2.0.0) (2023-11-21) ### ⚠ BREAKING CHANGES * handle transfer types and consider them for BRC-20 indexing (#258) ### Features * handle transfer types and consider them for BRC-20 indexing ([#258](#258)) ([7b83761](7b83761)) ### Bug Fixes * address location counts ([#273](#273)) ([86efc3a](86efc3a)) * also remove null bytes in blessed inscriptions ([7e8d412](7e8d412)) * batch size to 2000 ([9cf9230](9cf9230)) * bump docker image ([08688da](08688da)) * do not reject unbounded inscriptions that come in disorder ([#264](#264)) ([56e2235](56e2235)) * guarantee gap detection is comparing numbers ([0f3f51a](0f3f51a)) * inscription count generation ([13e1f16](13e1f16)) * keep block transfer index ([#260](#260)) ([0e33a64](0e33a64)) * only advance blessed number after gap detection ([c8f3c81](c8f3c81)) * only scan BRC-20 after its genesis height ([#263](#263)) ([6381760](6381760)) * only validate gaps for blessed numbers ([#262](#262)) ([29aaeda](29aaeda)) * reduce batching to 4500 ([8fd770b](8fd770b)) * reduce brc-20 batch to 5k ([2037647](2037647)) * reduce brc20 processing batch size to half ([7079dc0](7079dc0)) * reduce chunk size to 3000 ([9556148](9556148)) * reduce to 4000 chunk size ([3373422](3373422)) * reject blocks that would create blessed inscription gaps ([#259](#259)) ([18cd028](18cd028)) * remove null bytes before inserting inscriptions ([#274](#274)) ([cec3de0](cec3de0)) * try batch iterator generator ([e2ed039](e2ed039)) * try returning brc20 batch to normal, use batchIterate everywhere ([1d3a24b](1d3a24b))
🎉 This PR is included in version 2.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
## [2.0.0-beta.3](hirosystems/ordinals-api@v2.0.0-beta.2...v2.0.0-beta.3) (2023-11-02) ### Bug Fixes * keep block transfer index ([#260](hirosystems/ordinals-api#260)) ([0e33a64](hirosystems/ordinals-api@0e33a64))
## [2.0.0](hirosystems/ordinals-api@v1.2.6...v2.0.0) (2023-11-21) ### ⚠ BREAKING CHANGES * handle transfer types and consider them for BRC-20 indexing (#258) ### Features * handle transfer types and consider them for BRC-20 indexing ([#258](hirosystems/ordinals-api#258)) ([7b83761](hirosystems/ordinals-api@7b83761)) ### Bug Fixes * address location counts ([#273](hirosystems/ordinals-api#273)) ([86efc3a](hirosystems/ordinals-api@86efc3a)) * also remove null bytes in blessed inscriptions ([7e8d412](hirosystems/ordinals-api@7e8d412)) * batch size to 2000 ([9cf9230](hirosystems/ordinals-api@9cf9230)) * bump docker image ([08688da](hirosystems/ordinals-api@08688da)) * do not reject unbounded inscriptions that come in disorder ([#264](hirosystems/ordinals-api#264)) ([56e2235](hirosystems/ordinals-api@56e2235)) * guarantee gap detection is comparing numbers ([0f3f51a](hirosystems/ordinals-api@0f3f51a)) * inscription count generation ([13e1f16](hirosystems/ordinals-api@13e1f16)) * keep block transfer index ([#260](hirosystems/ordinals-api#260)) ([0e33a64](hirosystems/ordinals-api@0e33a64)) * only advance blessed number after gap detection ([c8f3c81](hirosystems/ordinals-api@c8f3c81)) * only scan BRC-20 after its genesis height ([#263](hirosystems/ordinals-api#263)) ([6381760](hirosystems/ordinals-api@6381760)) * only validate gaps for blessed numbers ([#262](hirosystems/ordinals-api#262)) ([29aaeda](hirosystems/ordinals-api@29aaeda)) * reduce batching to 4500 ([8fd770b](hirosystems/ordinals-api@8fd770b)) * reduce brc-20 batch to 5k ([2037647](hirosystems/ordinals-api@2037647)) * reduce brc20 processing batch size to half ([7079dc0](hirosystems/ordinals-api@7079dc0)) * reduce chunk size to 3000 ([9556148](hirosystems/ordinals-api@9556148)) * reduce to 4000 chunk size ([3373422](hirosystems/ordinals-api@3373422)) * reject blocks that would create blessed inscription gaps ([#259](hirosystems/ordinals-api#259)) ([18cd028](hirosystems/ordinals-api@18cd028)) * remove null bytes before inserting inscriptions ([#274](hirosystems/ordinals-api#274)) ([cec3de0](hirosystems/ordinals-api@cec3de0)) * try batch iterator generator ([e2ed039](hirosystems/ordinals-api@e2ed039)) * try returning brc20 batch to normal, use batchIterate everywhere ([1d3a24b](hirosystems/ordinals-api@1d3a24b))
Avoid using
LIMIT
andOFFSET
by keeping a transfer index per each location per block. This allows us to use aWHERE
condition to filter the page, which will be very performant in super large blocks.Also avoid the
COUNT(*) OVER()
by calculating the total using this cached column.