aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_resendwallettransactions.py
AgeCommit message (Collapse)Author
2020-12-06Merge #19893: test: Remove or explain syncwithvalidationinterfacequeueMarcoFalke
fa6af312277bb1b7e57d9b764d411c5b0873829f test: Document why syncwithvalidationinterfacequeue is needed in tests (MarcoFalke) fa135a13b8ddaa117bd090ec43a3eab3a95755c1 Revert "test: Add missing sync_all to wallet_balance test" (MarcoFalke) Pull request description: syncwithvalidationinterfacequeue is a hidden test-only RPC, so it should not be used when it is not needed. Thus, either remove it or explain why it is needed. ACKs for top commit: fjahr: Code review ACK fa6af312277bb1b7e57d9b764d411c5b0873829f Tree-SHA512: de30db4ab521184091ee5beeab02989138cf7cf05088f766a2fb106151b239310b63d5380cb79e2a072f72c5ae9513aecae8eb9c1c7be713771585c3cb04d63a
2020-10-13test: Speed up wallet_resendwallettransactions test with mockscheduler RPCMarcoFalke
2020-10-08test: Document why syncwithvalidationinterfacequeue is needed in testsMarcoFalke
2020-10-08Use mockable time everywhere in net_processingPieter Wuille
2020-09-26test: use explicit p2p objects where availableOliver Gugger
To make the intent of the tests easier to understand, we reference the p2p connection objects by their explicit names instead of the p2ps array.
2020-09-10[refactor] clarify tests by referencing p2p objects directlygzhao408
Use object returned from add_p2p_connection to refer to p2ps. Add a test class attribute if it needs to be used across many methods. Don't use the p2p property.
2020-08-26test: Update wait_until usage in tests not to use the one from utilsSeleme Topuz
Replace "wait_until()" usage from utils, with the ones from BitcoinTestFramework and P2PInterface. closes #19080
2020-08-21scripted-diff: Rename mininode to p2pJohn Newbery
-BEGIN VERIFY SCRIPT- sed -i 's/\.mininode/\.p2p/g' $(git grep -l "mininode") git mv test/functional/test_framework/mininode.py test/functional/test_framework/p2p.py -END VERIFY SCRIPT-
2020-08-21scripted-diff: Rename mininode_lock to p2p_lockJohn Newbery
-BEGIN VERIFY SCRIPT- sed -i 's/mininode_lock/p2p_lock/g' $(git grep -l "mininode_lock") -END VERIFY SCRIPT-
2020-05-25[test] Test that wallet transactions aren't rebroadcast before 12 hoursAmiti Uttarwar
2020-04-29Merge #18038: P2P: Mempool tracks locally submitted transactions to improve ↵fanquake
wallet privacy 50fc4df6c4e8a84bdda13ade7bed7a2131796f00 [mempool] Persist unbroadcast set to mempool.dat (Amiti Uttarwar) 297a1785360c4db662a7f3d3ade7b6b503258d39 [test] Integration tests for unbroadcast functionality (Amiti Uttarwar) 6851502472d3625416f0e7796e9f2a0379d14d49 [refactor/test] Extract P2PTxInvStore into test framework (Amiti Uttarwar) dc1da48dc5e5526215561311c184a8cbc345ecdc [wallet] Update the rebroadcast frequency to be ~1/day. (Amiti Uttarwar) e25e42f20a3aa39651fbc1f9fa3df1a49f1f5868 [p2p] Reattempt initial send of unbroadcast transactions (Amiti Uttarwar) 7e93eecce3bc5a1b7bb0284e06f9e2e69454f5ba [util] Add method that returns random time in milliseconds (Amiti Uttarwar) 89eeb4a3335f8e871cc3f5286af4546dff66172a [mempool] Track "unbroadcast" transactions (Amiti Uttarwar) Pull request description: This PR introduces mempool tracking of unbroadcast transactions and periodic reattempts at initial broadcast. This is a part of the rebroadcast project, and a standalone privacy win. The current rebroadcast logic is terrible for privacy because 1. only the source wallet rebroadcasts transactions and 2. it does so quite frequently. In the current system, if a user submits a transaction that does not immediately get broadcast to the network (eg. they are offline), this "rebroadcast" behavior is the safety net that can actually serve as the initial broadcast. So, keeping the attempts frequent is important for initial delivery within a reasonable timespan. This PR aims to improve # 2 by reducing the wallet rebroadcast frequency to ~1/day from ~1/15 min. It achieves this by separating the notion of initial broadcast from rebroadcasts. With these changes, the mempool tracks locally submitted transactions & periodically reattempts initial broadcast. Transactions submitted via the wallet or RPC are added to an "unbroadcast" set & are removed when a peer sends a `getdata` request, or the transaction is removed from the mempool. Every 10-15 minutes, the node reattempts an initial broadcast. This enables reducing the wallet rebroadcast frequency while ensuring the transactions will be propagated to the network. For privacy improvements around # 1, please see #16698. Thank you to gmaxwell for the idea of how to break out this subset of functionality (https://github.com/bitcoin/bitcoin/pull/16698#issuecomment-571399346) ACKs for top commit: fjahr: Code review ACK 50fc4df6c4e8a84bdda13ade7bed7a2131796f00 MarcoFalke: ACK 50fc4df6c4e8a84bdda13ade7bed7a2131796f00, I think this is ready for merge now 👻 amitiuttarwar: The current tip `50fc4df` currently has 6 ACKs on it, so I've opened #18807 to address the last bits. jnewbery: utACK 50fc4df6c4e8a84bdda13ade7bed7a2131796f00. ariard: Code Review ACK 50fc4df (minor points no need to invalid other ACKs) robot-visions: ACK 50fc4df6c4e8a84bdda13ade7bed7a2131796f00 sipa: utACK 50fc4df6c4e8a84bdda13ade7bed7a2131796f00 naumenkogs: utACK 50fc4df Tree-SHA512: 2dd935d645d5e209f8abf87bfaa3ef0e4492705ce7e89ea64279cb27ffd37f4727fa94ad62d41be331177332f8edbebf3c7f4972f8cda10dd951b80a28ab3c0f
2020-04-23[refactor/test] Extract P2PTxInvStore into test frameworkAmiti Uttarwar
2020-04-23[wallet] Update the rebroadcast frequency to be ~1/day.Amiti Uttarwar
Since the mempool unbroadcast mechanism handles the reattempts for initial broadcast, the wallet rebroadcast attempts can be much less frequent (previously ~1/30 min)
2020-04-16scripted-diff: Bump copyright headersMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2020-02-29test: Add missing syncwithvalidationinterfacequeueMarcoFalke
2019-07-02rpc: Clarify that block count means height excl genesisMarcoFalke
2019-04-11Merge #15773: test: Add BitcoinTestFramework::sync_* methodsMarcoFalke
fafe5f0d09 test: Remove unused imports (MarcoFalke) fa16a09215 scripted-diff: use self.sync_* methods (MarcoFalke) faf77f9b90 test: Pass self to test_simple_bumpfee_succeeds (MarcoFalke) fa6dc7c5c3 test: Add BitcoinTestFramework::sync_* methods (MarcoFalke) fafe008cb4 test: Pass at most one node group to sync_all (MarcoFalke) fa4680ed09 scripted-diff: Rename sync_blocks to send_blocks to avoid name collisions and confusion (MarcoFalke) Pull request description: This adds methods to the test framework that can be called by just `self.sync_*()`. This avoids having to import the underlying util method. Also, in the default case, where all nodes are synced this avoid having to pass `self.nodes` explicitly. So the effective changes are: ```diff @@ -from test_framework.util import sync_blocks, sync_mempools @@ - sync_blocks(self.nodes) + self.sync_blocks() @@ - sync_mempools(self.nodes) + self.sync_mempools() ACKs for commit fafe5f: promag: utACK fafe5f0. jonatack: ACK https://github.com/bitcoin/bitcoin/pull/15773/commits/fafe5f0d09db6778173a1079d93c314e9317708c, nice simplification. Tree-SHA512: 5c81840edf9fb3c5de2d7bf95ca36a5a8d23567cd1479a0f4044547c2080e9a3c5cf375357bc8eebb5b68829be050a171ab2512cfd47b89feed51fe3bad2cd72
2019-04-09test: Remove unused importsMarcoFalke
2019-04-09[wallet] Schedule tx rebroadcasts in walletJohn Newbery
Removes the now-unused Broadcast/ResendWalletTransactions interface from validationinterface. The wallet_resendwallettransactions.py needs a sleep added at the start to make sure that the rebroadcast scheduler is warmed up before the next block is mined.
2019-03-27[tests] Add test for wallet rebroadcastsJohn Newbery
The existing wallet_resendwallettransactions.py test only tests the resendwallettransactions RPC. It does not test whether transactions are actually rebroadcast, or whether the rebroadcast logic is called on a timer. This commit updates the test to not use the resendwallettransactions RPC and test that transactions are rebroadcast on a timer.
2018-09-10qa: Run all tests even if wallet is not compiledMarcoFalke
2018-07-27Update copyright headers to 2018DrahtBot
2018-01-25[tests] Rename wallet_* functional tests.Anthony Towns