Skip to content

Conversation

@maflcko
Copy link
Member

@maflcko maflcko commented Apr 26, 2019

When a serialized transaction has inputs, there is no risk in only trying to deserialize it with witness allowed. (This is how all transactions from p2p are deserialized.) In fact, it would avoid a common issue where a transaction with inputs can be deserialized in two ways:

When a serialized transaction has no inputs, there is no risk in only trying to deserialze it with witness disallowed. (A transaction without inputs can't have corresponding witness data)

@maflcko maflcko added this to the 0.18.1 milestone Apr 26, 2019
@maflcko maflcko force-pushed the 1904-docIsWitness branch 2 times, most recently from fab96c9 to fa8630d Compare April 26, 2019 21:36
@maflcko
Copy link
Member Author

maflcko commented May 13, 2019

review beg 🙏

@meshcollider As the author of the docstring, you seem qualified to review the doc change?
@achow101 As the author of converttopsbt, you seem qualified to review the code change?

@achow101
Copy link
Member

utACK fa8630d268dc65e097ead9962d9d8af2301182ca

Copy link
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

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

utACK fa8630d268dc65e097ead9962d9d8af2301182ca

Copy link
Contributor

Choose a reason for hiding this comment

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

In commit "rpc: Document iswitness flag" (faee652f971e5422c4df1dff3f36c9089aaf587f)

Maybe drop this sentence and just use the same "If not present, If true..., If false..." text from converttopsbt. I think the converttopsbt explanation is a little clearer, and that it's better to keep the text consistent in all three methods so readers don't have to parse text closely to see where differences are.

Sipa's explanation and advice from the bug also seem very helpful and so might be worth incorporating too:

Copy link
Member Author

Choose a reason for hiding this comment

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

Force pushed to use the same docstring everywhere

@maflcko maflcko force-pushed the 1904-docIsWitness branch 2 times, most recently from fa5a72d to faa568a Compare May 16, 2019 19:43
Also explain the param in all RPCs
@maflcko maflcko force-pushed the 1904-docIsWitness branch from faa568a to fa499b5 Compare May 16, 2019 19:57
Copy link
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

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

utACK fa499b5. Changes since last review: consolidating commits and making iswitness documentation the same across methods.

Copy link
Contributor

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

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

utACK fa499b5

@maflcko
Copy link
Member Author

maflcko commented Jun 6, 2019

Anything left to do here?

@meshcollider
Copy link
Contributor

utACK fa499b5

@meshcollider meshcollider merged commit fa499b5 into bitcoin:master Jun 18, 2019
meshcollider added a commit that referenced this pull request Jun 18, 2019
fa499b5 rpc: bugfix: Properly use iswitness in converttopsbt (MarcoFalke)
fa5c5cd rpc: Switch touched RPCs to IsValidNumArgs (MarcoFalke)

Pull request description:

  When a serialized transaction has inputs, there is no risk in only trying to deserialize it with witness allowed. (This is how all transactions from p2p are deserialized.) In fact, it would avoid a common issue where a transaction with inputs can be deserialized in two ways:
  * Fixes #12989
  * Fixes #15872
  * Fixes #15701
  * Fixes #13738
  * ...

  When a serialized transaction has no inputs, there is no risk in only trying to deserialze it with witness disallowed. (A transaction without inputs can't have corresponding witness data)

ACKs for commit fa499b:
  meshcollider:
    utACK fa499b5
  ryanofsky:
    utACK fa499b5. Changes since last review: consolidating commits and making iswitness documentation the same across methods.
  PastaPastaPasta:
    utACK fa499b5

Tree-SHA512: a64423a3131f3f0222a40da557c8b590c9ff01b45bcd40796f77a1a64ae74c6680a6be9d01ece95c492dfbcc7e2810409d2c2b336c2894af00bb213972fc85c6
@fanquake fanquake mentioned this pull request Jun 18, 2019
@maflcko maflcko deleted the 1904-docIsWitness branch June 18, 2019 13:31
maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Jun 18, 2019
maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Jun 18, 2019
Also explain the param in all RPCs

Github-Pull: bitcoin#15899
Rebased-From: fa499b5
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jun 19, 2019
…erttopsbt

fa499b5 rpc: bugfix: Properly use iswitness in converttopsbt (MarcoFalke)
fa5c5cd rpc: Switch touched RPCs to IsValidNumArgs (MarcoFalke)

Pull request description:

  When a serialized transaction has inputs, there is no risk in only trying to deserialize it with witness allowed. (This is how all transactions from p2p are deserialized.) In fact, it would avoid a common issue where a transaction with inputs can be deserialized in two ways:
  * Fixes bitcoin#12989
  * Fixes bitcoin#15872
  * Fixes bitcoin#15701
  * Fixes bitcoin#13738
  * ...

  When a serialized transaction has no inputs, there is no risk in only trying to deserialze it with witness disallowed. (A transaction without inputs can't have corresponding witness data)

ACKs for commit fa499b:
  meshcollider:
    utACK bitcoin@fa499b5
  ryanofsky:
    utACK fa499b5. Changes since last review: consolidating commits and making iswitness documentation the same across methods.
  PastaPastaPasta:
    utACK fa499b5

Tree-SHA512: a64423a3131f3f0222a40da557c8b590c9ff01b45bcd40796f77a1a64ae74c6680a6be9d01ece95c492dfbcc7e2810409d2c2b336c2894af00bb213972fc85c6
HashUnlimited pushed a commit to HashUnlimited/chaincoin that referenced this pull request Aug 23, 2019
HashUnlimited pushed a commit to HashUnlimited/chaincoin that referenced this pull request Aug 23, 2019
Also explain the param in all RPCs

Github-Pull: bitcoin#15899
Rebased-From: fa499b5
Bushstar pushed a commit to Bushstar/omnicore that referenced this pull request Aug 24, 2019
Bushstar pushed a commit to Bushstar/omnicore that referenced this pull request Aug 24, 2019
Also explain the param in all RPCs

Github-Pull: bitcoin#15899
Rebased-From: fa499b5
@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

6 participants