Commit Graph

3816 Commits

Author SHA1 Message Date
Oliver Gugger
acb731389d
Merge pull request #1907 from ellemouton/bumpWithnessItemPerInputMax
wire: increase max witness items per input
2022-11-01 13:00:55 +01:00
Elle Mouton
6a03eb372b
wire: increase max witness items per input 2022-11-01 13:43:52 +02:00
Olaoluwa Osuntokun
fc47c31b45
txscript: modify TweakTaprootPrivKey to operate on private key copy
In this commit, we fix an inadvertent mutation bug that would at times
cause the private key passed into the tweak function to actually be
*modified* in place.

We fix this by accepting the value instead of a pointer. The actual
private key struct itself contains no pointer fields, so this is
effectively a deep copy via dereference.

We also add a new unit test that fails w/o this change, to show that the
private key was indeed being modified.
2022-10-27 16:19:56 -07:00
Olaoluwa Osuntokun
2cc19083f2
Merge pull request #1894 from Roasbeef/musig2-1-0
btcec/schnorr/musig2: update to musig 1.0.0
2022-10-25 16:52:33 -07:00
Olaoluwa Osuntokun
eef9fbc5c9
btcec/schnorr/musig2: always pass in priv key for early nonce gen
This helps mitigate an issue discovered in musig2 under certain
scenarios:
https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-October/021000.html.
2022-10-25 16:34:17 -07:00
Olaoluwa Osuntokun
323871ff16
btcec/musig2: remove old canned test vector code 2022-10-20 17:58:04 -07:00
Olaoluwa Osuntokun
5d895bbea5
btcec/schnorr/musig2: add sig combine test vectors 2022-10-20 17:58:00 -07:00
Olaoluwa Osuntokun
ca28a98425
btcec/schnorr/musig2: add sig verify+sign test vectors 2022-10-20 17:57:57 -07:00
Olaoluwa Osuntokun
cc12483f0a
btcec/schnorr/musig2: add key tweak sign test vectors 2022-10-20 17:57:55 -07:00
Olaoluwa Osuntokun
4e55273815
btcec/schnorr/musig2: update key agg test vectors to musig2 1.0.0 2022-10-20 17:57:52 -07:00
Olaoluwa Osuntokun
3d9f4484df
btcec/schnorr/musig: update nonce test vectors to musig2 1.0.0 2022-10-20 17:57:50 -07:00
Olaoluwa Osuntokun
1567f20055
btcec/schnorr/musig2: update to musig 1.0.0
The major change in musig 1.0.0 is that plain public keys are used as
input to key aggregation.
2022-10-20 17:57:46 -07:00
Olaoluwa Osuntokun
a34e777916
btcec/schnorr/musig2: update musig2 impl to version 0.7.0
The two _concrete_ changes between version 0.4.0 (where we are before
this commit), and version 0.7.0 are:

  1. Variable length messages are now allowed, this comes with a new 8
     byte prefix for the messages.

     * Our implementation was already using a `[]byte` for the
       message/hash, so no extra API changes are needed here.

  2. The serialization for a blank message and a normal message (for
     nonce gen) is now distinct. A single byte is added (either 0 or 1)
     to indicate if a message was passed into nonce generation.
2022-10-20 17:57:42 -07:00
David Vennik
e563459b72 Fixed ban bug that doesn't print numTxns
(cherry picked from commit 11c8d11a26d14a64fe6e412313624b6bfc5b4e2c)
2022-10-10 10:34:58 -04:00
Olaoluwa Osuntokun
6b5418d585
Merge pull request #1898 from Roasbeef/v0-23-2-branch
build: bump version to v0.23.2
2022-10-09 18:35:58 -07:00
Olaoluwa Osuntokun
1a4af39ab0
build: bump version to v0.23.2
This includes the recent fix to the wire witness wire parsing bug.
2022-10-09 18:23:11 -07:00
Olaoluwa Osuntokun
d0aa7473a6
Merge pull request #1896 from Roasbeef/witness-wire-hot-fix
wire: remove erroneous witness size check in wire parsing
2022-10-09 18:21:33 -07:00
Olaoluwa Osuntokun
f523d4ccaa
wire: remove erroneous witness size check in wire parsing
In this commit, we fix a bug that would cause nodes to be unable to
parse a given block from the wire. The block would be properly accepted
if fed in via other mechanisms.

The issue here is that the old checks for the maximum witness size,
circa segwit v0 where placed in the wire package _as well_ as the tx
engine. This check should only be in the engine, since it's properly
gated by other related scrip validation flags.

The fix itself is simple: limit witnesses only based on the maximum
block size in bytes, or ~4MB.
2022-10-09 18:09:02 -07:00
Tochi Obudulu
38ee9a41c8 build: bump golang base image version to 1.17
Image fails to build on 1.16
2022-09-13 09:06:06 -04:00
Victor Shyba
ef4a8d310b doc: fix Tor hidden service setup link 2022-09-13 09:04:55 -04:00
George Tsagkarelis
d827d0240a
wire: add outpoint string parser unit tests 2022-08-17 19:22:33 +03:00
George Tsagkarelis
571f9c69ec
wire: add string parser to outpoint 2022-08-17 18:25:24 +03:00
Olaoluwa Osuntokun
0f49e10006
Merge pull request #1866 from darioush/bump-btcutils-versions
Bump btcd version in btcutil package
2022-08-10 17:21:39 -07:00
Olaoluwa Osuntokun
da4b534ed9
Merge pull request #1865 from sputn1ck/musig2_0.3.0
MuSig2: Catch up to 0.4.0
2022-08-10 17:20:47 -07:00
sputn1ck
06ce9608aa
btcec/schnorr/musig2: add infinity testvectors
This commit adds the testvectors from
20ba03106d
2022-08-09 06:44:42 +02:00
sputn1ck
44eb8c64f8
btcec/schnorr/musig2: Allow infinity nonces
This commit updates the musig2 module to allow
infinity nonces, as per Musig2 0.4.0.
2022-08-09 06:44:25 +02:00
sputn1ck
4b2fe9f83e
btcec/schnorr/musig2: Add CombineSig testvectors
This commit adds the testvectors from
cdc3520c07
2022-08-04 11:55:19 +02:00
sputn1ck
5e960074ea
btcec/schnorr/musig2: Add PartialSigVerify testvectors
Adds testvectors from
ebb6a7454b
and
6788ee5412
2022-08-04 11:51:02 +02:00
sputn1ck
85356e8174
btcec/schnorr/musig2: Throw error on invalid partial sig 2022-08-04 11:49:29 +02:00
sputn1ck
53f47d65f1
btcec/schnorr/musig2: Add Sign test vectors
This commit adds the testvectors from
4c06f31daf
to the testcases
2022-08-04 11:49:17 +02:00
sputn1ck
8b59e7aa6b
btcec/schnorr/musig2: Add AggregateNonce testvectors
This commit adds the testvectors from
0ec2aefdaa
to the testcases
2022-08-04 11:46:52 +02:00
sputn1ck
1b85a60b6d
btcec/schnorr/musig2: Add AggregateKeys testvectors
This commit adds the testvectors from
20f60b0f37
to the testcases
2022-08-04 11:44:25 +02:00
sputn1ck
478a2f78c4
btcec/schnorr/musig2: Add nonce generation testcases
This commit adds the testcases specified under version 0.3.1 from
https://github.com/jonasnick/bips/blob/musig2/bip-musig2.mediawiki#change-log

and the fixes from
79438fd604
2022-08-04 11:38:20 +02:00
sputn1ck
4ad819e7af
btcec/schnorr/musig2: Update to MuSig 0.3.0
This commit changes the i's in GenNonces to 0 and 1 as per
https://github.com/jonasnick/bips/blob/musig2/bip-musig2.mediawiki#change-log
0.3
2022-08-04 11:34:10 +02:00
sputn1ck
3376655b9c
btcec/schnorr/musig2: XOR rand with secret key
This commit XORs the secret key (if a secret key is specified)
with the random bytes as per MuSig2 Spec
(https://github.com/jonasnick/bips/blob/musig2/bip-musig2.mediawiki#nonce-generation-1)
2022-08-04 11:32:57 +02:00
Darioush Jalali
149b0f09aa
go mod tidy in btcetc/ 2022-07-11 16:36:12 -07:00
Darioush Jalali
3ec3acc6fb
go mod tidy in btcutil/ 2022-07-11 16:30:53 -07:00
Darioush Jalali
f46068f38e
bump version to v0.23.0 2022-06-30 15:59:56 -07:00
Darioush Jalali
d9c09e0315
Bump btcd version in btcutil package 2022-06-28 17:21:46 -07:00
Olaoluwa Osuntokun
04aac1ec7d
Merge pull request #1863 from Roasbeef/version-bump-23-1
build: bump version to v0.23.1
2022-06-07 10:40:35 -07:00
Olaoluwa Osuntokun
e6f6ba4593
build: bump version to v0.23.1
Includes:
  * A fix in the RPC server: https://github.com/btcsuite/btcd/pull/1862
  * Rolling back a breaking change fromteh PoV of the rpcclient: https://github.com/btcsuite/btcd/pull/1844
2022-06-06 16:16:49 -07:00
Olaoluwa Osuntokun
8fc2d707f6
Merge pull request #1862 from bhandras/rpccliet-fix2
rpcclient: fix missing return
2022-06-06 16:09:32 -07:00
Olaoluwa Osuntokun
1696c63888
Merge pull request #1844 from chappjc/getnewaddress-rpcclient-revert
rpcclient: add getnewaddresstype and revert breaking change
2022-06-06 16:08:50 -07:00
Andras Banki-Horvath
b2af7770e9
rpcclient: fix missing return 2022-06-03 14:58:20 +02:00
Olaoluwa Osuntokun
b5fb9b05c8
Merge pull request #1860 from Roasbeef/version-bump-23
build: bump version to v0.23
2022-06-02 14:13:29 -07:00
Olaoluwa Osuntokun
2ce3069953
build: bump version to v0.23.0 2022-05-31 17:56:23 -07:00
Olaoluwa Osuntokun
fd7f41cdc5
Merge pull request #1840 from ellemouton/exportCheckStandardnessFunc
mempool: export checkStandardness func
2022-05-26 14:50:18 -07:00
Olaoluwa Osuntokun
cee92e09ad
Merge pull request #1856 from bhandras/rpcclient-fix
rpcclient: fix crash in http retry handler
2022-05-17 14:59:29 -07:00
Andras Banki-Horvath
97313ac873
rpcclient: save the last error when retrying 2022-05-13 15:35:14 +02:00
Andras Banki-Horvath
9babf1fa08
rpcclient: fix backoff logic
This commit removes Sleep() from the rety handler so that the shutdown
request is always respected. Furthermore the maximum retry count is corrected.
2022-05-13 15:35:14 +02:00