-
Notifications
You must be signed in to change notification settings - Fork 38.7k
[TESTS] Move base58 to own module to break circular dependency #19230
New issue
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
Conversation
This breaks the script->key->address->script dependency cycle.
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, 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. |
|
cc @jnewbery |
|
Code review ACK c75de5d
I think it makes conceptual sense as well now that base58 is only one of the address formats. |
|
ACK c75de5d according to --color-moved=dimmed-zebra this is a move-only apart from the imports 👒 Show signature and timestampSignature: Timestamp of file with hash |
|
What was the circular dependency that this was fixing? |
|
Concept NACK. This just seems to be moving code around for no good reason. base58 is very much linked to legacy P2PKH and P2SH addresses, so it makes sense that the code for those things should live in the same module (see segwit_address.py where the bech32 and segwit v0 address code are in the same module). The only thing that imports base58 for any other reason are the |
|
@jnewbery The circular dependency was script->key->address->script, and I couldn't get the taproot tests to work without it. If you have another solution, I'm all ears, but this seems like a generally clean solution to me. |
script doesn't import key |
|
Hmm! Perhaps that was fixed then. I wrote this a few months ago, and was annoyed about keeping to rebase it, so I PRed it separately. |
|
I don't think script has ever imported key in master. It does in your branch, but that doesn't seem like a good reason to open a PR against master |
|
Oops, I see. Still, I think this is generally an improvement. |
|
I'm simply giving you the feedback that I'd give any other contributor, including someone new to the project: moving the code around for no discernible benefit isn't a good use of reviewer resource. I'm neutral on whether base58 should have its own module. The bech32 code seems to be perfectly happy in segwit_address.py and I don't see this as any different. I do think it's disappointing that his got two ACKs and was merged within 12 hours even though the motivation and commit log were wrong. |
|
@jnewbery You're right about that. If I would have had the facts right, I would not have opened this PR. |
…lar dependency c75de5d [TESTS] Move base58 to own module to break circular dependency (Pieter Wuille) Pull request description: I encountered difficulties with the test framework in bitcoin#17977. This fixes them, and I think the change is generally useful. ACKs for top commit: laanwj: Code review ACK c75de5d MarcoFalke: ACK c75de5d according to --color-moved=dimmed-zebra this is a move-only apart from the imports 👒 Tree-SHA512: 9e0493de3e279074f0c70e92c959b73ae30479ad6f2083a3c6bbf4b0191d65ef94854559a5b7c904f5dadc5e93129ed00f6dc0a8ccce6ba7921cd45f7119f74b
Summary: generate_wif_key is a wallet utility function. Move it from the EC key module to the wallet util module. This is a backport of [[bitcoin/bitcoin#19239 | core#19239]] Backport note: the revert commit is not relevant, we haven't backported [[bitcoin/bitcoin#19230 | core#19230]] Test Plan: `ninja check-functional-extended` Reviewers: #bitcoin_abc, majcosta Reviewed By: #bitcoin_abc, majcosta Differential Revision: https://reviews.bitcoinabc.org/D9934
I encountered difficulties with the test framework in #17977. This fixes them, and I think the change is generally useful.