Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Don't resend wallet txs that aren't in our own mempool #7521
Conversation
|
utACK |
|
utACK @pstratem Unnested ACK? |
|
@laanwj sorry, needs backport |
|
@sipa typo |
|
Why not? How will they get relayed then? At least attempt to add it to our own mempool again before failing... |
|
@luke-jr My original attempt included trying to add it to your own mempool again first, but its an unfortunate amount of cs_main locking that would be needed. |
|
ACK (with moderate testing) |
That's a bug. They shouldn't be negative until a conflict is mined. |
Rebroadcasts are rare anyway, right? I don't see why locking would be an issue... |
|
@luke-jr This needs to be the simplest and most obviously-does-no-harm change to avoid a serious behavior regression in 0.12. The whole rebroadcast logic in general is brain-damaged and privacy destroying and we should fix it more completely, but this PR is not the time. |
|
@luke-jr yes, i'm saying that in 0.11 they were negative so weren't rebroadcast. now they aren't negative, so we need to explicitly not rebroadcast them. i dont think they are rare are they? |
|
@luke-jr In 0.11 same as in 0.12, a wallet transaction will be rejected by your mempool if your fee settings are higher than the tx pays. The regressed behavior is that in 0.12 the node will continually rebroadcast non-mempoolable (and non-mempool) transactions; which is incredibly deanonymizing (and somewhat bandwidth wasting). E.g. you pay someone a tiny amount with a 1e-8/byte fee when their mempool isn't full and then their client will continue to beacon forever... and because their own node hasn't and wouldn't mempool the transaction, it's completely clear that they're the origin. |
|
Oh! So this doesn't restore the "-1 if not in mempool" bug, it only restores the side effect of that preventing rebroadcast. Makes [enough] sense for now. |
|
@morcos Can you document the rationale here better in the commit message? Maybe something like:
|
|
Actually, this is a new condition in 0.12, since 0.11 never would create a transaction that wouldn't be accepted to the mempool (and why the -1 bug wasn't really quite a bug in 0.11). So this does seem to indeed still change the behaviour negatively... so I guess I'm back to not seeing a justification for this change. :( |
laanwj
added
the
Wallet
label
Feb 12, 2016
|
@luke-jr "wouldn't create" is too limited, people sendrawtransaction, wallets get copied, nodes get restarted with different settings, and this covers received transactions too. |
laanwj
added
the
Needs backport
label
Feb 15, 2016
jonasschnelli
commented on the diff
Feb 19, 2016
| @@ -1265,7 +1265,7 @@ bool CWalletTx::RelayWalletTransaction() | ||
| assert(pwallet->GetBroadcastTransactions()); | ||
| if (!IsCoinBase()) | ||
| { | ||
| - if (GetDepthInMainChain() == 0 && !isAbandoned()) { | ||
| + if (GetDepthInMainChain() == 0 && !isAbandoned() && InMempool()) { |
jonasschnelli
Member
|
|
utACK 5a2b1c0 |
|
utACK |
|
utACK 5a2b1c0 |
laanwj
merged commit 5a2b1c0
into
bitcoin:master
Mar 3, 2016
1 check passed
added a commit
that referenced
this pull request
Mar 3, 2016
added a commit
to MarcoFalke/bitcoin
that referenced
this pull request
Apr 27, 2016
|
Backported as part of #7938. Removing label 'Needs backport'. |
morcos commentedFeb 11, 2016
No description provided.