HomePhabricator

[64-bit ints] Render 63+sign-bit ints in `ScriptToAsmStr`

Description

[64-bit ints] Render 63+sign-bit ints in ScriptToAsmStr

Summary:
Currently, this doesn't support numbers outside of 4 bytes in size, which excludes many 63+sign-bit numbers.

However, simply raising the number of bytes might be too aggressive, as it might start to render legitimate byte strings as decimal numbers.

Therefore, we instead check if the number is also minimally encoded, so only numbers that would be valid in the Script interpreter will be rendered as decimal numbers.

Depends on D18461.

Test Plan: ninja check

Reviewers: Fabien, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D18462

Details

Provenance
tobias_ruckAuthored on Aug 8 2025, 14:04
tobias_ruckPushed on Aug 12 2025, 12:15
Reviewer
Restricted Project
Differential Revision
D18462: [64-bit ints] Render 63+sign-bit ints in `ScriptToAsmStr`
Parents
rABC9db74d61f2d5: [64-bit ints] Add 63+sign-bit tests to script_tests.json
Branches
Unknown
Tags
Unknown