← Watch feed
Reword the input claim checks' docstrings
What changed, and why it matters
This commit only rewrites comments and documentation strings in code and tests. No program logic, behavior, or security checks were changed.
Recommended action
No security action needed; this is a documentation-only change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff is limited to docstring and comment wording in five files. It rephrases explanations for PSBTUnsupportedScriptPathError, PSBTUnsupportedScriptPathView, set_input_locking_script, and two test docstrings. There are no code-path, control-flow, or data-handling changes.
Changed components
src/seedsigner/models/psbt_parser.pysrc/seedsigner/views/psbt_views.pytests/psbt_testing_util.pytests/test_flows_psbt.pytests/test_psbt_parser.pyInspect captured patch +13 / −15
### src/seedsigner/models/psbt_parser.py
@@ -206,10 +206,8 @@ class PSBTUnsupportedDerivationPathError(PSBTVerificationError):
class PSBTUnsupportedScriptPathError(PSBTVerificationError):
"""
- This seed can sign an input only through a taproot script path spend, because the
- keys of ours that the input claims are keys in its script tree leaves.
-
- Script path spends are not yet supported.
+ An input only lets this seed sign through a taproot script path spend. Script path
+ spends are not yet supported.
"""
pass
@@ -676,7 +674,7 @@ def _parse_inputs(self, child_key_derivation_cache: dict):
path maps.
* PSBTUnsupportedDerivationPathError: An input claims one of our keys at a
derivation path too short for any wallet to use.
- * PSBTUnsupportedScriptPathError: This seed can sign an input only through a
+ * PSBTUnsupportedScriptPathError: An input only lets this seed sign through a
taproot script path spend.
"""
self.num_inputs = len(self.psbt.inputs)
### src/seedsigner/views/psbt_views.py
@@ -903,7 +903,7 @@ def run(self):
class PSBTUnsupportedScriptPathView(View):
"""
- Reached when this seed can sign an input only through a taproot script path spend
+ Reached when an input only lets this seed sign through a taproot script path spend
(see PSBTUnsupportedScriptPathError).
Script path spends are not yet supported, so this seed cannot sign the input. We do
### tests/psbt_testing_util.py
@@ -263,15 +263,14 @@ def claim_seed_owns_key(scope: InputScope | OutputScope, claimed_derivation_path
def set_input_locking_script(inp: InputScope, script_pubkey: Script):
"""
- Changes the locking script (the scriptPubKey) of the coin a segwit input spends.
+ Changes the locking script (the scriptPubKey) of the utxo a segwit input spends.
Lets a test make the input commit to a different script or key.
Edits the witness_utxo and drops the non_witness_utxo. The non_witness_utxo is the
previous transaction, which still pays the old scriptPubKey, so it would contradict
- the edit. Editing it to match is not an option either: that changes the txid it
- hashes to, so it would no longer be the transaction this input claims to spend. The
- witness_utxo alone describes a segwit input's coin, which is what a coordinator
- would normally send anyway.
+ the edit. Editing it to match would change its txid, and the input would then have
+ to point at the new txid. The witness_utxo alone describes a segwit input's utxo,
+ which is what a coordinator would normally send anyway.
"""
inp.witness_utxo.script_pubkey = script_pubkey
inp.non_witness_utxo = None
### tests/test_flows_psbt.py
@@ -498,8 +498,9 @@ def test_extraneous_input_script_terminates_signing_flow(self):
def test_input_ownership_contradiction_terminates_signing_flow(self):
"""
- The psbt adds a second claim of ours to the user's own input, at a path whose key
- the input's script does not use. That is framed as an attack.
+ The psbt claims that our input is also controlled by our key at a second
+ derivation path. The input's script uses a different key, so the claim is false.
+ That is framed as an attack.
The flow should stop at PSBTInputOwnershipContradictionView, before any
transaction detail is rendered.
### tests/test_psbt_parser.py
@@ -3477,7 +3477,7 @@ class TestPSBTParserInputOwnership(PSBTParserOwnershipTestBase):
really derive a claimed key, but it's the script the input commits to that decides
which keys can spend it.
- These tests cover claims of ours that the committed script does not use. They also
+ These tests cover claims on our keys that the committed script does not use. They also
cover the taproot claims whose check needs the input's merkle root.
"""
def test__parse__refuses_a_true_claim_planted_on_another_partys_input(self):
@@ -3635,7 +3635,7 @@ def test__parse__drops_an_internal_key_claim_when_the_merkle_root_is_left_out(se
cannot rebuild the address, so the claim is neither confirmed nor contradicted.
The parse should drop the claim, leaving that input with no verified derivation
- paths. With another input of ours, the psbt should still parse.
+ paths. With another of our inputs, the psbt should still parse.
"""
internal_derivation_path = "m/86h/1h/0h/0/0"
internal_public_key = self._root().derive(internal_derivation_path).get_public_key()Risk score
Our methodology →Why this scored 15/100
Human-validated context
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
No validated notes yet.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.