Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
695 commits
Select commit Hold shift + click to select a range
9b7f15c
wallet: move CreateImportedAccount across all backends
GustavoStingelin Jun 3, 2026
c9a9237
wallet: move GetAccount across all backends
GustavoStingelin Jun 3, 2026
4b8448b
wallet: move ListAccounts across all backends
GustavoStingelin Jun 3, 2026
385bbd4
wallet: move RenameAccount across all backends
GustavoStingelin Jun 3, 2026
fed6f29
wallet: rename shared account backend helpers
GustavoStingelin Jun 3, 2026
61c6d8c
wallet: split itest CreateAccount invariants tests
GustavoStingelin Jun 3, 2026
5ada550
wallet: split itest CreateDerivedAccount tests
GustavoStingelin Jun 3, 2026
e11727c
wallet: split itest CreateImportedAccount tests
GustavoStingelin Jun 3, 2026
75701e2
wallet: split itest GetAccount tests
GustavoStingelin Jun 3, 2026
50c7669
wallet: split itest ListAccounts tests
GustavoStingelin Jun 3, 2026
e0b111b
wallet: split itest RenameAccount tests
GustavoStingelin Jun 3, 2026
5cc0251
wallet: split itest account helpers
GustavoStingelin Jun 3, 2026
50075a9
wallet: extract EnsureKeyScope shared workflow
GustavoStingelin Jun 3, 2026
f374f33
wallet: move EnsureKeyScope across all backends
GustavoStingelin Jun 3, 2026
717a154
wallet: rename account_common to accountinfo
GustavoStingelin Jun 3, 2026
16caedb
wallet: readd create max account number itest
GustavoStingelin Jun 4, 2026
9706902
Makefile: pin sqlfluff docker image
GustavoStingelin Jun 4, 2026
0f16f27
wallet: plumb SQL account row IDs into AccountInfo
GustavoStingelin Jun 5, 2026
88b6266
wallet: add get account ops workflow
GustavoStingelin Jun 5, 2026
66c563e
wallet: implement get account ops adapters
GustavoStingelin Jun 5, 2026
fc6c90a
wallet: add list accounts ops workflow
GustavoStingelin Jun 5, 2026
3fe28b1
wallet: implement list accounts ops adapters
GustavoStingelin Jun 5, 2026
d05301d
wallet: add ensure key scope ops workflow
GustavoStingelin Jun 5, 2026
6442caa
wallet: implement ensure key scope ops adapters
GustavoStingelin Jun 5, 2026
f48fc89
wallet: add imported account ops workflow
GustavoStingelin Jun 5, 2026
b30733e
wallet: implement imported account ops adapters
GustavoStingelin Jun 5, 2026
15460af
wallet: add rename account ops workflow
GustavoStingelin Jun 5, 2026
7e20ac1
wallet: implement rename account ops adapters
GustavoStingelin Jun 5, 2026
723f6a5
docs/adr: add ADR 0012 wallet-level watch-only uniformity
yyforyongyu May 27, 2026
a41b1bc
db: add symmetric watch-only sentinels + helper for SQL backends
yyforyongyu May 27, 2026
ea11f13
db: add symmetric address sentinel + helper for SQL backends
yyforyongyu May 27, 2026
bdd69c3
db: enforce ADR 0012 invariant at imported-account/address create
yyforyongyu May 27, 2026
b761596
db+wallet: add Wallet.IsWatchOnly() and clean up per-row docstrings
yyforyongyu May 27, 2026
48d7411
wallet: validate WatchOnly + InitialAccounts upfront in Create
yyforyongyu May 27, 2026
c73d12f
db: reserve imported address account name
yyforyongyu Jun 5, 2026
2bbea77
db: auto-create imported address bucket
yyforyongyu Jun 5, 2026
ea28f03
db: update imported address bucket tests
yyforyongyu Jun 5, 2026
040f8f1
db/sql: add idempotent imported-bucket insert
yyforyongyu Jun 9, 2026
25d467a
db: materialize imported bucket idempotently
yyforyongyu Jun 9, 2026
f9118c3
db: reject renaming an account onto the reserved imported bucket
yyforyongyu Jun 10, 2026
9a8ada8
db/sql: enrich UTXO queries with account/address/scope columns
yyforyongyu May 28, 2026
8ff09c2
db: add UTXO enrichment fields + KeyScopeFromIDs helper
yyforyongyu Jun 10, 2026
18929eb
db: surface UTXO enrichment fields on UtxoInfo
yyforyongyu Jun 10, 2026
7f7d19f
db: test UTXO enrichment fields on ListUTXOs/GetUtxo
yyforyongyu Jun 10, 2026
0283a20
db/sql: add scoped AccountName filter to ListUtxos query
yyforyongyu May 28, 2026
d3013c7
db: add scoped AccountName filter to ListUtxosQuery
yyforyongyu May 28, 2026
5dd4af3
db: stop precreating imported UTXO account
yyforyongyu Jun 5, 2026
295fb65
kvdb: add UTXO enrichment helpers
yyforyongyu Jun 10, 2026
54dbfc6
kvdb: implement GetUtxo
yyforyongyu Jun 10, 2026
205bfd5
kvdb: test GetUtxo
yyforyongyu Jun 10, 2026
1d4b4da
kvdb: implement LeaseOutput
yyforyongyu Jun 1, 2026
7738c8b
kvdb: add ListUTXOs account-filter helpers
yyforyongyu Jun 10, 2026
62c4106
kvdb: implement ListUTXOs
yyforyongyu Jun 10, 2026
c05d919
kvdb: test ListUTXOs listing and enrichment
yyforyongyu Jun 10, 2026
eb259cf
kvdb: test ListUTXOs account filtering
yyforyongyu Jun 10, 2026
eacb51f
kvdb: implement ListLeasedOutputs
yyforyongyu Jun 1, 2026
8e3db4f
kvdb: align ReleaseOutput error mapping with db sentinels
yyforyongyu Jun 2, 2026
663e388
wallet: route GetUtxo through store
yyforyongyu Jun 1, 2026
21b99f6
wallet: route ListUnspent through store
yyforyongyu Jun 1, 2026
74f63cb
wallet: route LeaseOutput through store
yyforyongyu Jun 1, 2026
64e8363
wallet: route ListLeasedOutputs through store
yyforyongyu Jun 1, 2026
8a45f92
wallet: route address balances through store UTXOs
yyforyongyu Jun 1, 2026
8f7a3cd
wallet: add wallet-native UTXO error sentinels
yyforyongyu Jun 3, 2026
858d36e
wallet: move legacy change source helper to deprecated.go
yyforyongyu May 27, 2026
fb7fd4f
wallet: generify constantInputSource; add constantUtxoInputSource
yyforyongyu May 27, 2026
fcfe7e2
wallet: add createChangeSource helper
yyforyongyu May 27, 2026
45ab102
wallet/psbt: remove obsolete funding unit tests
yyforyongyu Jun 2, 2026
f405d4b
wallet: route change source through store
yyforyongyu Jun 2, 2026
97e3bc4
wallet: route tx inputs and coin selection through store
yyforyongyu Jun 10, 2026
a90ef50
wallet: add store-routed tx-creator coverage
yyforyongyu Jun 10, 2026
a1ec059
wallet: reject immature coinbase in selected utxo paths
yyforyongyu Jun 10, 2026
d0b7782
wallet: drop dead tx-creator test helpers
yyforyongyu May 27, 2026
4661fd8
wallet: add sub AGENTS.md
GustavoStingelin May 28, 2026
575ebde
AGENTS.md: redact considering the subagents
GustavoStingelin May 28, 2026
577fb9e
kvdb: add CreateTx credit helpers
yyforyongyu Jun 10, 2026
c08ebd2
kvdb: implement CreateTx
yyforyongyu Jun 10, 2026
a935481
kvdb: test CreateTx credit validation
yyforyongyu Jun 10, 2026
cbd4c3b
wallet: add tx publisher store matchers
yyforyongyu May 19, 2026
eafe702
wallet: detect wallet-output spends for sweep recording
yyforyongyu Jun 10, 2026
b6628a4
wallet: route tx recording and ownership filtering through store
yyforyongyu Jun 10, 2026
038d2dd
kvdb: implement InvalidateUnminedTx
yyforyongyu May 16, 2026
f3a27d0
wallet: route invalid tx cleanup through store
yyforyongyu May 19, 2026
115b96d
db: validate CreateTx credit address membership
yyforyongyu Jun 10, 2026
fc25cbe
db/sql: resolve CreateTx credit owners by address
yyforyongyu Jun 10, 2026
94d36f1
db/itest: cover CreateTx credit owner resolution
yyforyongyu Jun 10, 2026
94c0f70
db/sql: add batched address script query
yyforyongyu Jun 8, 2026
d283dc4
db: add owned address script resolver
yyforyongyu Jun 8, 2026
dda1fcc
db: expose owned address resolver
yyforyongyu Jun 8, 2026
b1dca8d
wallet: batch tx publisher owned address lookups
yyforyongyu Jun 10, 2026
35a2926
wallet: benchmark batched owned address filtering
yyforyongyu Jun 10, 2026
2469412
db: stop precreating bare multisig account
yyforyongyu Jun 5, 2026
d76de16
wallet: treat already-known/confirmed txs as a successful publish
yyforyongyu Jun 10, 2026
506e713
wallet: add PSBT store fixtures
yyforyongyu May 19, 2026
2d36def
wallet: route PSBT UTXO lookup through store
yyforyongyu May 19, 2026
dfea846
wallet: route PSBT lock checks through store
yyforyongyu May 19, 2026
91bccb7
wallet: route PSBT parent tx lookup through store
yyforyongyu May 19, 2026
daf039b
wallet: remove PSBT legacy credit helper
yyforyongyu May 19, 2026
f418150
docs: update keyvault ADR scoping to one wallet
GustavoStingelin Jun 11, 2026
91f413b
wallet: add lifecycle to keyvault interface
GustavoStingelin Jun 11, 2026
2cbb6ba
wallet: fix taproot PSBT derivation
yyforyongyu Jun 17, 2026
f0f133b
kvdb: return empty missing-scope accounts
yyforyongyu Jun 17, 2026
3eeea24
wallet: keep recovery same-block spends
yyforyongyu Jun 17, 2026
6b9c5b5
db: verify existing block metadata
yyforyongyu Jun 17, 2026
4e3de76
kvdb: report watch-only wallet state
yyforyongyu Jun 17, 2026
10c0f3c
db/sql: rewind rollback to stored block
yyforyongyu Jun 17, 2026
39d4ef7
wallet: reject nil account xpub
yyforyongyu Jun 17, 2026
47b7511
wallet: handle value coin sources
yyforyongyu Jun 17, 2026
90eaacc
wallet+db: complete btcd-v2 migration for sql-wallet rebase
yyforyongyu Jun 26, 2026
e27192d
docs: add normalized identity ADR
yyforyongyu Jun 29, 2026
ceb5e1e
db+wallet: add and use account import flag
yyforyongyu Jun 29, 2026
8cb4487
db: make account numbers optional
yyforyongyu Jun 29, 2026
593f845
db+wallet: add and use address import and path flags
yyforyongyu Jun 29, 2026
a3e9b66
db/sql: add derived address table
yyforyongyu Jun 29, 2026
ab94943
db/sql: dual-write derived addresses
yyforyongyu Jun 29, 2026
a28521c
db/sql: read derived address identity
yyforyongyu Jun 29, 2026
fe181b7
db: support accountless address listing
yyforyongyu Jun 29, 2026
f222078
wallet: omit imported address scope
yyforyongyu Jun 29, 2026
c3987f5
db: remove imported address scope
yyforyongyu Jun 29, 2026
db67f6e
db: support accountless utxos
yyforyongyu Jun 29, 2026
87fb7ea
wallet: use utxo spendability
yyforyongyu Jun 29, 2026
4b16c23
db+wallet: carry derived address identity
yyforyongyu Jun 29, 2026
eab9e96
db: drop origin lookup API
yyforyongyu Jun 29, 2026
0b9e4a8
db/sql: drop legacy origin schema and counters
yyforyongyu Jun 29, 2026
1a0eadb
db/sql: remove legacy address shape
yyforyongyu Jun 29, 2026
55d8aad
db: switch utxo consumers to derived address shape
yyforyongyu Jun 29, 2026
305794e
db/itest: cover account identity
yyforyongyu Jun 29, 2026
7221b55
db/itest: cover address identity
yyforyongyu Jun 29, 2026
8b5f6fc
db/itest: cover tx utxo identity
yyforyongyu Jun 29, 2026
f543042
db/runtime: prefer canceled retry context
yyforyongyu Jun 29, 2026
339b39a
db: normalize store file names
yyforyongyu Jun 22, 2026
21a8f2f
db: add synced block query types
yyforyongyu Jun 8, 2026
2b39416
db/sql: add synced block list query
yyforyongyu Jun 8, 2026
df18110
kvdb: implement ListSyncedBlocks
yyforyongyu Jun 8, 2026
3f800b3
db/sql: add multi-row sqlite test helper
yyforyongyu Jun 8, 2026
58d88f8
sqlite: implement ListSyncedBlocks
yyforyongyu Jun 8, 2026
a0df9f8
pg: implement ListSyncedBlocks
yyforyongyu Jun 8, 2026
081daa4
db: add ListSyncedBlocks to WalletStore interface
yyforyongyu Jun 8, 2026
381b07b
db: implement DeleteExpiredLeases on Store
yyforyongyu Jun 8, 2026
1cad0d8
kvdb: implement RollbackToBlock
yyforyongyu Jun 22, 2026
7755da1
kvdb: test RollbackToBlock behavior
yyforyongyu Jun 22, 2026
ca2f716
db/sql: add outputs-to-watch query
yyforyongyu Jun 8, 2026
8fdc261
kvdb: implement ListOutputsToWatch
yyforyongyu Jun 8, 2026
bc3380e
db: add WatchOutputFromRow conversion helper
yyforyongyu Jun 8, 2026
701f5cd
sqlite: implement ListOutputsToWatch
yyforyongyu Jun 8, 2026
da42d0f
pg: implement ListOutputsToWatch
yyforyongyu Jun 8, 2026
8b94024
db: add ListOutputsToWatch to UTXOStore interface
yyforyongyu Jun 8, 2026
1b45ca8
db/itest: cover watched bare-multisig outputs
yyforyongyu Jun 8, 2026
f48b695
db: harden duplicate tx checks
yyforyongyu Jun 22, 2026
7f4149f
db/sql: add duplicate tx replay queries
yyforyongyu Jun 22, 2026
6eb468e
db/pg: harden CreateTx duplicate replay
yyforyongyu Jun 22, 2026
2828dbd
db/sqlite: harden CreateTx duplicate replay
yyforyongyu Jun 22, 2026
74665b0
db: add tx batch request types
yyforyongyu Jun 8, 2026
11961d1
kvdb: add tx batch credit and block-meta helpers
yyforyongyu Jun 8, 2026
dd88e84
kvdb: implement ApplyTxBatch tx and sync-tip writes
yyforyongyu Jun 8, 2026
879a34a
kvdb: test tx batch rollback state
yyforyongyu Jun 22, 2026
c99182a
sqlite: implement ApplyTxBatch
yyforyongyu Jun 8, 2026
e902f0e
pg: implement ApplyTxBatch
yyforyongyu Jun 8, 2026
926539c
db: add ApplyTxBatch to TxStore interface
yyforyongyu Jun 8, 2026
ca00ff0
db/itest: cover ApplyTxBatch conformance
yyforyongyu Jun 8, 2026
e6e1f7f
db/itest: cover duplicate tx replay
yyforyongyu Jun 22, 2026
c9101a8
wallet: remove keyvault auto lock
GustavoStingelin Jul 2, 2026
6700920
wallet: rename keyvault passphrase rotation
GustavoStingelin Jul 2, 2026
4e6abce
wallet: rename DBVault to WalletVault
GustavoStingelin Jul 2, 2026
a0511be
wallet: add keyvault unlocked state
GustavoStingelin Jul 2, 2026
59fa2a1
wallet: implement keyvault IsLocked
GustavoStingelin Jul 2, 2026
793aaef
wallet: implement keyvault Lock
GustavoStingelin Jul 2, 2026
74fefd2
wallet: implement keyvault Unlock
GustavoStingelin Jul 2, 2026
db722e9
wallet: implement keyvault ChangePassphrase
GustavoStingelin Jul 2, 2026
8d7c3cd
wallet: implement keyvault Encrypt
GustavoStingelin Jul 2, 2026
8cc42e7
wallet: implement keyvault Decrypt
GustavoStingelin Jul 2, 2026
317a776
wallet: add keyvault cipher vector tests
GustavoStingelin Jul 2, 2026
5c43ec3
wallet: wire watch-only keyvault state
GustavoStingelin Jul 3, 2026
328e428
wallet: fix watch-only wallet secret invariants
GustavoStingelin Jul 3, 2026
622b9c3
waddrmgr: add derived address eviction
yyforyongyu Jun 7, 2026
70b4238
waddrmgr: test derived address cache eviction
yyforyongyu Jun 7, 2026
eca6683
db: add scan batch request types
yyforyongyu Jun 8, 2026
4d1004e
db/sql: add scan batch account queries
yyforyongyu Jun 8, 2026
5d62dc1
db: add scan horizon account types
yyforyongyu Jun 8, 2026
4fd62f3
db: add scan horizon extension helpers
yyforyongyu Jun 22, 2026
7c1b0a1
db: test scan horizon extension helpers
yyforyongyu Jun 22, 2026
09a7f6b
waddrmgr: test multi-branch address eviction
yyforyongyu Jun 22, 2026
f7a4a7d
db/sql: add scan horizon account queries
yyforyongyu Jun 22, 2026
736796f
wallet: evict scan horizons on rollback
yyforyongyu Jun 22, 2026
0a03451
wallet: test scan horizon rollback eviction
yyforyongyu Jun 22, 2026
e602edc
db/pg: implement scan horizon ops
yyforyongyu Jun 22, 2026
e18b963
db/sqlite: implement scan horizon ops
yyforyongyu Jun 22, 2026
7bd2675
db+sqlite+pg: extract shared address converters to addressstore_common
Abdulkbk Jul 3, 2026
5f6aa67
db+sqlite+pg: split address types into per-op files
Abdulkbk Jul 6, 2026
4495820
db+sqlite+pg: split GetAddress into its own file
Abdulkbk Jul 6, 2026
2e0f153
db+sqlite+pg: split GetAddressSecret into its own file
Abdulkbk Jul 6, 2026
e91818e
db+sqlite+pg: split ResolveOwnedAddresses into its own file
Abdulkbk Jul 6, 2026
d80f0b1
db+sqlite+pg: split ListAddresses into its own file
Abdulkbk Jul 6, 2026
cbb6807
db+sqlite+pg: convert NewImportedAddress to db-ops interface style
Abdulkbk Jul 3, 2026
6ac9b65
db+sqlite+pg: convert NewDerivedAddress to db-ops interface style
Abdulkbk Jul 3, 2026
ee35b88
db: relocate address-store residuals and split unit tests
Abdulkbk Jul 3, 2026
9b0a415
kvdb: add scan horizon extension handlers
yyforyongyu Jun 8, 2026
2940b4d
kvdb: implement ApplyScanBatch orchestration and rollback
yyforyongyu Jun 8, 2026
3b7a689
db: add CanSkipCreateTxDuplicate helper
yyforyongyu Jun 8, 2026
0ed27bb
sqlite: extract applyBatchTransaction batch helper
yyforyongyu Jun 8, 2026
c05e528
pg: extract applyBatchTransaction batch helper
yyforyongyu Jun 8, 2026
2fd48da
sqlite: implement ApplyScanBatch
yyforyongyu Jun 8, 2026
61fca7a
pg: implement ApplyScanBatch
yyforyongyu Jun 8, 2026
7b93f4b
db: add ApplyScanBatch to TxStore interface
yyforyongyu Jun 8, 2026
cfaa09c
db: replay idempotent batch edges
yyforyongyu Jun 17, 2026
1e0ec3d
wallet+db: use shared batch duplicate handling
yyforyongyu Jul 9, 2026
2ffbcb1
kvdb: test ApplyScanBatch tx and synced-block writes
yyforyongyu Jun 8, 2026
8016601
kvdb: test ApplyScanBatch synced-tip rollback
yyforyongyu Jun 8, 2026
94419d0
kvdb: test ApplyScanBatch rollback through skipped indices
yyforyongyu Jun 8, 2026
837377f
kvdb: test ApplyScanBatch account name resolution
yyforyongyu Jun 8, 2026
f902c9a
db/itest: add scan batch conformance fixture
yyforyongyu Jun 8, 2026
061ef00
db/itest: cover ApplyScanBatch horizon conformance
yyforyongyu Jun 8, 2026
7e9af36
db/itest: cover ApplyScanBatch watch-set conformance
yyforyongyu Jun 8, 2026
3976c11
db/itest: cover scan/tx batch duplicate and new-block tx
yyforyongyu Jun 8, 2026
823cf39
kvdb: restore sync tip on failed RollbackToBlock
yyforyongyu Jun 8, 2026
7e1ac75
db/itest: cover RollbackToBlock sync tip atomicity
yyforyongyu Jun 8, 2026
85a293b
wallet: pass runtime store into syncer
yyforyongyu May 19, 2026
34f3ed4
wallet: route runtime startup setup
yyforyongyu May 19, 2026
1a47917
wallet: route sync-tip updates
yyforyongyu May 19, 2026
c2d3b59
wallet: route rollback block reads
yyforyongyu May 19, 2026
3bcb0e0
db: implement wallet-scoped rewind
yyforyongyu Jun 24, 2026
86dcace
db/itest: cover wallet-scoped rewind
yyforyongyu Jun 24, 2026
7b728ec
wallet: route manual rewinds through Store
yyforyongyu Jun 24, 2026
1643c34
wallet: restore the in-memory synced tip on a failed rewind
yyforyongyu Jun 6, 2026
12fa672
wallet: route unmined rebroadcast reads
yyforyongyu May 19, 2026
b7f4ad0
db: promote unmined tx duplicates
yyforyongyu Jun 28, 2026
632eedf
wallet: route relevant tx notifications
yyforyongyu Jun 28, 2026
a6c0cd2
wallet+db: test relevant tx routing
yyforyongyu Jun 28, 2026
2d283e2
wallet: route filtered block batches
yyforyongyu May 19, 2026
f95a4c6
wallet: test filtered block Store write shape
yyforyongyu May 19, 2026
601269f
wallet: test filtered block bare multisig credits
yyforyongyu May 19, 2026
a54d1ed
wallet: test filtered block third-party filtering
yyforyongyu May 19, 2026
3e458a3
wallet: build Store scan batch params
yyforyongyu May 19, 2026
10fbb1d
wallet: route scan batch writes
yyforyongyu May 19, 2026
826e48d
wallet: route targeted scan batch writes
yyforyongyu May 19, 2026
017aa71
wallet: route sync-tip updates in scan flow
yyforyongyu May 19, 2026
e49ec01
wallet: backport scan-horizon account-name stamping
yyforyongyu Jun 10, 2026
1523c24
wallet: test confirmed relevant tx omits sync tip
yyforyongyu Jun 10, 2026
1c69806
wallet: load scan horizons from store accounts
yyforyongyu Jun 10, 2026
07c05f0
wallet: test store scan horizon loading
yyforyongyu Jun 10, 2026
a5e44ce
wallet: load store scan addresses
yyforyongyu Jun 1, 2026
a83e1d5
wallet: load store scan watch outputs
yyforyongyu Jun 1, 2026
c0739da
wallet: wire store scan data loading
yyforyongyu Jun 1, 2026
fee5545
wallet: resolve targeted rescan accounts by durable identity
yyforyongyu Jun 10, 2026
5d7beab
wallet: cover targeted rescan imported-target resolution
yyforyongyu Jun 10, 2026
6175f6c
wallet: drop syncer legacy DB fallbacks
yyforyongyu Jun 8, 2026
1c7451c
wallet: make syncer Store mandatory
yyforyongyu Jun 10, 2026
a1dcc89
wallet: make syncer rollback and lifecycle tests Store-only
yyforyongyu Jun 10, 2026
bcd33e1
wallet: make syncer scan tests Store-only
yyforyongyu Jun 10, 2026
645e8c0
wallet: make syncer chain-update and broadcast tests Store-only
yyforyongyu Jun 10, 2026
2ea76df
wallet: route manager master fingerprint read through Store
yyforyongyu Jun 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
260 changes: 244 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ env:
BITCOIND_VERSION: '22.0'
BITCOIND_IMAGE: 'lightninglabs/bitcoin-core'

BTCD_VERSION_LATEST: v0.25.0

jobs:
########################
# Format, compileation and lint check
Expand Down Expand Up @@ -63,6 +65,15 @@ jobs:
- name: Check RPC format
run: make rpc-check

- name: Check generated SQL code is up-to-date
run: make sqlc-check

- name: Check SQL formatting
run: make sql-format-check

- name: Check SQL linting
run: make sql-lint-check

- name: compile code
run: go install -v ./...

Expand Down Expand Up @@ -112,28 +123,29 @@ jobs:
steps:
- name: extract bitcoind from docker image
run: |-
docker pull ${{ env.BITCOIND_IMAGE }}:${{ env.BITCOIND_VERSION }}
CONTAINER_ID=$(docker create ${{ env.BITCOIND_IMAGE }}:${{ env.BITCOIND_VERSION }})
sudo docker cp $CONTAINER_ID:/opt/bitcoin-${{ env.BITCOIND_VERSION }}/bin/bitcoind /usr/local/bin/bitcoind
IMAGE=${{ env.BITCOIND_IMAGE }}:${{ env.BITCOIND_VERSION }}
docker pull $IMAGE

BIN_PATH=$(docker run --rm --entrypoint sh $IMAGE -c '
command -v bitcoind ||
find /opt /usr -type f -name bitcoind 2>/dev/null | head -n 1
')
if [ -z "$BIN_PATH" ]; then
echo "could not locate bitcoind in $IMAGE" >&2
exit 1
fi

CONTAINER_ID=$(docker create $IMAGE)
sudo docker cp $CONTAINER_ID:$BIN_PATH /usr/local/bin/bitcoind
docker rm $CONTAINER_ID
bitcoind --version

- name: git checkout
uses: actions/checkout@v5

- name: Clean up runner space
uses: ./.github/actions/cleanup-space

- name: go cache
uses: actions/cache@v4
with:
path: /home/runner/work/go
key: btcwallet-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
btcwallet-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
btcwallet-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-
btcwallet-${{ runner.os }}-go-${{ env.GO_VERSION }}-
btcwallet-${{ runner.os }}-go-

- name: setup go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
Expand All @@ -143,9 +155,225 @@ jobs:
run: make ${{ matrix.unit_type }}

- name: Send coverage
uses: shogo82148/actions-goveralls@v1
uses: coverallsapp/github-action@v2
if: matrix.unit_type == 'unit-cover'
continue-on-error: true
with:
path-to-profile: coverage.txt
file: coverage.txt
flag-name: unit
format: golang
parallel: true

########################
# run integration tests (SQLite + Postgres)
########################
itest-db:
name: ${{ matrix.db }} itest (${{ matrix.race && 'race' || 'cover' }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
db: [sqlite, postgres]
race: [false, true]
steps:
- name: git checkout
uses: actions/checkout@v5

- name: Clean up runner space
uses: ./.github/actions/cleanup-space

- name: setup go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: '${{ env.GO_VERSION }}'

- name: run ${{ matrix.db }} itest-db (coverage)
if: ${{ !matrix.race }}
run: make itest-db db=${{ matrix.db }} cover=1 verbose=1

- name: run ${{ matrix.db }} itest-db-race
if: matrix.race
run: make itest-db-race db=${{ matrix.db }} verbose=1

- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
if: ${{ !matrix.race }}
continue-on-error: true
with:
file: coverage-itest-${{ matrix.db }}.txt
flag-name: itest-db-${{ matrix.db }}
format: golang
parallel: true

########################
# Run bwtest integration tests against each supported chain backend.
#
# These jobs currently use kvdb only. Database expansion is planned via a
# separate matrix in a future change.
########################
itest-btcd:
name: itest btcd
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v5

- name: Clean up runner space
uses: ./.github/actions/cleanup-space

- name: setup go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: '${{ env.GO_VERSION }}'

- name: add go bin to PATH
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH

- name: install btcd ${{ env.BTCD_VERSION_LATEST }}
run: go install -v github.com/btcsuite/btcd@${{ env.BTCD_VERSION_LATEST }}

- name: check btcd version
run: btcd --version

# The btcd backend job runs btcd for both the shared miner and the chain
# backend under test.
- name: run itest (btcd, kvdb)
run: make itest chain=btcd db=kvdb

- name: upload itest logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: itest-logs-btcd
path: itest/test-logs
retention-days: 5

########################
# Run bwtest integration tests with the neutrino backend.
#
# Job flow:
# - Install btcd `${{ env.BTCD_VERSION_LATEST }}`.
# - Use btcd as the shared miner for the suite.
# - Run `make itest chain=neutrino db=kvdb` so wallets use the in-process
# neutrino backend while blocks/peers come from btcd.
########################
itest-neutrino:
name: itest neutrino
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v5

- name: Clean up runner space
uses: ./.github/actions/cleanup-space

- name: setup go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: '${{ env.GO_VERSION }}'

- name: add go bin to PATH
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH

- name: install btcd ${{ env.BTCD_VERSION_LATEST }}
run: go install -v github.com/btcsuite/btcd@${{ env.BTCD_VERSION_LATEST }}

- name: check btcd version
run: btcd --version

# Neutrino runs in-process, but it still relies on the shared btcd miner
# for chain data and peer connectivity.
- name: run itest (neutrino, kvdb)
run: make itest chain=neutrino db=kvdb

- name: upload itest logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: itest-logs-neutrino
path: itest/test-logs
retention-days: 5

########################
# Run bwtest integration tests with the bitcoind backend.
#
# Job flow:
# - Install btcd `${{ env.BTCD_VERSION_LATEST }}` as the shared miner.
# - Run a matrix over bitcoind versions `30` (latest) and `28` (older).
# - Extract each matrix binary from the docker image and run
# `make itest chain=bitcoind db=kvdb`.
########################
itest-bitcoind:
name: itest bitcoind (v${{ matrix.bitcoind_version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
bitcoind_version: ['30', '28']
steps:
- name: git checkout
uses: actions/checkout@v5

- name: Clean up runner space
uses: ./.github/actions/cleanup-space

- name: setup go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: '${{ env.GO_VERSION }}'

- name: add go bin to PATH
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH

- name: install btcd ${{ env.BTCD_VERSION_LATEST }}
run: go install -v github.com/btcsuite/btcd@${{ env.BTCD_VERSION_LATEST }}

- name: check btcd version
run: btcd --version

# For bitcoind backend tests, btcd remains the shared miner while the
# matrix covers both bitcoind v30 (latest) and v28 (older).
- name: extract bitcoind from docker image (${{ matrix.bitcoind_version }})
run: |-
IMAGE=${{ env.BITCOIND_IMAGE }}:${{ matrix.bitcoind_version }}
docker pull $IMAGE

BIN_PATH=$(docker run --rm --entrypoint sh $IMAGE -c '
command -v bitcoind ||
find /opt /usr -type f -name bitcoind 2>/dev/null | head -n 1
')
if [ -z "$BIN_PATH" ]; then
echo "could not locate bitcoind in $IMAGE" >&2
exit 1
fi

CONTAINER_ID=$(docker create $IMAGE)
sudo docker cp $CONTAINER_ID:$BIN_PATH /usr/local/bin/bitcoind
docker rm $CONTAINER_ID
bitcoind --version

- name: run itest (bitcoind, kvdb)
run: make itest chain=bitcoind db=kvdb

- name: upload itest logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: itest-logs-bitcoind-${{ matrix.bitcoind_version }}
path: itest/test-logs
retention-days: 5

########################
# Complete parallel coverage uploads
########################
finish:
name: Finish coverage upload
if: ${{ !cancelled() }}
needs: [unit-test, itest-db]
runs-on: ubuntu-latest
steps:
- name: Finish parallel Coveralls upload
uses: coverallsapp/github-action@v2
continue-on-error: true
with:
parallel-finished: true
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@ btcwallet
vendor
.idea
coverage.txt
coverage-itest-postgres.txt
coverage-itest-sqlite.txt
*.swp
.vscode
.DS_Store
.aider*
/.worktrees/
coverage.out
*.prof
*.test
*cpu.out

# Integration test logs.
itest/test-logs/

# Backwards compatibility for older log dir.
itest/.minerlogs/
Loading
Loading