Skip to content

Conversation

instagibbs
Copy link
Member

@instagibbs instagibbs commented Feb 28, 2020

Sniped test and alternative to #18220

Sjors documenting the issue:

A PSBT signed by ColdCard was analyzed as follows (see #17509 (comment))

{
  "inputs": [
    {
      "has_utxo": true,
      "is_final": false,
      "next": "finalizer"
    }
  ],
  "estimated_vsize": 141,
  "estimated_feerate": 1e-05,
  "fee": 1.41e-06,
  "next": "signer"
}
I changed AnalyzePSBT so that it returns "next": "finalizer" instead.

It makes it much clearer that the role has been decided before hitting the calc_fee block, and groups all state-deciding in one spot instead of 2.

Note that this assumes that PSBT roles are a complete ordering, which for now and in the future seems to be a correct assumption.

@instagibbs instagibbs force-pushed the analyze_psbt_role_simple branch from fef9c78 to 1ef28b4 Compare February 28, 2020 16:31
@Sjors
Copy link
Member

Sjors commented Feb 28, 2020

ACK 1ef28b4, much nicer. Don't forget to document the bug fix.

@instagibbs
Copy link
Member Author

@achow101 poing

@achow101
Copy link
Member

ACK 1ef28b4

@DrahtBot DrahtBot added the Tests label Feb 28, 2020
@Empact
Copy link
Contributor

Empact commented Feb 28, 2020

ACK 1ef28b4

@fanquake fanquake added the PSBT label Feb 28, 2020
@DrahtBot
Copy link
Contributor

DrahtBot commented Feb 28, 2020

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

Conflicts

No conflicts as of last run.

@meshcollider meshcollider merged commit 1f88624 into bitcoin:master Mar 2, 2020
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Mar 2, 2020
…orrect

1ef28b4 Make AnalyzePSBT next role calculation simple, correct (Gregory Sanders)

Pull request description:

  Sniped test and alternative to bitcoin#18220

  Sjors documenting the issue:
  ```
  A PSBT signed by ColdCard was analyzed as follows (see bitcoin#17509 (comment))

  {
    "inputs": [
      {
        "has_utxo": true,
        "is_final": false,
        "next": "finalizer"
      }
    ],
    "estimated_vsize": 141,
    "estimated_feerate": 1e-05,
    "fee": 1.41e-06,
    "next": "signer"
  }
  I changed AnalyzePSBT so that it returns "next": "finalizer" instead.
  ```

  It makes it much clearer that the role has been decided before hitting the `calc_fee` block, and groups all state-deciding in one spot instead of 2.

  Note that this assumes that PSBT roles are a complete ordering, which for now and in the future seems to be a correct assumption.

ACKs for top commit:
  Sjors:
    ACK 1ef28b4, much nicer. Don't forget to document the bug fix.
  achow101:
    ACK 1ef28b4
  Empact:
    ACK bitcoin@1ef28b4

Tree-SHA512: 22ba4234985c6f9c1445b14565c71268cfaa121c4ef000ee3d5117212b09442dee8d46d9701bceddaf355263fe25dfe40def2ef614d4f2fe66c9ce876cb49934
luke-jr pushed a commit to bitcoinknots/bitcoin that referenced this pull request Mar 5, 2020
sidhujag pushed a commit to syscoin-core/syscoin that referenced this pull request Nov 10, 2020
…orrect

1ef28b4 Make AnalyzePSBT next role calculation simple, correct (Gregory Sanders)

Pull request description:

  Sniped test and alternative to bitcoin#18220

  Sjors documenting the issue:
  ```
  A PSBT signed by ColdCard was analyzed as follows (see bitcoin#17509 (comment))

  {
    "inputs": [
      {
        "has_utxo": true,
        "is_final": false,
        "next": "finalizer"
      }
    ],
    "estimated_vsize": 141,
    "estimated_feerate": 1e-05,
    "fee": 1.41e-06,
    "next": "signer"
  }
  I changed AnalyzePSBT so that it returns "next": "finalizer" instead.
  ```

  It makes it much clearer that the role has been decided before hitting the `calc_fee` block, and groups all state-deciding in one spot instead of 2.

  Note that this assumes that PSBT roles are a complete ordering, which for now and in the future seems to be a correct assumption.

ACKs for top commit:
  Sjors:
    ACK 1ef28b4, much nicer. Don't forget to document the bug fix.
  achow101:
    ACK 1ef28b4
  Empact:
    ACK bitcoin@1ef28b4

Tree-SHA512: 22ba4234985c6f9c1445b14565c71268cfaa121c4ef000ee3d5117212b09442dee8d46d9701bceddaf355263fe25dfe40def2ef614d4f2fe66c9ce876cb49934
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 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.

7 participants