Commit graph

50 commits

Author SHA1 Message Date
Olaoluwa Osuntokun
3d3b5e8a29 build: pin tagged submodules and remove local replacements
In this commit, we pin btcutil and wire to their freshly tagged v2.0.1
releases. We also remove the root module's remaining local replace
directives now that all three in-tree modules have published versions.

This makes local builds and downstream module consumers resolve the same
btcutil, v2transport, and wire code. The regenerated checksums cover each
published module.
2026-07-21 18:52:36 -07:00
Olaoluwa Osuntokun
8d902916fe build: bump v2transport to v1.1.0
In this commit, we bump the root module requirement to the freshly tagged
v2transport v1.1.0 release. This exposes the responder handshake admission
APIs added in #2576 when btcd is built as a downstream module, where the
repository-local replace directive does not apply.
2026-07-21 18:28:27 -07:00
Boris Nagaev
6c056ec471
server: centralize inbound handshake admission
In this commit, we introduce a server-wide admission policy for
incomplete inbound handshakes and the CPU-bound portion of v2 responder
setup. Source accounting uses normalized IPv4 and IPv6 prefixes, while
global, per-source, and concurrent v2 budgets remain independent and
bounded.

Peer construction passes the policy through a small interface only for
inbound v2 responders. Handshake slots release on verack or disconnect,
and the connection manager reserves MaxPeers capacity for automatic
outbound peers.
2026-07-18 00:17:55 -05:00
Boris Nagaev
ad8d94e62c
connmgr: bound accepted inbound connections
In this commit, we add an optional inbound connection limit at the
listener boundary. Each accepted socket owns a slot until Close releases
it exactly once, which makes connection lifetime, rather than accept
rate, the accounting unit.

The default remains unlimited for existing callers. The new tests cover
the configured bound, concurrent admission, callback ordering, and slot
reuse.
2026-07-18 00:17:55 -05:00
Boris Nagaev
81b07f6657
multi: use local submodules in root 2026-06-26 12:17:37 -05:00
Olaoluwa Osuntokun
fdad1fab1f multi: pin new v2 submodule tags and bump to v0.26.0-beta.rc1
In this commit, we strip all of the local `replace ... => ../...`
directives that were introduced as part of #1825 (the v2 module
restructuring), now that proper tags exist for every freshly carved-out
submodule. Every in-tree go.mod is pinned to the newly published tags:
chainhash/v2.0.0, wire/v2.0.0, chaincfg/v2.0.0, address/v2.0.0,
txscript/v2.0.0, btcutil/v2.0.0, psbt/v2.0.0, and btcec is bumped to
v2.5.0 since it now depends on chainhash/v2 (previously
chaincfg/chainhash).

While here, we also unify the Go toolchain to 1.25 across every
submodule so the workspace resolves a consistent set of language
features.

Finally, we bump the main btcd version to v0.26.0-beta.rc1 in
preparation for the upcoming release candidate.
2026-05-14 19:25:06 -07:00
Oliver Gugger
dccea8feba multi: use new v2 modules everywhere 2026-05-14 18:05:33 -07:00
Olaoluwa Osuntokun
1863073cb0 multi: bump Go toolchain to 1.25, build CI with 1.26.3
In this commit, we update every in-tree go.mod to declare go 1.25 and
have CI build with 1.26.3 (Dockerfile uses the golang:1.26-alpine base).
Docs that mention the minimum required Go version are aligned with the
new floor as well.

Fixes #2527, which flagged the README.md / go.mod version mismatch (the
README claimed 1.22 while the root + v2transport go.mod files already
required 1.23.2).
2026-05-14 17:32:02 -07:00
Olaoluwa Osuntokun
e59dfeb949 multi: bump in-tree go.mod files to newly tagged submodule versions
In this commit, we pin every in-tree go.mod to the freshly cut submodule
tags ahead of a btcd point release: btcec/v2.4.0, btcutil/v1.2.0,
btcutil/psbt/v1.2.0, and chaincfg/chainhash/v1.2.0. The btcec bump also
drags secp256k1 up to v4.4.0 (and blake256 to v1.1.0 transitively) for
every module that imports btcec.

v2transport stays at v1.0.1 since no v2transport code changed since the
last tag, but its go.mod is bumped here so the workspace resolves to a
consistent set of internal deps.
2026-05-14 17:02:20 -07:00
Calvin Kim
0f603feffa main: update go.mod and go.sum
We update go.mod and go.sum to point to the local btcutil library.

This commit should be updated later on so that we do it right.
2026-05-14 16:16:14 -07:00
Olaoluwa Osuntokun
939b9394dc btcutil: add new AddressPayToAnchor addr type 2026-05-12 10:56:34 -07:00
Olaoluwa Osuntokun
5f415da375
build: remove replace directives left over after BIP 324 PRs 2025-06-06 15:50:48 -07:00
Olaoluwa Osuntokun
48058b0d8d
v2transport+btcd: update to btcec v2.3.5 2025-06-03 17:03:19 -07:00
Eugene Siegel
824e163e1e server.go+peer: enable v2 functionality in peer code
This adds the v2 software flag to the list of services btcd supports
and adds functionality to optionally use v2 transport if the peer
supports it.
2025-05-26 13:46:25 -07:00
Olaoluwa Osuntokun
9c841eddbc
build: add rapid as a dep 2025-03-18 11:18:39 -05:00
Kim
ca8059b59d bump go mod versions 2025-02-10 16:37:15 +09:00
Oliver Gugger
cefeeaa6b6
mod+rpcserver: bump to latest version of btcec 2024-07-23 10:57:08 +02:00
Robert
139669066c
Sending RPC requests through unix sockets (#2168)
Sending RPC requests through unix sockets
2024-06-26 16:42:49 -04:00
yyforyongyu
fbe65bfc01
gomod: run go mod tidy for all modules
Also add the `make tidy-module` copied from `lnd`.
2024-01-15 17:22:42 +08:00
Olaoluwa Osuntokun
d64de4a905
build: update to btcutil v1.1.5 2023-12-30 16:24:53 -08:00
Olaoluwa Osuntokun
c3c3545f9b
multi: update main package to chainhash/v1.1.0, use optimized dsha256
In this commit, we update the top-level btcd package to use the latest
version of btcutil and also the chainhash package. With this version
bump, we can now use the new optimized dsha256 routine where applicable.

With this commit, I've covered most of the areas we'll hash an entire
transaction/block/header, but we may want to optimize some other areas
further, in particular, the witness sighash calc.
2023-12-19 15:01:55 -08:00
Olaoluwa Osuntokun
e22513c237
btcutil: update to chaincfg/chainhash/v1.1.0 2023-12-15 14:42:29 -08:00
ClaytonNorthey92
d988b86027 Added test for client.GetChainTxStatsAsync() in rpcclient. This sets up a test websocket server to run the tests. Also, ensure these are run within a timeout, since they rely on concurrency 2023-11-02 16:16:11 -04:00
Tim Kuijsten
3faf68c8c5 go mod tidy 2022-04-09 07:22:22 -04:00
Olaoluwa Osuntokun
c203b940f3
build: update to btcec/v2.1.3 and chaincfg/chainhash v1.0.1
In this commit, we update the top level module to use the newly tagged
sub-modules. Once we remove the circular dependant in these sub-modules,
then we'll no longer have to do things like this.
2022-03-15 18:48:50 -07:00
Olaoluwa Osuntokun
30d58b98a1
build: add temporary replace directives for btcec+chainhash
This PR includes some changes to them, so we'll need to use a temporary
replace directives to ensure the build passes.
2022-03-15 18:23:47 -07:00
Olaoluwa Osuntokun
6fc4199ee4
txscript: add new RawTxInTapscriptSignature to generate tapsript sigs
In this commit, we add a new function `RawTxInTapscriptSignature` that
will be used to generate signatures in the _tapscript_ context. Note
that this differs from top-level taproot as a distinct sighash is used,
and we _always_ accept a root hash to perform the proper tweak.
2022-03-15 18:23:08 -07:00
Olaoluwa Osuntokun
abeaf4e334
txscript: introduce new signatureVerifier interface to abstract over schnorr/ecdsa
In this commit, we add a new signatureVerifier interface that will allow
us to consolidate a lot of code as we'll now have 4 distinct sig+sighash
types to verify:
  1. pre-segwit
  2. segwit v0
  3. segwit v1 (taproot key spend)
  4. tapscript spends

We'll need to be able to handle 3 of the cases for the modified
OP_CHECKSIG operator. This new abstraction allows us to keep the
implementation of the function somewhat succinct.

In this commit we implement a verifier for #3 which is needed to verify
the top-level taproot keyspend. We expose the verifier using a new
VerifyTaprootKeySpend function.
2022-03-15 18:22:48 -07:00
Olaoluwa Osuntokun
3baa09f33e
build: update to btcec/v2.1.1 and chaincfg/chainhash/v1.00 2022-03-09 18:54:03 -08:00
Oliver Gugger
999514c1fe
mod: add TODOs for removing local replaces 2022-03-09 11:58:43 +01:00
Oliver Gugger
46f5eec021
mod: bump btcec/v2 module version 2022-03-09 11:58:43 +01:00
Oliver Gugger
56dfa0f7e2
mod: add temporary replace 2022-03-09 11:58:42 +01:00
Oliver Gugger
4ad74cd4c2
mod: use chaincfg/chainhash module 2022-03-09 11:58:39 +01:00
Anup Chenthamarakshan
87e3d7e278 Replace github.com/btcsuite/goleveldb with github.com/syndtr/goleveldb 2022-03-08 10:07:52 -08:00
Olaoluwa Osuntokun
7572beb481
build: retract bogus tags from btcd fork
Fixes https://github.com/btcsuite/btcd/issues/1791.
2022-02-04 15:54:43 -08:00
Olaoluwa Osuntokun
0847f7a476
build: update to btcec v2.1.0
This was the version tagged that created the new `ecdsa` and `schnorr`
packages. Updating these pinned version lets importers properly use
these packages and build. Things build as is since we use replace
directive to point to the latest version _in the repo_ when we build.
2022-02-01 12:52:14 -08:00
Olaoluwa Osuntokun
eee3c3b337
multi: switch project over to using btcec/v2 2022-01-26 16:10:17 -08:00
Olaoluwa Osuntokun
161863e7fc
btcutil: update modules to replace to top-level btcd repo
Now that the new `btcutil/v1.0.0` tag has been pushed, we update the new
internal modules to point to the top-level `btcd` repo via replace
directives.
2022-01-11 14:21:39 -08:00
Olaoluwa Osuntokun
caac0f821a
multi: update btcutil imports to point to new sub-module
In this commit, we update all the btcutil imports to point to the new
sub-module.

In the same commit, we also modify the recently added `btcutil/go.mod`
file as we need to continue pointing to the _old_ version of btcd, until
we merge this PR and push a new tag.
2022-01-10 18:44:58 -08:00
Calvin Kim
3be166e3ae go.mod, go.sum: Update goleveldb
Goleveldb recently had a PR in where memory allocation was reduced
drastically (github.com/syndtr/goleveldb/pull/367).  Update goleveldb
to use that PR.
2021-11-30 09:35:11 -05:00
Olaoluwa Osuntokun
7ae5b74dee
build: bump min Go version to 1.16.8 add Go 1.17.1 2021-09-15 18:19:34 -07:00
Wilmer Paulino
f133593b93
build: update btcutil dependency 2021-03-29 16:59:44 -07:00
Jake Sylvestre
297c6120bb ci: add go 1.15 to tests 2020-09-17 01:38:18 -04:00
Javed Khan
875b51c9fb peer: knownInventory, sentNonces - use generic lru
While here, also rename and generalize limitMap and apply to
other maps which need to be bounded.
2020-07-08 16:44:04 -04:00
David Hill
bc8d63bf15 build: update deps 2020-05-13 08:52:05 -04:00
Olaoluwa Osuntokun
e159f05c6e
build: use go 1.13.x in travis 2019-09-25 18:43:43 -07:00
Olaoluwa Osuntokun
b8cdcc3ffc
build: update to latest version of btcutil
In this commit, we update to the latest version of btcutil which
contains a bug fix for filter matching, and as optimizations speed up
both filter matching and constructions.
2019-04-25 17:38:31 -07:00
Olaoluwa Osuntokun
2bdd957fe1
build: update to latest version of btcutil
In this commit, we update to the latest version of `btcutil`. This version
contains a bug fix for the neutrino filter generation. The implementation
within `btcutil` didn't fully comply with the BIP specification as it
included some OP_RETURN outputs, rather than excluding them all. As a
result, any active `btcd` node on mainnet/testnet will need to _drop their
entire `cfindex`_ and re-index after this is merged in.
2019-02-12 18:36:55 -08:00
Conner Fromknecht
2ecf0619f2
build: tidy go modules 2018-11-30 13:52:58 -08:00
Conner Fromknecht
852b39bd6d
build: add go.mod and go.sum for 1.11 modules 2018-11-29 17:34:23 -08:00