aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-09-22Add 'sequence' zmq publisher to track all block (dis)connects, mempool deltasGregory Sanders
Using the zmq notifications to avoid excessive mempool polling can be difficult given the current notifications available. It announces all transactions being added to mempool or included in blocks, but announces no evictions and gives no indication if the transaction is in the mempool or a block. Block notifications for zmq are also substandard, in that it only announces block tips, while all block transactions are still announced. This commit adds a unified stream which can be used to closely track mempool: 1) getrawmempool to fill out mempool knowledge 2) if txhash is announced, add or remove from set based on add/remove flag 3) if blockhash is announced, get block txn list, remove from those transactions local view of mempool 4) if we drop a sequence number, go to (1) The mempool sequence number starts at the value 1, and increments each time a transaction enters the mempool, or is evicted from the mempool for any reason, including block inclusion. The mempool sequence number is published via ZMQ for any transaction-related notification. These features allow for ZMQ/RPC consumer to track mempool state in a more exacting way, without unnecesarily polling getrawmempool. See interface_zmq.py::test_mempool_sync for example usage.
2020-09-22zmq test: Actually make reorg occurGregory Sanders
2020-09-22Merge #19849: Assert that RPCArg names are equal to CRPCCommand ones ↵MarcoFalke
(blockchain,rawtransaction) fa6bb0ce5dba33970e2c1e47ea4d0d2c0718eccb Assert that RPCArg names are equal to CRPCCommand ones (rawtransaction) (MarcoFalke) fa80c814874a2893e4323ba5148fba21d7f421cd Assert that RPCArg names are equal to CRPCCommand ones (blockchain) (MarcoFalke) Pull request description: This is split out from #18531 to just touch some RPC methods. Description from the main pr: ### Motivation RPCArg names in the rpc help are currently only used for documentation. However, in the future they could be used to teach the server the named arguments. Named arguments are currently registered by the `CRPCCommand`s and duplicate the RPCArg names from the documentation. This redundancy is fragile, and has lead to errors in the past (despite having linters to catch those kind of errors). See section "bugs found" for a list of bugs that have been found as a result of the changes here. ### Changes The changes here add an assert in the `CRPCCommand` constructor that the RPCArg names are identical to the ones in the `CRPCCommand`. ### Future work > Here or follow up, makes sense to also assert type of returned UniValue? Sure, but let's not get ahead of ourselves. I am going to submit any further works as follow-ups, including: * Removing the CRPCCommand arguments, now that they are asserted to be equal and thus redundant * Removing all python regex linters on the args, now that RPCMan can be used to generate any output, including the cli.cpp table * Auto-formatting and sanity checking the RPCExamples with RPCMan * Checking passed-in json in self-check. Removing redundant checks * Checking returned json against documentation to avoid regressions or false documentation * Compile the RPC documentation at compile-time to ensure it doesn't change at runtime and is completely static ### Bugs found * The assert identified issue #18607 * The changes itself fixed bug #19250 ACKs for top commit: fjahr: utACK fa6bb0ce5dba33970e2c1e47ea4d0d2c0718eccb tryphe: utACK fa6bb0ce5dba33970e2c1e47ea4d0d2c0718eccb. Reducing data duplication is nice. Code changes are minimal and concise. Tree-SHA512: deb0edc3f999baf055526eaa199b98c500635e12502dece7aa3cad5319db330eb5ee7459a5c8f040a83671a7f20c560c19a2026fb76c8416f138aa332727cbce
2020-09-22Merge #17785: p2p: Unify Send and Receive protocol versionsWladimir J. van der Laan
ddefb5c0b759950942ac03f28c43b548af7b4033 p2p: Use the greatest common version in peer logic (Hennadii Stepanov) e084d45562b94827b3a7873895882fcaae9f4d48 p2p: Remove SetCommonVersion() from VERACK handler (Hennadii Stepanov) 8d2026796a6f7add0c2cda9806e759817d1eae6f refactor: Rename local variable nSendVersion (Hennadii Stepanov) e9a6d8b13b0558b17cdafbd32fd2663b4138ff11 p2p: Unify Send and Receive protocol versions (Hennadii Stepanov) Pull request description: On master (6fef85bfa3cd7f76e83b8b57f9e4acd63eb664ec) `CNode` has two members to keep protocol version: - `nRecvVersion` for received messages - `nSendVersion` for messages to send After exchanging with `VERSION` and `VERACK` messages via protocol version `INIT_PROTO_VERSION`, both nodes set `nRecvVersion` _and_ `nSendVersion` to _the same_ value which is the greatest common protocol version. This PR: - replaces two `CNode` members, `nRecvVersion` `nSendVersion`, with `m_greatest_common_version` - removes duplicated getter and setter There is no change in behavior on the P2P network. ACKs for top commit: jnewbery: ACK ddefb5c0b759950942ac03f28c43b548af7b4033 naumenkogs: ACK ddefb5c0b759950942ac03f28c43b548af7b4033 fjahr: Code review ACK ddefb5c0b759950942ac03f28c43b548af7b4033 amitiuttarwar: code review but untested ACK ddefb5c0b7 benthecarman: utACK `ddefb5c` Tree-SHA512: 5305538dbaa5426b923b0afd20bdef4f248d310855d1d78427210c00716c67b7cb691515c421716b6157913e453076e293b10ff5fd2cd26a8e5375d42da7809d
2020-09-21Merge #18267: BIP-325: Signet [consensus]Wladimir J. van der Laan
8258c4c0076bb5f27efdc117a04b27fcd6dd00b2 test: some sanity checks for consensus logic (Anthony Towns) e47ad375bf17557f805bd206e789b8db78c6338a test: basic signet tests (Karl-Johan Alm) 4c189abdc452f08dfa758564b5381bc78c42d481 test: add small signet fuzzer (practicalswift) ec9b25d046793be50da1c11ba61d1b4b13b295b0 test: signet network selection tests (Karl-Johan Alm) 3efe298dccb248f25d6b01ab6a80b1cd6c9e1a1e signet: hard-coded parameters for Signet Global Network VI (2020-09-07) (Karl-Johan Alm) c7898bca4e1ccbc6edafd3b72eaf80df38e3af32 qt: update QT to support signet network (Karl-Johan Alm) a8de47a1c9033fac3355590f1fe2158a95011bb3 consensus: add signet validation (Karl-Johan Alm) e8990f121405af8cd539b904ef082439261e6c93 add signet chain and accompanying parameters (Karl-Johan Alm) 404682b7cdb54494e7c98f0ba0cac8b51f379750 add signet basic support (signet.cpp) (Karl-Johan Alm) a2147d7dadec1febcd9c2b8ebbbf78dce6d0556b validation: move GetWitnessCommitmentIndex to consensus/validation (Karl-Johan Alm) Pull request description: This PR is a part of BIP-325 (https://github.com/bitcoin/bips/blob/master/bip-0325.mediawiki), and is a sub-PR of #16411. * Signet consensus (this) * Signet RPC tools (pending) * Signet utility scripts (contrib/signet) (pending) ACKs for top commit: jonatack: re-ACK 8258c4c0076bb5f27efdc117a04b27fcd6dd00b per `git diff dbeea65 8258c4c`, only change since last review is updated `-signet*` config option naming. fjahr: re-ACK 8258c4c laanwj: ACK 8258c4c0076bb5f27efdc117a04b27fcd6dd00b2 MarcoFalke: Approach ACK 8258c4c007 🌵 Tree-SHA512: 5d158add96755910837feafa8214e13695b769a6aec3a2da753cf672618bef377fac43b0f4b772a87b25dd9f0c1c9b29f2789785d7a7d47a155cdcf48f7c975d
2020-09-21Merge #19697: Improvements on ADDR cachingWladimir J. van der Laan
0d04784af151de249bbbcbad51e6e8ad9af8f5a3 Refactor the functional test (Gleb Naumenko) 83ad65f31b5c9441ae1618614082e584854a14e1 Address nits in ADDR caching (Gleb Naumenko) 81b00f87800f40cb14f2131ff27668bd2bb9e551 Add indexing ADDR cache by local socket addr (Gleb Naumenko) 42ec5585424ceb91bed07826dde15697c020661a Justify the choice of ADDR cache lifetime (Gleb Naumenko) Pull request description: This is a follow-up on #18991 which does 3 things: - improves privacy of a node listening to multiple addresses via adding cache index by local socket addr (suggested [here](https://github.com/bitcoin/bitcoin/pull/18991#issuecomment-668219345)) - documents on the choice of 24h cache lifetime - addresses nits from #18991 ACKs for top commit: jnewbery: utACK 0d04784af151de249bbbcbad51e6e8ad9af8f5a3 vasild: ACK 0d04784 jonatack: Code review ACK 0d04784 Tree-SHA512: bb65a34dd1ce2811186d3e4469bc33e8399cebaaa494ce13041c7cff23275870e4176a719f7a72f8d779c49f8b2344bf4fa1aeb3ea4e2626d5ae76514f00a750
2020-09-20Merge #19781: test: add parameterized constructor for msg_sendcmpct()MarcoFalke
638441928a446726ce3a7fb20433a5478e7585bb 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 638441928a446726ce3a7fb20433a5478e7585bb. epson121: Code review ACK 638441928a446726ce3a7fb20433a5478e7585bb Tree-SHA512: 3b58d276d714b73abc6cc98d1d52dec5f6026b33f03faaeb7dcbc5d83ac377555179f98b159b2b9ecc8957999c35a1dc082e3c69299c5fde4e35f1bd0587ce9d
2020-09-20Merge #18949: doc: Add CODEOWNERS file to automatically nominate PR reviewersMarcoFalke
a06eb03ded1a70879db86a03c2d6831e2ed75f62 doc: Add comments and additional reviewers to CODEOWNERS file (Adam Jonas) e02da2290619553f6fba67d8584cb1a49414bc87 doc: Add CODEOWNERS file (Wladimir J. van der Laan) Pull request description: This PR brings back and builds on #17094. GitHub uses a CODEOWNERS magic file to automatically add tagged contributors to the "Reviewers" list for a PR. The goal of this is to make use of GitHub's suggested reviewers feature and not to confer ownership or give veto power to specific people. It would be better if this file could be named CODEREVIEWERS, but alas, that wouldn't work. The idea of a NAGFILE was proposed in [Bitcoin Core Dev meeting in 2018](https://diyhpl.us/wiki/transcripts/bitcoin-core-dev-tech/2018-03-07-priorities/#:~:text=NAGFILE). While this GitHub implementation has some complications, it's a step towards realizing the promise of automating "reviewing begging" and (hopefully) positively impacting the review process as a whole. Of secondary value, this file can serve as documentation for who the maintainers are and who it might be smart to check with for certain areas of code/features (i.e., fuzzing, PSBT, and Bech32) -- this is helpful information for new contributors. * The first commit is taken from #17094 * The second commit adds comments and expands the list of reviewers based on the suggestions and comments from that PR * ~The third WIP commit~ This commit also uses the doc dir as an example of granular assignments based on lines of codes ~contributed~ written and/or general engagement with the project. (If interested, here is a report for [most lines of code per author for each file](https://gist.github.com/adamjonas/854a46a1918224927b186865baeac411)). The pro of this level of detail is that the best reviewer is more likely to be nominated. The con is that it will create churn as files are renamed, new files are added, or reviewers want to be added or removed. Some open questions: * How often should this file be changed? * What level of history does one need have on the project before being added to this file? When does it make sense to remove a reviewer? * These review notifications can [cause a lot of noise](https://github.community/t5/How-to-use-Git-and-GitHub/Team-based-notifications-or-rework-CODEOWNERS-notification/td-p/7811) and automatically subscribes the requested reviewer to the thread. A GitHub Team based approach would allow for adding or removing reviewers without modifying this file; however, this comes along with its [own set of problems](https://bionic.fullstory.com/taming-github-codeowners-with-bots/#problems-with-github-code-owners), including granting [write access](https://github.community/t5/How-to-use-Git-and-GitHub/CODEOWNERS-works-with-users-but-not-teams/td-p/4986#U4991). Other projects [have used bots](https://bionic.fullstory.com/taming-github-codeowners-with-bots/#using-a-github-bot) to sidestep this. Top commit has no ACKs. Tree-SHA512: aa674ac62478b8801f48750df869c802070dc83d0fa9ff93596e9d63406129d7fd3c0daeb35d7a1a259554d045c24746a6808878a7b9867c7ed66d251f0c918f
2020-09-19Merge #13686: ZMQ: Small cleanups in the ZMQ codefanquake
6fe2ef2acb00b1df7f6a0c0dea1a81a1924be0e1 scripted-diff: Rename SendMessage to SendZmqMessage. (Daniel Kraft) a3ffb6ebebd753cec294c91cef7c603a30cf217e Replace zmqconfig.h by a simple zmqutil. (Daniel Kraft) 7f2ad1b9acef4ccc1b3e1a9f551416235d95cbfd Use std::unique_ptr for CZMQNotifierFactory. (Daniel Kraft) b93b9d54569145bfcec6cee10968284fe05fe254 Simplify and fix notifier removal on error. (Daniel Kraft) e15b1cfc310df739b92bd281112dbeb31d3bb30a Various cleanups in zmqnotificationinterface. (Daniel Kraft) Pull request description: This contains various small code cleanups that make the ZMQ code easier to read and maintain (at least in my opinion). The only functional change is that a potential memory leak is fixed that would have occured when a notifier is removed from the `notifiers` list after its callback function returned `false` (which is likely not relevant in practice but still a bug). ACKs for top commit: instagibbs: utACK 6fe2ef2acb00b1df7f6a0c0dea1a81a1924be0e1 hebasto: re-ACK 6fe2ef2acb00b1df7f6a0c0dea1a81a1924be0e1, only the latest commit got a scripted-diff since my [previous](https://github.com/bitcoin/bitcoin/pull/13686#pullrequestreview-487649808) review. Tree-SHA512: 8206f8713bf3698d7cd4cb235f6657dc1c4dd920f50a8c5f371a559dd17ce5ab6d94d6281165eef860a22fc844a6bb25489ada12c83ebc780efd7ccdc0860f70
2020-09-19Merge #18790: gui: Improve thread namingfanquake
ead771bf6fc7a4b96a03d4938796c88657c69ba6 qt: Rename qt-init thread before logging start (Hennadii Stepanov) ad5f614bf326d739424e8b403066f2d4275e4c1b qt: Name ClientModel timer QThread (Hennadii Stepanov) 2c7f5d8c2e6dae099a73fe748f6194da3c961a48 qt: Name WalletController worker QThread (Hennadii Stepanov) 27dcc37d429626c75c540331340c62723529f37e qt: Name RPCConsole executor QThread (Hennadii Stepanov) Pull request description: On **master** (eef90c14ed0f559e3f6e187341009270b84f45cb): - thread list from OS: ![Screenshot from 2020-04-28 00-25-41](https://user-images.githubusercontent.com/32963518/80425413-3de07100-88ec-11ea-8d7a-79bd9e152395.png) - log excerpt: ``` 2020-04-27T21:25:26Z [] GUI: initialize : Running initialization in thread ... 2020-04-27T21:26:04Z [] Using BerkeleyDB version Berkeley DB 4.8.30: (April 9, 2010) 2020-04-27T21:26:04Z [] Using wallet /home/hebasto/.bitcoin/testnet3/wallets/test2 2020-04-27T21:26:04Z [] BerkeleyEnvironment::Open: LogDir=/home/hebasto/.bitcoin/testnet3/wallets/test2/database ErrorFile=/home/hebasto/.bitcoin/testnet3/wallets/test2/db.log 2020-04-27T21:26:04Z [] init message: Loading wallet... 2020-04-27T21:26:04Z [] BerkeleyEnvironment::Open: LogDir=/home/hebasto/.bitcoin/testnet3/wallets/test2/database ErrorFile=/home/hebasto/.bitcoin/testnet3/wallets/test2/db.log 2020-04-27T21:26:04Z [] [test2] Wallet File Version = 169900 2020-04-27T21:26:04Z [] [test2] Keys: 2001 plaintext, 0 encrypted, 2001 w/ metadata, 2001 total. Unknown wallet records: 0 2020-04-27T21:26:04Z [] [test2] Wallet completed loading in 26ms 2020-04-27T21:26:04Z [] GUI: TransactionTablePriv::refreshWallet 2020-04-27T21:26:04Z [] [test2] setKeyPool.size() = 2000 2020-04-27T21:26:04Z [] [test2] mapWallet.size() = 0 2020-04-27T21:26:04Z [] [test2] m_address_book.size() = 0 ``` With **this PR**: - thread list from OS: ![Screenshot from 2020-04-28 00-21-40](https://user-images.githubusercontent.com/32963518/80425527-7a13d180-88ec-11ea-8a34-dfc774bb1c75.png) - log excerpt: ``` 2020-04-27T21:21:25Z [qt-init] GUI: initialize : Running initialization in thread ... 2020-04-27T21:23:08Z [qt-walletctrl] Using BerkeleyDB version Berkeley DB 4.8.30: (April 9, 2010) 2020-04-27T21:23:08Z [qt-walletctrl] Using wallet /home/hebasto/.bitcoin/testnet3/wallets/test2 2020-04-27T21:23:08Z [qt-walletctrl] BerkeleyEnvironment::Open: LogDir=/home/hebasto/.bitcoin/testnet3/wallets/test2/database ErrorFile=/home/hebasto/.bitcoin/testnet3/wallets/test2/db.log 2020-04-27T21:23:08Z [qt-walletctrl] init message: Loading wallet... 2020-04-27T21:23:08Z [qt-walletctrl] BerkeleyEnvironment::Open: LogDir=/home/hebasto/.bitcoin/testnet3/wallets/test2/database ErrorFile=/home/hebasto/.bitcoin/testnet3/wallets/test2/db.log 2020-04-27T21:23:08Z [qt-walletctrl] [test2] Wallet File Version = 169900 2020-04-27T21:23:08Z [qt-walletctrl] [test2] Keys: 2001 plaintext, 0 encrypted, 2001 w/ metadata, 2001 total. Unknown wallet records: 0 2020-04-27T21:23:08Z [qt-walletctrl] [test2] Wallet completed loading in 37ms 2020-04-27T21:23:08Z [qt-walletctrl] init message: Rescanning... 2020-04-27T21:23:08Z [qt-walletctrl] [test2] Rescanning last 112924 blocks (from block 1609206)... 2020-04-27T21:23:08Z [qt-walletctrl] [test2] Rescan started from block 000000000000003761c81f7efbd8cebf217f39d353ec1ac59c624ac2dddfc2a8... 2020-04-27T21:23:22Z [qt-walletctrl] [test2] Rescan completed in 14157ms 2020-04-27T21:23:22Z [qt-walletctrl] GUI: TransactionTablePriv::refreshWallet 2020-04-27T21:23:22Z [qt-walletctrl] [test2] setKeyPool.size() = 2000 2020-04-27T21:23:22Z [qt-walletctrl] [test2] mapWallet.size() = 0 2020-04-27T21:23:22Z [qt-walletctrl] [test2] m_address_book.size() = 0 ``` ACKs for top commit: Sjors: tACK ead771bf6fc7a4b96a03d4938796c88657c69ba6 Tree-SHA512: a3b2789990414ab23b69236ca36b656a3f026e11e88fb5940ef4fecfc2053df5ed886615afb37f98584f6e19b953209d3884baab057740b2e9eed68661880dd3
2020-09-19Merge #19940: rpc: Return fee and vsize from testmempoolacceptfanquake
23c35bf0059bd6270218e0b732959e9c754f9812 [test] add get_vsize util for more programmatic testing (gzhao408) 2233a93a109b10b6fe0f5f26c2bb529c8de3dde7 [rpc] Return fee and vsize from testmempoolaccept (codeShark149) Pull request description: From #19093 and resolves #19057. Difference from #19093: return `vsize` and `fees` object (similar to `getmempoolentry`) when the test accept is successful. Updates release-notes.md. ACKs for top commit: jnewbery: utACK 23c35bf0059bd6270218e0b732959e9c754f9812 fjahr: utACK 23c35bf instagibbs: reACK https://github.com/bitcoin/bitcoin/pull/19940/commits/23c35bf0059bd6270218e0b732959e9c754f9812 Tree-SHA512: dcb81b7b817a4684e9076bc5d427a6f2d549d2edc66544e718260c4b5f8f1d5ae1d47b754175e9f0c8a3bd8371ce116c2dca0583588d513a7d733d5d614f2b04
2020-09-19Merge #19971: test: create default wallet in extended testsfanquake
a5f5374b43275ce4529c3a44c4b44e478d35e079 test: create default wallet in extended tests (Sjors Provoost) Pull request description: This was omitted from #15454 ACKs for top commit: ryanofsky: Code review ACK a5f5374b43275ce4529c3a44c4b44e478d35e079. Just reverted a leftover diff since last review gzhao408: utACK https://github.com/bitcoin/bitcoin/pull/19971/commits/a5f5374b43275ce4529c3a44c4b44e478d35e079 Tree-SHA512: 573e215e3665cd23f58417a7ebf66a73420645450f8bc51a7bbb36dea6bfda838f6131bb4456aea35d9dac57b61741bba704a7df8ed11409c21fb8001ec55588
2020-09-18test: create default wallet in extended testsSjors Provoost
This was omitted from #15454
2020-09-18test: some sanity checks for consensus logicAnthony Towns
2020-09-18test: basic signet testsKarl-Johan Alm
2020-09-18test: add small signet fuzzerpracticalswift
2020-09-18test: signet network selection testsKarl-Johan Alm
2020-09-18signet: hard-coded parameters for Signet Global Network VI (2020-09-07)Karl-Johan Alm
Co-authored-by: Anthony Towns <aj@erisian.com.au>
2020-09-18qt: update QT to support signet networkKarl-Johan Alm
2020-09-18consensus: add signet validationKarl-Johan Alm
2020-09-18add signet chain and accompanying parametersKarl-Johan Alm
Co-authored-by: Anthony Towns <aj@erisian.com.au>
2020-09-18Merge #15454: Remove the automatic creation and loading of the default walletSamuel Dobson
d26f0648f1c0d1115dcb8d76e57195032b88f400 Tell users how to load or create a wallet when no wallet is loaded (Andrew Chow) 1bee1e6269b76b52b1eab9112d39c245beaa27a2 Do not create default wallet (Andrew Chow) Pull request description: Instead of automatically creating and loading a default wallet, users should instead explicitly create their wallet or load it on start. Builds on #19754 which provides the `load_on_startup` behavior for the GUI. ACKs for top commit: jnewbery: Manual test and very light code review ACK d26f0648f1c0d1115dcb8d76e57195032b88f400 ryanofsky: Code review ACK d26f0648f1c0d1115dcb8d76e57195032b88f400. Just suggested changes to first commit (reusing MakeWalletDatabase and adding release notes), no changes to second commit jonatack: ACK d26f0648f1c0d1115dcb8d76e57195032b88f400 light code review, debug build, ran tests, did manual testing with testnet, rebased on master, on linux debian. Tree-SHA512: 091d785aef64736f7df661c576e815a87f3d029cfa32f3a75ba86fc25795f10b022ab3ae15c5b61a10b8cee16f5650f15cd79cbd6127e5e3ccbef631966d3c30
2020-09-16Merge #19934: tests: Add fuzzing harness for Keccak and SHA3_256Wladimir J. van der Laan
fc7f84a9ca98ee0d9c2d1f092be6b5dba3f2a582 tests: Add fuzzing harness for Keccak and SHA3_256 (practicalswift) Pull request description: Add fuzzing harness for Keccak and SHA3_256. See [`doc/fuzzing.md`](https://github.com/bitcoin/bitcoin/blob/master/doc/fuzzing.md) for information on how to fuzz Bitcoin Core. Don't forget to contribute any coverage increasing inputs you find to the [Bitcoin Core fuzzing corpus repo](https://github.com/bitcoin-core/qa-assets). Happy fuzzing :) ACKs for top commit: laanwj: uACK fc7f84a9ca98ee0d9c2d1f092be6b5dba3f2a582 elichai: utACK :) fc7f84a9ca98ee0d9c2d1f092be6b5dba3f2a582 Tree-SHA512: 01e1610e1c178d5f42578e2dd5644a4165596db34cf5037d574a5285e0ace4b06dc33ab81a308595246117537fe175294efd4bfc174ffc2e8eac98f0ec9dd3e9
2020-09-16Merge #19936: Test: batch rpc with paramsWladimir J. van der Laan
e1fdd2963baab68bb6a77af2ad7a07fcacd4e73e Test batch rpc with params (Gregory Sanders) Pull request description: Useful as an example and test case. ACKs for top commit: laanwj: ACK e1fdd2963baab68bb6a77af2ad7a07fcacd4e73e theStack: ACK e1fdd2963baab68bb6a77af2ad7a07fcacd4e73e Tree-SHA512: 2d2ba8960916342b264a14624857d6dd10005be12efafb3e970b82656f721c8f3700ebc9b8809de1b2f887d482b772043504aeaeebc7f2e1c8203f076a451526
2020-09-16[test] add get_vsize util for more programmatic testinggzhao408
2020-09-15[rpc] Return fee and vsize from testmempoolacceptcodeShark149
Return fee and vsize if tx would pass ATMP.
2020-09-16Merge #19879: [p2p] miscellaneous wtxid followupsfanquake
a8a64acaf32ac21feeb885671772282b531ef9a2 [BroadcastTransaction] Remove unsafe move operator (Amiti Uttarwar) 125c0381266e0e05a408f8e1818501ab73d29110 [p2p] Remove dead code (Amiti Uttarwar) fc66d0a65cdc52a3b259effe0c29b5eafb1b5ff5 [p2p] Check for nullptr before dereferencing pointer (Adam Jonas) cb79b9dbf4cd06e17c8c65b36bf15c3ea2641de4 [mempool] Revert unbroadcast set to tracking just txid (Amiti Uttarwar) Pull request description: Addresses some outstanding review comments from #18044 - reverts unbroadcast txids to a set instead of a map (simpler, communicates intent better, takes less space, no efficiency advantages of map) - adds safety around two touchpoints (check for nullptr before dereferencing pointer, remove an inaccurate std::move operator) - removes some dead code Links to comments on wtxid PR: [1](https://github.com/bitcoin/bitcoin/pull/18044#discussion_r460495254) [2](https://github.com/bitcoin/bitcoin/pull/18044#discussion_r460496023) [3](https://github.com/bitcoin/bitcoin/pull/18044#discussion_r463532611) thanks to jnewbery & adamjonas for flagging these ! ! ACKs for top commit: sdaftuar: utACK a8a64acaf32ac21feeb885671772282b531ef9a2 naumenkogs: utACK a8a64acaf32ac21feeb885671772282b531ef9a2 jnewbery: utACK a8a64acaf32ac21feeb885671772282b531ef9a2 Tree-SHA512: 7be669cb30cc17fb9e06b50e636ef7887c6a27354697987e4e4d38dba4b8f50e175647587430cd9bc3295bec01ce8b1e6639a50a4249d8fff9b1ca1b9ead3277
2020-09-15Merge #19241: help: Generate checkpoint height from chainparamsWladimir J. van der Laan
916d3596c493fec44da86aeb92b61eafeea0b596 help: Generate checkpoint height from chainparams (Luke Dashjr) Pull request description: Not sure if this is worth putting in Core, but might as well until checkpoints are removed entirely. ACKs for top commit: laanwj: re-ACK 916d3596c493fec44da86aeb92b61eafeea0b596 Tree-SHA512: d8eb26b570ee730fdd75ca916507134db5f2f68987a911e33544b7f1c9ccfd1c76b9c9db63056971956b6daf16910f17ecfc197481c2f7b0773afdfbf7d381cf
2020-09-15Merge #19558: build: split pthread flags out of ldflags and dont use when ↵Wladimir J. van der Laan
building libconsensus fc9278d162c342bace8a147da6bc4f9941d8d9d7 build: AX_PTHREAD serial 27 (fanquake) 15c27c44417ab77a660b53b8574f7eb5261b19f8 build: split PTHREAD_* flags out of AM_LDFLAGS (fanquake) 68e3e2294483cfee6bba8b5481eaee293e981ae8 scripted-diff: add FUZZ_SUITE_LDFLAGS_COMMON (fanquake) afecde8046b5f13253f1a7d687b4a90841b5766c build: add PTHREAD_LIBS to LDFLAGS configure output (fanquake) Pull request description: TLDR: Split pthread flags out of ldflags, and stop using them when building libconsensus. Building libconsensus on Linux using Clang currently warns. i.e: ```bash ./autogen.sh ./configure --disable-tests --disable-bench --with-utils=no --with-daemon=no --with-gui=no --disable-wallet --with-libs=yes CC=clang CXX=clang++ make V=1 -j6 ... -Wl,-z -Wl,relro -Wl,-z -Wl,now -pthread -Wl,-soname -Wl,libbitcoinconsensus.so.0 -o .libs/libbitcoinconsensus.so.0.0.0 clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument] clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument] ``` Besides wanting to quiet the warnings, after digging into this it seemed we could clean up how we are passing around the pthread flags. I also learnt a bit more about how libtools builds shared libraries, and that passing `-pthread` on the link line wouldn't be enough to link against pthreads anyways, due to libtools usage of -nostdlib (see [related discussion where we build DLLs](https://github.com/bitcoin/bitcoin/blob/476436b2dec254bb988f8c7a6cbec1d7bb7cecfd/configure.ac#L603)). This can be demonstrated with a patch to libconsensus: ```patch diff --git a/src/script/bitcoinconsensus.cpp b/src/script/bitcoinconsensus.cpp index 15e204062..10bf3582f 100644 --- a/src/script/bitcoinconsensus.cpp +++ b/src/script/bitcoinconsensus.cpp @@ -10,6 +10,8 @@ #include <script/interpreter.h> #include <version.h> +#include <pthread.h> + namespace { /** A class that deserializes a single CTransaction one time. */ @@ -127,3 +129,10 @@ unsigned int bitcoinconsensus_version() // Just use the API version for now return BITCOINCONSENSUS_API_VER; } + +void *func_pthread(void *x) { return x; } + +void f() { + pthread_t t; + pthread_create(&t,0,func_pthread,0); +} ``` After building, you'll find you have a `libbitcoinconsensus.so` using pthread symbols, but which isn't linked against libpthread: ```bash ldd -r src/.libs/libbitcoinconsensus.so linux-vdso.so.1 (0x00007ffe49378000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f553cee7000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f553cda2000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f553cd88000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f553cbc5000) /lib64/ld-linux-x86-64.so.2 (0x00007f553d15d000) undefined symbol: pthread_create (src/.libs/libbitcoinconsensus.so) ``` This libtool behaviour has been known about for some time, i.e this [thread from 2005](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460), describes the same issue. The suggestion from libtool maintainers at the time is to add `-lpthread` to LDFLAGS. Also worth noting is that some of the users in those threads were also using the `AX_PTHREADS` macro, same as us, to determine how to compile with/link against pthreads. This macro has [recently been updated](https://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=commitdiff;h=2fb904589643eb6ca6122f834891b58d1d51b347), with reference to this issue. You can compare the output from the version we currently use, to the new version: ```bash # our ax_pthread macro: PTHREAD_CFLAGS = -pthread PTHREAD_LIBS = PTHREAD_CC = gcc / clang # the new ax_pthread macro PTHREAD_CFLAGS = -pthread PTHREAD_LIBS = -lpthread PTHREAD_CC = gcc / clang ``` Note that as part of this PR I've also added `PTHREAD_LIBS` to the split out flags. Although we weren't using it anywhere previously (and wouldn't have seemed to matter for the most part, given it was likely empty for most builders), the macro assumes it's use. i.e: > NOTE: You are assumed to not only compile your program with these flags, > but also to link with them as well. For example, you might link with > $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS ACKs for top commit: laanwj: Code review ACK fc9278d162c342bace8a147da6bc4f9941d8d9d7 hebasto: re-ACK fc9278d162c342bace8a147da6bc4f9941d8d9d7, only rebased and renamed s/`AM_PTHREAD_FLAGS`/`PTHREAD_FLAGS`/ since my [previous](https://github.com/bitcoin/bitcoin/pull/19558#pullrequestreview-473487730) review.. kallewoof: ACK fc9278d162c342bace8a147da6bc4f9941d8d9d7 Tree-SHA512: 7c0a5b0f0de4f54b1d7dce0e69020b341c37a383bb7c715867cc96c648774a557b1ddb42eb1b676f7bb2b822b69795bec14dc6272362d80662a21f10cb80331c
2020-09-15scripted-diff: Rename SendMessage to SendZmqMessage.Daniel Kraft
Windows headers define SendMessage as a macro, which leads to problems with the method name "SendMessage". To circumvent this, we rename the method to "SendZmqMessage". -BEGIN VERIFY SCRIPT- sed -i 's/SendMessage/SendZmqMessage/g' src/zmq/zmqpublishnotifier.* -END VERIFY SCRIPT-
2020-09-15Merge #19643: Add -netinfo peer connections dashboardfanquake
bf1f913c4405cba35c8f99ec07b407940eb955b6 cli -netinfo: display multiple levels of details (Jon Atack) 077b3ac9284a90f33e31c64c49062ceaf815af60 cli: change -netinfo optional arg from bool to int (Jon Atack) 4e2f2ddd6444d93dd7e60ec67cc393dfc2a29b9d cli: add getpeerinfo last_{block,transaction} to -netinfo (Jon Atack) 644be659abfcf7c638e17795bafedad73bc55b27 cli: add -netinfo server version check and error message (Jon Atack) ce57bf6cc0cdaf8233fd8a20e0d1c5b69d17d2a3 cli: create peer connections report sorted by dir, minping (Jon Atack) f5edd66e5d136b229c805af9e6ea73218f6cedde cli: create vector of Peer structs for peers data (Jon Atack) 3a0ab93e1ce8d91235a6d46a57c6cb110fc5bf03 cli: add NetType enum struct and NetTypeEnumToString() (Jon Atack) c227100919dd2422b29eb3bca9c0f1a7983cc3a8 cli: create local addresses, ports, and scores report (Jon Atack) d3f77b736e43b187771b901a6a3452f83c116918 cli: create inbound/outbound peer connections report (Jon Atack) 19377b2fd24704bff6c805946575b116f07d5e0d cli: start dashboard report with chain and version header (Jon Atack) a3653c159e4f5c887eec9ea608e474eaa299fc07 cli: tally peer connections by type (Jon Atack) 54799b66b466c0d015e6fe2f820663cc5d8e7998 cli: add ipv6 and onion address type detection helpers (Jon Atack) 12242b17a52c9833e6504f3f0a5b247a6e2fc5f9 cli: create initial -netinfo option, NetinfoRequestHandler class (Jon Atack) Pull request description: This PR is inspired by laanwj's python script mentioned in #19405, which it turns out I ended up using every day and extending because I got hooked on using it to monitor Bitcoin peer connections. For the full experience, run `./src/bitcoin-cli -netinfo 4` On Linux, try it with watch `watch ./src/bitcoin-cli -netinfo 4` Help doc ``` $ ./src/bitcoin-cli -help | grep -A3 netinfo -netinfo Get network peer connection information from the remote server. An optional integer argument from 0 to 4 can be passed for different peers listings (default: 0). ``` ACKs for top commit: vasild: ACK bf1f913 0xB10C: ACK bf1f913c4405cba35c8f99ec07b407940eb955b6 practicalswift: ACK bf1f913c4405cba35c8f99ec07b407940eb955b6 -- patch looks correct and is limited to `src/bitcoin-cli.cpp` Tree-SHA512: b9d18e5cc2ffd2bb9f0295b5ac7609da8a9bbecaf823a26dfa706b5f07d5d1a8343081dad98b16aa9dc8efd8f41bc1a4acdc40259727de622dc7195ccf59c572
2020-09-15Merge #19903: Update build-openbsd.md with GUI supportfanquake
d11020019a0c93dcc56859cdfcd9f0c6a777424f Add OpenBSD instructions for building the Qt GUI (grubles) Pull request description: Using OpenBSD as a desktop OS is prevalent enough IMO to warrant updating the documentation for building the GUI. ACKs for top commit: fanquake: ACK d11020019a0c93dcc56859cdfcd9f0c6a777424f - looks fine. Have not tested. Tree-SHA512: a8078334fdd35438bcf87c3f5eae851c2a1ce961eb48ae50770bf2c556489da86b6ee198fe9fb732dcaddb2e0f2f4f55a3126971aae8f7d4e2e320dbb024e204
2020-09-15Merge #16378: The ultimate send RPCSamuel Dobson
92326d89766155a792254d30a9962251b8fc7799 [rpc] add send method (Sjors Provoost) 2c2a1445dc9d22c9d729b8301c8b3f54195bcfcf [rpc] add snake case aliases for transaction methods (Sjors Provoost) 1bc8d0fd5906bc9637d513cd193a1f47ad94da28 [rpc] walletcreatefundedpsbt: allow inputs to be null (Sjors Provoost) Pull request description: `walletcreatefundedpsbt` has some interesting features that `sendtoaddress` and `sendmany` don't have: * manual coin selection * outputting a PSBT (it was controversial to add this, see #18201) * create a transaction without adding to wallet (which leads to broadcasting, unless `-walletbroadcast=0`) At the same time `walletcreatefundedpsbt` can't broadcast a transaction, which is inconvenient for simple use cases. This PR introduces a new `send` RPC method which creates a PSBT, signs it if possible and adds it to the wallet by default. If it can't sign all inputs, it outputs a PSBT. If `add_to_wallet` is set to `false` it will return the transaction in both PSBT and hex format. Because it uses a PSBT internally, it will much easier to add hardware wallet support to this method (see #16546). For `bitcoin-cli` users, it tries to keep the simplest use case easy to use: ```sh bitcoin-cli -regtest send '{"ADDRESS": 0.1}' 1 sat/b ``` This paves the way for deprecating `sendtoaddress` and `sendmany` though there's no rush. The only missing feature compared to these older methods is adding labels to a destination address. Depends on: - [x] #16377 (`[rpc] don't automatically append inputs in walletcreatefundedpsbt`) - [x] #11413 (`[wallet] [rpc] sendtoaddress/sendmany: Add explicit feerate option`) - [x] #18244 (`[rpc] have lockUnspents also lock manually selected coins`) ACKs for top commit: meshcollider: Light re-utACK 92326d89766155a792254d30a9962251b8fc7799 achow101: ACK 92326d89766155a792254d30a9962251b8fc7799 Reviewed code and test, ran tests. kallewoof: utACK 92326d89766155a792254d30a9962251b8fc7799 Tree-SHA512: 7552ef1b193d4c06e381c44932fdb0d54f64383e4c7d6b988f49d059c7d4bba45ce6aa7813e03df86360ad9dad6f3010eb76ee7da480551742d5fd98c2251c0f
2020-09-14build: AX_PTHREAD serial 27fanquake
2020-09-14build: split PTHREAD_* flags out of AM_LDFLAGSfanquake
Note that with this change we are no-longer including PTHREAD_* flags when building libbitcoinconsensus. Also note that we are including PTHREAD_LIBS in AM_PTHREAD_FLAGS
2020-09-14scripted-diff: add FUZZ_SUITE_LDFLAGS_COMMONfanquake
-BEGIN VERIFY SCRIPT- sed -i -e 's/\$(RELDFLAGS) \$(AM_LDFLAGS) \$(LIBTOOL_APP_LDFLAGS)$/\$(FUZZ_SUITE_LDFLAGS_COMMON)/' src/Makefile.test.include patch -p1 << "EOF" --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -323,6 +323,8 @@ endif if ENABLE_FUZZ +FUZZ_SUITE_LDFLAGS_COMMON = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) + test_fuzz_addition_overflow_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) test_fuzz_addition_overflow_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) test_fuzz_addition_overflow_LDADD = $(FUZZ_SUITE_LD_COMMON) EOF -END VERIFY SCRIPT-
2020-09-14Merge #19931: Change CSipHasher's count variable to uint8_tfanquake
812037cb80f72096738cf2b0c15b39536c6c1e24 Change CSipHasher's count variable to uint8_t (Pieter Wuille) Pull request description: SipHash technically supports arbitrarily long inputs (at least, I couldn't find a limit in the [paper](https://eprint.iacr.org/2012/351.pdf)), but only the low 8 bits of the length matter. Because of that we should use an unsigned type to track the length (as any signed type could overflow, which is UB). `uint8_t` is sufficient, however. Fixes #19930. ACKs for top commit: laanwj: anyhow re-ACK 812037cb80f72096738cf2b0c15b39536c6c1e24 elichai: utACK 812037cb80f72096738cf2b0c15b39536c6c1e24 practicalswift: ACK 812037cb80f72096738cf2b0c15b39536c6c1e24 theStack: ACK 812037cb80f72096738cf2b0c15b39536c6c1e24 Tree-SHA512: 5b1440c9e4591460da198991fb421ad47d2d96def2014e761726ce361aa9575752f2c4085656e7e9badee3660ff005cc76fbd1afe4848faefe4502f3412bd896
2020-09-14build: add PTHREAD_LIBS to LDFLAGS configure outputfanquake
Also moves $PTHREAD_CFLAGS to the CFLAGS.
2020-09-14Merge #19944: Update secp256k1 subtree (including BIP340 support)fanquake
b9c1a7648131c5deec9704ee9acd00ec1820b9ce Squashed 'src/secp256k1/' changes from 2ed54da18a..8ab24e8dad (Pieter Wuille) Pull request description: This updates our src/secp256k1 subtree to the latest libsecp256k1 upstream version. As it adds BIP340 support (see https://github.com/bitcoin-core/secp256k1/pull/558), this is a prerequisite for #17977. In particular, it contains: * A few generic library improvements * Support for x-only public keys as used by BIP340. * Support for "key pair" objects, making signing more efficient by using a precomputed public key. * Signing support for BIP340 Schnorr (single-party) signatures. * Verification support for BIP340 Schnorr signatures. * Support for verifying tweaked x-only keys, as used by BIP341's Taproot construction. Things that are not included: * MuSig, nor any kind of multisignatures, threshold signatures, ... on top. * Batch verification. * Support for variable-length messages in BIP340 (which are still being discussed, but won't affect BIP341, or Bitcoin Core). * A few more generic improvements that are still in the pipeline, including faster modular inversions. ACKs for top commit: instagibbs: ACK 894fb33f4c1b24667891f7d2aff9f486177b1173 fanquake: ACK 894fb33f4c1b24667891f7d2aff9f486177b1173. Any Valgrind concerns will be addressed upstream, see discussion in https://github.com/bitcoin-core/secp256k1/pull/813, and if necessary, can be pulled into our tree prior to the 0.21.0 branch off. They are not a blocker for merging this PR in it's current state. benthecarman: ACK `894fb33` Tree-SHA512: 6dc992f4477069b7fbd223316f1be955750923be1479c38adad2312649fdca1f316edb375c42ef9d97cea2407caaef49fb8c93abd6c037fe1a522910cbbc2479
2020-09-13Test batch rpc with paramsGregory Sanders
2020-09-13Merge #19919: bugfix: make LoadWallet assigns status alwaysSamuel Dobson
8b39a875581bed1c2f40a7d9616bdb7cc642bf59 bugfix: make LoadWallet assigns status always (Akio Nakamura) Pull request description: In my enviroment, ```test/functional/wallet_multiwallet.py``` failed in line 237 for master( 147d50d63 ). It got an expected rpc-error-message, but error code was not (-4) but (-18). This is because that although loadwallet() in rpcwallet.cpp assumes LoadWallet() always assign some value to the 'status', but LoadWallet() does not do so in some situation. This PR intends to fix above and prevends loadwallet() returns ambiguous error code. ACKs for top commit: hebasto: re-ACK 8b39a875581bed1c2f40a7d9616bdb7cc642bf59, that is the same as 1728059730abef04f3fa84de0b6e20044be7a9d6. ryanofsky: Code review ACK 8b39a875581bed1c2f40a7d9616bdb7cc642bf59 (same as previous) meshcollider: utACK 8b39a875581bed1c2f40a7d9616bdb7cc642bf59 Tree-SHA512: a75d8240f60325bfdb69a07d392269fec97de743f38fe108371eb63a0aba5d8ce3cc484ecc69e81febf8040f5ab64f3a9450b98f8e07a0c17803784bb6f342bf
2020-09-11Update src/secp256k1 subtree to upstream libsecp256k1Pieter Wuille
2020-09-11Squashed 'src/secp256k1/' changes from 2ed54da18a..8ab24e8dadPieter Wuille
8ab24e8dad Merge #558: Add schnorrsig module which implements BIP-340 compliant signatures f3733c5433 Merge #797: Fix Jacobi benchmarks and other benchmark improvements cb5524adc5 Add benchmark for secp256k1_ge_set_gej_var 5c6af60ec5 Make jacobi benchmarks vary inputs d0fdd5f009 Randomize the Z coordinates in bench_internal c7a3424c5f Rename bench_internal variables 875d68b95f Merge #699: Initialize field elements when resulting in infinity 54caf2e74f Merge #799: Add fallback LE/BE for architectures with known endianness + SHA256 selftest f431b3f28a valgrind_ctime_test: Add schnorrsig_sign 16ffa9d97c schnorrsig: Add taproot test case 8dfd53ee3f schnorrsig: Add benchmark for sign and verify 4e43520026 schnorrsig: Add BIP-340 compatible signing and verification 7332d2db6b schnorrsig: Add BIP-340 nonce function 7a703fd97d schnorrsig: Init empty experimental module eabd9bc46a Allow initializing tagged sha256 6fcb5b845d extrakeys: Add keypair_xonly_tweak_add 58254463f9 extrakeys: Add keypair struct with create, pub and pub_xonly f0010349b8 Separate helper functions for pubkey_create and seckey_tweak_add 910d9c284c extrakeys: Add xonly_pubkey_tweak_add & xonly_pubkey_tweak_add_test 176bfb1110 Separate helper function for ec_pubkey_tweak_add 4cd2ee474d extrakeys: Add xonly_pubkey with serialize, parse and from_pubkey f49c9896b0 Merge #806: Trivial: Add test logs to gitignore aabf00c155 Merge #648: Prevent ints from wrapping around in scratch space functions f5adab16a9 Merge #805: Remove the extremely outdated TODO file. bceefd6547 Add test logs to gitignore 1c325199d5 Remove the extremely outdated TODO file. 47e6618e11 extrakeys: Init empty experimental module 3e08b02e2a Make the secp256k1_declassify argument constant 8bc6aeffa9 Add SHA256 selftest 670cdd3f8b Merge #798: Check assumptions on integer implementation at compile time 5e5fb28b4a Use additional system macros to figure out endianness 7c068998ba Compile-time check assumptions on integer types 02b6c87b52 Add support for (signed) __int128 979961c506 Merge #787: Use preprocessor macros instead of autoconf to detect endianness 887bd1f8b6 Merge #793: Make scalar/field choice depend on C-detected __int128 availability 0dccf98a21 Use preprocessor macros instead of autoconf to detect endianness b2c8c42cf1 Merge #795: Avoid linking libcrypto in the valgrind ct test. 57d3a3c64c Avoid linking libcrypto in the valgrind ct test. 79f1f7a4f1 Autodetect __int128 availability on the C side 0d7727f95e Add SECP256K1_FE_STORAGE_CONST_GET to 5x52 field 805082de11 Merge #696: Run a Travis test on s390x (big endian) 39295362cf Test travis s390x (big endian) 6034a04fb1 Merge #778: secp256k1_gej_double_nonzero supports infinity f60915906d Merge #779: travis: Fix argument quoting for ./configure 9e49a9b255 travis: Fix argument quoting for ./configure 18d36327fd secp256k1_gej_double_nonzero supports infinity 214cb3c321 Merge #772: Improve constant-timeness on PowerPC 40412b1930 Merge #774: tests: Abort if malloc() fails during context cloning tests 2e1b9e0458 tests: Abort if malloc() fails during context cloning tests 67a429f31f Suppress a harmless variable-time optimization by clang in _int_cmov 5b196338f0 Remove redundant "? 1 : 0" after comparisons in scalar code 3e5cfc5c73 Merge #741: Remove unnecessary sign variable from wnaf_const 66bb9320c0 Merge #773: Fix some compile problems on weird/old compilers. 1309c03c45 Fix some compile problems on weird/old compilers. 2309c7dd4a Merge #769: Undef HAVE___INT128 in basic-config.h to fix gen_context compilation 22e578bb11 Undef HAVE___INT128 in basic-config.h to fix gen_context compilation 3f4a5a10e4 Merge #765: remove dead store in ecdsa_signature_parse_der_lax f00d6575ca remove dead store in ecdsa_signature_parse_der_lax dbd41db16a Merge #759: Fix uninitialized variables in ecmult_multi test 2e7fc5b537 Fix uninitialized variables in ecmult_multi test 37dba329c6 Remove unnecessary sign variable from wnaf_const 6bb0b77e15 Fix test_constant_wnaf for -1 and add a test for it. 47a7b8382f Clear field elements when writing infinity 61d1ecb028 Added test with additions resulting in infinity 60f7f2de5d Don't assume that ALIGNMENT > 1 in tests ada6361dec Use ROUND_TO_ALIGN in scratch_create 8ecc6ce50e Add check preventing rounding to alignment from wrapping around in scratch_alloc 4edaf06fb0 Add check preventing integer multiplication wrapping around in scratch_max_allocation git-subtree-dir: src/secp256k1 git-subtree-split: 8ab24e8dad9d43fc6661842149899e3cc9213b24
2020-09-11Merge #19922: test: Run rpc_txoutproof.py even with wallet disabledWladimir J. van der Laan
faf251d854e3a670533ea3e9087e82c92f3ae533 test: gettxoutproof duplicate txid (João Barbosa) faf5eb45c4a08fbfd9a8c12534bca8adfe756ef2 test: Test empty array in gettxoutproof (MarcoFalke) fa56e866e8ac08b35e775a4e37a4e5849e093c7d test: Run rpc_txoutproof.py even with wallet disabled (MarcoFalke) faba790bd40b5a9e8849997785020790ff60571b test: MiniWallet: Default fee_rate in send_self_transfer, Pass in utxo_to_spend (MarcoFalke) fa65a11d0c9a34ff7f4cc4efd53367794e751749 test: bugfix: Actually pick largest utxo (MarcoFalke) Pull request description: Run the consensus test even when the wallet was not compiled. Also: * Minor bugfix in MiniWallet * Two new test cases (one cherry-picked from #19847) ACKs for top commit: jnewbery: utACK faf251d854e3a670533ea3e9087e82c92f3ae533. Thanks Marco! kristapsk: ACK faf251d854e3a670533ea3e9087e82c92f3ae533 Tree-SHA512: a5ab33695c88cfb3c369021d4506069c08ce298e24e891db55159130693ed3817444c72f6aad3f472235aa4597b2c601010af714411c2ec8ad9c2d2e0b00ecbc
2020-09-11Merge #19916: build: allow user to specify DIR_FUZZ_SEED_CORPUS for cov_fuzzfanquake
fb3bacce69a39bf86288ece239c1be63518e11fb .gitignore: ignore qa-assets/ folder (eugene) a9f201439a84096a209bebc11705656b08d1b488 build: use DIR_FUZZ_SEED_CORPUS if specified for cov_fuzz target (eugene) Pull request description: This PR contains two commits: - The cov_fuzz target now uses `DIR_FUZZ_SEED_CORPUS` as the seed directory instead of the hard-coded `qa-assets/fuzz_seed_corpus`. Otherwise, running it requires me to copy the corpus to the bitcoin directory first. In case `DIR_FUZZ_SEED_CORPUS` is not specified, the original default is used. - add qa-assets folder to gitignore Example usage: `make cov_fuzz DIR_FUZZ_SEED_CORPUS=~/workspace/qa-assets/fuzz_seed_corpus` It can also just be an environment variable. ACKs for top commit: fanquake: ACK fb3bacce69a39bf86288ece239c1be63518e11fb - looks fine. practicalswift: ACK fb3bacce69a39bf86288ece239c1be63518e11fb - patch looks correct Tree-SHA512: 19ad7c6a2b0c088df14fb71a217d956e66a69eea78f016cd1e914d39c5d7cc196766a637e6c941c6706322663010e7162e85f57e888b8f3b05d0c37d44740847
2020-09-11Merge #19870: doc: update PyZMQ install instructions, fix zmq_sub.py file ↵fanquake
permissions 062e6699c4ac48c3d46516190ec411dec3680a0d script: fix zmq_sub.py file permissions (Jon Atack) 36f8e0cce700576865e61035626e08c5e845a38a doc: update PyZMQ installation instructions, ZeroMQ link (Jon Atack) Pull request description: Seen while reviewing #19572. ACKs for top commit: theStack: ACK 062e6699c4ac48c3d46516190ec411dec3680a0d 🧷 fanquake: ACK 062e6699c4ac48c3d46516190ec411dec3680a0d Tree-SHA512: 2210d92385377d066984d0a83882c3ece9f0f41c901b7eb375af9cdb57296f50f227c68193ccf35926073c2b788d58976442791a9fce2fc0f76452804d5cee6a
2020-09-10Change CSipHasher's count variable to uint8_tPieter Wuille
2020-09-10tests: Add fuzzing harness for Keccak and SHA3_256practicalswift
2020-09-10Merge #19841: Implement Keccak and SHA3_256Wladimir J. van der Laan
ab654c7d587b33d62230394663020439f80cee28 Unroll Keccak-f implementation (Pieter Wuille) 3f01ddb01bfffd49dfa131898d1c674ac5d0ac99 Add SHA3 benchmark (Pieter Wuille) 2ac8bf95834c8a43ebf365f09fb610829733134b Implement keccak-f[1600] and SHA3-256 (Pieter Wuille) Pull request description: Add a simple (and initially unoptimized) Keccak/SHA3 implementation based on https://github.com/mjosaarinen/tiny_sha3/blob/master/sha3.c, as one will be needed for TORv3 support (the conversion from BIP155 encoding to .onion notation uses a SHA3-based checksum). In follow-up commits, a benchmark is added, and the Keccakf function is unrolled for a (for me) 4.9x speedup. Test vectors are taken from https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/secure-hashing#sha3vsha3vss. ACKs for top commit: practicalswift: ACK ab654c7d587b33d62230394663020439f80cee28 -- patch looks correct and no sanitizer complaints when doing some basic fuzz testing of the added code (remember: **don't trust: fuzz!**) :) laanwj: re-ACK ab654c7d587b33d62230394663020439f80cee28 vasild: ACK ab654c7 Tree-SHA512: 8a91b18c46e8fb178b7ff82046cff626180362337e515b92fbbd771876e795da2ed4e3995eb4849773040287f6e687237f469a90474ac53f521fc12e0f5031d9
2020-09-10Add OpenBSD instructions for building the Qt GUIgrubles