You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
While setting up regtest with BDK, bitcoin mining rewards generated to the wallet specified in generatetowallet is getting funds. No matter how many blocks I generate, BDK seems to only record, arbitrarily but deterministically, only a single transaction.
To Reproduce
The example below uses bdk-cli to make the issue easier to reproduce, but I initially encountered this directly using bdk 0.28.0 as a library in my tests.
I'm running a bitcoind in regtest mode, and Blockstream's Electrs fork (which runs the Esplora REST API on :50000 and the Electrum JSONRPC API on :50001)
docker-compose.yaml
services:
bitcoind:
image: lncm/bitcoind:v25.0command:
- -regtest
- -rpcbind=0.0.0.0:18443
- -rpcuser=test
- -rpcpassword=test
- -rpcallowip=0.0.0.0/0
- -server=1
- -txindex=1
- -prune=0volumes:
- bitcoin-data:/data/.bitcoinports:
- 18443:18443esplora:
image: blockstream/esplora:electrs-latest# Esplora has no arm image. Setting it explicitly to x86 gets rid of a noisy warning.platform: linux/amd64command:
- ./electrs_bitcoin/bin/electrs
- -vvvv
- --timestamp
- --daemon-dir=/app/.bitcoin
- --db-dir=/app/db
- --network
- regtest
- --http-addr=0.0.0.0:50000
- --electrum-rpc-addr=0.0.0.0:50001
- --daemon-rpc-addr=bitcoind:18443
- --cookie=test:test
- --electrum-txs-limit=1000000
- --utxos-limit=1000000volumes:
- bitcoin-data:/app/.bitcoinports:
- 50000:50000
- 50001:50001volumes:
bitcoin-data:
Notice that Electrum indexed all 5 transactions and reports a much larger sum than BDK does.
Try this again with another 100 transactions. BDK will still pick up only a single transaction. Sometimes it may pick up one whose block rewards have matured and so there's a usable balance, but usually it'll report 0 spendable balance.
Expected behavior
BDK should see a transaction for every block mined and report the correct balance.
Describe the bug
While setting up regtest with BDK, bitcoin mining rewards generated to the wallet specified in
generatetowallet
is getting funds. No matter how many blocks I generate, BDK seems to only record, arbitrarily but deterministically, only a single transaction.To Reproduce
The example below uses
bdk-cli
to make the issue easier to reproduce, but I initially encountered this directly usingbdk 0.28.0
as a library in my tests.I'm running a bitcoind in regtest mode, and Blockstream's Electrs fork (which runs the Esplora REST API on
:50000
and the Electrum JSONRPC API on:50001
)docker-compose.yaml
Notice above that BDK only found a single transaction.
Notice that Electrum indexed all 5 transactions and reports a much larger sum than BDK does.
Expected behavior
BDK should see a transaction for every block mined and report the correct balance.
Build environment
bdk-cli 0.27.1
cargo 1.72.1 (103a7ff2e 2023-08-15)
Additional context
The text was updated successfully, but these errors were encountered: