aboutsummaryrefslogtreecommitdiff
path: root/test/functional
AgeCommit message (Collapse)Author
2020-01-04Merge #17853: [0.19] psbt: handle unspendable psbtsfanquake
ca5f8deefd778195cb10a3419d3b5c0693abb958 Mark PSBTs spending unspendable outputs as invalid in analysis (Andrew Chow) 551583398ba4fdae973c047bc60556ffa17c6431 Have a PSBTAnalysis state that indicates invalid PSBT (Andrew Chow) Pull request description: Backport of #17524 ACKs for top commit: achow101: ACK ca5f8deefd778195cb10a3419d3b5c0693abb958 Tree-SHA512: b5f2b951beb9477ac3176a0aade845654d2108ca3a9fbc72097ba4b4797df5419053d6b489bbaa03be08cb8cfdc37a83db8b7642ffa52d42b7aa8ea14aff39cc
2020-01-03Fix origfee return for bumpfee with feerate argGregory Sanders
Github-Pull: #17643 Rebased-From: 02afb0c550dc8529918460c845d1da3adf236eed
2020-01-03Mark PSBTs spending unspendable outputs as invalid in analysisAndrew Chow
Github-Pull: #17524 Rebased-From: 773d4572a4864ab7b6380858d07d9579ff6dd9a2
2019-10-02Merge #16727: wallet: Explicit feerate for bumpfeeWladimir J. van der Laan
c812aba3949b6ab81030dc708cda7c8821be2f70 test bumpfee fee_rate argument (ezegom) 9f25de3d9eb8d012ca1a98cbcd28021e3e1c85ee rpc bumpfee check fee_rate argument (ezegom) 88e5f997dfab3f03bb1ec3f149eaff8dcc2981fe rpc bumpfee: add fee_rate argument (ezegom) 1a4c791cf49ff15aa9deba4388c0180b8f47f15b rpc bumpfee: move feerate estimation logic into separate method (ezegom) Pull request description: Taking over for https://github.com/bitcoin/bitcoin/pull/16492 which seems to have gone inactive. Only minor commit cleanups, rebase, and some help text fixes on top of previous PR. Renamed `feeRate` to `fee_rate` to reflect updated guidelines. ACKs for top commit: Sjors: Code review ACK c812aba laanwj: ACK c812aba3949b6ab81030dc708cda7c8821be2f70 Tree-SHA512: 5f7f51bd780a573ccef1ccd72b0faf3e5d143f6551060a667560c5163f7d9480e17e73775d1d7bcac0463f3b6b4328f0cff7b27e39483bddc42a530f4583ce30
2019-09-30Merge #16987: test: Correct docstring param name.MarcoFalke
e28d8f893656a5b60dd9c0ec11a88611a56d2ab4 Correct docstring param name. (John Bampton) Pull request description: Small fix to correct the Python docstring. ACKs for top commit: laanwj: ACK e28d8f893656a5b60dd9c0ec11a88611a56d2ab4 MarcoFalke: ACK e28d8f8 Tree-SHA512: 7bec1c6b166c768dd69fc6b94eb80ceeaa0258985b9a11956e336940d403785e7d09d0084d9b870b637ec784db044cf4c0f8ac3f0fcdf431090f003016ef13a9
2019-09-30test bumpfee fee_rate argumentezegom
2019-09-30qa: Fix service flag comparison check in rpc_net testLuke Dashjr
2019-09-30Correct docstring param name.John Bampton
2019-09-27Merge #16817: rpc: Fix casing in getblockchaininfo to be inline with other ↵Wladimir J. van der Laan
fields 1a02edb3f2803b6f82f06a31acf0b0e5fc19bd1c [RPC] Fix casing in getblockchaininfo to be inline with the rest of the response (Dan Gershony) Pull request description: The response in the RPC result `startTime` is camel cased while the rest of the response seems to be lower cased. If this was intentional please ignore and close this PR. Note: RPC field case changes might break existing callers ACKs for top commit: laanwj: ACK 1a02edb3f2803b6f82f06a31acf0b0e5fc19bd1c Tree-SHA512: 6f0eaf2b4aaf73c9a9bf1fbd4af59af5f95fc012fa88f94e050e6ae273b3ad647f5729df53bfce91e1a925fe4fd7b14818908bb6131a81413a555137d1007d7c
2019-09-26[RPC] Fix casing in getblockchaininfo to be inline with the rest of the responseDan Gershony
The response in the RPC result `starttime` is camel cased while the rest of the response seems to be lower cased. If this was intentional please ignore this PR. Note: case might break existing callers Reflect the change in the test data Change to snake case
2019-09-25Merge #16929: test: follow-up to rpc: default maxfeerate value as BTC/kBWladimir J. van der Laan
6659810e2f38994813aa9d7644d570ae0152fa2c test: use named args for sendrawtransaction calls (Jon Atack) 5c1cd78b7e582660a78d9d9dec673967a6b78936 doc: improve rawtransaction code/test docs (Jon Atack) acc14c50932c7353f94d3d4367d05021606e0ca9 test: fix incorrect value in rpc_rawtransaction.py (Jon Atack) Pull request description: Follow-up to PR #16521. - Fix incorrect value in rpc_rawtransaction test as per https://github.com/bitcoin/bitcoin/pull/16521/files#r325842308 - Improve the code docs - Use named arguments as per https://github.com/bitcoin/bitcoin/pull/16521/files#r310715127 Happy to squash or keep only the first commit if the others are too fixup-y. ACKs for top commit: laanwj: ACK 6659810e2f38994813aa9d7644d570ae0152fa2c Tree-SHA512: bf5258f23802ab3ba3defb8791097e08e63f3e2af21023f832cd270dc88d1fa04349e921d69f9f5fedac5dce5cd3c1cc46b48febbede4bc18dccb8be994565b2
2019-09-25doc: replace outdated OpenSSL comment in test READMEfanquake
2019-09-22Merge #16918: test: Make PORT_MIN in test runner configurableMarcoFalke
fa69588537bc91c0aedbc89ef1760d89cbffad75 test: Make PORT_MIN in test runner configurable (MarcoFalke) Pull request description: This is needed when some ports in the port range are used by other processes. Note that simply assigning the ports dynamically does not work: * We spin up several nodes per test (each node gets its own port) * We run several tests in parallel So to avoid nodes from different tests colliding on ports, the port assignment must be deterministic (can not be dynamic). Fixes: #10869 ACKs for top commit: practicalswift: ACK fa69588537bc91c0aedbc89ef1760d89cbffad75 -- diff looks correct promag: ACK fa69588537bc91c0aedbc89ef1760d89cbffad75. Tree-SHA512: e79adb015e7de79064e2d14336c38bc9672bd779ad6c52917721897e73f617c39d32c068a369c26670002a6c4ab95a71ef3a6878ebdd9710e02f410e2f7bcd14
2019-09-22test: use named args for sendrawtransaction callsJon Atack
involving more than one argument.
2019-09-21doc: improve rawtransaction code/test docsJon Atack
2019-09-21test: fix incorrect value in rpc_rawtransaction.pyJon Atack
2019-09-20Merge #16920: test: Fix extra_args in wallet_import_rescan.pyMarcoFalke
fa2e038691263ddd107df233148d9814630d4a18 test: Fix extra_args in wallet_import_rescan.py (MarcoFalke) Pull request description: Bug introduced by me (:man_facepalming:) in fa25668e1c8982548f1c6f94780709c625811469 For reference: ``` >>> a = [[]]*2 >>> a[0] += ['ONE'] >>> a [['ONE'], ['ONE']] >>> a = [[] for _ in range(2)] >>> a[0] += ['ONE'] >>> a [['ONE'], []] ACKs for top commit: theStack: utACK fa2e038 Tree-SHA512: 7d75a0d06233d013d62198ea95793612242254d5d90f393d01b2beef5abc78d6e85c796532311638f16cfed3b66a7ae41a108c0fe6f0f5d7f6616b042c670df7
2019-09-19test: Fix extra_args in wallet_import_rescan.pyMarcoFalke
2019-09-19test: Make PORT_MIN in test runner configurableMarcoFalke
2019-09-19Test: Move common function assert_approx() into util.pyfridokus
2019-09-19Merge #16885: doc: Update tx-size-small comment with relevant CVE disclosurefanquake
c4b0c08f7c91bcef48dd023982ff132795575247 Update tx-size-small comment with relevant CVE disclosure (Gregory Sanders) Pull request description: Code first introduced under https://github.com/bitcoin/bitcoin/pull/11423 with essentially no description and no discussion. ACKs for top commit: MarcoFalke: ACK c4b0c08f7c91bcef48dd023982ff132795575247 fanquake: ACK c4b0c08f7c91bcef48dd023982ff132795575247 Tree-SHA512: 95d5c92998b8b1e944c477dbaee265b62612b6e815099ab31d9ff580b4dff777abaf7f326a284644709f918aa1510412d62310689b1250ef6e64de7b19ca9f71
2019-09-18Update tx-size-small comment with relevant CVE disclosureGregory Sanders
2019-09-18Merge #16898: test: Remove connect_nodes_biMarcoFalke
fadfd844de8c53034a97dfa6f771ffe9f523fba2 test: Remove unused connect_nodes_bi (MarcoFalke) fa3b9ee8b2280af4bcbcfffff275aaf8dd125929 scripted-diff: test: Replace connect_nodes_bi with connect_nodes (MarcoFalke) faaee1e39a91b3f603881655d3980c29af09852b test: Use connect_nodes when connecting nodes in the test_framework (MarcoFalke) 1111bb91f517838e5b9f778bf6b5a9c8d561e857 test: Reformat python imports to aid scripted diff (MarcoFalke) Pull request description: By default all test nodes are connected in a chain. However, instead of just a single connection between each pair of nodes, we end up with up to four connections for a "middle" node (two outbound, two inbound, from each side). This is generally redundant (tx and block relay should succeed with just a single connection) and confusing. For example, test timeouts after a call to `sync_` may be racy and hard to reproduce. On top of that, the test `debug.log`s are hard to read because txs and block invs may be relayed on the same connection multiple times. Fix this by inlining `connect_nodes_bi` in the two tests that need it, and then replace it with a single `connect_nodes` in all other tests. Historic background: `connect_nodes_bi` has been introduced as a (temporary?) workaround for bug #5113 and #5138, which has long been fixed in #5157 and #5662. ACKs for top commit: laanwj: ACK fadfd844de8c53034a97dfa6f771ffe9f523fba2 jonasschnelli: utACK fadfd844de8c53034a97dfa6f771ffe9f523fba2 - more of less a cleanup PR. promag: Tested ACK fadfd844de8c53034a97dfa6f771ffe9f523fba2, ran extended tests. Tree-SHA512: 2d027a8fd150749c071b64438a0a78ec922178628a7dbb89fd1212b0fa34febd451798c940101155d3617c0426c2c4865174147709894f1f1bb6cfa336aa7e24
2019-09-18Merge #16521: rpc: Use the default maxfeerate value as BTC/kBWladimir J. van der Laan
2dfd6834ef8737e16e4b96df0c459f30a0721d6c test: Add test for default maxfeerate in sendrawtransaction (Joonmo Yang) 261843e4bef96ab296a9775819a99bfa60cad743 wallet/rpc: Use the default maxfeerate value as BTC/kB (Joonmo Yang) Pull request description: Fixes https://github.com/bitcoin/bitcoin/issues/16382 This patch tries to treat `maxfeerate` in sendrawtransaction/testmempoolaccept RPC as a rate(BTC/kB) instead of an absolute value(BTC). The included test case checks if the new behavior works correctly, by using the transaction with an absolute fee of ~0.02BTC, where the fee rate is ~0.2BTC/kB. This test should be failing if the default `maxfeerate` is 0.1BTC, but pass if the default value is 0.1BTC/kB ACKs for top commit: laanwj: ACK 2dfd6834ef8737e16e4b96df0c459f30a0721d6c (ACKs by Sjors and MarcoFalke above for trivially different code) Tree-SHA512: a1795bffe8a182acef8844797955db1f60bb0c0ded97148f3572dc265234d5219271a3a7aa0b6418a43f73b2b2720ef7412ba169c99bb1cdcac52051f537d6af
2019-09-18Merge #16512: rpc: Shuffle inputs and outputs after joining psbtsWladimir J. van der Laan
c0b5d9710322a614a50ab5da081558cf6a38ad2a Test that joinpsbts randomly shuffles the inputs (Andrew Chow) 6f405a1d3b38395e35571b68aae55cae50e0762a Shuffle inputs and outputs after joining psbts (Andrew Chow) Pull request description: `joinpsbts` currently just adds the inputs and outputs in the order of that the PSBTs were provided. This makes it extremely easy to identify which outputs belong to which inputs. This PR changes that so that all of the inputs and outputs are shuffled in the joined transaction. ACKs for top commit: instagibbs: utACK https://github.com/bitcoin/bitcoin/pull/16512/commits/c0b5d9710322a614a50ab5da081558cf6a38ad2a jonatack: ACK c0b5d9710322a614a50ab5da081558cf6a38ad2a modulo suggestions for later. Tree-SHA512: 14a0b7aae07d92e6d2c76a3a3b228b481e1964cb7d34f97515bdda18e2ea05a9f97c5a22affc143b86ae8b95c3cb239849fb54219d65512bc2112264dca915c8
2019-09-18Merge #14696: qa: Add explicit references to related CVE's in ↵Wladimir J. van der Laan
p2p_invalid_block test. 0c62e3aa73839e97e65a3155e06a98d84b700a1e New regression testing for CVE-2018-17144, CVE-2012-2459, and CVE-2010-5137. (lucash-dev) 38bfca6bb2ad68719415e9c54a981441052da072 Added comments referencing multiple CVEs in tests and production code. (lucash-dev) Pull request description: This functional test includes two scenarios that test for regressions of vulnerabilities, but they are only briefly described. There are freely available documents explaining in detail the issues, but without explicit mentions, the developer trying to maintain the code needs an additional step of digging in commit history and PR conversations to figure it out. Added comments to explicitly mention CVE-2018-17144 and CVE-2012-2459, for more complete documentation. This improves developer experience by making understanding the tests easier. ACKs for top commit: laanwj: ACK 0c62e3aa73839e97e65a3155e06a98d84b700a1e, checked the CVE numbers, thanks for adding documentation Tree-SHA512: 3ee05351745193b8b959e4a25d50f25a693b2d24b0732ed53cf7d5882df40b5dd0f1877bd5c69cffb921d4a7acf9deb3cc1160b96dc730d9b5984151ad06b7c9
2019-09-17Merge #16864: test: Add python bech32 impl round-trip testMarcoFalke
ae0add8dfe23310e10f18732dbd54360ce405b9b Add python bech32 impl round-trip test (Gregory Sanders) Pull request description: Currently there is a single use of `segwit_addr.encode`, and zero uses of `segwit_addr.decode` in the codebase. This adds a simple round-trip test of the implementation to avoid future regressions. Top commit has no ACKs. Tree-SHA512: feb3303f240f5987993e092ec15b878c8db3957d338db6a08fbe947bbfea0c558c7ebc26f8052c38a69d85c354f24e71431e19e0a2991c3c64b604f6d50697ff
2019-09-17Merge #16888: test: Bump timeouts in slow running testsMarcoFalke
fa502cb6f07f9a0c170185b760e3e349c6dac5f8 test: Bump timeouts in slow running tests (MarcoFalke) Pull request description: Fixes #16794 ACKs for top commit: jamesob: ACK https://github.com/bitcoin/bitcoin/pull/16888/commits/fa502cb6f07f9a0c170185b760e3e349c6dac5f8 Tree-SHA512: 52d1a6f9febe066332cc9df40638fdc3e8aaf1990caf912073b42f2f6615879da5512533ff71b85b4865034bc30da46945d34916669068e004e68058aeb04e90
2019-09-17test: Remove unused connect_nodes_biMarcoFalke
2019-09-17scripted-diff: test: Replace connect_nodes_bi with connect_nodesMarcoFalke
-BEGIN VERIFY SCRIPT- sed -i --regexp-extended -e 's/connect_nodes_bi\(self.nodes,\s*(.),\s*/connect_nodes(self.nodes[\1], /g' $(git grep -l connect_nodes_bi) sed -i --regexp-extended -e 's/connect_nodes_bi(,| )/connect_nodes\1/g' $(git grep -l connect_nodes_bi) -END VERIFY SCRIPT-
2019-09-17test: Use connect_nodes when connecting nodes in the test_frameworkMarcoFalke
2019-09-17test: Reformat python imports to aid scripted diffMarcoFalke
2019-09-16test: Bump timeouts in slow running testsMarcoFalke
2019-09-16Merge #16845: test: Add notes on how to generate data/wallets/high_minversionMarcoFalke
2222c96deec0f636dee6e49efb745f29b06a40a5 test: Add notes on how to generate data/wallets/high_minversion (MarcoFalke) Pull request description: I forgot to do this in #16796 ACKs for top commit: ryanofsky: ACK 2222c96deec0f636dee6e49efb745f29b06a40a5 Tree-SHA512: 5f24ffa641b97eac4febad42ade7228b14fa72335c918a10880c5dec86a3ecc3075a31526f275188e07fea95b8e2c6320c64f716099f604b00e13d5366fcee37
2019-09-16test: Add notes on how to generate data/wallets/high_minversionMarcoFalke
2019-09-16Merge #16737: test: Establish only one connection between nodes in ↵Wladimir J. van der Laan
rpc_invalidateblock fae961de6be3e2ab9793d437079651541e219e71 test: Establish only one connection between nodes in rpc_invalidateblock (MarcoFalke) Pull request description: Headers and block sync should eventually converge to the same result, regardless of whether the peers treat each other as "inbound" or "outbound". `connect_nodes_bi` has been introduced as a (temporary?) workaround for bug #5113 and #5138, which has long been fixed in #5157 and #5662. Thus remove the `connect_nodes_bi` workaround from the rpc_invalidateblock test. Conveniently, this also closes #16453. See https://github.com/bitcoin/bitcoin/issues/16444#issuecomment-514801708 for rationale ACKs for top commit: laanwj: ACK fae961de6be3e2ab9793d437079651541e219e71 Tree-SHA512: b3614c66a205823df73f64d19cacfbec269beb5db52ff79004d746e17d7c0dfb43ab9785fdddc97e2a76fe76286c8c605b34df3dda4a2bf5be035f01169ae89a
2019-09-15Add python bech32 impl round-trip testGregory Sanders
2019-09-15test: improve gettransaction test coverageJon Atack
- Test gettransaction response without verbose, with verbose=False, and with verbose=True. - In each case, test presence of expected fields in the output, including absence of the "decoded" field when `verbose` is not passed or false. - Test that the "details" field contains the expected receive vout in each case.
2019-09-14rpc: fix regression in gettransactionJon Atack
PR 16866 renamed the 'decode' argument in gettransaction to 'verbose' to make it more consistent with other RPC calls like getrawtransaction. However, it seems it inadvertently overloaded the 'details' fields when 'verbose' is passed. The result is that the original 'details' fields are no longer returned, which seems to be a breaking API change. This PR takes the simplest path to restoring the 'details' fields by renaming them from 'details' back to 'decoded', while leaving the 'verbose' argument for API consistency. It also addresses [this comment](https://github.com/bitcoin/bitcoin/pull/16185#discussion_r320740413) to mention that the 'decoded' field is identical to decoderawtransaction. Update the RPC help, functional test, and release note.
2019-09-13[wallet] Rename 'decode' argument in gettransaction method to 'verbose'John Newbery
This makes the RPC method consistent with other RPC methods that have a 'verbose' option. Change the name of the return object from 'decoded' to details. Update help text.
2019-09-12Merge #16551: test: Test that low difficulty chain fork is rejectedMarcoFalke
333317ce6b67aa92f7363d48cd750712190b4b6b test: Test that low difficulty chain fork is rejected (MarcoFalke) fa31dc1bf4ee471c4641eef8de02702ba0619ae7 test: Pass down correct chain name in tests (MarcoFalke) Pull request description: To prevent OOM, Bitcoin Core will reject chain forks at low difficulty by default. This is the only use-case of checkpoints, so add a test for it to make sure the feature works as expected. If it didn't work, checkpoints would have no use-case and we might as well remove them ACKs for top commit: Sjors: Thanks for adding the node 1 example. Code review ACK 333317c Tree-SHA512: 90dffa540d0904f3cffb61d2382b1a26f84fe9560b7013e4461546383add31a8757b350616a6d43217c59ef7b8b2a1b62bb3bab582c679cbb2c660a782ce7be1
2019-09-12Merge #16850: test: `servicesnames` field in `getpeerinfo` and `getnetworkinfo`Wladimir J. van der Laan
1d524c62ea679aa89770f9fdcd72b84f013639cb tests: rename 'test_getnetworkinginfo' in 'test_getnetworkinfo' (darosior) 07a8f65031c448971ee665f3db0fbf883a34465b tests: add a test for the 'servicesnames' RPC field (darosior) Pull request description: As per https://github.com/bitcoin/bitcoin/pull/16787#issuecomment-529801457, fixes #16844. This adds a test for both commands in the first commit and renames the test for `getnetworkinfo` in the second commit. ACKs for top commit: laanwj: ACK 1d524c62ea679aa89770f9fdcd72b84f013639cb Tree-SHA512: 8267dce4d54356debab75014e6f9ba885b892da605ed32f26a5446c232992fcae761861bb678adbdb942815d4706f3768c70deee6afec68f219b23605475be01
2019-09-11tests: rename 'test_getnetworkinginfo' in 'test_getnetworkinfo'darosior
Since it's the name of the RPC call
2019-09-11tests: add a test for the 'servicesnames' RPC fielddarosior
In getpeerinfo and getnetworkinfo
2019-09-11Merge #16251: Improve signrawtransaction error reportingfanquake
ec4c79326bb670c2cc1757ecfb1900f8460c5257 signrawtransaction*: improve error for partial signing (Anthony Towns) 3c481f8921bbc587cf287329f39243abe703b868 signrawtransactionwithkey: better error messages for bad redeemScript/witnessScript (Anthony Towns) Pull request description: Two fixes for `signrawtransactionwith{key,wallet}` (in addition to #16250): one that checks redeemScript/witnessScript matches scriptPubKey (and if both are provided that they match each other sanely), and the other changes the warning when some-but-not-all the signatures for a CHECKMULTISIG are provided to something that suggests more signatures may be all that's required. Fixes: #13218 Fixes: #14823 ACKs for top commit: instagibbs: utACK https://github.com/bitcoin/bitcoin/pull/16251/commits/ec4c79326bb670c2cc1757ecfb1900f8460c5257 achow101: Code Review ACK ec4c79326bb670c2cc1757ecfb1900f8460c5257 meshcollider: utACK ec4c79326bb670c2cc1757ecfb1900f8460c5257 Tree-SHA512: 0c95c91d498e85b834662b9e5c83f336ed5fd306be7701ce1dbfa0836fbeb448a267a796585512f7496e820be668b07c2a0a2f45e52dc23f09ee7d9c87e42b35
2019-09-10signrawtransactionwithkey: better error messages for bad ↵Anthony Towns
redeemScript/witnessScript This adds checks to ensure the redeemScript/witnessScript actually correspond to the provided scriptPubKey, and, if both are provided, that they are sensibly related to each other. Thanks to github user passionofvc for raising this issue.
2019-09-09Merge #16796: wallet: Fix segfault in CreateWalletFromFileSamuel Dobson
fa734603b78ba31ebf0da5d2dbe87386eafff01a wallet: Fix segmentation fault in CreateWalletFromFile (MarcoFalke) fab3c34412379598b812631e3c123e9467cdc485 test: Print both messages on failure in assert_raises_message (MarcoFalke) faa13539d5262bb7a512e9ff82e80083e04315ee wallet: Fix documentation around WalletParameterInteraction (MarcoFalke) Pull request description: Comes with a test to aid review. The test should fail without the fix to bitcoind The following `CreateWalletFromFile` issues are fixed: * `walletFile` refers to freed memory and will thus corrupt the debug.log and/or crash the node if read * `WalletParameterInteraction` was moved to `CreateWalletFromFile` and `WalletInit::ParameterInteraction` without updating the documentation ACKs for top commit: promag: ACK fa734603b78ba31ebf0da5d2dbe87386eafff01a. darosior: ACK fa734603b78ba31ebf0da5d2dbe87386eafff01a meshcollider: LGTM, code-read ACK fa734603b78ba31ebf0da5d2dbe87386eafff01a Tree-SHA512: 2aceb63a3f25b90a840cfa08d37f5874aad4eb3df8c2ebf94e2ed18b55809b185e6920bdb345b988bff1fcea5e68a214fe06c361f7da2c01a3cc29e0cc421cb4
2019-09-09Merge #16285: rpc: Improve scantxoutset response and help messageWladimir J. van der Laan
bdd6a4fd5da44c2575be9195ecb4213a13e74511 qa: Check scantxoutset result against gettxoutsetinfo (João Barbosa) fc0c410d6e19dd8e3abbc9b0fc13c836e6678750 rpc: Improve scantxoutset response and help message (João Barbosa) Pull request description: The new response keys `height` and `bestblock` allow the client to know at what point the scan took place. The help message now has all the response keys (`result` and `txouts` were missing) and it's improved a bit. Note that `searched_items` key is renamed to `txouts`, considering `scantxoutset` is marked experimental. ACKs for top commit: laanwj: ACK bdd6a4fd5da44c2575be9195ecb4213a13e74511 Tree-SHA512: 6bb7c3464b19857b756b8bc491ab7c58b0d948aad8c005b26ed27c55a1278f5639217e11a315bb505b4f44ebe86f413068c1e539c8a5f7a4007735586cc6443c
2019-09-09qa: Check scantxoutset result against gettxoutsetinfoJoão Barbosa
2019-09-07Merge #15759: p2p: Add 2 outbound block-relay-only connectionsfanquake
0ba08020c9791f7caf5986ad6490c16a2b66cd83 Disconnect peers violating blocks-only mode (Suhas Daftuar) 937eba91e1550bc3038dc541c236ac83e0a0e6d5 doc: improve comments relating to block-relay-only peers (Suhas Daftuar) 430f489027f15c1e4948ea4378954df24e3fee88 Don't relay addr messages to block-relay-only peers (Suhas Daftuar) 3a5e885306ea954d7eccdc11502e91a51dab8ec6 Add 2 outbound block-relay-only connections (Suhas Daftuar) b83f51a4bbe29bf130a2b0c0e85e5bffea107f75 Add comment explaining intended use of m_tx_relay (Suhas Daftuar) e75c39cd425f8c4e5b6bbb2beecb9c80034fefe1 Check that tx_relay is initialized before access (Suhas Daftuar) c4aa2ba82211ea5988ed7fe21e1b08bc3367e6d4 [refactor] Change tx_relay structure to be unique_ptr (Suhas Daftuar) 4de0dbac9b286c42a9b10132b7c2d76712f1a319 [refactor] Move tx relay state to separate structure (Suhas Daftuar) 26a93bce29fd813e1402b013f402869c25b656d1 Remove unused variable (Suhas Daftuar) Pull request description: Transaction relay is optimized for a combination of redundancy/robustness as well as bandwidth minimization -- as a result transaction relay leaks information that adversaries can use to infer the network topology. Network topology is better kept private for (at least) two reasons: (a) Knowledge of the network graph can make it easier to find the source IP of a given transaction. (b) Knowledge of the network graph could be used to split a target node or nodes from the honest network (eg by knowing which peers to attack in order to achieve a network split). We can eliminate the risks of (b) by separating block relay from transaction relay; inferring network connectivity from the relay of blocks/block headers is much more expensive for an adversary. After this commit, bitcoind will make 2 additional outbound connections that are only used for block relay. (In the future, we might consider rotating our transaction-relay peers to help limit the effects of (a).) ACKs for top commit: sipa: ACK 0ba08020c9791f7caf5986ad6490c16a2b66cd83 ajtowns: ACK 0ba08020c9791f7caf5986ad6490c16a2b66cd83 -- code review, ran tests. ran it on mainnet for a couple of days with MAX_BLOCKS_ONLY_CONNECTIONS upped from 2 to 16 and didn't observe any unexpected behaviour: it disconnected a couple of peers that tried sending inv's, and it successfully did compact block relay with some block relay peers. TheBlueMatt: re-utACK 0ba08020c9791f7caf5986ad6490c16a2b66cd83. Pointed out that stats.fRelayTxes was sometimes uninitialized for blocksonly peers (though its not a big deal and only effects RPC), which has since been fixed here. Otherwise changes are pretty trivial so looks good. jnewbery: utACK 0ba08020c9791f7caf5986ad6490c16a2b66cd83 jamesob: ACK https://github.com/bitcoin/bitcoin/commit/0ba08020c9791f7caf5986ad6490c16a2b66cd83 Tree-SHA512: 4c3629434472c7dd4125253417b1be41967a508c3cfec8af5a34cad685464fbebbb6558f0f8f5c0d4463e3ffa4fa3aabd58247692cb9ab8395f4993078b9bcdf