doc: correct analyzepsbt rpc doc #15559

pull fanquake wants to merge 2 commits into bitcoin:master from fanquake:fixup-analysepsbt-rpc-doc changing 2 files +9 −9
  1. fanquake commented at 4:30 am on March 8, 2019: member

    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.

  2. fanquake added the label Docs on Mar 8, 2019
  3. fanquake added the label RPC/REST/ZMQ on Mar 8, 2019
  4. fanquake requested review from achow101 on Mar 8, 2019
  5. in src/rpc/rawtransaction.cpp:1874 in a849e78f8f outdated
    1873-                "        \"redeemscript\" : \"hash\"   (string) Hash160 of the redeemScript that is missing\n"
    1874-                "        \"witnessscript\" : \"hash\"  (string) SHA256 of the witnessScript that is missing\n"
    1875+                "        \"redeemscript\" : \"hash\"   (string, optional) Hash160 of the redeemScript that is missing\n"
    1876+                "        \"witnessscript\" : \"hash\"  (string, optional) SHA256 of the witnessScript that is missing\n"
    1877                 "      }\n"
    1878                 "      \"next\" : \"role\"           (string) Role of the next person that this input needs to go to\n"
    


    fanquake commented at 5:39 am on March 8, 2019:

    Looks like next (inside inputs) is also optional. i.e for: bitcoin-cli analyzepsbt "cHNidP8BAJoCAAAAAljoeiG1ba8MI76OcHBFbDNvfLqlyHV5JPVFiHuyq911AAAAAAD/////g40EJ9DsZQpoqka7CwmK6kQiwHGyyng1Kgd5WdB86h0BAAAAAP////8CcKrwCAAAAAAWABTYXCtx0AYLCcmIauuBXlCZHdoSTQDh9QUAAAAAFgAUAK6pouXw+HaliN9VRuh0LR2HAI8AAAAAAAEAuwIAAAABqtc5MQGL0l+ErkALaISL4J23BurCrBgpi6vucatlb4sAAAAASEcwRAIgWPb8fGoz4bMVSNSByCbAFb0wE1qtQs1neQ2rZtKtJDsCIEoc7SYExnNbY5PltBaR3XiwDwxZQvufdRhW+qk4FX26Af7///8CgPD6AgAAAAAXqRQPuUY0IWlrgsgzryQceMF9295JNIfQ8gonAQAAABepFCnKdPigj4GZlCgYXJe12FLkBj9hh2UAAAABB9oARzBEAiB0AYrUGACXuHMyPAAVcgs2hMyBI4kQSOfbzZtVrWecmQIgc9Npt0Dj61Pc76M4I8gHBRTKVafdlUTxV8FnkTJhEYwBSDBFAiEA9hA4swjcHahlo0hSdG8BV3KTQgjG0kRUOTzZm98iF3cCIAVuZ1pnWm0KArhbFOXikHTYolqbV2C+ooFvZhkQoAbqAUdSIQKVg785rgpgl0etGZrd1jT6YQhVnWxc05tMIYPxq5bgfyEC2rYf9JoU22p9ArDNH7t4/EsYMStbTlTa5Nui+/71NtdSrgABASAAwusLAAAAABepFLf1+vQOPUClpFmx2zU18rcvqSHohwEHIyIAIIwjUxc3Q7WV37Sge3K6jkLjeX2nTof+fZ10l+OyAokDAQjaBABHMEQCIGLrelVhB6fHP0WsSrWh3d9vcHX7EnWWmn84Pv/3hLyyAiAMBdu3Rw2/LwhVfdNWxzJcHtMJE+mWzThAlF2xIijaXwFHMEQCIGX0W6WZi1mif/4ae+0BavHx+Q1Us6qPdFCqX1aiUQO9AiB/ckcDrR7blmgLKEtW1P/LiPf7dZ6rvgiqMPKbhROD0gFHUiEDCJ3BDHrG21T5EymvYXMz2ziM6tDCMfcjN50bmQMLAtwhAjrdkE89bc9Z3bkGsN7iNSm3/7ntUOXoYVGSaGAiHw5zUq4AIgIDqaTDf1mW06ol26xrVwrwZQOUSSlCRgs1R1Ptnuylh3EQ2QxqTwAAAIAAAACABAAAgAAiAgJ/Y5l1fS7/VaE2rQLGhLGDi2VW5fG2s0KCqUtrUAUQlhDZDGpPAAAAgAAAAIAFAACAAA=="

     0{
     1  "inputs": [
     2    {
     3      "has_utxo": true,
     4      "is_final": true
     5    },
     6    {
     7      "has_utxo": true,
     8      "is_final": true
     9    }
    10  ],
    11  "next": "extractor",
    12  "estimated_vsize": 463,
    13  "estimated_feerate": "0.00021598 BTC/kB",
    14  "fee": 0.00010000
    15}
    

    Will update.

  6. achow101 commented at 6:08 am on March 8, 2019: member

    estimated_feerate is a string.

    Eh, it’s not supposed to be.

  7. laanwj commented at 2:08 pm on March 8, 2019: member

    "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.

  8. MarcoFalke added this to the milestone 0.18.0 on Mar 8, 2019
  9. MarcoFalke added the label Needs backport on Mar 8, 2019
  10. fanquake force-pushed on Mar 9, 2019
  11. fanquake renamed this:
    doc: correct analysepsbt rpc doc
    doc: correct analyzepsbt rpc doc
    on Mar 9, 2019
  12. DrahtBot commented at 6:59 am on March 9, 2019: member

    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.

  13. achow101 approved
  14. achow101 commented at 7:10 pm on March 11, 2019: member
    utACK 983e4e9b005e54307f315f00f8ea90959482376c
  15. sipa commented at 7:12 pm on March 11, 2019: member
    Concept ACK
  16. in src/rpc/rawtransaction.cpp:1881 in 983e4e9b00 outdated
    1883-                "  \"estimated_vsize\" : vsize       (numeric) Estimated vsize of the final signed transaction\n"
    1884+                "  \"estimated_vsize\" : vsize       (numeric, optional) Estimated vsize of the final signed transaction\n"
    1885                 "  \"estimated_feerate\" : feerate   (numeric, optional) Estimated feerate of the final signed transaction. Shown only if all UTXO slots in the PSBT have been filled.\n"
    1886                 "  \"fee\" : fee                     (numeric, optional) The transaction fee paid. Shown only if all UTXO slots in the PSBT have been filled.\n"
    1887-                "  \"next\" : \"role\"                 (string) Role of the next person that this psbt needs to go to\n"
    1888+                "  \"next\" : \"role\"               (string) Role of the next person that this psbt needs to go to\n"
    


    MarcoFalke commented at 7:23 pm on March 11, 2019:
    0                "  \"next\" : \"role\"                 (string) Role of the next person that this psbt needs to go to\n"
    
  17. in src/rpc/rawtransaction.cpp:1874 in 983e4e9b00 outdated
    1874-                "        \"witnessscript\" : \"hash\"  (string) SHA256 of the witnessScript that is missing\n"
    1875+                "        \"redeemscript\" : \"hash\"   (string, optional) Hash160 of the redeemScript that is missing\n"
    1876+                "        \"witnessscript\" : \"hash\"  (string, optional) SHA256 of the witnessScript that is missing\n"
    1877                 "      }\n"
    1878-                "      \"next\" : \"role\"           (string) Role of the next person that this input needs to go to\n"
    1879+                "      \"next\" : \"role\"           (string, optional) Role of the next person that this input needs to go to\n"
    


    MarcoFalke commented at 7:23 pm on March 11, 2019:
    0                "      \"next\" : \"role\"             (string, optional) Role of the next person that this input needs to go to\n"
    
  18. in src/rpc/rawtransaction.cpp:1879 in 983e4e9b00 outdated
    1880                 "    }\n"
    1881                 "    ,...\n"
    1882                 "  ]\n"
    1883-                "  \"estimated_vsize\" : vsize       (numeric) Estimated vsize of the final signed transaction\n"
    1884+                "  \"estimated_vsize\" : vsize       (numeric, optional) Estimated vsize of the final signed transaction\n"
    1885                 "  \"estimated_feerate\" : feerate   (numeric, optional) Estimated feerate of the final signed transaction. Shown only if all UTXO slots in the PSBT have been filled.\n"
    


    MarcoFalke commented at 7:24 pm on March 11, 2019:
    0                "  \"estimated_feerate\" : feerate   (numeric, optional) Estimated feerate of the final signed transaction in " + CURRENCY_UNIT + "/kB. Shown only if all UTXO slots in the PSBT have been filled.\n"
    
  19. MarcoFalke approved
  20. MarcoFalke commented at 7:24 pm on March 11, 2019: member
    ACK
  21. doc: correct analysepsbt rpc doc a4d0fd026b
  22. rpc: return a number for estimated_feerate in analyzepsbt 335931df4a
  23. fanquake force-pushed on Mar 11, 2019
  24. fanquake commented at 11:41 pm on March 11, 2019: member

    Updated with marcos suggestions.

    src/bitcoin-cli analyzepsbt

     0analyzepsbt "psbt"
     1
     2Analyzes and provides information about the current status of a PSBT and its inputs
     3
     4Arguments:
     51. psbt    (string, required) A base64 string of a PSBT
     6
     7Result:
     8{
     9  "inputs" : [                      (array of json objects)
    10    {
    11      "has_utxo" : true|false     (boolean) Whether a UTXO is provided
    12      "is_final" : true|false     (boolean) Whether the input is finalized
    13      "missing" : {               (json object, optional) Things that are missing that are required to complete this input
    14        "pubkeys" : [             (array, optional)
    15          "keyid"                 (string) Public key ID, hash160 of the public key, of a public key whose BIP 32 derivation path is missing
    16        ]
    17        "signatures" : [          (array, optional)
    18          "keyid"                 (string) Public key ID, hash160 of the public key, of a public key whose signature is missing
    19        ]
    20        "redeemscript" : "hash"   (string, optional) Hash160 of the redeemScript that is missing
    21        "witnessscript" : "hash"  (string, optional) SHA256 of the witnessScript that is missing
    22      }
    23      "next" : "role"             (string, optional) Role of the next person that this input needs to go to
    24    }
    25    ,...
    26  ]
    27  "estimated_vsize" : vsize       (numeric, optional) Estimated vsize of the final signed transaction
    28  "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.
    29  "fee" : fee                     (numeric, optional) The transaction fee paid. Shown only if all UTXO slots in the PSBT have been filled.
    30  "next" : "role"                 (string) Role of the next person that this psbt needs to go to
    31}
    32
    33Examples:
    34> bitcoin-cli analyzepsbt "psbt"
    
  25. MarcoFalke commented at 3:53 pm on March 12, 2019: member
    utACK 335931df4a37467299a2ee0ba521ecd5c4e6d39e
  26. laanwj commented at 11:18 am on March 13, 2019: member
    utACK 335931df4a37467299a2ee0ba521ecd5c4e6d39e
  27. laanwj merged this on Mar 13, 2019
  28. laanwj closed this on Mar 13, 2019

  29. laanwj referenced this in commit 8e1704c015 on Mar 13, 2019
  30. laanwj referenced this in commit 20fd64fe10 on Mar 13, 2019
  31. laanwj referenced this in commit 2edd0c40c3 on Mar 13, 2019
  32. fanquake deleted the branch on Mar 13, 2019
  33. fanquake removed the label Needs backport on Mar 13, 2019
  34. HashUnlimited referenced this in commit e43d01e7d6 on Apr 19, 2019
  35. HashUnlimited referenced this in commit ef57512d10 on Apr 19, 2019
  36. deadalnix referenced this in commit 28038bfc30 on Jun 18, 2020
  37. MarcoFalke locked this on Dec 16, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-07-03 13:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me