An alternative full node bitcoin implementation written in Go (golang)
Find a file
Olaoluwa Osuntokun dd169fe0c3
Merge pull request #2656 from Roasbeef/codex/btcd-v0.27.0
build: prepare v0.27.0 release version
2026-10-21 18:39:17 -05:00
.gemini .gemini: add styleguide.md 2025-07-16 11:46:18 +00:00
.github build: upgrade Go toolchain to 1.27.3 2026-10-21 11:50:14 -05:00
address Merge pull request #2631 from fametrano/simnet-base58-fallback 2026-10-22 07:00:03 +08:00
addrmgr multi: use new v2 modules everywhere 2026-05-14 18:05:33 -07:00
blockchain Merge pull request #2575 from Roasbeef/trailing-relax 2026-07-21 17:17:23 -07:00
btcec build: upgrade Go toolchain to 1.27.3 2026-10-21 11:50:14 -05:00
btcjson btcjson: accept null in StringOrArray.UnmarshalJSON 2026-05-30 16:47:18 +09:00
btcutil hdkeychain: reject invalid child results 2026-10-22 06:13:07 +08:00
chaincfg build: upgrade Go toolchain to 1.27.3 2026-10-21 11:50:14 -05:00
chainhash build: upgrade Go toolchain to 1.27.3 2026-10-21 11:50:14 -05:00
cmd build: bump btcd and btcctl to v0.27.0 2026-10-21 18:11:42 -05:00
connmgr server+connmgr: make outbound startup deterministic 2026-07-21 16:45:44 -07:00
database multi: use new v2 modules everywhere 2026-05-14 18:05:33 -07:00
docs multi: use new v2 modules everywhere 2026-05-14 18:05:33 -07:00
integration multi: gofmt with Go 1.27 2026-10-12 15:29:08 -07:00
internal multi: switch to github.com/decred/dcrd/container/lru 2026-10-12 15:30:12 -07:00
limits multi: Run gofmt on the entire repository 2023-06-21 22:31:09 +09:00
mempool mempool: move MockTxMempool into a mempooltest package 2026-10-12 15:29:38 -07:00
mining multi: use new v2 modules everywhere 2026-05-14 18:05:33 -07:00
netsync netsync: avoid clock tick race in sync state test 2026-07-02 01:18:38 -05:00
ossec harden btcd on OpenBSD 2022-04-09 07:22:22 -04:00
peer multi: switch to github.com/decred/dcrd/container/lru 2026-10-12 15:30:12 -07:00
psbt psbt: reject conflicting input UTXOs 2026-10-22 05:20:36 +08:00
release docs: publish release notes with the signed tag 2026-10-21 18:28:58 -05:00
rpcclient multi: replace btcsuite/go-socks with an x/net/proxy wrapper 2026-10-12 15:30:12 -07:00
scripts build: add a weekly check of the Go version policy 2026-10-12 15:29:08 -07:00
txscript txscript: align signature opcode validation 2026-10-22 06:21:18 +08:00
v2transport build: upgrade Go toolchain to 1.27.3 2026-10-21 11:50:14 -05:00
wire build: upgrade Go toolchain to 1.27.3 2026-10-21 11:50:14 -05:00
.gitignore multi: update make and CI goals with new packages 2026-05-14 18:05:33 -07:00
.golangci.yml golangci: add configuration file for linting 2025-08-05 18:39:30 +09:00
btcd.go main: add flag to write execution traces 2024-11-20 17:50:51 +09:00
CHANGES fix typos (#2100) 2024-03-25 09:44:25 -04:00
config.go multi: replace btcsuite/go-socks with an x/net/proxy wrapper 2026-10-12 15:30:12 -07:00
config_test.go config: apply --torisolation to --proxy without credentials 2026-10-12 15:30:12 -07:00
doc.go doc: correct comments 2023-12-20 11:41:55 -05:00
Dockerfile build: upgrade Go toolchain to 1.27.3 2026-10-21 11:50:14 -05:00
go.mod build: pin v0.27.0 nested module releases 2026-10-21 18:26:18 -05:00
go.sum build: pin v0.27.0 nested module releases 2026-10-21 18:26:18 -05:00
LICENSE Update license 2025-01-14 19:58:46 -08:00
log.go server: centralize inbound handshake admission 2026-07-18 00:17:55 -05:00
Makefile build: run the v2transport tests in CI 2026-10-12 15:30:12 -07:00
params.go multi: use new v2 modules everywhere 2026-05-14 18:05:33 -07:00
README.md docs: clarify Go security patch version floors 2026-10-21 12:05:00 -05:00
rpcadapters.go multi: use new v2 modules everywhere 2026-05-14 18:05:33 -07:00
rpcserver.go multi: switch from btcsuite/websocket to gorilla/websocket 2026-10-12 15:30:12 -07:00
rpcserver_test.go mempool: move MockTxMempool into a mempooltest package 2026-10-12 15:29:38 -07:00
rpcserverhelp.go btcjson: add Warnings field to GetBlockChainInfoResult 2026-05-11 17:22:00 -07:00
rpcserverhelp_test.go Relicense to the btcsuite developers. 2015-05-01 12:00:56 -05:00
rpcwebsocket.go rpcserver: time out websocket writes 2026-10-12 15:30:12 -07:00
rpcwebsocket_test.go rpcserver: detect unexpected replies before websocket shutdown 2026-10-12 15:36:45 -07:00
sample-btcd.conf config: reject non-positive maxpeers 2026-07-21 16:45:44 -07:00
SECURITY.md btcd: add SECURITY.md 2023-12-30 16:24:59 -08:00
server.go multi: switch to github.com/decred/dcrd/container/lru 2026-10-12 15:30:12 -07:00
server_test.go multi: replace btcsuite/go-socks with an x/net/proxy wrapper 2026-10-12 15:30:12 -07:00
service_windows.go multi: replace btcsuite/winsvc with golang.org/x/sys/windows/svc 2026-10-12 15:30:12 -07:00
signal.go btcd: Simplify shutdown signal handling logic. (#733) 2016-08-11 13:39:23 -05:00
signalsigterm.go multi: Run gofmt on the entire repository 2023-06-21 22:31:09 +09:00
upgrade.go multi: Simplify code per gosimple linter. 2016-11-03 13:00:35 -05:00
upnp.go chore: fix some comments 2024-08-09 16:51:11 +08:00
version.go build: bump btcd and btcctl to v0.27.0 2026-10-21 18:11:42 -05:00
version_test.go version: preserve semantic version separators 2026-07-21 19:06:49 -07:00

btcd

Build Status Coverage Status ISC License GoDoc

btcd is an alternative full node bitcoin implementation written in Go (golang).

This project is currently under active development and is in a Beta state. It is extremely stable and has been in production use since October 2013.

It properly downloads, validates, and serves the block chain using the exact rules (including consensus bugs) for block acceptance as Bitcoin Core. We have taken great care to avoid btcd causing a fork to the block chain. It includes a full block validation testing framework which contains all of the 'official' block acceptance tests (and some additional ones) that is run on every pull request to help ensure it properly follows consensus. Also, it passes all of the JSON test data in the Bitcoin Core code.

It also properly relays newly mined blocks, maintains a transaction pool, and relays individual transactions that have not yet made it into a block. It ensures all individual transactions admitted to the pool follow the rules required by the block chain and also includes more strict checks which filter transactions based on miner requirements ("standard" transactions).

One key difference between btcd and Bitcoin Core is that btcd does NOT include wallet functionality and this was a very intentional design decision. See the blog entry here for more details. This means you can't actually make or receive payments directly with btcd. That functionality is provided by the btcwallet and Paymetheus (Windows-only) projects which are both under active development.

Requirements

Go 1.26.10 or newer.

Go version policy

btcd is built with the newest Go release and requires the previous one, which still receives point releases. Both are kept at the latest point release of their branch:

  • CI, the Docker images and release binaries are built with Go 1.27.3, the GO_VERSION in .github/workflows/main.yml.
  • The go line in every go.mod, which sets the minimum Go version and the language version, is Go 1.26.10.

The go directive sets only a minimum version, so it cannot encode the patched release floor for each supported Go branch. Use Go 1.26.10 or newer on the Go 1.26 branch, and Go 1.27.3 or newer on the Go 1.27 branch. Go 1.27.0 through 1.27.2 do not include the CVE-2026-111943 mitigation.

Both are bumped when Go publishes a point release, and both move up a branch when a new major version of Go is released. A weekly CI job checks this against the releases listed on go.dev; make check-go-versions runs the same check locally.

Installation

https://github.com/btcsuite/btcd/releases

Linux/BSD/MacOSX/POSIX - Build from Source

  • Install Go according to the installation instructions here: http://golang.org/doc/install

  • Ensure Go was installed properly and is a supported version:

$ go version
$ go env GOROOT GOPATH

NOTE: The GOROOT and GOPATH above must not be the same path. It is recommended that GOPATH is set to a directory in your home directory such as ~/goprojects to avoid write permission issues. It is also recommended to add $GOPATH/bin to your PATH at this point.

  • Run the following commands to obtain btcd, all dependencies, and install it:
$ cd $GOPATH/src/github.com/btcsuite/btcd
$ go install -v . ./cmd/...
  • btcd (and utilities) will now be installed in $GOPATH/bin. If you did not already add the bin directory to your system path during Go installation, we recommend you do so now.

Updating

Linux/BSD/MacOSX/POSIX - Build from Source

  • Run the following commands to update btcd, all dependencies, and install it:
$ cd $GOPATH/src/github.com/btcsuite/btcd
$ git pull
$ go install -v . ./cmd/...

Getting Started

btcd has several configuration options available to tweak how it runs, but all of the basic operations described in the intro section work with zero configuration.

Linux/BSD/POSIX/Source

$ ./btcd

IRC

  • irc.libera.chat
  • channel #btcd
  • webchat

Issue Tracker

The integrated github issue tracker is used for this project.

Documentation

The documentation is a work-in-progress. It is located in the docs folder.

Release Verification

Please see our documentation on the current build/verification process for all our releases for information on how to verify the integrity of published releases using our reproducible build system.

License

btcd is licensed under the copyfree ISC License.