Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1237 commits
Select commit Hold shift + click to select a range
8d27ef3
gitignore: ignore IDEA files
bullet-tooth Feb 10, 2025
b1ab1de
multi: fix typos
bullet-tooth Feb 10, 2025
2aa26d3
wire: add TestNet4
bullet-tooth Feb 10, 2025
65a2972
chaincfg: add TestNet4 params
bullet-tooth Feb 10, 2025
0ef589e
blockchain: add BIP94 support
bullet-tooth Feb 10, 2025
6896e50
cmd: add TestNet4 config param
bullet-tooth Feb 10, 2025
64fe10c
dbtool: add TestNet4 config param
bullet-tooth Feb 10, 2025
3e04a3e
rpcclient: add TestNet4 config param support
bullet-tooth Feb 10, 2025
078a698
btcd: add TestNet4 config param
bullet-tooth Feb 10, 2025
9c841ed
build: add rapid as a dep
Roasbeef Mar 6, 2025
591d7e1
blockchain: add property-based tests for assertNoTimeWarp
Roasbeef Mar 6, 2025
a4f82f2
blockchain: implement AlwaysActiveHeight for forced deployment activa…
Roasbeef Mar 10, 2025
4f4ea81
Merge pull request #2339 from Roasbeef/testnet4-bip9
Roasbeef Mar 18, 2025
5ace0a6
multi: deprecation gocov
petersssong Mar 14, 2025
43a870e
Merge pull request #2304 from kcalvinalvin/2025-01-16-dont-ask-for-bl…
Roasbeef Mar 21, 2025
06cf379
refactor: use maps.Copy for cleaner map handling
xinhangzhou Mar 24, 2025
679a31f
Merge pull request #2340 from petersssong/master
Roasbeef Mar 24, 2025
cae3fb6
docs: update contribution link
quantix9 Mar 25, 2025
7d6aef9
Merge pull request #2348 from quantix9/fix/link
guggero Mar 25, 2025
f6aa7a8
Merge pull request #2343 from xinhangzhou/master
yyforyongyu Mar 26, 2025
990d952
psbt: check path minimum length
guggero Apr 4, 2025
cd05d9a
Merge pull request #2352 from guggero/psbt-size-check
Roasbeef Apr 7, 2025
cabd365
database: shut the program down immediately if we run out of disk space
kcalvinalvin Apr 14, 2025
1eb974a
Merge pull request #2358 from kcalvinalvin/2025-02-17-exit-when-runni…
Roasbeef May 6, 2025
16c2b92
psbt: overflow checks when computing Taproot BIP32 derivation min size
ffranr May 18, 2025
565a7a8
psbt: limit value size in ReadTaprootBip32Derivation to prevent OOM
ffranr May 23, 2025
d79d37d
ellswift: introduce ElligatorSwift encoding and decoding funcs
Crypt-iQ Jul 18, 2024
c324e19
v2transport: introduce FSChaCha20, FSChaCha20Poly1305 handshake
Crypt-iQ Jul 19, 2024
f9c0058
wire: introduce encoding/decoding funcs for v2 messages
Crypt-iQ Jul 25, 2024
824e163
server.go+peer: enable v2 functionality in peer code
Crypt-iQ Jul 25, 2024
6588e2e
v2transport: Add detailed logging to transport implementation
Roasbeef Mar 28, 2025
b5f0ebb
v2transport+server+peer: add v2->v1 downgrade error if EOF during han…
Crypt-iQ Apr 21, 2025
675d300
peer+server.go: pendingReconnects map to reconnect to downgraded v2->…
Crypt-iQ May 3, 2025
2d2bf57
server.go+connmgr: changes to trigger a reconnect in connmgr
Crypt-iQ May 4, 2025
c6b2553
rpcserver: expose v2 connection status in getpeerinfo
Roasbeef Mar 29, 2025
1ffd7b4
v2transport: export maxGarbageLen
Roasbeef May 23, 2025
53afae4
peer: use random garbage length for v2 peers
Roasbeef May 23, 2025
be67c07
peer: log when we downgrade outbound peers from v2 to v1
Roasbeef May 23, 2025
ef0e43b
multi: refactor v2 -> v1 downgrade logic
Roasbeef May 24, 2025
5ab25f3
config: add new --v2transport option to gate BIP 324
Roasbeef May 26, 2025
253c36d
Merge pull request #2260 from Crypt-iQ/v2_transport
Roasbeef Jun 3, 2025
00db18b
v2transport: minor style fixes
Roasbeef Jun 3, 2025
f44d32b
v2transport: reduce size of module by shedding dep on wire package
Roasbeef Jun 4, 2025
48058b0
v2transport+btcd: update to btcec v2.3.5
Roasbeef Jun 4, 2025
0cba26d
Merge pull request #2374 from ffranr/2372-fix-bip32-derivation-overfl…
yyforyongyu Jun 6, 2025
089f012
Merge pull request #2381 from Roasbeef/v2-transport-module
Roasbeef Jun 6, 2025
56cb0bb
v2transport: fix module path
Roasbeef Jun 6, 2025
7716758
Merge pull request #2383 from Roasbeef/v2-module-fix
Roasbeef Jun 6, 2025
5f415da
build: remove replace directives left over after BIP 324 PRs
Roasbeef Jun 6, 2025
ac58f69
Merge pull request #2384 from Roasbeef/bip324-modules
Roasbeef Jun 6, 2025
e5d2ae4
txscript: add more detail to invalid tapscript merkle proof error
Roasbeef Dec 3, 2024
3afc25b
Merge pull request #2284 from Roasbeef/ctrl-block-error
Roasbeef Jun 19, 2025
3913a72
main+wire: fix line too long
yyforyongyu Jun 23, 2025
c96d061
wire: refactor `BtcDecode` and patch unit test
yyforyongyu Jun 23, 2025
796d0ef
main: add method `pushInventory` to be used in `OnGetData`
yyforyongyu Jun 23, 2025
9dc2503
main: refactor `OnGetData` to simplify the logic
yyforyongyu Jun 23, 2025
1827fcf
main: fix typo
yyforyongyu Jun 25, 2025
e4c44fe
Print a readable error before os.Exit(1) in btcctl
bshramin Jul 1, 2025
91daea9
Merge pull request #2389 from yyforyongyu/refactor
Roasbeef Jul 2, 2025
1d9a130
Merge pull request #2322 from starius/block-count
Roasbeef Jul 2, 2025
2c9907c
Merge pull request #2393 from bshramin/btcctl-config-error
guggero Jul 3, 2025
73344db
CI: add gemini assist for code reviews
mohamedawnallah Jul 9, 2025
fa8d919
Merge pull request #2395 from mohamedawnallah/addGeminiCodeAssist
guggero Jul 10, 2025
bc52e09
p2p: remove alert msg
brunoerg Jul 10, 2025
c9bd7b4
txscript: add new ScriptTemplate DSL for writing Scripts
Roasbeef Jul 18, 2024
c6b5b83
Merge pull request #2396 from brunoerg/2025-07-remove-alert
Roasbeef Jul 11, 2025
4530538
Merge pull request #2216 from Roasbeef/script-template
Roasbeef Jul 11, 2025
4727f32
Update Go module and dependencies
Aharonee May 19, 2025
9adca74
Merge pull request #2375 from Aharonee/chore/update_psbt_deps
yyforyongyu Jul 14, 2025
5e69e56
btcutil/bloom: align hash function count with filter capacity
gijswijs Jun 7, 2025
d5cd95b
wire: optimize parsing for CFCheckpkt message, reduce allocs by 96%
Roasbeef Jul 15, 2025
9181aa1
Merge pull request #2398 from Roasbeef/neutrino-opt
yyforyongyu Jul 16, 2025
e8ea247
.gemini: add `styleguide.md`
yyforyongyu Jul 16, 2025
ab068f4
Merge pull request #2399 from mohamedawnallah/add-gemini-style-guide
yyforyongyu Jul 16, 2025
7b7644c
Merge pull request #2397 from gijswijs/bloom-update
Roasbeef Jul 22, 2025
6b2a9a4
btcjson: add stubs for SubmitPackage
bhandras May 5, 2025
5e45197
btcjson: add json parsing unit tests for SubmitPackage stubs
bhandras Jul 23, 2025
baebb83
Merge pull request #2366 from bhandras/submitpackage
Roasbeef Jul 28, 2025
22b4663
Makefile: Update dependencies and improve installation commands
gosunuts Mar 10, 2025
f190651
multi: apply make fmt to all files
gosunuts Mar 10, 2025
106cde6
golangci: add configuration file for linting
gosunuts Jul 11, 2025
ffcda0f
rpcclient: add bitcoind version dependent error matching
guggero Aug 15, 2025
ce72d63
Merge pull request #2405 from guggero/bitcoind-v30-error
Roasbeef Aug 20, 2025
c002ea3
Merge pull request #2320 from gosunuts/feature/fix-ci
Roasbeef Aug 20, 2025
2577dd3
Dockerfile: update go base image
gosunuts Aug 20, 2025
a4ddae2
Merge pull request #2409 from gosunuts/fix/dockerfile-go-version
yyforyongyu Aug 20, 2025
29f4215
Makefile+workflows: fallback to `GOPATH/bin` on non-existent `GOBIN`
mohamedawnallah Aug 20, 2025
e8097a1
Merge pull request #2410 from mohamedawnallah/fallback-to-GOPATH-bin-dir
Roasbeef Aug 20, 2025
26ef499
treap: refactor the Put() code into exported and unexported versions
kcalvinalvin Sep 20, 2025
e3d237d
treap: add treapNodePool and fetch from it for cloneTreapNode and
kcalvinalvin Sep 20, 2025
31a762b
build: bump version to v0.25.0-beta.rc1
Roasbeef Sep 25, 2025
b7d0706
Merge pull request #2430 from Roasbeef/v-0-25-0-rc1
Roasbeef Sep 25, 2025
8f54cc6
musig2: add Session.RegisterCombinedNonce
sputn1ck Oct 7, 2025
21eb99e
musig2: add combinedNonce getter
sputn1ck Oct 8, 2025
442ef28
Merge pull request #2443 from sputn1ck/musig2_sign_with_agg_nonce
Roasbeef Oct 27, 2025
798b4ed
build: bump version to v0.25
Roasbeef Oct 27, 2025
582b999
rpcclient: ensure http dial respects timeout
wydengyre Oct 29, 2025
65d3968
treap: return newly created treapNodes in put()
kcalvinalvin Sep 20, 2025
0e95ae3
treap: add recycle() method on treapNode
kcalvinalvin Oct 30, 2025
e764c17
Merge pull request #2447 from Roasbeef/v-25-branch
Roasbeef Nov 4, 2025
9ff0780
Merge pull request #2450 from FiveBellsSettlement/btc-client-correct-…
Roasbeef Nov 6, 2025
e009124
treap, ffldb: change Put() to take in multiple key-value pairs
kcalvinalvin Sep 20, 2025
29d105b
blockchain: make BIP30 enforcement logic testable
starius Nov 4, 2025
f7dd09f
blockchain: run BIP30 check at BIP0034Height
starius Nov 4, 2025
5baa638
blockchain: run BIP30 if we are on non-BIP34 fork
starius Nov 4, 2025
6803c62
blockchain: fix overly eager BIP30 bypass
starius Nov 4, 2025
cd4e542
regtest: align activations with Bitcoin Core
starius Dec 22, 2025
d3615dc
fix spelling error
jlopp Dec 25, 2025
8431527
Merge pull request #2468 from jlopp/spellcheck
yyforyongyu Jan 12, 2026
7d4da22
build: bump version of Go container for release builds
Roasbeef Jan 13, 2026
3eacced
Merge pull request #2471 from Roasbeef/container-version-bump
Roasbeef Jan 13, 2026
3a0df88
btcec/schnorr: fix nonce generation comments
erickcestari Jan 15, 2026
091b790
server: fix peer add/done race between peerHandler and syncManager
Aharonee Feb 12, 2026
ce91359
server: serialize peer lifecycle via single goroutine
Aharonee Feb 16, 2026
f6d69f7
server: address review feedback on peer lifecycle handling
Aharonee Feb 18, 2026
5f25cf0
blockchain: add bestHeader to BlockChain
kcalvinalvin Jan 22, 2025
b60c2c3
blockchain: add statusHeaderStored for blockNode status
kcalvinalvin Sep 22, 2025
743d0a2
blockchain: add ErrKnownInvalidBlock error code
kcalvinalvin Feb 24, 2026
fd16786
blockchain: add maybeAcceptHeader
kcalvinalvin Sep 16, 2025
c1a4612
blockchain: add ProcessBlockHeader
kcalvinalvin Sep 16, 2025
f9645f0
blockchain: reuse existing header node in maybeAcceptBlock
kcalvinalvin Feb 24, 2026
9e45f60
blockchain: don't flush blockNodes that we don't have the data for
kcalvinalvin Sep 22, 2025
e4b38e0
blockchain: change HaveBlock to also check for block data availability
kcalvinalvin Sep 22, 2025
eeb2d43
blockchain: add exports methods based on block header tip
kcalvinalvin Jan 31, 2025
b1aef3a
netsync: add checkHeadersList
kcalvinalvin Sep 22, 2025
ddf80b8
netsync: add fetchHigherPeers
kcalvinalvin Sep 16, 2025
51576a4
netsync: add isInIBDMode
kcalvinalvin Sep 22, 2025
2f2364d
netsync: add fetchHeaders
kcalvinalvin Sep 22, 2025
26c2459
netsync: use ProcessBlockHeader in handleBlockHeader
kcalvinalvin Sep 23, 2025
28b6690
blockchain: add BestChainHeaderForkHeight to return the fork point
kcalvinalvin Feb 24, 2026
dc90f8c
netsync: change fetchHeaderBlocks to be based on the processed block
kcalvinalvin Sep 23, 2025
8588a25
netsync: require peer argument in fetchHeaderBlocks
kcalvinalvin Feb 25, 2026
7179268
integration: add reorg regression test for fetchHeaderBlocks fork point
kcalvinalvin Feb 24, 2026
46574cc
netsync: change startSync to be based off of processed headers
kcalvinalvin Sep 23, 2025
9530eda
netsync: update handleBlockMsg
kcalvinalvin Sep 23, 2025
5af7680
netsync: remove unused headerList and checkpoint code
kcalvinalvin Sep 23, 2025
0b1c7b7
netsync: rename headersFirstMode to ibdMode
kcalvinalvin Sep 23, 2025
dc6e096
netsync: add TestSyncStateMachine for end-to-end IBD sync flow
kcalvinalvin Feb 26, 2026
ce09426
netsync: add TestStartSyncBlockFallback for block-only sync path
kcalvinalvin Feb 26, 2026
570d3c8
netsync: add TestStallNoDisconnectAtSameHeight for stall handler
kcalvinalvin Feb 26, 2026
2aae8a6
netsync: add TestStartSyncChainCurrent for chain-current noop path
kcalvinalvin Feb 26, 2026
52e7b26
addrmgr: treat RFC7343 (ORCHIDv2) addresses as unroutable
erickcestari Mar 6, 2026
40eea63
wire: skip IPv4-mapped IPv6 addresses in addrv2 messages
erickcestari Mar 6, 2026
3bf0086
wire: bound witness read to remaining slab
erickcestari Mar 6, 2026
2037864
wire: Reduce MaxMessagePayload to 4MB
erickcestari Mar 6, 2026
c13dec2
wire: enforce full payload consumption in ReadMessage
Roasbeef Mar 6, 2026
c64768b
wire: add test for trailing bytes rejection in ReadMessage
Roasbeef Mar 6, 2026
45135e6
peer: add panic recovery to message handling goroutines
erickcestari Mar 6, 2026
cac334b
Merge pull request #2479 from erickcestari/fix-addrv2-address-validation
Roasbeef Mar 10, 2026
d36b9de
txscript: switch template engine from html/template to text/template
erickcestari Mar 10, 2026
1c55c7c
Merge pull request #2493 from erickcestari/use-text-template
Roasbeef Mar 10, 2026
50f056f
Merge pull request #2428 from kcalvinalvin/2025-09-16-new-parallel-bl…
Roasbeef Mar 24, 2026
4a4e2d2
addrmgr: fix IsRoutable for IPv6 addresses starting with 0
EricGrill Jan 14, 2026
c70d6b9
Merge pull request #2474 from EricGrill/fix/ipv6-zero-address-routable
Roasbeef Mar 24, 2026
b950e5b
Merge pull request #2477 from erickcestari/fix-doc-nonce-generation-s…
Roasbeef Mar 24, 2026
26124d2
netsync: allow sync with non-localhost peers on regtest/simnet
Abdulkbk Feb 23, 2026
7f47da8
netsync: add TestIsSyncCandidateRegtest
Roasbeef Mar 24, 2026
5e96c5b
wire: separate protocol message limit from serialization bound
erickcestari Mar 23, 2026
6b04a0b
Merge pull request #2487 from Abdulkbk/allow-ip-regtest
Roasbeef Mar 25, 2026
c47cb8a
Merge pull request #2425 from kcalvinalvin/2025-09-20-add-treapnode-pool
Roasbeef Mar 25, 2026
1031309
wire: add test for IPv4-mapped IPv6 address in NetAddressV2FromBytes
kcalvinalvin Mar 27, 2026
077c9b7
wire: fix IPv4-mapped IPv6 addresses using wrong networkID in addrv2
kcalvinalvin Mar 27, 2026
2c19db8
main: add regtest port for btcwallet
Abdulkbk Feb 24, 2026
14e32c2
Merge pull request #2488 from Abdulkbk/btcwallet-regtest
yyforyongyu Mar 31, 2026
dd78e09
Merge pull request #2515 from kcalvinalvin/2026-03-30-no-wrap-ipv4-in…
Roasbeef Mar 31, 2026
28fd6a7
wire: use MaxProtocolMessageLength as a max size for MsgReject
kcalvinalvin Apr 6, 2026
b047478
Merge pull request #2504 from erickcestari/fix-max-message-payload
Roasbeef Apr 8, 2026
51e9b53
Merge pull request #2518 from kcalvinalvin/2026-04-06-use-maxprotocol…
Roasbeef Apr 8, 2026
5fefcc6
chaincfg/chainhash: add strict parsing
starius Apr 8, 2026
08be37f
server, integration: add unit regression tests for peer lifecycle fix
Aharonee Apr 9, 2026
d1a428e
rpcclient: add GetTxOutProof{,Async} methods
guggero Aug 17, 2025
cd70f77
rpcclient: speed up string parsing
guggero Dec 2, 2025
5d5251d
go.mod, go.sum: updated secp256k1 to v4.4.0
MPins Nov 18, 2025
77e3f98
ecdsa: add VerifyLowS helper and tests
MPins Nov 18, 2025
8c40eb7
ecdsa: update recovery error messages and fix test comparison
MPins Apr 18, 2026
8ee32c6
txscript: reject OP_CODESEPARATOR in unexecuted branches for non-segwit
Roasbeef Feb 13, 2026
53036fd
txscript: support latest Core script_tests format
Roasbeef Apr 21, 2026
9d93e3d
txscript: support latest Core tx_valid semantics
Roasbeef Apr 21, 2026
4d03fb1
txscript: support latest Core tx_invalid semantics
Roasbeef Apr 21, 2026
44bfb2b
txscript: update script_tests.json from Bitcoin Core
Roasbeef Apr 21, 2026
77a3316
txscript: update tx_valid.json from Bitcoin Core
Roasbeef Apr 21, 2026
1b76fcb
txscript: update tx_invalid.json from Bitcoin Core
Roasbeef Apr 21, 2026
0235896
txscript: return ErrCleanStack for witness cleanstack failures
Roasbeef Apr 21, 2026
af7f379
txscript: align empty CHECKSIG pubkey validation with Core
Roasbeef Apr 21, 2026
63772e5
txscript: use finalOpcodeData for nested P2SH redeem script extraction
Roasbeef Apr 29, 2026
ee91afc
txscript: refactor CalcScriptInfo for nested P2SH analysis
Roasbeef Apr 29, 2026
24e3318
Merge pull request #2485 from Roasbeef/fix-codesep-unexecuted-branch
Roasbeef Apr 30, 2026
ac0394f
Merge pull request #2467 from starius/bip30bypassfix
Roasbeef Apr 30, 2026
c794769
Merge pull request #2489 from guggero/gettxoutproof
Roasbeef Apr 30, 2026
e4fe598
Merge pull request #2520 from starius/strict-chainhash-parsing-1
Roasbeef May 6, 2026
5b189f5
rpcclient: support canceling in-flight http requests
wydengyre Oct 30, 2025
13ccec2
rpcclient: avoid double-resolving POST requests on shutdown
starius Mar 20, 2026
fac1a22
rpcclient: resolve all batch futures if Send fails
starius Mar 20, 2026
1f00e1a
rpcclient: avoid duplicate batch POST handlers
starius Mar 20, 2026
51944b2
make fmt
starius May 6, 2026
74f4848
tests: fix stale regtest assumptions after #2467
starius May 6, 2026
edaf284
Merge pull request #2500 from starius/rpcclient-fixes
Roasbeef May 11, 2026
b528a35
btcjson: fix infinite recursion in StringOrArray.MarshalJSON
EricGrill Jan 14, 2026
6392419
btcjson: add Warnings field to GetBlockChainInfoResult
EricGrill Jan 14, 2026
91cf7b2
btcjson: add tests for StringOrArray and Warnings field
Roasbeef May 6, 2026
d9099f6
Merge pull request #2476 from EricGrill/fix/json-marshal-recursion
Roasbeef May 12, 2026
939b939
btcutil: add new AddressPayToAnchor addr type
Roasbeef Sep 27, 2025
e07d161
txscript: add initial awareness of new P2A output script
Roasbeef Sep 27, 2025
241bf7c
txscript: support trivial signing for P2A
Roasbeef Sep 27, 2025
f26e6bb
txscript: recognize P2A scripts in ParsePkScript
Roasbeef Sep 27, 2025
053fb4c
txscript: add tests for new P2A awareness
Roasbeef Sep 27, 2025
891bcb2
txscript: recognize P2A witness program during script execution
Roasbeef Sep 27, 2025
2682f2c
mempool: add p2a specific policy
Roasbeef Sep 27, 2025
de921ae
rpctest: add new e2e test for new P2A behavior
Roasbeef Sep 27, 2025
d12d39d
Merge pull request #2433 from Roasbeef/p2a
Roasbeef May 12, 2026
aacc988
Merge pull request #2491 from btcsuite/block-fix
Roasbeef May 12, 2026
f1b95f8
server: guard OnVerAck with sync.Once
Roasbeef May 12, 2026
e6f589e
server: gate handleDonePeerMsg on peerAdded, not VerAckReceived
Roasbeef May 12, 2026
f2a24d4
server: document peerLifecycle channel buffer sizing
Roasbeef May 12, 2026
56613bb
Merge pull request #2480 from Aharonee/bugfix/peer_race_condition
Roasbeef May 14, 2026
807cbce
rpcclient: compute httpURL once at construction time
JLSchuler99 May 5, 2026
153bf6d
btcutil: use anet instead of net for android builds
kcalvinalvin Nov 12, 2025
c90e88e
btcutil: export interfaceAddr
kcalvinalvin Nov 12, 2025
0f603fe
main: update go.mod and go.sum
kcalvinalvin Nov 12, 2025
589d7c0
main: use btcutil.InterfaceAddr
kcalvinalvin Nov 12, 2025
8bffc8a
Merge pull request #2526 from JLSchuler99/rpcclient-httpurl-no-resolve
Roasbeef May 14, 2026
73af4d6
btcutil: rename interfaceAddrs to InterfaceAddrs in appengine variant
Roasbeef May 14, 2026
2c05692
github: cross-compile android/arm64 in CI
Roasbeef May 14, 2026
c728090
Merge pull request #2461 from kcalvinalvin/2025-11-12-fix-android-builds
Roasbeef May 14, 2026
90540b8
Merge pull request #2524 from MPins/verifylows
Roasbeef May 14, 2026
e59dfeb
multi: bump in-tree go.mod files to newly tagged submodule versions
Roasbeef May 15, 2026
1863073
multi: bump Go toolchain to 1.25, build CI with 1.26.3
Roasbeef May 15, 2026
62cc0a6
multi: appease go 1.26 vet for non-const format + goroutine Fatalf
Roasbeef May 15, 2026
44d51eb
Merge pull request #2531 from Roasbeef/release-prep-bump-modules
Roasbeef May 15, 2026
28c77e7
chainhash: move to top-level module, use v2
guggero Dec 19, 2023
bf8006d
btcec: use new chainhash/v2 module
guggero Dec 19, 2023
039baa2
wire: make own module, use v2
guggero Dec 19, 2023
bd65d6d
chaincfg: add own module, use v2
guggero Dec 19, 2023
3000c45
address: move to top-level module, use v2
guggero Dec 19, 2023
55a463a
txscript: turn into own module, use v2
guggero Dec 19, 2023
e9ec6ec
btcutil: remove circular dependency, use v2
guggero Dec 19, 2023
c0db6df
psbt: move to top-level module, use v2, remove btcutil dep
guggero Dec 19, 2023
dccea8f
multi: use new v2 modules everywhere
guggero Dec 19, 2023
c0cfa06
multi: update make and CI goals with new packages
guggero Dec 19, 2023
9dfa926
server: fix linter issue
guggero Aug 20, 2025
b29ce97
rpcwebsocket: fi linter complaint about unused functions
guggero Aug 20, 2025
258049c
Merge pull request #1825 from guggero/btcec-v2-no-circular-dep
Roasbeef May 15, 2026
fdad1fa
multi: pin new v2 submodule tags and bump to v0.26.0-beta.rc1
Roasbeef May 15, 2026
b3cbf4f
Merge pull request #2532 from Roasbeef/release-v0.26-rc1
Roasbeef May 15, 2026
61c215e
ci: run rpctest integration tests
kcalvinalvin May 30, 2026
2211785
integration: fix p2a_test build under -tags=rpctest
kcalvinalvin May 30, 2026
79752a8
btcjson: accept null in StringOrArray.UnmarshalJSON
kcalvinalvin May 30, 2026
bfb36e5
netsync: process inv announcements when no syncPeer is set
kcalvinalvin May 30, 2026
f8ce7a7
rpctest: scope shared state to the current process
kcalvinalvin May 30, 2026
1966c38
Merge pull request #2536 from kcalvinalvin/2026-05-30-run-and-fix-bro…
yyforyongyu Jun 4, 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
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
36 changes: 36 additions & 0 deletions .gemini/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Config for the Gemini Pull Request Review Bot.
# https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github

# Enables fun features such as a poem in the initial pull request summary.
# Type: boolean, default: false.
have_fun: false

code_review:
# Disables Gemini from acting on PRs.
# Type: boolean, default: false.
disable: false

# Minimum severity of comments to post (LOW, MEDIUM, HIGH, CRITICAL).
# Type: string, default: MEDIUM.
comment_severity_threshold: MEDIUM

# Max number of review comments (-1 for unlimited).
# Type: integer, default: -1.
max_review_comments: -1

pull_request_opened:
# Post helpful instructions when PR is opened.
# Type: boolean, default: false.
help: false

# Post PR summary when opened.
# Type boolean, default: true.
summary: true

# Post code review on PR open.
# Type boolean, default: true.
code_review: true

# List of glob patterns to ignore (files and directories).
# Type: array of string, default: [].
ignore_patterns: []
291 changes: 291 additions & 0 deletions .gemini/styleguide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,291 @@
# LND Style Guide

## Code Documentation and Commenting

- Always use the Golang code style described below in this document.
- Readable code is the most important requirement for any commit created.
- Comments must not explain the code 1:1 but instead explain the _why_ behind a
certain block of code, in case it requires contextual knowledge.
- Unit tests must always use the `require` library. Either table driven unit
tests or tests using the `rapid` library are preferred.
- The line length MUST NOT exceed 80 characters, this is very important.
You must count the Golang indentation (tabulator character) as 8 spaces when
determining the line length. Use creative approaches or the wrapping rules
specified below to make sure the line length isn't exceeded.
- Every function must be commented with its purpose and assumptions.
- Function comments must begin with the function name.
- Function comments should be complete sentences.
- Exported functions require detailed comments for the caller.

**WRONG**
```go
// generates a revocation key
func DeriveRevocationPubkey(commitPubKey *btcec.PublicKey,
revokePreimage []byte) *btcec.PublicKey {
```
**RIGHT**
```go
// DeriveRevocationPubkey derives the revocation public key given the
// counterparty's commitment key, and revocation preimage derived via a
// pseudo-random-function. In the event that we (for some reason) broadcast a
// revoked commitment transaction, then if the other party knows the revocation
// preimage, then they'll be able to derive the corresponding private key to
// this private key by exploiting the homomorphism in the elliptic curve group.
//
// The derivation is performed as follows:
//
// revokeKey := commitKey + revokePoint
// := G*k + G*h
// := G * (k+h)
//
// Therefore, once we divulge the revocation preimage, the remote peer is able
// to compute the proper private key for the revokeKey by computing:
// revokePriv := commitPriv + revokePreimge mod N
//
// Where N is the order of the sub-group.
func DeriveRevocationPubkey(commitPubKey *btcec.PublicKey,
revokePreimage []byte) *btcec.PublicKey {
```
- In-body comments should explain the *intention* of the code.
**WRONG**
```go
// return err if amt is less than 546
if amt < 546 {
return err
}
```
**RIGHT**
```go
// Treat transactions with amounts less than the amount which is considered dust
// as non-standard.
if amt < 546 {
return err
}
```
## Code Spacing and formatting
- Segment code into logical stanzas separated by newlines.
**WRONG**
```go
witness := make([][]byte, 4)
witness[0] = nil
if bytes.Compare(pubA, pubB) == -1 {
witness[1] = sigB
witness[2] = sigA
} else {
witness[1] = sigA
witness[2] = sigB
}
witness[3] = witnessScript
return witness
```
**RIGHT**
```go
witness := make([][]byte, 4)

// When spending a p2wsh multi-sig script, rather than an OP_0, we add
// a nil stack element to eat the extra pop.
witness[0] = nil

// When initially generating the witnessScript, we sorted the serialized
// public keys in descending order. So we do a quick comparison in order
// to ensure the signatures appear on the Script Virtual Machine stack in
// the correct order.
if bytes.Compare(pubA, pubB) == -1 {
witness[1] = sigB
witness[2] = sigA
} else {
witness[1] = sigA
witness[2] = sigB
}

// Finally, add the preimage as the last witness element.
witness[3] = witnessScript

return witness
```
- Use spacing between `case` and `select` stanzas.
**WRONG**
```go
switch {
case a:
<code block>
case b:
<code block>
case c:
<code block>
case d:
<code block>
default:
<code block>
}
```
**RIGHT**
```go
switch {
// Brief comment detailing instances of this case (repeat below).
case a:
<code block>

case b:
<code block>

case c:
<code block>

case d:
<code block>

default:
<code block>
}
```
## Additional Style Constraints
### 80 character line length
- Wrap columns at 80 characters.
- Tabs are 8 spaces.
**WRONG**
```go
myKey := "0214cd678a565041d00e6cf8d62ef8add33b4af4786fb2beb87b366a2e151fcee7"
```
**RIGHT**
```go
myKey := "0214cd678a565041d00e6cf8d62ef8add33b4af4786fb2beb87b366a2e1" +
"51fcee7"
```
### Wrapping long function calls
- If a function call exceeds the column limit, place the closing parenthesis
on its own line and start all arguments on a new line after the opening
parenthesis.
**WRONG**
```go
value, err := bar(a,
a, b, c)
```
**RIGHT**
```go
value, err := bar(
a, a, b, c,
)
```
- Compact form is acceptable if visual symmetry of parentheses is preserved.
**ACCEPTABLE**
```go
response, err := node.AddInvoice(
ctx, &lnrpc.Invoice{
Memo: "invoice",
ValueMsat: int64(oneUnitMilliSat - 1),
},
)
```
**PREFERRED**
```go
response, err := node.AddInvoice(ctx, &lnrpc.Invoice{
Memo: "invoice",
ValueMsat: int64(oneUnitMilliSat - 1),
})
```
### Exception for log and error message formatting
- Minimize lines for log and error messages, while adhering to the
80-character limit.
**WRONG**
```go
return fmt.Errorf(
"this is a long error message with a couple (%d) place holders",
len(things),
)

log.Debugf(
"Something happened here that we need to log: %v",
longVariableNameHere,
)
```
**RIGHT**
```go
return fmt.Errorf("this is a long error message with a couple (%d) place "+
"holders", len(things))

log.Debugf("Something happened here that we need to log: %v",
longVariableNameHere)
```
### Exceptions and additional styling for structured logging
- **Static messages:** Use key-value pairs instead of formatted strings for the
`msg` parameter.
- **Key-value attributes:** Use `slog.Attr` helper functions.
- **Line wrapping:** Structured log lines are an exception to the 80-character
rule. Use one line per key-value pair for multiple attributes.
**WRONG**
```go
log.DebugS(ctx, fmt.Sprintf("User %d just spent %.8f to open a channel", userID, 0.0154))
```
**RIGHT**
```go
log.InfoS(ctx, "Channel open performed",
slog.Int("user_id", userID),
btclog.Fmt("amount", "%.8f", 0.00154))
```
### Wrapping long function definitions
- If function arguments exceed the 80-character limit, maintain indentation
on following lines.
- Do not end a line with an open parenthesis if the function definition is not
finished.
**WRONG**
```go
func foo(a, b, c,
) (d, error) {

func bar(a, b, c) (
d, error,
) {

func baz(a, b, c) (
d, error) {
```
**RIGHT**
```go
func foo(a, b,
c) (d, error) {

func baz(a, b, c) (d,
error) {

func longFunctionName(
a, b, c) (d, error) {
```
- If a function declaration spans multiple lines, the body should start with an
empty line.
**WRONG**
```go
func foo(a, b, c,
d, e) error {
var a int
}
```
**RIGHT**
```go
func foo(a, b, c,
d, e) error {

var a int
}
```
## Use of Log Levels
- Available levels: `trace`, `debug`, `info`, `warn`, `error`, `critical`.
- Only use `error` for internal errors not triggered by external sources.
## Testing
- To run all tests for a specific package:
`make unit pkg=$pkg`
- To run a specific test case within a package:
`make unit pkg=$pkg case=$case`
## Git Commit Messages
- **Subject Line:**
- Format: `subsystem: short description of changes`
- `subsystem` should be the package primarily affected (e.g., `peer`, `rpcclient`).
- For multiple packages, use `+` or `,` as a delimiter (e.g., `peer+rpcclient`).
- For widespread changes, use `multi:`.
- Keep it under 50 characters.
- Use the present tense (e.g., "Fix bug", not "Fixed bug").
- **Message Body:**
- Separate from the subject with a blank line.
- Explain the "what" and "why" of the change.
- Wrap text to 72 characters.
- Use bullet points for lists.
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Bug report
about: Create a bug report. Please use the discussions section for general or troubleshooting questions.
title: '[bug]: '
labels: ["bug", "needs triage"]
assignees: ''
---

### Background

Describe your issue here.

### Your environment

* version of `btcd`
* which operating system (`uname -a` on *Nix)
* any other relevant environment details

### Steps to reproduce

Tell us how to reproduce this issue. Please provide stacktraces and links to code in question.

### Expected behaviour

Tell us what should happen

### Actual behaviour

Tell us what happens instead
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Discussions
url: https://github.com/btcsuite/btcd/discussions
about: For general or troubleshooting questions or if you're not sure what issue type to pick.
- name: Community Slack
url: https://lightning.engineering/slack.html
about: Please ask and answer questions here.
- name: Security issue disclosure policy
url: https://github.com/lightningnetwork/lnd#security
about: Please refer to this document when reporting security related issues.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest a new feature for `btcd`.
title: '[feature]: '
labels: enhancement
assignees: ''
---

**Is your feature request related to a problem? Please describe.**
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

**Describe the solution you'd like**
<!-- A clear and concise description of what you want to happen. -->

**Describe alternatives you've considered**
<!-- A clear and concise description of any alternative solutions or features you've considered. -->

**Additional context**
<!-- Add any other context or screenshots about the feature request here. -->
Loading