btcd v0.22.0-beta
This release of btcd is primarily to act as a catchup for the various changes that have accumulated.
Verifying the Release
In order to verify the release, you'll need to have gpg or gpg2 installed on your system. Once you've obtained a copy (and hopefully verified that as well), you'll first need to import the keys that have signed this release if you haven't done so already:
Once you have the required PGP keys, you can verify the release (assuming manifest-v0.22.0-beta.txt and manifest-v0.22.0-beta.txt.sig are in the current directory) with:
gpg --verify manifest-v0.22.0-beta.txt.sig
You should see the following if the verification was successful:
gpg: assuming signed data in 'manifest-v0.22.0-beta.txt'
gpg: Signature made Tue 08 Jun 2021 10:07:53 AM EDT
gpg: using DSA key 0DB39EAF526568682088EEDFB15210D35378BD54
gpg: Good signature from "John C. Vernaleo <[email protected]>" [ultimate]
That will verify the signature of the manifest file, which ensures integrity and authenticity of the archive you've downloaded locally containing the binaries. Next, depending on your operating system, you should then re-compute the sha256 hash of the archive with shasum -a 256 <filename>, compare it with the corresponding one in the manifest file, and ensure they match exactly.
Verifying the Release Binaries
As of this release, our release binaries are fully reproducible thanks to go1.13! Third parties are now able to verify that the release binaries were produced properly without having to trust the release manager(s). See our reproducible builds guide for how this can be achieved. The release binaries are compiled with go1.16.5, which is required by verifiers to arrive at the same ones.
Finally, you can also verify the tag itself with the following command:
git verify-tag v0.22.0-beta
You should see something along the lines of this in the case of a valid tag:
gpg: Signature made Tue 08 Jun 2021 09:42:52 AM EDT
gpg: using DSA key 0DB39EAF526568682088EEDFB15210D35378BD54
gpg: Good signature from "John C. Vernaleo <[email protected]>" [ultimate]
Building the Contained Release
Users are able to rebuild the target release themselves without having to fetch any of the dependencies. In order to do so, assuming that vendor.tar.gz and btcd-source-v0.22.0-beta.tar.gz are in the current directory, follow these steps:
tar -xvzf vendor.tar.gz
tar -xvzf btcd-source-v0.22.0.tar.gz
GO111MODULE=on go install -v -mod=vendor
GO111MODULE=on go install -v -mod=vendor ./cmd/btcctl
The -mod=vendor flag tells the go build command that it doesn't need to fetch the dependencies, and instead, they're all enclosed in the local vendor directory.
Additionally, it's also possible to use the enclosed release.sh script to bundle a release for a specific system like so:
BTCBUILDSYS="linux-arm64 darwin-amd64" ./build/release/release.sh
Release Notes
Protocol and network-related changes:
-
Added support for witness tx and block in
notfoundmsg. (#1625) -
Added support for receiving
sendaddrv2messages from a peer. (#1670) -
Fixed bug in
peerpackage causing last block height to go backwards. (#1606) -
Added chain parameters for connecting to the public Signet network. (#1692, #1718)
Also added
--signetcommand line flag tobtcctlandbtcdutilities.
Crypto changes:
- Fixed bug causing panic due to bad R and S signature components in
btcec.RecoverCompact. (#1691) - Set the name (
secp256k1) in the CurveParams of the S256 curve. (#1565)
Notable developer-related package changes:
-
Improve gc for
txscript.IsUnspendablemethod. (#1615)Significantly reduced allocations, which should bring a performance gain during sync.
-
Used
RLock/RUnlockwhen possible in theaddrmgrpackage. (#1697) -
Removed unknown block version warning in the
blockchainpackage, due to false positives triggered by AsicBoost. (#1463) -
Added proper types for flag field and improve docs, for
msgtxin thewirepackage. (#1632) -
Added
chaincfg.RegisterHDKeyIDfunction to populate HD key ID pairs. (#1617) -
Fixed flaky hash cache test due to resetting RNG. (#1689)
-
Added new method
mining.AddWitnessCommitmentto add the witness commitment as anOP_RETURNoutput within the coinbase transaction. (#1716)
RPC changes:
-
Implemented Batch JSON-RPC in
rpcclientand server. (#1583)Please refer to
rpcclient/examples/bitcoincorehttpbulk/README.mdfor examples. -
Implemented
rpcclientmethod to invokegetdescriptorinfoJSON-RPC command. (#1578) -
Updated the
rpcserverhandler forvalidateaddressJSON-RPC command to have parity with the bitcoind 0.20.0 interface. (#1613) -
Implemented
rpcclientmethod to invokegetblockfilterJSON-RPC command. (#1579) -
Implemented
signmessagewithprivkeyJSON-RPC command in rpcserver. (#1585) -
Implemented
rpcclientmethod to invokeimportmultiJSON-RPC command. (#1579) -
Implemented
watchOnlyargument inrpcclientmethod to invokelisttransactionsJSON-RPC command. (#1628) -
Updated
btcjson.ListTransactionsResultfor compatibility with Bitcoin Core 0.20.0. (#1626)Two new fields
BlockHeightandLabelwere added as optional, to keep backwards compatibility. -
Implemented nullable optional JSON-RPC parameters. (#1594)
Fixed command marshalling dropping params that follow params with
nilvalue. -
Implemented
rpcclientand server method to invokegetnodeaddressesJSON-RPC command. (#1590) -
Implemented
rpcclientmethods to invoke PSBT JSON-RPC commands. (#1596)The
walletcreatefundedpsbtandwalletprocesspsbtcommands were implemented. -
Implemented
rpcclientmethod to invokelistsinceblockwith theinclude_watchonlyparameter enabled. (#1451) -
Implemented
rpcclientmethod to invokederiveaddressesJSON-RPC command. (#1631) -
Implemented
rpcclientmethod to invokegetblocktemplateJSON-RPC command. (#1629)The corresponding
btcjsonstructs were also updated to reflect changes in Bitcoin Core. -
Implemented
rpcclientmethod to invokegetaddressinfoJSON-RPC command. (#1633) -
Implemented
rpcclientmethod to invokegetwalletinfoJSON-RPC command. (#1638) -
Fixed error message in rpcserver when an unknown RPC command is encountered. (#1695)
-
Fixed error message returned by
estimatefeewhen the number of blocks exceeds the max depth. (#1678) -
Updated
btcjson.GetBlockChainInfoResultto include new fields in Bitcoin Core. (#1676)Two new fields
InitialBlockDownloadandSizeOnDiskwere added. -
Added
ExtraHeadersinrpcclient.ConnConfigstruct. (#1669)It's useful when the RPC provider needs customized headers, for example, the
X-Auth-Tokenheader. -
Fixed bitcoind compatibility issue with the
sendrawtransactionJSON-RPC command. (#1659) -
Added new JSON-RPC errors to
btcjsonpackage, and documented them. (#1648) -
Implemented
rpcclientmethod to invokecreatewalletJSON-RPC command. (#1650)This is also the first
rpcclientmethod that uses the functional options pattern, which will be used more and more in future. -
Implemented
rpcclientmethods to invokebackupwallet,dumpwallet,loadwalletandunloadwalletJSON-RPC commands. (#1645) -
Fixed unmarshalling error in
getmininginfoJSON-RPC command, for valid integers in scientific notation. (#1644) -
Implemented
rpcclientmethod to invokegettxoutsetinfoJSON-RPC command. (#1641) -
Implemented
rpcclientmethod to invokesignrawtransactionwithwalletJSON-RPC command. (#1642) -
Added
txidtogetblocktemplateresponse of rpcserver. (#1639) -
Fixed monetary unit used in
createrawtransactionJSON-RPC command in rpcserver. (#1614) -
Added
rawtxfield tobtcjson.GetBlockVerboseTxResultto provide backwards compatibility with older versions of Bitcoin Core. (#1677)
Misc changes:
- Updated
btcutildependency. (#1704) - Updated documentation links to use https://pkg.go.dev instead of http://godoc.org. (#1693)
- Added Dockerfile to build and run btcd on Docker. (#1465)
- Reworked documentation and published on https://btcd.readthedocs.io. (#1468)
- Added support for Go 1.15. (#1619)
- Added Go 1.14 as the minimum supported version of Golang. (#1621)
- Removed unnecessary
GOMAXPROCSfunction calls. (#1627) - Enabled Go Race detector and code coverage on GitHub Actions. (#1601)
Changelog
The full list of changes since v0.21.0-beta can be found here:
Contributors (Alphabetical Order)
10gic
Andrew Tugarinov
Anirudha Bose
Appelberg-s
Armando Ochoa
Aurèle Oulès
Calvin Kim
Christian Lehmann
Conner Fromknecht
Dan Cline
David Mazary
Elliott Minns
Federico Bond
Friedger Müffke
Gustavo Chain
Hanjun Kim
Henry Fisher
Iskander Sharipov
Jake Sylvestre
Johan T. Halseth
John C. Vernaleo
Liran Sharir
Mikael Lindlof
Olaoluwa Osuntokun
Oliver Gugger
Rjected
Steven Kreuzer
Torkel Rogstad
Tristyn
Victor Lavaud
Vinayak Borkar
Wilmer Paulino
Yaacov Akiba Slama
ebiiim
ipriver
wakiyamap
yyforyongyu