update typicalMaximumVmNumberByteLength & update conditionals
We noticed that in libauth v3.1.0-next.4 the function vmNumberToBigInt still has the following logic
const typicalMaximumVmNumberByteLength = 8;
where this maximum is the default for maximumVmNumberByteLength which then later triggers the error:
if (bytes.length > maximumVmNumberByteLength) {
return VmNumberError.outOfRange;
}
@bitjson suggested setting the typicalMaximumVmNumberByteLength to zero to disable maximum length checks
maximumVmNumberByteLength appears 144 times in the codebase, sometimes with custom high number value overrides for the BCH consensus for 2025.
I simply updated the defaults and the three inequality checks I found, i did not dive further into the remaining occurrences.
⚠️ No Changeset found
Latest commit: e9654eca6c1b1df1bbda2e8dc8b4f207e60dcae6
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Codecov Report
Attention: Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.
Project coverage is 94.22%. Comparing base (
489cac0) to head (e9654ec).
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/lib/vm/instruction-sets/common/format.ts | 0.00% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## next #153 +/- ##
=======================================
Coverage 94.22% 94.22%
=======================================
Files 159 159
Lines 53320 53327 +7
Branches 1626 1626
=======================================
+ Hits 50239 50246 +7
Misses 3080 3080
Partials 1 1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.