rpc: doc: use “output script” terminology consistently in “asm”/“hex” results #30408

pull theStack wants to merge 1 commits into bitcoin:master from theStack:202407-rpc-doc_improve_hex_asm_result_scriptPubKey_naming changing 2 files +13 −13
  1. theStack commented at 3:34 pm on July 8, 2024: contributor

    The wording “public key script” was likely chosen as a human-readable form of the technical term scriptPubKey, but it doesn’t seem to be really widespread. Replace it by the more (probably most?) common term “output script” instead. Note that the argument for the decodescript RPC is not necessarily an output script (it could e.g. be also a redeem script), so in this case we just stay generic and use “script”.

    See also the draft BIP “Terminology for Transaction Components” (https://github.com/murchandamus/bips/blob/2022-04-tx-terminology/bip-tx-terminology.mediawiki) from murchandamus which suggests to use “output script” as well.

    Affects the help text of the following RPCs:

    • decodepsbt
    • decoderawtransaction
    • decodescript
    • getblock (if verbosity=3)
    • getrawtransaction (if verbosity=2,3)
    • gettxout
  2. rpc: doc: use "output script" terminology consistently in "asm"/"hex" results
    The wording "public key script" was likely chosen as a human-readable form of
    the technical term `scriptPubKey`, but it doesn't seem to be really widespread.
    Replace it by the more common term "output script" instead. Note that the
    argument for the `decodescript` RPC is not necessarily an output script (it
    could e.g. be also a redeem script), so in this case we just stay generic and
    use "script".
    
    See also the draft BIP "Terminology for Transaction Components"
    (https://github.com/murchandamus/bips/blob/2022-04-tx-terminology/bip-tx-terminology.mediawiki)
    which suggests to use "output script" as well.
    
    Affects the help text of the following RPCs:
        - decodepsbt
        - decoderawtransaction
        - decodescript
        - getblock (if verbosity=3)
        - getrawtransaction (if verbosity=2,3)
        - gettxout
    29eafd5733
  3. DrahtBot commented at 3:34 pm on July 8, 2024: contributor

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

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK maflcko, BrandonOdiwuor, tdb3, achow101

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #28824 (Fix ASM ambiguity by willcl-ark)

    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.

  4. DrahtBot added the label RPC/REST/ZMQ on Jul 8, 2024
  5. maflcko commented at 3:42 pm on July 8, 2024: member
    ACK 29eafd5733d77b3e8f3f3ab6cd65c61ac0e8536b
  6. BrandonOdiwuor commented at 4:22 pm on July 9, 2024: contributor

    ACK 29eafd5733d77b3e8f3f3ab6cd65c61ac0e8536b

    LGTM

  7. in src/rpc/rawtransaction.cpp:516 in 29eafd5733
    513                 {RPCResult::Type::STR, "address", /*optional=*/true, "The Bitcoin address (only if a well-defined address exists)"},
    514                 {RPCResult::Type::STR, "p2sh", /*optional=*/true,
    515                  "address of P2SH script wrapping this redeem script (not returned for types that should not be wrapped)"},
    516                 {RPCResult::Type::OBJ, "segwit", /*optional=*/true,
    517-                 "Result of a witness script public key wrapping this redeem script (not returned for types that should not be wrapped)",
    518+                 "Result of a witness output script wrapping this redeem script (not returned for types that should not be wrapped)",
    


    tdb3 commented at 7:45 pm on July 20, 2024:
    nit:
    witness program or output script seems like it might be more accurate than witness output script.

    maflcko commented at 8:04 am on July 22, 2024:

    witness program or output script seems like it might be more accurate than witness output script.

    No. A witness program is different from the witness output script. The witness output script consists of both, the “version byte” and the “witness program”. You can refer to BIP 141 for more details: https://en.bitcoin.it/wiki/BIP_0141#Witness_program

  8. tdb3 approved
  9. tdb3 commented at 7:46 pm on July 20, 2024: contributor
    ACK 29eafd5733d77b3e8f3f3ab6cd65c61ac0e8536b Thanks for adding clarity. Left a nit.
  10. achow101 commented at 5:40 pm on July 23, 2024: member
    ACK 29eafd5733d77b3e8f3f3ab6cd65c61ac0e8536b
  11. achow101 merged this on Jul 23, 2024
  12. achow101 closed this on Jul 23, 2024

  13. theStack deleted the branch on Jul 23, 2024
  14. maflcko commented at 12:31 pm on July 25, 2024: member

    Affects the help text of the following RPCs:

    Looks like 3 RPCs were forgotten, so I created https://github.com/bitcoin/bitcoin/pull/30524


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-09-16 19:12 UTC

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