Skip to content

rpc: doc: use "output script" terminology consistently in "asm"/"hex" results - #30408

Merged
achow101 merged 1 commit into
bitcoin:masterfrom
theStack:202407-rpc-doc_improve_hex_asm_result_scriptPubKey_naming
Jul 23, 2024
Merged

achow101 merged 1 commit into
bitcoin:masterfrom
theStack:202407-rpc-doc_improve_hex_asm_result_scriptPubKey_naming

Conversation

@theStack

@theStack theStack commented Jul 8, 2024

Copy link
Copy Markdown
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

… 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
@DrahtBot

DrahtBot commented Jul 8, 2024 •

Copy link
Copy Markdown
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.

@maflcko

maflcko commented Jul 8, 2024

Copy link
Copy Markdown
Member

ACK 29eafd5

@DrahtBot DrahtBot mentioned this pull request Jul 9, 2024

@BrandonOdiwuor BrandonOdiwuor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ACK 29eafd5

LGTM

@tdb3 tdb3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ACK 29eafd5
Thanks for adding clarity.
Left a nit.

"address of P2SH script wrapping this redeem script (not returned for types that should not be wrapped)"},
{RPCResult::Type::OBJ, "segwit", /*optional=*/true,
"Result of a witness script public key wrapping this redeem script (not returned for types that should not be wrapped)",
"Result of a witness output script wrapping this redeem script (not returned for types that should not be wrapped)",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

@achow101

Copy link
Copy Markdown
Member

ACK 29eafd5

@achow101
achow101 merged commit ed2d775 into bitcoin:master Jul 23, 2024
@theStack
theStack deleted the 202407-rpc-doc_improve_hex_asm_result_scriptPubKey_naming branch July 23, 2024 18:23
@maflcko

maflcko commented Jul 25, 2024

Copy link
Copy Markdown
Member

Affects the help text of the following RPCs:

Looks like 3 RPCs were forgotten, so I created #30524

fanquake added a commit that referenced this pull request Aug 12, 2024
fa5755b doc: rpc: Use "output script" consistently (2/2) (MarcoFalke)

Pull request description:

  Small follow-up to #30408 to fixup the RPCs that were forgotten.

ACKs for top commit:
  theStack:
    lgtm ACK fa5755b

Tree-SHA512: f1fc0aabb59017da216d6fe0f08a2274336d04db332ad6ce3d9608cd6f03667be1c76423f24a489ac8e7d536011a129dca752ab64b4621b7bc1d4d53f68602e4
@bitcoin bitcoin locked and limited conversation to collaborators Jul 25, 2025
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.

6 participants