Commit graph

128 commits

Author SHA1 Message Date
sanket1729
14f93579a5 Add pegins and issuance test 2021-07-01 17:56:44 +00:00
sanket1729
edf8455fe4 Fix bug in CAssetIssuance decoding 2021-07-01 17:56:44 +00:00
sanket1729
6c985308d7 Implement Taphash in test framework 2021-07-01 17:56:44 +00:00
Andrew Poelstra
68bfd70b43 ci: various linter / CI compiler error fixes
Includes changing TRUE to OP_TRUE for anyone-can-spend output name,
to avoid symbol conflict on win64 builds, which is really obnoxious.
2021-03-26 17:33:04 +00:00
Andrew Poelstra
22cf380984 Merge a993a7c675 into merged_master (Elements PR #960)
Several conflicts in the C++ code related to the new `flags` parameter
to `CheckSignature` and the corresponding function being renamed upstream
to `CheckSignatureECDSA`.

Several conflicts in the test harness as Steven sorta pulled the new
upstream ECKey module into the Python code, and the actual upstream
code was slightly different. Also needed to update the feature_taproot
code to always use the non-RANGEPROOF sighash since dynafed is not
enabled in the Taproot test.

Also had to pull the `set_wif` method out of `ECKey` and inline it because
otherwise it triggers a "circular inclusion" error between script.py (which
would pull in `base58_to_bytes` from address.py) and address.py (which now
pulls in some taproot EC related stuff from script.py).

Noticed that #960 does not test the "sighash rangeproof flag set but no
witnesses" case.
2021-03-25 23:46:21 +00:00
Steven Roose
b888f42270
tests: Add test feature_sighash_rangeproof.py 2021-02-22 15:19:10 +00:00
Andrew Poelstra
4cb66aae97 Merge 0b2abaa666 into merged_master (Bitcoin PR #19954) 2020-11-30 17:12:23 +00:00
Andrew Poelstra
ca42c615f0 Merge b99a1633b2 into merged_master (Bitcoin PR #19781) 2020-11-29 14:25:26 +00:00
Andrew Poelstra
81a3dda09b Merge c30f79d418 into merged_master (Bitcoin PR #19940) 2020-11-29 14:00:02 +00:00
Andrew Poelstra
897f8be4ef Merge bd60a9a8ed into merged_master (Bitcoin PR #19818) 2020-11-28 22:14:15 +00:00
Andrew Poelstra
9a200a587e Merge 505b39e72b into merged_master (Bitcoin PR #19610) 2020-11-28 20:35:13 +00:00
Andrew Poelstra
66ad009d69 Merge e80e5b3e4f into merged_master (Bitcoin PR #19760) 2020-11-28 13:25:26 +00:00
Andrew Poelstra
1aea27d291 Merge b4d0366b47 into merged_master (Bitcoin PR #19070) 2020-11-27 17:48:36 +00:00
Andrew Poelstra
c98788b086 Merge cb1ee1551c into merged_master (Bitcoin PR #19674) 2020-11-27 14:17:51 +00:00
Andrew Poelstra
e547a98b54 Merge ccef10261e into merged_master (Bitcoin PR #18044) 2020-11-26 17:01:52 +00:00
Andrew Poelstra
efaef30fdb Merge 631284f09a into merged_master (Bitcoin PR #19486) 2020-11-26 01:51:47 +00:00
Andrew Poelstra
5402e2ba19 Merge 67881de0e3 into merged_master (Bitcoin PR #19272) 2020-11-26 01:09:12 +00:00
Andrew Poelstra
927a580a42 Merge 07d0e0d59f into merged_master (Bitcoin PR #19044) 2020-11-26 01:08:55 +00:00
Andrew Poelstra
62a9d9569c Merge 7d32cce3e7 into merged_master (Bitcoin PR #19010) 2020-11-26 01:08:50 +00:00
Andrew Poelstra
b29efd4af5 Merge 3eda7ea9ba into merged_master (Bitcoin PR #18764) 2020-11-26 01:08:47 +00:00
Andrew Poelstra
9ac62395d7 Merge e45fb7e0d2 into merged_master (Bitcoin PR #18877) 2020-11-26 01:08:42 +00:00
Andrew Poelstra
b066f21047 Merge fd48e7ad99 into merged_master (Bitcoin PR #18585) 2020-11-26 01:08:30 +00:00
Andrew Poelstra
042d703f0b Merge 4ad6144ed0 into merged_master (Bitcoin PR #18672) 2020-11-26 01:08:26 +00:00
Andrew Poelstra
96af3c5b23 Merge d2882a012b into merged_master (Bitcoin PR #18610) 2020-11-26 01:08:25 +00:00
Andrew Poelstra
fd37b7c5d6 Merge 54f812d9d2 into merged_master (Bitcoin PR #18673) 2020-11-26 01:08:23 +00:00
Andrew Poelstra
9146c7899d Merge 59d6249290 into merged_master (Bitcoin PR #18593) 2020-11-26 01:08:17 +00:00
Andrew Poelstra
f3f386ffee Merge cf21293ef7 into merged_master (Bitcoin PR #18515) 2020-11-26 01:08:10 +00:00
Andrew Poelstra
f8e3be6cb7 Merge d52ba21dff into merged_master (Bitcoin PR #18481) 2020-11-26 01:08:06 +00:00
Andrew Poelstra
9587ad280d Merge 7e1fc03b18 into merged_master (Bitcoin PR #18334) 2020-11-26 01:08:05 +00:00
Andrew Poelstra
7bc1e4d084 Merge 24a727e23e into merged_master (Bitcoin PR #18255) 2020-11-26 01:07:53 +00:00
Andrew Poelstra
4c7d6ec20e Merge 3b69310beb into merged_master (Bitcoin PR #17984) 2020-11-14 18:40:28 +00:00
Andrew Poelstra
3613ae283d Merge f60e0684d1 into merged_master (Elements PR #773) 2020-11-09 23:10:10 +00:00
Andrew Poelstra
55b110cabc Merge c08bf2b574 into merged_master (Bitcoin PR #15437) 2020-11-09 21:20:35 +00:00
Andrew Poelstra
bc7f2f6de6 Merge 04d9939f46 into merged_master (Bitcoin PR #16850) 2020-11-09 21:20:23 +00:00
Andrew Poelstra
9cc26a716a Merge 5b2fe5563b into merged_master (Elements PR #642)
FIXME: we disable standardness checks for the non-PAK node in the PAK tests.
This is because of a bug in Elements which causes non-PAK nodes to reject
pegouts for standardness reasons. Need to fix it after the rebase.
2020-11-09 21:20:21 +00:00
Andrew Poelstra
39d8aa865c Merge cc40b55da7 into merged_master (Bitcoin PR #16726) 2020-11-09 21:20:18 +00:00
Andrew Poelstra
dcd3f9fd69 Merge 59ce537a49 into merged_master (Bitcoin PR #16152) 2020-11-09 21:20:07 +00:00
Andrew Poelstra
046cf94f99 Merge d9bafca20c into merged_master (Bitcoin PR #15982) 2020-11-06 15:20:15 +00:00
Andrew Poelstra
13b3e5bcc3 Merge c459c5f701 into merged_master (Bitcoin PR #15664) 2020-10-29 04:36:59 +00:00
Andrew Poelstra
67d718b048 Merge a74d588f21 into merged_master (Bitcoin PR #14954) 2020-10-27 22:32:24 +00:00
Vasil Dimov
353a3fdaad
net: advertise support for ADDRv2 via new message
Introduce a new message `sendaddrv2` to signal support for ADDRv2.
Send the new message immediately after sending the `VERACK` message.

Add support for receiving and parsing ADDRv2 messages.

Send ADDRv2 messages (instead of ADDR) to a peer if he has
advertised support for it.

Co-authored-by: Carl Dong <contact@carldong.me>
2020-10-09 16:42:50 +02:00
MarcoFalke
b99a1633b2
Merge #19781: test: add parameterized constructor for msg_sendcmpct()
638441928a test: add parameterized constructor for msg_sendcmpct() (Sebastian Falbesoner)

Pull request description:

  While working on the test for #19776 I noticed that creating a `sendcmpct` message is quite cumbersome -- due to the lack of a parameterized constructor, one needs to create an empty (that is, initialized with default values) object and then set the two fields one by one. This PR replaces the default constructor with a parameterized constructor and uses it in the test `p2p_compactblocks.py`, reducing LOC. No need to pollute the namespace with temporary throw-away message objects anymore.

ACKs for top commit:
  guggero:
    Code review ACK 638441928a.
  epson121:
    Code review ACK 638441928a

Tree-SHA512: 3b58d276d714b73abc6cc98d1d52dec5f6026b33f03faaeb7dcbc5d83ac377555179f98b159b2b9ecc8957999c35a1dc082e3c69299c5fde4e35f1bd0587ce9d
2020-09-20 11:13:56 +02:00
gzhao408
23c35bf005 [test] add get_vsize util for more programmatic testing 2020-09-16 07:19:58 -07:00
Wladimir J. van der Laan
bd60a9a8ed
Merge #19818: p2p: change CInv::type from int to uint32_t, fix UBSan warning
7984c39be1 test framework: serialize/deserialize inv type as unsigned int (Jon Atack)
407175e0c2 p2p: change CInv::type from int to uint32_t (Jon Atack)

Pull request description:

  Fixes UBSan implicit-integer-sign-change issue per https://github.com/bitcoin/bitcoin/pull/19610#issuecomment-680686460.

  Credit to Crypt-iQ for finding and reporting the issue and to vasild for the original review suggestion in https://github.com/bitcoin/bitcoin/pull/19590#pullrequestreview-455788826.

  Closes #19678.

ACKs for top commit:
  laanwj:
    ACK 7984c39be1
  MarcoFalke:
    ACK 7984c39be1 🌻
  vasild:
    ACK 7984c39be

Tree-SHA512: 59f3a75f40ce066ca6f0bb1927197254238302b4073af1574bdbfe6ed580876437be804be4e47d51467d604f0d9e3a5875159f7f2edbb2351fdb2bb9465100b5
2020-09-03 17:23:52 +02:00
Wladimir J. van der Laan
505b39e72b
Merge #19610: p2p: refactor AlreadyHave(), CInv::type, INV/TX processing
fb56d37612 p2p: ensure inv is GenMsgTx before ToGenTxid in inv processing (John Newbery)
aa3621385e test: use CInv::MSG_WITNESS_TX flag in p2p_segwit (Jon Atack)
24ee4f01ea p2p: make gtxid(.hash) and fAlreadyHave localvars const (Jon Atack)
b1c855453b p2p: use CInv block message helpers in net_processing.cpp (Jon Atack)
acd6642167 [net processing] Change AlreadyHaveTx() to take a GenTxid (John Newbery)
5fdfb80b86 [net processing] Change AlreadyHaveBlock() to take block_hash argument (John Newbery)
430e183b89 [net processing] Remove mempool argument from AlreadyHaveBlock() (John Newbery)
42ca5618ca [net processing] Split AlreadyHave() into separate block and tx functions (John Newbery)
39f1dc9445 p2p: remove nFetchFlags from NetMsgType TX and INV processing (Jon Atack)
471714e1f0 p2p: add CInv block message helper methods (Jon Atack)

Pull request description:

  Building on #19590 and the recent `wtxid` and `GenTxid` changes, this is a refactoring and cleanup PR to simplify and improve some of the net processing code.

  Some of the diffs are best reviewed with `-w` to ignore spacing.

  Co-authored by John Newbery.

ACKs for top commit:
  laanwj:
    Code review ACK fb56d37612
  jnewbery:
    utACK fb56d37612
  vasild:
    ACK fb56d3761

Tree-SHA512: ba39b58e6aaf850880a842fe5f6295e9f1870906ef690206acfc17140aae2ac854981e1066dbcd4238062478762fbd040ef772fdc2c50eea6869997c583e6a6d
2020-09-02 13:45:40 +02:00
Jon Atack
7984c39be1
test framework: serialize/deserialize inv type as unsigned int 2020-08-28 20:12:02 +02:00
Jon Atack
aa3621385e
test: use CInv::MSG_WITNESS_TX flag in p2p_segwit 2020-08-26 11:57:27 +02:00
John Newbery
d5800da519 [test] Remove final references to mininode 2020-08-25 10:04:25 +01:00
Sebastian Falbesoner
638441928a test: add parameterized constructor for msg_sendcmpct() 2020-08-23 02:27:09 +02:00
Wladimir J. van der Laan
b4d0366b47
Merge #19070: p2p: Signal support for compact block filters with NODE_COMPACT_FILTERS
f5c003d3ea [test] Add test for NODE_COMPACT_FILTER. (Jim Posen)
132b30d9c8 [net] Signal NODE_COMPACT_FILTERS if we're serving compact filters. (Jim Posen)
b3fbc94d4f Apply cfilters review fixups (John Newbery)

Pull request description:

  If -peerblockfilters is configured, signal the `NODE_COMPACT_FILTERS` service bit to indicate that we are able to serve compact block filters, headers and checkpoints.

ACKs for top commit:
  MarcoFalke:
    re-review and Concept ACK f5c003d3ea
  fjahr:
    Code review ACK f5c003d3ea
  clarkmoody:
    Concept ACK f5c003d3ea
  ariard:
    Concept and Code Review ACK f5c003d
  jonatack:
    ACK f5c003d3e

Tree-SHA512: 34d1c153530a0e55d09046fe548c9dc37344b5d6d50e00af1b4e1de1e7b49de770fca8471346a17c151de9fe164776296bb3dd5af331977f0c3ef1e6fc906f85
2020-08-13 15:44:48 +02:00