Skip to content

v2.0.0

Compare
Choose a tag to compare
@ahonn ahonn released this 08 May 06:25
· 235 commits to main since this release
4219f0e

What's Changed

  • fix(error): refactor global error handler to fix inaccurate error message by @ahonn in #111
  • feat(bitcoin)!: use mempool.space REST API by @ahonn in #96
  • chore(error): add filled count to sentry context by @ahonn in #113
  • feat(bitcoin): calculate fees when mempool.space recommend fees api unavailable by @ahonn in #114
  • fix: fix the state issue of inactive paymaster cell job by @ahonn in #118
  • docs: update env vars and add missing docs by @ahonn in #119
  • feat(unlock): add spore BTCTimeLock cells unlock support by @ahonn in #120
  • feat(bitcoin): add /bitcoin/v1/transactiona/:btc_txid/hex route by @ahonn in #123
  • feat(bitcoin): post btc transaction to multi electrs/btc nodes by @ahonn in #127
  • fix: fix bitcoin client error message handle by @ahonn in #129

Full Changelog: release/v1.5.0...release/v2.0.0

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