Skip to content
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

Merge develop to main branch (release v2.0.0) #125

Merged
merged 63 commits into from
May 8, 2024
Merged

Merge develop to main branch (release v2.0.0) #125

merged 63 commits into from
May 8, 2024

Conversation

ahonn
Copy link
Collaborator

@ahonn ahonn commented May 6, 2024

Main Changes

Upgrading to V2

We have released v2.0.0 for support mempool.space API as the primary Bitcoin data provider, and it is used to broadcast transactions. But it is still compatible with the electrs used previously.

There are two ways to upgrade:

Upgrading from v1.x.x and use electrs (compatible, by default)

Suppose you do not want to use the mempool.space API as the main data provider, you do not need to make any changes.

But we recommend you remove the following env vars for safety:

BITCOIN_JSON_RPC_URL=<http://bitcoin:8332>
BITCOIN_JSON_RPC_USERNAME=<rpc_username>
BITCOIN_JSON_RPC_PASSWORD=<rpc_password>

and add the following env vars to make sure to use electrs as the primary data provider, and add mempool.space API as a fallback:

BITCOIN_DATA_PROVIDER=electrs # recommend, electrs by default
BITCOIN_MEMPOOL_SPACE_API_URL=https://mempool.space # optional, mempool.space as the fallback

Upgrading from v1.x.x and using mempool.space API

The new feature in v2.0.0, we can use mempool.space API as the primary data provider, and use electrs as a fallback.

Add the following env vars:

BITCOIN_DATA_PROVIDER=mempool 
BITCOIN_MEMPOOL_SPACE_API_URL=https://mempool.space

If you want to use the previous electrs as a fallback, keep the original BITCOIN_ELECTRS_API_URL env var. Otherwise, remove this var to avoid using electrs.

BITCOIN_ELECTRS_API_URL=<http://electrs:3002> # optional, electrs as fallback

Recommended Fees API

If use mempool.space API as the primary data provider, then we can use /bitcoin/v1/fees/recommended to get the bitcoin fees. and we will calculate fees when mempool.space recommend fees API unavailable (see #114).

use electrs as the primary data provider and didn't set BITCOIN_MEMPOOL_SPACE_API_URL as a fallback, then recommended fees API will be unavailable

ahonn and others added 30 commits April 29, 2024 14:41
fix: refactor global error handler to fix inaccurate error message
refactor: use mempool.space REST API
ahonn and others added 4 commits May 6, 2024 13:27
…lock-support

feat(unlock): add spore BTCTimeLock cells unlock support
…transaction-hex

feat(bitcoin): add /bitcoin/v1/transactiona/:btc_txid/hex route
Copy link

vercel bot commented May 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
btc-assets-api ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2024 9:55am

…ti-electrs-btc-nodes

feat(bitcoin): post btc transaction to multi electrs/btc nodes
Copy link

vercel bot commented May 7, 2024

@Flouse is attempting to deploy a commit to the Cell Studio Team on Vercel.

To accomplish this, @Flouse needs to request access to the Team.

Afterwards, an owner of the Team is required to accept their membership request.

If you're already a member of the respective Vercel Team, make sure that your Personal Vercel Account is connected to your GitHub account.

@ahonn ahonn marked this pull request as ready for review May 7, 2024 07:42
@Flouse Flouse requested a review from yuche May 8, 2024 00:31
@Flouse Flouse merged commit 4219f0e into main May 8, 2024
7 checks passed
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