8000 wallet, refactor: make DescriptorScriptPubKeyMan agnostic of internal flag by S3RK · Pull Request #20191 · bitcoin/bitcoin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

wallet, refactor: make DescriptorScriptPubKeyMan agnostic of internal flag #20191

New issue 8000

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 1, 2021

Conversation

S3RK
Copy link
Contributor
@S3RK S3RK commented Oct 20, 2020

Rationale: improve consistency between CWallet and DescriptorScriptPubKeyMan; simplify ScriptPubKeyMan interface.

Descriptor in itself is neither internal or external. It's responsibility of a wallet to assign and manage descriptors for a specific purpose. Duplicating information about internalness of a descriptor could lead to inconsistencies and unexpected behaviour (for example misreporting keypool size).

@fanquake fanquake requested a review from achow101 October 20, 2020 03:35
@DrahtBot
Copy link
Contributor
DrahtBot commented Oct 20, 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.

@achow101
Copy link
Member

ACK 07d2fff

@instagibbs
Copy link
Member

concept ACK

@S3RK S3RK force-pushed the remove_m_internal branch from 07d2fff to c9a4e0d Compare January 14, 2021 10:05
Copy link
Member
@achow101 achow101 left a comment

Choose a reason for hiding this comment

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

re-ACK c9a4e0d

Only change since last review is a comment.

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 c9a4e0d

Copy link
Member
@achow101 achow101 left a comment

Choose a reason for hiding this comment

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

ACK 7e329e2

@fanquake
Copy link
Member

@meshcollider @instagibbs

Copy link
Member
@instagibbs instagibbs left a comment

Choose a reason for hiding this comment

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

utACK

Idea for follow-up:

Extract the desc_str creation from DescriptorScriptPubKeyMan::SetupDescriptorGeneration, then I think the logic/flow between ExternalSignerScriptPubKeyMan and DescriptorScriptPubKeyMan becomes a lot closer, could reduce amount of required duplicate code.

It would also mean that DescriptorSPKM never have to know anything about internal-ness, just like External ones.

@jb55
Copy link
Contributor
jb55 commented Jun 30, 2021

ACK c94e3da

Descriptor in itself is neither internal or external.
It's responsibility of a wallet to assign and manage descriptors
for a specific purpose. Duplicating such information could lead to
inconsistencies and unexpected behaviour.
@S3RK S3RK force-pushed the remove_m_internal branch from c94e3da to 1811810 Compare June 30, 2021 06:38
@instagibbs
Copy link
Member

reACK 1811810

@achow101
Copy link
Member

reACK 1811810

@fanquake fanquake merged commit 5a95c51 into bitcoin:master Jul 1, 2021
@fanquake
Copy link
Member
fanquake commented Jul 1, 2021

Looks like there are now some CI failures for the wallet_importdescriptors.py --descriptors test. An incompatiblity between this and #19651?

@achow101
Copy link
Member
achow101 commented Jul 1, 2021

@fanquake Fix in #22379

sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jul 1, 2021
… agnostic of internal flag

1811810 refactor: remove m_internal from DescriptorSPKman (S3RK)

Pull request description:

  Rationale: improve consistency between `CWallet` and `DescriptorScriptPubKeyMan`; simplify `ScriptPubKeyMan` interface.

  Descriptor in itself is neither internal or external. It's responsibility of a wallet to assign and manage descriptors for a specific purpose. Duplicating information about internalness of a descriptor could lead to inconsistencies and unexpected behaviour (for example misreporting keypool size).

ACKs for top commit:
  instagibbs:
    reACK bitcoin@1811810
  achow101:
    reACK 1811810

Tree-SHA512: d5613b7f6795b290bfa0fd8cb0536de1714d0cf72cba402266bd06d550758ebad690b54fc0a336a1c7414b5814aa4a37c90a6ae89926474a97d30956d7e034ff
gwillen pushed a commit to ElementsProject/elements that referenced this pull request Jun 1, 2022
This broke functional tests; had to forward-port #22379 (which will be
merged in a couple PRs) to fix it.
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants
0