Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump to v0.24.0 #5

Merged
merged 243 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
243 commits
Select commit Hold shift + click to select a range
571f9c6
wire: add string parser to outpoint
GeorgeTsagk Aug 16, 2022
d827d02
wire: add outpoint string parser unit tests
GeorgeTsagk Aug 16, 2022
fc47c31
txscript: modify TweakTaprootPrivKey to operate on private key copy
Roasbeef Oct 27, 2022
f6279ea
btcec/schnorr/musig2: add pk option to NonceGen
sputn1ck Nov 1, 2022
c5b3ed6
btcec/schnorr/musig2: add public key to secnonce
sputn1ck Nov 1, 2022
d99a169
btcec/schnorr/musig2: add pubkey check to Sign
sputn1ck Nov 1, 2022
586729c
btcutil/psbt: add method Packet.GetTxFee
ffranr Nov 3, 2022
63835cb
Merge pull request #1916 from ffranr/add_gettxfee
guggero Nov 7, 2022
14bb56f
Merge pull request #1905 from Roasbeef/taptweak-mutation
guggero Nov 8, 2022
a8244f5
btcec/schnorr: use private key copy for BIP-340 signatures
Roasbeef Nov 9, 2022
108fcf7
Merge pull request #1919 from Roasbeef/sign-mutate
Roasbeef Nov 9, 2022
31ecaff
Merge pull request #1913 from sputn1ck/musig2_update
Roasbeef Nov 9, 2022
55e40f4
btcec/schnorr/musig2: fix BenchmarkPartialVerify
Roasbeef Nov 9, 2022
4350859
Merge pull request #1920 from Roasbeef/musig2-benchmark-fix
Roasbeef Nov 10, 2022
866b3dc
base58: fix decoding issue
guggero Nov 18, 2022
02c854e
Merge pull request #1923 from guggero/base58-fix
guggero Nov 18, 2022
6c93f9f
Update Dockerfile to Alpine 3.16
guiand888 Nov 20, 2022
52b6eb4
Update Docker documentation towards building your own image
guiand888 Nov 20, 2022
1d6e578
chainhash: JSON marshal hash as string
ffranr Dec 2, 2022
718d268
Merge pull request #1932 from ffranr/chainhash_json
guggero Dec 5, 2022
977712a
Merge pull request #1924 from guiand888/patch-1
Roasbeef Jan 6, 2023
1d77730
[connmgr] remove pending entry on failed connection
hxw May 13, 2020
016b3ad
Update mining.md (#1938)
jagottsicher Jan 20, 2023
f6e8292
txscript: fix sighash bug in RawTxInTaprootSignature
Roasbeef Jan 24, 2023
5e0de1c
txscript: add new PayToTaprootScript function
Roasbeef Jan 25, 2023
d6efaa7
txscript: add tests for RawTxInTaprootSignature and RawTxInTapscriptS…
Roasbeef Jan 24, 2023
be056b0
Merge pull request #1941 from Roasbeef/sighash-taproot-keyspend-bug-fix
Roasbeef Jan 25, 2023
734ab73
psbt: export Bip32 encode/decode functions
guggero Jan 27, 2023
2dbc98b
psbt: fix formatting and typos
guggero Jan 27, 2023
19c7c3d
psbt: allow Unknowns in outputs
guggero Jan 27, 2023
5ebbb1b
psbt: encode global unknowns
guggero Jan 27, 2023
6c81c66
psbt: use pointer slice for global unknowns
guggero Jan 27, 2023
bb0a2f3
psbt: add unit test for unknowns
guggero Jan 27, 2023
ecf98ce
Merge pull request #1942 from guggero/psbt-export
guggero Feb 2, 2023
52082fc
docs: Update Go version as per the Readme.
hristog Feb 10, 2023
902f797
txscript: Fix typo in IsUnspendable() comment
kcalvinalvin Feb 13, 2023
e1e4196
txscript: allow script builder capacity to be specified
guggero Feb 27, 2023
3833196
Merge pull request #1954 from guggero/script-builder-alloc
guggero Feb 28, 2023
a18c2cf
Export MakeScritpNum, AsSmallInt, and IsSmallInt
martonp Mar 3, 2023
d628705
btcd: Add memory profiling flag
kcalvinalvin Jul 27, 2021
b554add
psbt: add verification method for psbt input data
ziggie1984 Mar 20, 2023
72ea23e
chainhash: JSON Unmarshal hash from appropriate string.
LindenWang01 Feb 21, 2023
e0e4916
Supplementary chainhash test cases
LindenWang01 Feb 24, 2023
7975168
Merge pull request #1964 from ziggie1984/psbt-nil-pointer-bug
guggero Mar 22, 2023
42653cd
txscript: fix script typos
hieblmi Mar 4, 2023
d48e864
Merge pull request #1957 from hieblmi/fix-typos
guggero Apr 20, 2023
52ede32
chaincfg: Update checkpoints
kcalvinalvin Apr 14, 2023
cfb39f7
blockchain: Use slices when fetching utxos
kcalvinalvin Apr 27, 2023
5ede256
blockchain: Add benchmark for using a map vs a slice
kcalvinalvin May 5, 2023
218c475
main: Update README.md's minimum go version
kcalvinalvin May 5, 2023
1287f1e
Merge pull request #1953 from kcalvinalvin/add-memory-profiling
guggero May 10, 2023
98e3c49
Merge pull request #1972 from kcalvinalvin/utxoview-use-slices
guggero May 11, 2023
c1a713e
docs: Update minimum Go version
kcalvinalvin May 22, 2023
4749f7a
Merge pull request #1977 from kcalvinalvin/fix-readme-min-version
Roasbeef May 24, 2023
9c16d23
Merge pull request #1879 from GeorgeTsagk/wire/outpoint-parse-string
Roasbeef May 25, 2023
e4c88c3
rpc: Add ScriptPubKeyResult address field
lindlof May 19, 2022
ba54076
multi: Run gofmt on the entire repository
kcalvinalvin May 16, 2023
253b688
Merge pull request #1981 from kcalvinalvin/2023-05-16-run-gofmt
Roasbeef Jun 21, 2023
599d361
blockchain+chaincfg: disable retargeting for regtest
guggero May 23, 2023
7fd5c1e
Merge pull request #1985 from guggero/pow-no-retargeting
guggero Jun 22, 2023
e160bb6
multi: remove repetitive the
cuishuang Jun 26, 2023
f9cbff0
Merge pull request #1998 from web3-explore/master
guggero Jun 26, 2023
00d0edd
blockchain: intro HeaderCtx, ChainCtx + refactor CheckBlockHeaderContext
Crypt-iQ Nov 28, 2022
ee6c0e1
blockchain: export CheckBlockHeaderSanity as a library function
Crypt-iQ Nov 28, 2022
f5eeb10
Merge pull request #1931 from Crypt-iQ/export_header_funcs
Roasbeef Jun 29, 2023
725b36b
btcutil: format BTC amounts with trailing zeroes
C-Otto Jun 18, 2023
4933e35
Merge pull request #1996 from C-Otto/trailing-zeroes
Roasbeef Jul 10, 2023
8f84bb0
musig2: fix early nonce gen option
sputn1ck Jul 10, 2023
883a03d
musig2: add early nonce gen KnownSigners test
sputn1ck Jul 10, 2023
7faa9b2
Merge pull request #2003 from sputn1ck/musig2_fix_early_nonce_gen
Roasbeef Jul 11, 2023
b84f084
blockchain: Add InactiveTips() to blockindex
kcalvinalvin Nov 6, 2022
46bfb78
blockchain: Add ChainTips() method to BlockChain
kcalvinalvin Nov 7, 2022
892ae67
btcjson, main: Implement the getchaintips call
kcalvinalvin Nov 7, 2022
e2d9e20
docs: Update json_rpc_api.md for getchaintips rpc
kcalvinalvin Nov 11, 2022
fc99e96
rpcclient, integration: Add test for getchaintips call
kcalvinalvin Nov 12, 2022
7f0fb2a
psbt: finalizer add proper sighash flag
Eoous Jul 14, 2023
3a9e7e2
Merge pull request #2006 from 0xEclair/sig_hash_type
Roasbeef Jul 23, 2023
6f93d9f
Merge pull request #1969 from lindlof/rpc-address-align
guggero Aug 3, 2023
3ba9fee
blockchain, btcutil/bloom: BuildMerkleTreeStore returns chainhash.Hash
kcalvinalvin Aug 3, 2023
2bb6824
blockchain: Add RollingMerkleTree
cfromknecht Jan 17, 2019
2d23f94
blockchain: Add benchmarks for Merkle root calculation
cfromknecht Jan 17, 2019
025fa65
blockchain: Add CalcMerkleRoot
cfromknecht Apr 23, 2019
ecfbb7e
blockchain, rpctest, mining, main: replace usage of BuildMerkleTreeSt…
cfromknecht Apr 23, 2019
880d9f9
schnorr: correct rfc reference in docs
wydengyre Aug 3, 2023
f258d0c
database/ffldb: Change scanBlockFiles behavior
kcalvinalvin Jan 24, 2023
6d38900
txscript/engine: add execution stepCallback
halseth May 9, 2023
5c5bef0
txscript/engine_debug_test: add TestDebugEngine
halseth Aug 1, 2023
d776d9c
Merge pull request #2016 from wydengyre/fix-docs-rfc6979
Roasbeef Aug 9, 2023
0aaa7c5
Merge pull request #1979 from kcalvinalvin/merkle-calc-fast
Roasbeef Aug 10, 2023
ab9338d
schnorr: bip-340 compliant verification
wydengyre Aug 12, 2023
0bed86b
Merge pull request #2018 from wydengyre/bip340-schnorr-verification
Roasbeef Aug 14, 2023
1c0bc47
schnorr: bip-340 compliant signing
wydengyre Aug 15, 2023
201b608
Merge pull request #1980 from halseth/script-callback
Roasbeef Aug 15, 2023
40d7a0a
Merge pull request #2022 from wydengyre/bip-340-signing
Roasbeef Aug 15, 2023
5c1dd21
database/ffldb: Add PruneBlocks to db interface
kcalvinalvin Jan 24, 2023
57ec43f
blockchain: Add pruning support
kcalvinalvin Apr 27, 2023
0212c33
wire, main: Add SFNodeNetworkLimited flag
kcalvinalvin Jan 26, 2023
02469e1
main: Add prune flag
kcalvinalvin Jan 26, 2023
a1736b4
main: Disable enabling both --prune and --txindex
kcalvinalvin Mar 2, 2023
57903c7
main: Disable enabling both --prune and --addrindex
kcalvinalvin Apr 3, 2023
aaedc11
database, database/ffldb: add BeenPruned() method
kcalvinalvin Aug 22, 2023
56f3463
main: force user to enable pruning if database is already pruned
kcalvinalvin Aug 22, 2023
47261ef
main: fetch prune status from db for handleGetBlockChainInfo
kcalvinalvin Aug 22, 2023
e27fcac
blockchain/indexers: add functions to report init status
kcalvinalvin Aug 22, 2023
f161a31
main: force the user to drop tx and addr indexes for pruning
kcalvinalvin Aug 22, 2023
8f8040e
main: return error if user requests addr or tx index while pruned
kcalvinalvin Aug 22, 2023
65c7299
main: cfindex related sanity checks when enabled with pruning
kcalvinalvin Aug 22, 2023
ec401d0
Merge pull request #1971 from kcalvinalvin/add-pruning
Roasbeef Aug 23, 2023
3627816
chainhash: add support to legacy-marshaled hashes
Beerosagos Aug 23, 2023
87552dd
gitignore: ignore vim files
yyforyongyu Aug 30, 2023
f12a0b3
Merge pull request #2025 from Beerosagos/hash-unmarshal
Roasbeef Sep 1, 2023
d4f519f
gomod: clean go mod files
yyforyongyu Aug 30, 2023
d62d537
rpcclient: remove redundant params used in `handleSendPostMessage`
yyforyongyu Aug 30, 2023
3a8b851
rpcclient: catch shutdown signal when sending requests
yyforyongyu Aug 31, 2023
80f5a0f
Merge pull request #2028 from yyforyongyu/catch-shutdown
Roasbeef Sep 5, 2023
1012f1e
wire: add NodeNetworkLimitedBlockThreshold const
kcalvinalvin Sep 25, 2023
d3d0682
integration: add test to check prune status
kcalvinalvin Oct 12, 2023
520d45e
fixup! integration: add test to check prune status
kcalvinalvin Oct 16, 2023
a35a687
Merge pull request #2043 from kcalvinalvin/2023-10-12-add-integration…
guggero Oct 16, 2023
8677a14
fix typos in sighash.go
kevinheavey Oct 20, 2023
ad26585
Update LICENSE
davidcardenasus Oct 17, 2023
1a61555
blockchain: export CheckSerializedHeight, reduce allocs for cb height
Crypt-iQ Jun 6, 2023
e16cdb6
Merge pull request #2051 from Crypt-iQ/txscript_alloc_cb_change
Roasbeef Oct 31, 2023
0e795fb
fix: default forward port
Eoous Oct 2, 2023
208800c
Added tests for FutureGetBestBlockHashResult.Receive
ClaytonNorthey92 Oct 26, 2023
d988b86
Added test for client.GetChainTxStatsAsync() in rpcclient. This sets…
ClaytonNorthey92 Oct 26, 2023
d15dd71
added tests for GetBestBlockHashAsync
ClaytonNorthey92 Nov 6, 2023
375f79d
chainhash: Add DoubleHashRaw
kcalvinalvin May 5, 2023
a09e7b2
wire: add HasFlag method
kcalvinalvin Nov 7, 2023
b4992fe
netsync: change isSyncCandidate behavior to include pruned nodes
kcalvinalvin Sep 25, 2023
f7e9fba
Merge pull request #1918 from kcalvinalvin/2022-11-06-implement-getch…
Roasbeef Nov 15, 2023
f396b3d
blockchain: better Ancestor with skiplists
kcalvinalvin Nov 17, 2023
4171854
Fix typos
xiaolou86 Nov 20, 2023
6ea604d
Fix typos on signature.go
EvanTedesco Nov 28, 2023
a4236c5
schnorr: simplify some signing math
wydengyre Oct 12, 2023
7520523
Correct comments in singature.go
jcvernaleo Nov 29, 2023
ac068e7
Merge pull request #1688 from kcalvinalvin/add-blockindex-parentskips
Roasbeef Dec 7, 2023
9091065
Update petertodd seed DNS to .net
petertodd Dec 8, 2023
55ac06b
Merge pull request #2035 from kcalvinalvin/2023-09-25-change-is-sync-…
Roasbeef Dec 9, 2023
c9cda53
multi: remove use of GO111MODULE
guggero Sep 27, 2022
36637f9
git: add binaries to .gitignore file
guggero Sep 27, 2022
4f72645
make: add install and release-install goals
guggero Sep 27, 2022
e318551
blockchain: Add sizehelper
kcalvinalvin May 16, 2023
96c9fd8
Merge pull request #1978 from kcalvinalvin/memory-efficient-txhash
Roasbeef Dec 15, 2023
e22513c
btcutil: update to chaincfg/chainhash/v1.1.0
Roasbeef Dec 15, 2023
7745cbb
btcutl/gcs: update filter logic to use new DoubleHashRaw
Roasbeef Dec 15, 2023
28a816f
btcutil/psbt: update to chaincfg/chainhash/v1.1.0 + btcutil/v1.1.3
Roasbeef Dec 15, 2023
b434080
wire/bench_test: report allocs in benchmarks
cfromknecht Jan 25, 2020
a9edc32
wire/bench: add witness block
cfromknecht Jan 25, 2020
a371aeb
wire/common: optimize Read/WriteVarInt
cfromknecht Jan 25, 2020
6275db9
wire: introduce Read/WriteVarIntBuf to reuse buffers between invocations
cfromknecht Jan 25, 2020
e58aadc
wire/msgtx: use Read/WriteVarIntBuf in tx serialization
cfromknecht Jan 25, 2020
e12d32d
wire/msgtx: reuse tx-level buffer for version and locktime
cfromknecht Jan 25, 2020
7951aa5
wire/common: add optimized Read/WriteVarBytesBuf
cfromknecht Jan 25, 2020
b171012
wire/msgtx: introduce optimized read/writeOutPointBuf
cfromknecht Jan 25, 2020
d43d9d5
wire/msgtx: introduce optimized writeTxInBuf
cfromknecht Jan 25, 2020
4829ff7
wire/msgtx: use writeTxInBuf in txn encoding
cfromknecht Jan 25, 2020
99f6488
wire/msgtx: introduce optimized readScriptBuf
cfromknecht Apr 30, 2019
6f4a7a1
wire/msgtx: introduce optimized readTxInBuf
cfromknecht Apr 30, 2019
607eea1
wire/msgtx: use readTxInBuf in txn serialization
cfromknecht Jan 25, 2020
7c8844f
wire/msgtx: introduce optimized WriteTxOutBuf
cfromknecht Jan 25, 2020
48d31e5
wire/msgtx: use WriteTxOutBuf in txn serialization
cfromknecht Jan 25, 2020
aebc743
wire/msgtx: introduce optimized readTxOutBuf
cfromknecht Jan 25, 2020
24d4217
wire/msgtx: use readTxOutBuf in txn serialization
cfromknecht Jan 25, 2020
3bfd0c6
wire/msgtx: introduce optimized writeTxWitnessBuf
cfromknecht Jan 25, 2020
3a91303
wire/msgtx: use writeTxWitnessBuf in txn serialization
cfromknecht Jan 25, 2020
0cf8c19
wire/msgtx: use readScriptBuf in txn serialization
cfromknecht Jan 25, 2020
aa769e3
wire/bench_test: introduce optimized readBlockHeaderBuf
cfromknecht Jan 25, 2020
3cee06e
wire/blockheader: introduce optimized writeBlockHeaderBuf
cfromknecht Jan 25, 2020
674c220
wire/invvect: add optimized readInvVectBuf and writeInvVectBuf
cfromknecht Jan 25, 2020
4ebc651
wire/msggetblocks: optimize by reusing small buffer
cfromknecht Jan 25, 2020
ee1f807
wire/msgblock: use only one small buffer per block encode/decode
cfromknecht Jan 25, 2020
d8e0817
wire/msgblock: optimize DeserializeTxLoc by reusing small buffers
cfromknecht Jan 25, 2020
c0d35e6
wire/msggetheaders: optimize serialization by reusing small buffers
cfromknecht Jan 25, 2020
83675cb
wire/msgheaders: optimize serialization by reusing small buffers
cfromknecht Jan 25, 2020
d042fe0
wire/msggetcfheaders: use single small buffer for encode/decode
cfromknecht Jan 25, 2020
1c525db
wire/msgcfheaders: optimize encode/decode by using one small buffer
cfromknecht Jan 25, 2020
1990555
wire/msggetcfcheckpt: optimize by removing read/writeElement
cfromknecht Jan 25, 2020
f37f475
wire/msgcfcheckpt: optimize serialization by reusing small buffers
cfromknecht Jan 25, 2020
2383a04
wire/msginv: optimize by reusing small buffers
cfromknecht Jan 25, 2020
d6594da
wire/msggetdata: optimize serialization by reusing small buffers
cfromknecht Jan 25, 2020
ddeba60
wiree/msggetcfilters: optimize serialization by reusing small buffers
cfromknecht Jan 25, 2020
834febb
wire/msgcfilter: optimize serialization by reusing small buffers
cfromknecht Jan 25, 2020
efcf964
wire/msgnotfound: optimize serialization by reusing small buffers
cfromknecht Jan 25, 2020
1cd5e02
wire/invvect: remove unused readInvVect and writeInvVect
cfromknecht Jan 25, 2020
57daac3
wire/common: add optimized writeVarStrBuf an readVarStrBuf
cfromknecht Jan 25, 2020
dc4fbb0
wire/msgreject: optimize serialization by reusing small buffers
cfromknecht Jan 25, 2020
8bf07cc
wire/netaddress: add optimiezed read/writeNetAddressBuf
cfromknecht Jan 25, 2020
7207967
wire/msgmerkleblock: optimize serialization by reusing small buffers
cfromknecht Jan 25, 2020
3698f2d
wire/msgping: remove usage for read/writeElement
cfromknecht Jan 25, 2020
80ae5d3
wire/msgpong: remove usage of read/writeElement
cfromknecht Jan 25, 2020
da89ed6
wire/msgtx: remove unused writeTxWitness
cfromknecht Jan 25, 2020
f0184e5
wire/msgtx: remove unused writeTxIn
cfromknecht Jan 25, 2020
e0fa866
wire/msgtx: remove unused readTxIn
cfromknecht Jan 25, 2020
4cc4f76
wire/msgtx: remove unused readScript
cfromknecht Jan 25, 2020
2e6eefc
wire/msgtx: remove unused read/writeOutPoint
cfromknecht Jan 25, 2020
d7396dc
wire/msgtx: use tx-level script slab
cfromknecht Jan 25, 2020
8c4da83
wire/msgblock+msgtx: user block-level script slab
cfromknecht Jan 25, 2020
1f2dfa2
blockchain: Add mapslice
kcalvinalvin May 16, 2023
35c4268
blockchain: Add tfFresh to txoFlags
kcalvinalvin May 16, 2023
27cf702
blockchain: Add memoryUsage() method on UtxoEntry
kcalvinalvin May 16, 2023
fc65744
blockchain: Add utxoStateConsistency read and write functions
kcalvinalvin May 16, 2023
d86e79e
blockchain: Refactor dbPutUtxoView
kcalvinalvin Jul 21, 2023
953d62a
blockchain: Return early on nil utxo view in dbPutUtxoView
kcalvinalvin Jul 21, 2023
bcd8f54
blockchain: Require utxoBucket in dbFetchUtxoEntry
kcalvinalvin May 16, 2023
053ef33
blockchain: Refactor fetchInputUtxos
kcalvinalvin May 18, 2023
3c11e48
blockchain: Add utxocache
kcalvinalvin May 16, 2023
16cd44f
blockchain, netsync, main, cmd/addblock: Use utxocache
kcalvinalvin May 16, 2023
d387d16
database/ffldb: make PruneBlocks atomic
kcalvinalvin Aug 25, 2023
dd37dfa
blockchain: add flushNeededAfterPrune
kcalvinalvin Aug 25, 2023
ebc93a3
blockchain: flush the utxo cache on prune if needed
kcalvinalvin Aug 25, 2023
84bdd01
ffldb: change export_test.go to export.go
kcalvinalvin Oct 13, 2023
26b2e9d
blockchain: add test for InitConsistentState
kcalvinalvin Oct 15, 2023
87a81f1
blockchain: address nit comments
kcalvinalvin Dec 13, 2023
941e42c
Merge pull request #1955 from kcalvinalvin/utxocache-original
Roasbeef Dec 19, 2023
4c2ce6d
Merge pull request #2072 from Roasbeef/chainhash-v-1-1-0-btcutil
Roasbeef Dec 19, 2023
b2f340d
fix: enhance code comments (#2074)
threewebcode Dec 19, 2023
4126760
btcutil/psbt: update to btcutil btcutil/v1.1.4
Roasbeef Dec 19, 2023
c3c3545
multi: update main package to chainhash/v1.1.0, use optimized dsha256
Roasbeef Dec 19, 2023
adfb641
txscript: use DoubleHashRaw to write directly crypto.Hash for segwit …
Roasbeef Dec 19, 2023
046a701
txscript: use DoubleHashRaw for segwit sighash single calc
Roasbeef Dec 19, 2023
19008ed
txscript: use a single shared scratch buffer in segwit sighash calc
Roasbeef Dec 19, 2023
0d666ff
Merge pull request #2075 from Roasbeef/btcutil-psbt-update-dec-2023
Roasbeef Dec 19, 2023
4af0ca8
doc: correct comments
bodhi-crypo Dec 20, 2023
83605e4
btcutil: reuse serialized tx during TxHash
kcalvinalvin Aug 21, 2023
6e7680a
rpctest: fix formatting
guggero Dec 15, 2023
323cf1e
rpctest: fix test node directory
guggero Dec 15, 2023
d33ac28
rpctest: add more context to errors
guggero Dec 15, 2023
dd5f3bd
rpctest: make test TCP ports unique per process
guggero Dec 15, 2023
7644d14
blockchain: fix compilation issues with 32bit systems
guggero Dec 21, 2023
8766bfd
Merge pull request #2071 from guggero/integration-harness-fixes
guggero Dec 22, 2023
56de9ca
btcutil: align new serialization caching logic w/ codebase style
Roasbeef Dec 29, 2023
e102a81
btcutil: add benchmarks for Hash + WitnessHash
Roasbeef Dec 29, 2023
b0e9636
wire: consistently use defer for returning scratch buffers
Roasbeef Dec 29, 2023
790c570
Merge pull request #2081 from Roasbeef/dont-serialize-tx-for-txhash
Roasbeef Dec 29, 2023
16684f6
Merge pull request #2073 from Roasbeef/wire-opts
Roasbeef Dec 29, 2023
d64de4a
build: update to btcutil v1.1.5
Roasbeef Dec 29, 2023
bf23715
btcd: add SECURITY.md
Roasbeef Dec 31, 2023
3c24785
chaincfg: update mainnet block hashes
Roasbeef Dec 29, 2023
8d2ab63
build: bump version to btcd v0.24
Roasbeef Dec 29, 2023
4ec8f01
rpcclient: fix race condition in `doDisconnect`
Roasbeef Dec 31, 2023
b1b9420
Merge pull request #2082 from btcsuite/btcd-24
Roasbeef Dec 31, 2023
f5696a2
Merge tag 'v0.24.0' into bump-to-v0.24.0
ygaberman-px Jan 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,13 @@ coverage.txt
btcec/coverage.txt
btcutil/coverage.txt
btcutil/psbt/coverage.txt

# vim
*.swp

# Binaries produced by "make build"
/addblock
/btcctl
/btcd
/findcheckpoint
/gencerts
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ ARG ARCH=amd64
FROM golang@sha256:c80567372be0d486766593cc722d3401038e2f150a0f6c5c719caa63afb4026a AS build-container

ARG ARCH
ENV GO111MODULE=on

ADD . /app
WORKDIR /app
Expand All @@ -35,7 +34,7 @@ RUN set -ex \
&& echo "Compiling for $GOARCH" \
&& go install -v . ./cmd/...

FROM $ARCH/alpine:3.12
FROM $ARCH/alpine:3.16

COPY --from=build-container /go/bin /bin

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ISC License

Copyright (c) 2013-2022 The btcsuite developers
Copyright (c) 2013-2023 The btcsuite developers
Copyright (c) 2015-2016 The Decred developers

Permission to use, copy, modify, and distribute this software for any
Expand Down
23 changes: 18 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ GOACC_BIN := $(GO_BIN)/go-acc
LINT_COMMIT := v1.18.0
GOACC_COMMIT := 80342ae2e0fcf265e99e76bcc4efd022c7c3811b

DEPGET := cd /tmp && GO111MODULE=on go get -v
GOBUILD := GO111MODULE=on go build -v
GOINSTALL := GO111MODULE=on go install -v
DEPGET := cd /tmp && go get -v
GOBUILD := go build -v
GOINSTALL := go install -v
DEV_TAGS := rpctest
GOTEST_DEV = GO111MODULE=on go test -v -tags=$(DEV_TAGS)
GOTEST := GO111MODULE=on go test -v
GOTEST_DEV = go test -v -tags=$(DEV_TAGS)
GOTEST := go test -v

GOFILES_NOVENDOR = $(shell find . -type f -name '*.go' -not -path "./vendor/*")

Expand Down Expand Up @@ -71,6 +71,19 @@ build:
$(GOBUILD) $(PKG)/cmd/findcheckpoint
$(GOBUILD) $(PKG)/cmd/addblock

install:
@$(call print, "Installing all binaries")
$(GOINSTALL) $(PKG)
$(GOINSTALL) $(PKG)/cmd/btcctl
$(GOINSTALL) $(PKG)/cmd/gencerts
$(GOINSTALL) $(PKG)/cmd/findcheckpoint
$(GOINSTALL) $(PKG)/cmd/addblock

release-install:
@$(call print, "Installing btcd and btcctl release binaries")
env CGO_ENABLED=0 $(GOINSTALL) -trimpath -ldflags="-s -w -buildid=" $(PKG)
env CGO_ENABLED=0 $(GOINSTALL) -trimpath -ldflags="-s -w -buildid=" $(PKG)/cmd/btcctl

# =======
# TESTING
# =======
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ which are both under active development.

## Requirements

[Go](http://golang.org) 1.16 or newer.
[Go](http://golang.org) 1.17 or newer.

## Installation

Expand All @@ -63,7 +63,7 @@ recommended that `GOPATH` is set to a directory in your home directory such as

```bash
$ cd $GOPATH/src/github.com/btcsuite/btcd
$ GO111MODULE=on go install -v . ./cmd/...
$ go install -v . ./cmd/...
```

- btcd (and utilities) will now be installed in ```$GOPATH/bin```. If you did
Expand All @@ -79,7 +79,7 @@ $ GO111MODULE=on go install -v . ./cmd/...
```bash
$ cd $GOPATH/src/github.com/btcsuite/btcd
$ git pull
$ GO111MODULE=on go install -v . ./cmd/...
$ go install -v . ./cmd/...
```

## Getting Started
Expand Down
15 changes: 15 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Security Policy

## Supported Versions

The last major `btcd` release is to be considered the current support version.
Given an issue severe enough, a backport will be issued either to the prior
major release or the set of releases considered utilized enough.

## Reporting a Vulnerability

To report security issues, send an email to [email protected]
(this list isn't to be used for support).

The following key can be used to communicate sensitive information: `91FE 464C
D751 01DA 6B6B AB60 555C 6465 E5BC B3AF`.
2 changes: 1 addition & 1 deletion addrmgr/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/*
Package addrmgr implements concurrency safe Bitcoin address manager.

Address Manager Overview
# Address Manager Overview

In order maintain the peer-to-peer Bitcoin network, there needs to be a source
of addresses to connect to as nodes come and go. The Bitcoin protocol provides
Expand Down
2 changes: 1 addition & 1 deletion addrmgr/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var (
ipNet("192.168.0.0", 16, 32),
}

// rfc2544Net specifies the the IPv4 block as defined by RFC2544
// rfc2544Net specifies the IPv4 block as defined by RFC2544
// (198.18.0.0/15)
rfc2544Net = ipNet("198.18.0.0", 15, 32)

Expand Down
2 changes: 1 addition & 1 deletion blockchain/accept.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ package blockchain
import (
"fmt"

"github.com/btcsuite/btcd/database"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/database"
)

// maybeAcceptBlock potentially accepts a block into the block chain and, if
Expand Down
44 changes: 44 additions & 0 deletions blockchain/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"testing"

"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/wire"
)

// BenchmarkIsCoinBase performs a simple benchmark against the IsCoinBase
Expand All @@ -29,3 +30,46 @@ func BenchmarkIsCoinBaseTx(b *testing.B) {
IsCoinBaseTx(tx)
}
}

func BenchmarkUtxoFetchMap(b *testing.B) {
block := Block100000
transactions := block.Transactions
b.ResetTimer()

for i := 0; i < b.N; i++ {
needed := make(map[wire.OutPoint]struct{}, len(transactions))
for _, tx := range transactions[1:] {
for _, txIn := range tx.TxIn {
needed[txIn.PreviousOutPoint] = struct{}{}
}
}
}
}

func BenchmarkUtxoFetchSlices(b *testing.B) {
block := Block100000
transactions := block.Transactions
b.ResetTimer()

for i := 0; i < b.N; i++ {
needed := make([]wire.OutPoint, 0, len(transactions))
for _, tx := range transactions[1:] {
for _, txIn := range tx.TxIn {
needed = append(needed, txIn.PreviousOutPoint)
}
}
}
}

func BenchmarkAncestor(b *testing.B) {
height := 1 << 19
blockNodes := chainedNodes(nil, height)

b.ResetTimer()
for i := 0; i < b.N; i++ {
blockNodes[len(blockNodes)-1].Ancestor(0)
for j := 0; j <= 19; j++ {
blockNodes[len(blockNodes)-1].Ancestor(1 << j)
}
}
}
Loading
Loading