diff options
| author | fanquake <[email protected]> | 2020-04-30 18:06:51 +0800 |
|---|---|---|
| committer | fanquake <[email protected]> | 2020-04-30 18:50:26 +0800 |
| commit | 64673b1037d60d5f2c9818085ff4d77b883ed44b (patch) | |
| tree | bbf245d2938208f83b24a7e6191d949e84a8836a /src/test/fuzz/integer.cpp | |
| parent | Merge #18810: doc: update rest info on block size and json (diff) | |
| parent | test: add test for witness commitment index (diff) | |
| download | discoin-64673b1037d60d5f2c9818085ff4d77b883ed44b.tar.xz discoin-64673b1037d60d5f2c9818085ff4d77b883ed44b.zip | |
Merge #18780: validation: add const for minimum witness commitment size
692f8307fc1449299b90182e7d79efb81a55d7ab test: add test for witness commitment index (fanquake)
06442549f8b725f46c1c727e9eb6fde6b843503c validation: Add minimum witness commitment size constant (fanquake)
Pull request description:
https://github.com/bitcoin/bitcoin/commit/16101de5f33be494019a3f81755e204d00c22347: Per [BIP 141](https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#Commitment_structure), the witness commitment structure is at least 38 bytes,
OP_RETURN (0x6a) + 36 (0x24) + 4 byte header (0xaa21a9ed) + 32 byte
SHA256 hash. It can be longer, however any additional data has no
consensus meaning.
https://github.com/bitcoin/bitcoin/commit/54f8c48d6ac973024df35c4db038791b7958a51d: As per BIP 141, if there is more than 1 pubkey that matches the witness
commitment structure, the one with the highest output index should be
chosen. This adds a sanity check that we are doing that, which will fail
if anyone tries to "optimize" GetWitnessCommitmentIndex() by returning
early.
ACKs for top commit:
MarcoFalke:
ACK 692f8307fc1449299b90182e7d79efb81a55d7ab 🌵
jonatack:
Code review ACK 692f830
ajtowns:
ACK 692f8307fc1449299b90182e7d79efb81a55d7ab
jnewbery:
utACK 692f8307fc1449299b90182e7d79efb81a55d7ab
laanwj:
ACK 692f8307fc1449299b90182e7d79efb81a55d7ab
Tree-SHA512: 7af3fe4b8a52fea2cdd0aec95f7bb935351a77b73d934bc88d6625a3503311b2a062cba5190b2228f97caa76840db3889032d910fc8e318ca8e7810a8afbafa0
Diffstat (limited to 'src/test/fuzz/integer.cpp')
0 files changed, 0 insertions, 0 deletions