Skip to content
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

doc: correct analyzepsbt rpc doc #15559

Merged
merged 2 commits into from Mar 13, 2019

Conversation

Projects
None yet
6 participants
@fanquake
Copy link
Member

commented Mar 8, 2019

Even though missing is optional, all its field are also all optional.

estimated_vsize is optional (calculate alongside estimated_feerate).

Make estimated_feerate output numeric.

@fanquake fanquake requested a review from achow101 Mar 8, 2019

Show resolved Hide resolved src/rpc/rawtransaction.cpp Outdated
@achow101

This comment has been minimized.

Copy link
Member

commented Mar 8, 2019

estimated_feerate is a string.

Eh, it's not supposed to be.

@laanwj

This comment has been minimized.

Copy link
Member

commented Mar 8, 2019

"estimated_feerate": "0.00021598 BTC/kB",

I don't think a formatted string is a good way to represent these on the RPC. Better to not leave the clients to strip off the unit, leave this as number and report the unit in the documentation.

@MarcoFalke MarcoFalke added this to the 0.18.0 milestone Mar 8, 2019

@fanquake fanquake force-pushed the fanquake:fixup-analysepsbt-rpc-doc branch from a849e78 to 983e4e9 Mar 9, 2019

@fanquake fanquake changed the title doc: correct analysepsbt rpc doc doc: correct analyzepsbt rpc doc Mar 9, 2019

@DrahtBot

This comment has been minimized.

Copy link
Contributor

commented Mar 9, 2019

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #15508 (Refactor analyzepsbt for use outside RPC code by gwillen)

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.

@achow101
Copy link
Member

left a comment

utACK 983e4e9

@sipa

This comment has been minimized.

Copy link
Member

commented Mar 11, 2019

Concept ACK

@MarcoFalke
Copy link
Member

left a comment

ACK

Show resolved Hide resolved src/rpc/rawtransaction.cpp Outdated
Show resolved Hide resolved src/rpc/rawtransaction.cpp Outdated
Show resolved Hide resolved src/rpc/rawtransaction.cpp Outdated

fanquake added some commits Mar 8, 2019

@fanquake fanquake force-pushed the fanquake:fixup-analysepsbt-rpc-doc branch from 983e4e9 to 335931d Mar 11, 2019

@fanquake

This comment has been minimized.

Copy link
Member Author

commented Mar 11, 2019

Updated with marcos suggestions.

src/bitcoin-cli analyzepsbt

analyzepsbt "psbt"

Analyzes and provides information about the current status of a PSBT and its inputs

Arguments:
1. psbt    (string, required) A base64 string of a PSBT

Result:
{
  "inputs" : [                      (array of json objects)
    {
      "has_utxo" : true|false     (boolean) Whether a UTXO is provided
      "is_final" : true|false     (boolean) Whether the input is finalized
      "missing" : {               (json object, optional) Things that are missing that are required to complete this input
        "pubkeys" : [             (array, optional)
          "keyid"                 (string) Public key ID, hash160 of the public key, of a public key whose BIP 32 derivation path is missing
        ]
        "signatures" : [          (array, optional)
          "keyid"                 (string) Public key ID, hash160 of the public key, of a public key whose signature is missing
        ]
        "redeemscript" : "hash"   (string, optional) Hash160 of the redeemScript that is missing
        "witnessscript" : "hash"  (string, optional) SHA256 of the witnessScript that is missing
      }
      "next" : "role"             (string, optional) Role of the next person that this input needs to go to
    }
    ,...
  ]
  "estimated_vsize" : vsize       (numeric, optional) Estimated vsize of the final signed transaction
  "estimated_feerate" : feerate   (numeric, optional) Estimated feerate of the final signed transaction in BTC/kB. Shown only if all UTXO slots in the PSBT have been filled.
  "fee" : fee                     (numeric, optional) The transaction fee paid. Shown only if all UTXO slots in the PSBT have been filled.
  "next" : "role"                 (string) Role of the next person that this psbt needs to go to
}

Examples:
> bitcoin-cli analyzepsbt "psbt"
@MarcoFalke

This comment has been minimized.

Copy link
Member

commented Mar 12, 2019

utACK 335931d

1 similar comment
@laanwj

This comment has been minimized.

Copy link
Member

commented Mar 13, 2019

utACK 335931d

@laanwj laanwj merged commit 335931d into bitcoin:master Mar 13, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Mar 13, 2019

Merge #15559: doc: correct analyzepsbt rpc doc
335931d rpc: return a number for estimated_feerate in analyzepsbt (fanquake)
a4d0fd0 doc: correct analysepsbt rpc doc (fanquake)

Pull request description:

  Even though `missing` is optional, all its field are also all optional.

  `estimated_vsize` is optional (calculate alongside `estimated_feerate`).

  Make `estimated_feerate` output numeric.

Tree-SHA512: 5e063bcfbca73d3d08d29c5d1f59bc1791757f69248da4a9c70fe4b2fe82807ec4ed9fca48d439101d66ba924916fa5da9232167d74ea2b967fc04f0a36f190e

laanwj added a commit that referenced this pull request Mar 13, 2019

doc: correct analysepsbt rpc doc
Github-Pull: #15559
Rebased-From: a4d0fd0
Tree-SHA512: 43f985ccb1af22e416230b8f351396d1fa677ee4e60f6952962ed37e842f5746df8a58ae7c35d6a7518af4b5974ee753b17ec3578394122584ca10e9ed561268

laanwj added a commit that referenced this pull request Mar 13, 2019

rpc: return a number for estimated_feerate in analyzepsbt
Github-Pull: #15559
Rebased-From: 335931d
Tree-SHA512: ebe460e935e33fbbbe725db403654ee65c86a606401e8519e1180551e2ccd43661eb4ad20bf065f2c0c2a8026c3bb3bce796789f8d612e9e197ceb8d541a63a9

@fanquake fanquake deleted the fanquake:fixup-analysepsbt-rpc-doc branch Mar 13, 2019

@fanquake

This comment has been minimized.

Copy link
Member Author

commented Mar 13, 2019

Has been backported in 20fd64f and 2edd0c4.

HashUnlimited pushed a commit to HashUnlimited/chaincoin that referenced this pull request Apr 19, 2019

doc: correct analysepsbt rpc doc
Github-Pull: bitcoin#15559
Rebased-From: a4d0fd0
Tree-SHA512: 43f985ccb1af22e416230b8f351396d1fa677ee4e60f6952962ed37e842f5746df8a58ae7c35d6a7518af4b5974ee753b17ec3578394122584ca10e9ed561268

HashUnlimited pushed a commit to HashUnlimited/chaincoin that referenced this pull request Apr 19, 2019

rpc: return a number for estimated_feerate in analyzepsbt
Github-Pull: bitcoin#15559
Rebased-From: 335931d
Tree-SHA512: ebe460e935e33fbbbe725db403654ee65c86a606401e8519e1180551e2ccd43661eb4ad20bf065f2c0c2a8026c3bb3bce796789f8d612e9e197ceb8d541a63a9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.