-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
output script descriptors, part 1: change API of transaction.py #8230
Merged
+1,916
−437
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SomberNight
added
topic-transactions 📑
related to logic in transaction.py
topic-wallet 👛
related to wallet.py, or maybe address_synchronizer.py/coinchooser.py
labels
Feb 27, 2023
Changed to draft as I've found a regression in the trezor plugin. EDIT: fixed in 9e7c366 |
SomberNight
force-pushed
the
202302_osd_tx
branch
from
March 1, 2023 18:46
9e7c366
to
c331a37
Compare
SomberNight
force-pushed
the
202302_osd_tx
branch
from
March 2, 2023 18:00
c331a37
to
5118ee1
Compare
also put key origin info into descriptor, if available
This fixes a regression where the plugin was assuming ordering for txin.pubkeys (which is now a set). (previously txin.pubkeys was a list ordered according to the final sort order of keys inside the bitcoin script)
SomberNight
force-pushed
the
202302_osd_tx
branch
from
March 3, 2023 16:42
5118ee1
to
a80bef8
Compare
SomberNight
added a commit
that referenced
this pull request
May 9, 2023
fix signing txs when using old "bitcoin app" (pre-2.1) on the ledger device ``` 33.36 | W | transaction | heyheyhey. cp1. include_sigs=True force_legacy=False use_segwit_ser=True 33.36 | W | transaction | heyheyhey. cp2. branch1 33.37 | E | plugins.ledger.ledger | Traceback (most recent call last): File "...\electrum\electrum\plugins\ledger\ledger.py", line 669, in sign_transaction rawTx = tx.serialize_to_network() File "...\electrum\electrum\transaction.py", line 945, in serialize_to_network witness = ''.join(self.serialize_witness(x, estimate_size=estimate_size) for x in inputs) File "...\electrum\electrum\transaction.py", line 945, in <genexpr> witness = ''.join(self.serialize_witness(x, estimate_size=estimate_size) for x in inputs) File "...\electrum\electrum\transaction.py", line 839, in serialize_witness sol = desc.satisfy(allow_dummy=estimate_size, sigdata=txin.part_sigs) File "...\electrum\electrum\descriptor.py", line 378, in satisfy sol = self._satisfy_inner(sigdata=sigdata, allow_dummy=allow_dummy) File "...\electrum\electrum\descriptor.py", line 574, in _satisfy_inner raise MissingSolutionPiece(f"no sig for {pubkey.hex()}") electrum.descriptor.MissingSolutionPiece: no sig for 033e92e55923ea25809790f292ee9bd410355ee02492472d9a1ff1b364874d0679 33.38 | I | plugins.ledger.ledger | no sig for 033e92e55923ea25809790f292ee9bd410355ee02492472d9a1ff1b364874d0679 ``` fixes #8365 regression from #8230
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
topic-transactions 📑
related to logic in transaction.py
topic-wallet 👛
related to wallet.py, or maybe address_synchronizer.py/coinchooser.py
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the first set of changes towards adding support for output script descriptors (#5694).
descriptor.py
, is added, which is originally from bitcoin-core/HWI but non-trivially changed in parts and extendedtransaction.py
is adapted to use the new module, changing some APIs there, mostly forPartialTxInput
PartialTxInput
re how to satisfy a locking script is mostly removed; that is now handled bydescriptor.py
insteadscript_type
,num_sig
,pubkeys
, one will just now set a new field,script_descriptor
instead{PartialTxInput,PartialTxOutput}.script_type
field is removedPartialTxInput.num_sig
, which was a hack for solving multisig scripts, is removed.pubkeys
field no longer has to be set explicitly, it is instead a method (property) derived from.script_descriptor
transaction.py
API