hirosystems / ordinals-api

Bitcoin Ordinals API
Apache License 2.0
201 stars 61 forks source link

Support BRC-20 in Regtest #336

Open bezrazli4n0 opened 7 months ago

bezrazli4n0 commented 7 months ago

Is your feature request related to a problem? Please describe. I can't test brc20 inscriptions locally with regtest bitcoin node because indexing starts from brc20 genesis block(779832).

Describe the solution you'd like Add some env flag to remove this hardcoded genesis block or set to zero

Describe alternatives you've considered Clone repo and manually set(patch) brc20 genesis block to zero

Was: "Can't test BRC20 inscriptions locally with regtest - BRC20_GENESIS_BLOCK is unreachable from local env"

louisdangw3 commented 7 months ago

when i set BRC20_GENESIS_BLOCK = 0 the result is {"limit":20,"offset":0,"total":0,"results":[]} . This is my bug image

bezrazli4n0 commented 7 months ago

when i set BRC20_GENESIS_BLOCK = 0 the result is {"limit":20,"offset":0,"total":0,"results":[]} . This is my bug image

It's working in my case

louisdangw3 commented 7 months ago

when i set BRC20_GENESIS_BLOCK = 0 the result is {"limit":20,"offset":0,"total":0,"results":[]} . This is my bug image

It's working in my case

are you fix this bug ?

smcclellan commented 7 months ago

Regtest is currently not supported for BRC-20. We will repurpose this ticket to track that change.

kobby-pentangeli commented 6 months ago

@smcclellan Please what's the status of this?

Currently, when I send a GET request using the schema, I get a 400: Bad Request response (produced in the logs), which ultimately results in a 404 in stdout.

PS: I use Ord wallet to create the BRC20s.

rafaelcr commented 5 months ago

hi @kobby-pentangeli we're currently working on moving the BRC-20 indexing from the API into Ordhook. With this change, you'll be able to index BRC-20 in ordhook using regtest and then serve the data to the API. It's our top priority right now so I'll keep you updated when we have finished.

kobby-pentangeli commented 5 months ago

@rafaelcr Thanks for the feedback. Just to be clear, does "moving" suggest that the current implementation of the API somehow supports regtest indexing, or perhaps available in a previous commit (state)? I'd love to check that out, just to set up some local infra for testing.