Skip to content

Conversation

achow101
Copy link
Member

@achow101 achow101 commented Aug 5, 2020

It's not clear what use there is to keeping -zapwallettxes given that it's intended usage has been superseded by abandontransaction. So this removes it outright.

Alternative to #19700

@ryanofsky
Copy link
Contributor

This seems reasonable if abandontransaction is a good alternative. I was also wondering if -zapwallettxes is fully working because it loops over m_spk_managers on the dummy wallet without calling SetupLegacyScriptPubKeyMan first

@achow101
Copy link
Member Author

achow101 commented Aug 5, 2020

I was also wondering if -zapwallettxes is fully working because it loops over m_spk_managers on the dummy wallet without calling SetupLegacyScriptPubKeyMan first

It looks like that's not even a reachable code path as WalletBatch::ZapWalletTx can't return DBErrors::NEED_REWRITE.

@DrahtBot
Copy link
Contributor

DrahtBot commented Aug 6, 2020

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@laanwj
Copy link
Member

laanwj commented Aug 6, 2020

Concept ACK

Removing all transactions from the wallet a sledge-hammer option. If there is any need for this it should be the wallet maintenance tool. But if its use is fully replaced by abandontransaction well, better to get rid of it.

If we do this, please keep the option as hidden option and exit with an error explaining to use abandontransaction if it is passed. People might find this option documented in old guides and such, it can be somewhat frustrating if options just disappear.

@achow101 achow101 force-pushed the rm-zapwallettxes branch 2 times, most recently from b94c431 to a03f330 Compare August 6, 2020 22:34
@DrahtBot DrahtBot mentioned this pull request Aug 8, 2020
@laanwj
Copy link
Member

laanwj commented Aug 9, 2020

FWIW I asked on twitter and mastodon what people's uses are with this option. Nothing really surprising there. No one is screaming to keep it. @luke-jr mentions something about a RBF override for abandontranscation that would be a remaining use case for this option.

@achow101
Copy link
Member Author

achow101 commented Aug 9, 2020

@luke-jr mentions something about a RBF override for abandontranscation that would be a remaining use case for this option.

To forcibly remove a particular transaction, people can use removeprunedfunds. It's intended use is for pruned wallets, but the RPC doesn't check for that and just removes the given transaction regardless. So if abandontransaction doesn't work, then removeprunedfunds will.

@meshcollider
Copy link
Contributor

meshcollider commented Aug 13, 2020

Concept ACK, I agree entirely with @laanwj and prefer this over #19700. I see no point in keeping this in either the wallet tool or the RPC.

@fanquake
Copy link
Member

Concept ACK

1 similar comment
@fjahr
Copy link
Contributor

fjahr commented Aug 14, 2020

Concept ACK

@laanwj
Copy link
Member

laanwj commented Aug 27, 2020

Let's move forward with this and not draw out the discussion too much. I think we can just remove this. I received no strong disagreements on my twitter/mastodon posts.

We can always add it back (to the wallet tool, as does #19700) if we receive reports of people missing it.

@practicalswift
Copy link
Contributor

Concept ACK

Removing likely broken likely unused options make perfect sense :)

Also: +6 −182 gives a warm fuzzy feeling.

@laanwj
Copy link
Member

laanwj commented Aug 30, 2020

Code review ACK 6738e34

@practicalswift
Copy link
Contributor

ACK 6738e34 -- patch looks correct

Restarted Travis to get rid of timeout

@fanquake
Copy link
Member

Looks good, but there's still DBErrors ZapWalletTx(std::list<CWalletTx>& vWtx); in wallet.h and walletdb.h.

Can you also add a release note after you've dropped them?

-zapwallettxes is made a hidden option to inform users that it is
removed and they should be using abandontransaction to do the stuck
transaction thing.
@achow101
Copy link
Member Author

Looks good, but there's still DBErrors ZapWalletTx(std::list<CWalletTx>& vWtx); in wallet.h and walletdb.h.

Can you also add a release note after you've dropped them?

Done and done.

Copy link
Contributor

@meshcollider meshcollider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 3340dba

Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 3340dba - remaining manpage references will get cleaned up pre-release.

@fanquake fanquake merged commit a1d14f5 into bitcoin:master Sep 1, 2020
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Sep 3, 2020
3340dba Remove -zapwallettxes (Andrew Chow)

Pull request description:

  It's not clear what use there is to keeping `-zapwallettxes` given that it's intended usage has been superseded by `abandontransaction`. So this removes it outright.

  Alternative to bitcoin#19700

ACKs for top commit:
  meshcollider:
    utACK 3340dba
  fanquake:
    ACK 3340dba - remaining manpage references will get cleaned up pre-release.

Tree-SHA512: 3e58e1ef6f4f94894d012b93e88baba3fb9c2ad75b8349403f9ce95b80b50b0b4f443cb623cf76c355930db109f491b3442be3aa02972e841450ce52cf545fc8
@gmaxwell
Copy link
Contributor

I don't see any problem in removing this. But the release note asserts that this functionality was added for the purpose of replacing transactions that didn't have RBF. Rather, the functionality was added to help rescue wallets that had been messed up by malleability attack: #3659 (comment)

It's my (non-researched) belief that the malleability motivation is no longer a reason to keep the functionality, because although wallets with non-segwit coins are still malleability-vulnerable, I believe other changes mean that conflicted transactions can just be abandoned. If there is another rash of malleability attacks, users will have to be advised to use abandon on the unsuccessful mutants rather than be advised to zap as was the case when these attacks were an issue, along with spendzeroconfchange=false (or a narrower version that only avoids vulnerable inputs, if one is ever implemented).

@achow101
Copy link
Member Author

But the release note asserts that this functionality was added for the purpose of replacing transactions that didn't have RBF. Rather, the functionality was added to help rescue wallets that had been messed up by malleability attack

Thanks for pointing that out, I've updated the release notes draft.

deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Sep 22, 2021
Summary:
-zapwallettxes is made a hidden option to inform users that it is
removed and they should be using abandontransaction to do the stuck
transaction thing.

This is a backport of [[bitcoin/bitcoin#19671 | core#19671]]

Test Plan: `ninja all check-all`

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D10160
kwvg added a commit to kwvg/dash that referenced this pull request Apr 12, 2022
kwvg added a commit to kwvg/dash that referenced this pull request Apr 12, 2022
kwvg added a commit to kwvg/dash that referenced this pull request Apr 13, 2022
kwvg added a commit to kwvg/dash that referenced this pull request Apr 16, 2022
kwvg added a commit to kwvg/dash that referenced this pull request Apr 20, 2022
kwvg added a commit to kwvg/dash that referenced this pull request May 7, 2022
kwvg added a commit to kwvg/dash that referenced this pull request May 9, 2022
kwvg added a commit to kwvg/dash that referenced this pull request May 13, 2022
malbit added a commit to malbit/raptoreum that referenced this pull request Aug 7, 2022
refs: [bitcoin#19290](bitcoin/bitcoin#19290) - Move BDB specific things into bdb.{cpp/h}
refs: [bitcoin#19292](bitcoin/bitcoin#19292) - refactor Read, Write, Erase, and Exists into non-template functions
refs: [bitcoin#19308](bitcoin/bitcoin#19308) - BerkeleyBatch Handle cursor internally
refs: [bitcoin#19324](bitcoin/bitcoin#19324) - Move BerkeleyBatch static functions to BerkeleyDatabase
refs: [bitcoin#19320](bitcoin/bitcoin#19320) - Replace CDataStream& with CDataStream&& where appropriate
refs: [bitcoin#19325](bitcoin/bitcoin#19325) - Refactor BerkeleyDatabase to introduce DatabaseBatch abstract class
refs: [bitcoin#19334](bitcoin/bitcoin#19334) - Introduce WalletDatabase abstract class
refs: [bitcoin#19102](bitcoin/bitcoin#19102) - Introduce and use DummyDatabase instead of dummy BerkeleyDatabase
refs: [bitcoin#19085](bitcoin/bitcoin#19085) - clean-up PeriodicFlush()
refs: [bitcoin#18923](bitcoin/bitcoin#18923) - Never schedule MaybeCompactWalletDB when -flushwallet is off
refs: [bitcoin#19335](bitcoin/bitcoin#19335) - Cleanup and separate BerkeleyDatabase and BerkeleyBatch
drop salvage wallet from UI
remove BDB version from Information Tab
refs: [bitcoin#19671](bitcoin/bitcoin#19671) - Remove -zapwallettxes
refs: [bitcoin#19261](bitcoin/bitcoin#19261) - Drop ::HasWallets()
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants