Skip to content

Commit d8db6b3

Browse files
authored
Merge branch 'bitcoin:master' into bip-0376
2 parents 8c38c9e + 178ba65 commit d8db6b3

40 files changed

Lines changed: 9311 additions & 24811 deletions

README.mediawiki

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,6 +1254,13 @@ users (see also: [https://en.bitcoin.it/wiki/Economic_majority economic majority
12541254
| Hunter Beast, Ethan Heilman, Isabel Foxen Duke
12551255
| Specification
12561256
| Draft
1257+
|-
1258+
| [[bip-0361.mediawiki|361]]
1259+
| Consensus (soft fork)
1260+
| Post Quantum Migration and Legacy Signature Sunset
1261+
| Jameson Lopp, Christian Papathanasiou, Ian Smith, Joe Ross, Steve Vaile, Pierre-Luc Dallaire-Demers
1262+
| Informational
1263+
| Draft
12571264
|- style="background-color: #cfffcf"
12581265
| [[bip-0370.mediawiki|370]]
12591266
| Applications
@@ -1387,6 +1394,13 @@ users (see also: [https://en.bitcoin.it/wiki/Economic_majority economic majority
13871394
| Ava Chow
13881395
| Informational
13891396
| Draft
1397+
|- style="background-color: #ffcfcf"
1398+
| [[bip-0391.mediawiki|391]]
1399+
| Applications
1400+
| Binary Output Descriptors
1401+
| SeedHammer
1402+
| Specification
1403+
| Closed
13901404
|-
13911405
| [[bip-0392.mediawiki|392]]
13921406
| Applications

bip-0054.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Given a block at height `N`:
6464
or equal to the value of the timestamp of the block at height `N-2015` (T<sub>N</sub> &ge;
6565
T<sub>N−2015</sub>).
6666

67-
A limit is set on the number of potentially executed signature operations in validating a
67+
A limit is set on the number of signature operations present in the scripts used to validate a
6868
transaction. It applies to all transactions in the block except the coinbase transaction[^1]. For
6969
each input in the transaction, count the number of `CHECKSIG` and `CHECKMULTISIG` in the input
7070
scriptSig and previous output's scriptPubKey, including the P2SH redeemScript. If the total summed
@@ -123,7 +123,10 @@ validation will need to be re-activated from block 1,983,702. A simple way to pr
123123
mandate that future coinbase transactions vary from coinbase transactions before [bip-0034][BIP34]
124124
activation. There are multiple ways of achieving this, but setting and enforcing the timelock for
125125
the coinbase transaction makes it so all coinbase transactions past Consensus Cleanup activation
126-
could not have been valid before this height and therefore cannot be a duplicate[^11].
126+
could not have been valid before this height and therefore cannot be a duplicate[^11]. This
127+
simplifies both reasoning and client implementation, since the [bip-0030][BIP30] check can be
128+
skipped entirely past Consensus Cleanup activation, regardless of the [bip-0034][BIP34] activation
129+
status[^12].
127130

128131
## Backward compatibility
129132

@@ -218,6 +221,10 @@ bip-0034 height commitment and the corresponding future block height.
218221
coinbase transactions as not having duplicate past Consensus Cleanup activation would be consistent
219222
for any implementation which enforces `nLockTime` from the genesis block, which is the behaviour
220223
notably of Bitcoin Core but also of all other implementations the authors are aware of.
224+
[^12]: For instance Bitcoin Core only disables [bip-0030][BIP30] validation for a specific chain
225+
where [bip-0034][BIP34] violations have been manually inspected (see [here][Core validation.cpp
226+
BIP34]). Without the guarantee given by enforcing the timelock on coinbase transactions, this would
227+
have to be perpetuated for the Consensus Cleanup.
221228

222229
[BIP30]: https://github.com/bitcoin/bips/blob/master/bip-0030.mediawiki
223230
[BIP-XXXX]: https://github.com/TheBlueMatt/bips/blob/7f9670b643b7c943a0cc6d2197d3eabe661050c2/bip-XXXX.mediawiki
@@ -242,3 +249,4 @@ notably of Bitcoin Core but also of all other implementations the authors are aw
242249
[Core 29.0]: https://bitcoincore.org/en/releases/29.0
243250
[inquisition-implem]: https://github.com/darosior/bitcoin/tree/2509_inquisition_consensus_cleanup
244251
[Core 30.0]: https://bitcoincore.org/en/releases/30.0
252+
[Core validation.cpp BIP34]: https://github.com/bitcoin/bitcoin/blob/390e7d61bd531505bb3d13f38316c282b85ed1dd/src/validation.cpp#L2401-L2459

bip-0054/test_vectors/coinbases.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,5 @@
7676
"valid": false,
7777
"comment": "Block at height 4 with coinbase's nLockTime set to block's nTime minus 1 and maximum non-final nSequence."
7878
}
79-
]
79+
]
80+

bip-0054/test_vectors/sigops.json

Lines changed: 100 additions & 83 deletions
Large diffs are not rendered by default.

bip-0054/test_vectors/timestamps.json

Lines changed: 4134 additions & 24253 deletions
Large diffs are not rendered by default.

bip-0054/test_vectors/txsize.json

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,67 @@
11
[
22
{
3+
"comment": "A 63-byte legacy transaction.",
34
"tx": "0200000001827da3d85a6547d6b03662d2cb86982d655a6f390547285a3bf9ec9f28e0c8831500000000ffffffff0100000000000000000300515200000000",
4-
"valid": true,
5-
"comment": "A 63-byte legacy transaction."
5+
"valid": true
66
},
77
{
8+
"comment": "A 61-byte legacy transaction with a witness.",
89
"tx": "02000000000101827da3d85a6547d6b03662d2cb86982d655a6f390547285a3bf9ec9f28e0c8831500000000ffffffff01000000000000000000010000000000",
9-
"valid": true,
10-
"comment": "A 61-byte legacy transaction with a witness."
10+
"valid": true
1111
},
1212
{
13+
"comment": "A 64-byte legacy transaction (4 bytes in spk).",
1314
"tx": "0200000001827da3d85a6547d6b03662d2cb86982d655a6f390547285a3bf9ec9f28e0c8831500000000ffffffff010000000000000000040051525400000000",
14-
"valid": false,
15-
"comment": "A 64-byte legacy transaction (4 bytes in spk)."
15+
"valid": false
1616
},
1717
{
18+
"comment": "A 64-byte legacy transaction (4 bytes in scriptsig).",
1819
"tx": "0200000001827da3d85a6547d6b03662d2cb86982d655a6f390547285a3bf9ec9f28e0c883150000000403424242ffffffff010040075af07507000000000000",
19-
"valid": false,
20-
"comment": "A 64-byte legacy transaction (4 bytes in scriptsig)."
20+
"valid": false
2121
},
2222
{
23+
"comment": "A 65-byte legacy transaction.",
2324
"tx": "0200000001827da3d85a6547d6b03662d2cb86982d655a6f390547285a3bf9ec9f28e0c8831500000000ffffffff01000000000000000005005152545800000000",
24-
"valid": true,
25-
"comment": "A 65-byte legacy transaction."
25+
"valid": true
2626
},
2727
{
28+
"comment": "A 64-byte Segwit transaction.",
2829
"tx": "02000000000101827da3d85a6547d6b03662d2cb86982d655a6f390547285a3bf9ec9f28e0c8831500000000ffffffff01000000000000000004005152540108213245576281941200000000",
29-
"valid": false,
30-
"comment": "A 64-byte Segwit transaction."
30+
"valid": false
3131
},
3232
{
33+
"comment": "A 64-byte Segwit transaction (1 p2tr input, 1 p2a output).",
3334
"tx": "02000000000101827da3d85a6547d6b03662d2cb86982d655a6f390547285a3bf9ec9f28e0c8831500000000ffffffff0100000000000000000451024e7301415a78b5a14a2527feb02c08b8124e74c3b9bcc1bd3dba1fbfa87f1c930f28a46fea2bf375105dfd835e212c9127aad4976c46ef86be02edbb681e6f38f9a9e06f0100000000",
34-
"valid": false,
35-
"comment": "A 64-byte Segwit transaction (1 p2tr input, 1 p2a output)."
35+
"valid": false
3636
},
3737
{
38+
"comment": "A 64-byte Segwit transaction (1 p2tr input with annex, 1 OP_RETURN output).",
39+
"tx": "02000000000101827da3d85a6547d6b03662d2cb86982d655a6f390547285a3bf9ec9f28e0c8831500000000ffffffff010000000000000000046a02ab0102415a78b5a14a2527feb02c08b8124e74c3b9bcc1bd3dba1fbfa87f1c930f28a46fea2bf375105dfd835e212c9127aad4976c46ef86be02edbb681e6f38f9a9e06f01064242ffab212100000000",
40+
"valid": false
41+
},
42+
{
43+
"comment": "Historical 64-byte transaction 892f44a49de6f5b212cdbea514d09e692d9fed5d897f37bcef14bd0eedebf193",
3844
"tx": "0200000001deb98691723fa71260ffca6ea0a7bc0a63b0a8a366e1b585caad47fb269a2ce401000000030251b201000000010000000000000000016a00000000",
39-
"valid": false,
40-
"comment": "Historical 64-byte transaction 892f44a49de6f5b212cdbea514d09e692d9fed5d897f37bcef14bd0eedebf193"
45+
"valid": false
4146
},
4247
{
48+
"comment": "Historical 64-byte transaction bbf71454857438c6dfd64c0d92a7c5360a8d8d57c9202f5806449e5b0d26b848",
4349
"tx": "01000000010d0afe3d74062ee60c0ec55579d691d8c8af5c04eb97b777157a21a8c5fb143d00000000035101b100000000010000000000000000016a01000000",
44-
"valid": false,
45-
"comment": "Historical 64-byte transaction bbf71454857438c6dfd64c0d92a7c5360a8d8d57c9202f5806449e5b0d26b848"
50+
"valid": false
4651
},
4752
{
53+
"comment": "Historical 64-byte transaction 6713d61a83e3d095582211ea8d6db452ac7561e863decba7c4046fb9f6d88aa0",
4854
"tx": "02000000011658a33df410379bb512206659910c9fbd0e50bfb732f7be9936558ff036919401000000035101b201000000010000000000000000016a00000000",
49-
"valid": false,
50-
"comment": "Historical 64-byte transaction 6713d61a83e3d095582211ea8d6db452ac7561e863decba7c4046fb9f6d88aa0"
55+
"valid": false
5156
},
5257
{
58+
"comment": "Historical 64-byte transaction 7f2efc6546011ad3227b2da678be0d30c7f4b08e2ce57b5edadd437f9e27a612",
5359
"tx": "02000000011a7a4cf262fb7e53e2e6e0b2ef8b763f6ee97d8681ca968d1938418d56e6c38700000000035101b201000000010000000000000000016a00000000",
54-
"valid": false,
55-
"comment": "Historical 64-byte transaction 7f2efc6546011ad3227b2da678be0d30c7f4b08e2ce57b5edadd437f9e27a612"
60+
"valid": false
5661
},
5762
{
63+
"comment": "Historical 64-byte transaction 5302e01dc4b7e34314a34c7c3347107e612b9524be684d388cd4d2ca35ff1ec9",
5864
"tx": "01000000019222bbb054bb9f94571dfe769af5866835f2a97e883959fa757de4064bed8bca01000000035101b100000000010000000000000000016a01000000",
59-
"valid": false,
60-
"comment": "Historical 64-byte transaction 5302e01dc4b7e34314a34c7c3347107e612b9524be684d388cd4d2ca35ff1ec9"
65+
"valid": false
6166
}
62-
]
67+
]

bip-0158/gentestvectors.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313
"encoding/json"
1414
"fmt"
1515
"io"
16-
"io/ioutil"
1716
"os"
1817
"path/filepath"
1918

@@ -164,7 +163,7 @@ func main() {
164163

165164
writerFile = writer
166165

167-
cert, err := ioutil.ReadFile(defaultBtcdRPCCertFile)
166+
cert, err := os.ReadFile(defaultBtcdRPCCertFile)
168167
if err != nil {
169168
fmt.Println("Couldn't read RPC cert: ", err.Error())
170169
return

0 commit comments

Comments
 (0)