Conversation
|
Vercel deployment URL: https://ordinals-5ut3rkhrx-blockstack.vercel.app 🚀 |
Codecov Report
@@ Coverage Diff @@
## develop #144 +/- ##
===========================================
- Coverage 91.98% 87.74% -4.25%
===========================================
Files 26 34 +8
Lines 2970 3622 +652
Branches 239 294 +55
===========================================
+ Hits 2732 3178 +446
- Misses 236 440 +204
- Partials 2 4 +2
|
bf66c92 to
acf5e54
Compare
acf5e54 to
389ec23
Compare
rafaelcr
left a comment
There was a problem hiding this comment.
Looking good! A few comments
| }, | ||
| }, | ||
| async (request, reply) => { | ||
| const blockHeight = (await fastify.db.getChainTipBlockHeight()) ?? 'blockheight'; |
There was a problem hiding this comment.
Is the word blockheight the right thing to return if we don't have a proper block height here? Not familiar with the ord docs on this
There was a problem hiding this comment.
Yep, that's to match the current ord implementation. https://sourcegraph.com/search?q=context:global+repo:ordinals/ord+and+%7C%7C+%22
| `; | ||
|
|
||
| const result = await this.sql<{ block_hash: string }[]>` | ||
| SELECT block_hash FROM inscriptions_per_block |
There was a problem hiding this comment.
I think we could make these queries more efficient if we modified the chain_tip materialized view to keep also the block hash and timestamp. That way it would be a O(1) retrieval from the DB always.
|
Forgot about this one. A lot of recursive viewing doesn't really work in our explorer due to security concerns, so it might not be too important to have these endpoints right now.. |
Adding these endpoints covered by
ordhttps://docs.ordinals.com/inscriptions.html?highlight=rec#recursion
todo
cacheing: what's your preferred etag/cacheing option? we could add a stats/inscriptioncountperblock cache for most, and a custom new cache for the /:blockheight show endpoint.