Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScriptAtLeast serialization fails if "required" value is greater than max int value #461

Closed
satran004 opened this issue Oct 16, 2024 · 0 comments · Fixed by #462
Closed
Assignees

Comments

@satran004
Copy link
Member

satran004 commented Oct 16, 2024

There is a change in the type for the 'required' field in ScriptAtLeast (script_n_of_k) in the Conway era.

    //Till Babbage Format :  script_n_of_k = (3, n: uint, [ * native_script ])
    //Conway Format         :  script_n_of_k = (3, int64, [* native_script])

Sample Cbor hex :

820083031affffb5ff858202828200581c1c12f03c1ef2e935acc35ec2e6f96c650fd3bfba3e96550504d5336183031afff6b79a8182051a0005561382051a0003dd4683031a000491b58182041a0004dc05820180820180
@satran004 satran004 self-assigned this Oct 16, 2024
@satran004 satran004 changed the title ScriptAtLeast serialization fails if "required" value is negative (Conway) ScriptAtLeast serialization fails if "required" value is greater than max int value Oct 16, 2024
satran004 added a commit that referenced this issue Oct 16, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
… no to BigInteger in other script types

Enhanced RequireTimeBefore, RequireTimeAfter, and ScriptAtLeast to handle BigInteger values, allowing support for larger numeric ranges. Updated deserialization and serialization methods accordingly.
satran004 added a commit that referenced this issue Oct 16, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
…om long to BigInteger (#462)

* #461 Support BigInteger for required in ScriptAtLeast and change slot no to BigInteger in other script types

Enhanced RequireTimeBefore, RequireTimeAfter, and ScriptAtLeast to handle BigInteger values, allowing support for larger numeric ranges. Updated deserialization and serialization methods accordingly.

* Remove public modifier

* Remove public modifiers to fix sonarcloud report
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant