Page MenuHomePhabricator

[64-bit ints] Add `SCRIPT_ENABLE_63_BIT_INTS` flag
ClosedPublic

Authored by tobias_ruck on Dec 6 2024, 11:54.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC3635d17a0eb0: [64-bit ints] Add `SCRIPT_ENABLE_63_BIT_INTS` flag
Summary

Add the flag (always disabled for now) to run the script interpreter with support for 63+sign-bit integers.

This flag is only needed for activation logic, and after 63+sign-bit integers have been enabled, we can remove the flag and pretend the chain has always had 63+sign-bit integers.

Note that parsing and disassembling 63+sign-bit integers isn't supported yet, which will be added in another diff. Therefore, script_tests.json also wasn't updated.

Partial backport of lotusd#71.

Depends on D17001.

Test Plan

ninja check

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tobias_ruck retitled this revision from [64-bit ints] Add `SCRIPT_ENABLE_64_BIT_INTS` flag to [64-bit ints] Add `SCRIPT_ENABLE_63_BIT_INTS` flag.Aug 1 2025, 14:48
tobias_ruck edited the summary of this revision. (Show Details)

pre-empt "what year is this"

Fabien requested changes to this revision.Aug 1 2025, 19:16
Fabien added inline comments.
src/test/scriptnum_tests.cpp
40 ↗(On Diff #55085)

Something is wrong here, how come the scriptnum2 case passes ? if num > max(int32_t) I expect it to fail

This revision now requires changes to proceed.Aug 1 2025, 19:16

fix CheckCreateVch in scriptnum_tests.cpp

clarify 31+sign-bit result behavior

Unknown Object (User) added a subscriber: Unknown Object (User).Aug 5 2025, 21:37
This revision is now accepted and ready to land.Aug 6 2025, 20:27