Skip to content

fix: restore wide-int bounds statics, document Memo.text break - #1628

Merged
quietbits merged 4 commits into
v17-feature-branchfrom
v17-fixes-1
Aug 10, 2026
Merged

fix: restore wide-int bounds statics, document Memo.text break#1628
quietbits merged 4 commits into
v17-feature-branchfrom
v17-fixes-1

Conversation

@quietbits

@quietbits quietbits commented Aug 10, 2026

Copy link
Copy Markdown
Contributor
  • Restored MIN_VALUE/MAX_VALUE on Int128, Uint128, Int256, and Uint256 — in JavaScript a check like v > Int128.MAX_VALUE was comparing against undefined, so the range guard silently passed every value instead of throwing
  • Derived those bounds from the shared intRange helper, matching how the Int32/Uint32/Int64/Uint64 shims already define theirs (only the four wide types had lost them)
  • Added tests pinning the exact decimal bounds 16.2.0 reported, written independently of intRange so the statics cannot silently disappear again
  • Added a dedicated CHANGELOG.md breaking-change entry for Memo.text no longer accepting a plain number[] — the break shipped undocumented, buried as an uncounted exception, while 16.2.0's own error text advertised Expects string, array or buffer, max 28 bytes
  • Noted the dropped input in the Memo.text TSDoc and regenerated docs/reference/core-transactions.md

@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Aug 10, 2026
@quietbits
quietbits requested a balanced review from Copilot August 10, 2026 21:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Restores wide-integer bounds and documents the Memo.text v17 input change.

Changes:

  • Adds MIN_VALUE/MAX_VALUE to 128/256-bit integer classes.
  • Adds regression tests for bounds and plain-array rejection.
  • Updates migration and API documentation.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/xdr/dx/int128.ts Restores signed 128-bit bounds.
src/xdr/dx/uint128.ts Restores unsigned 128-bit bounds.
src/xdr/dx/int256.ts Restores signed 256-bit bounds.
src/xdr/dx/uint256.ts Restores unsigned 256-bit bounds.
src/base/memo.ts Documents accepted text inputs.
test/unit/xdr/large_int.test.ts Tests wide-integer statics and boundaries.
test/unit/base/memo.test.ts Tests plain-array rejection.
docs/XDR_MIGRATION.md Documents restored bounds.
docs/UINT8ARRAY_MIGRATION.md Describes the Memo.text input swap.
docs/reference/core-transactions.md Regenerates Memo API reference.
CHANGELOG.md Records the breaking input change.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/UINT8ARRAY_MIGRATION.md Outdated
@quietbits
quietbits requested a review from Ryang-21 August 10, 2026 22:10
Comment thread docs/XDR_MIGRATION.md Outdated
Comment thread CHANGELOG.md Outdated
@quietbits
quietbits merged commit 6562185 into v17-feature-branch Aug 10, 2026
13 checks passed
@quietbits
quietbits deleted the v17-fixes-1 branch August 10, 2026 22:59
@github-project-automation github-project-automation Bot moved this from Backlog (Not Ready) to Done in DevX Aug 10, 2026
Ryang-21 added a commit that referenced this pull request Aug 10, 2026
* Class XDR Implementation (#1422)

* feat(xdr): codegen tool + schema source

* feat(xdr): add class-based XDR runtime and sep51 JSON walker

* refactor(numbers): drop LargeInt classes, delegate to new XDR layer

* refactor(base): migrate src/base to new XDR layer; drop legacy xdr.ts + generated

* refactor: migrate downstream consumers (bindings/contract/horizon/rpc/webauth)

* feat(base/scval): add bool to ScValType

* allow opaque xdr types to be initalized via string

* refactor xdr strings to be represented soley via bytes with a dx friendly XdrString wrapper class

* generate a value getter function for void union cases

* add a is() function to the generated XDR union classes for instanceOf checks

* feat(xdr): regenerate schemas against @stellar/js-xdr and add CAP-71 credentials

* feat(xdr): wire the toJSON hook so JSON.stringify emits SEP-0051

* fix(bindings): emit Uint8Array for bytes/bytesN to match scValToNative

* refactor(contract): rename fromJSON to fromJson with deprecated aliases

* feat(xdr): accept ASCII asset codes with zero padding in constructors

* Migrate public API from Buffer to Uint8Array (#1564)

* feat(base): migrate crypto and strkey APIs to Uint8Array

* feat(base)!: migrate value types to Uint8Array

* feat(base)!: migrate transactions, operations, and auth to Uint8Array

* feat!: migrate contract, rpc, and webauth layers to Uint8Array

* build!: drop buffer polyfill and dependency

* fix(horizon): type manage_data value as string to match runtime API

* fix(xdr): emit SEP-51 key `type` instead of Rust-escaped `type_` (#1571)

* build(xdr): regenerate xdr.json via docker from pinned stellar-xdr commit (#1575)

* build(xdr): regenerate schema from stellar-xdr with CAP-83 and CAP-85 ungated (#1576)

* build(xdr): regenerate schema from stellar-xdr with CAP-83 and CAP-85 ungated

* fix(xdr): keep consumers compiling against the regenerated union arms

* fix(vitest): isolate browser dep cache per transport

* feat(xdr): support CAP-83 empty tx set values and CAP-85 external executables (#1577)

* build(xdr): fail the schema download instead of masking it in a pipe

* feat(xdr): support CAP-83 and CAP-85 protocol values

* fix(xdr): bound decimal string length before BigInt parse in JSON decode (#1581)

* fix(xdr): bound decimal string length before BigInt parse in json decode

* refactor(xdr): name the digit-budget constants in bigint-parts

* fix(xdr): restrict fromJson to SEP-0051 keys and reject unknown fields (#1582)

* fix(xdr): restrict fromJson to SEP-51 keys and reject unknown fields

* fix(test): correct horizon corpus fixture path so corpus tests run

* fix(strkey): bound decodeCheck input length before base32 decode (#1583)

* fix(xdr): reject AssetCode12 JSON codes shorter than 5 bytes (#1585)

* fix(horizon)!: make TransactionFailedExtras result_codes.operations optional (#1586)

* Fix: signed payload strkey framing (#1588)

* fix(strkey): validate signed payload framing in decodeCheck

* Fix: xdr json decode validation (#1592)

* fix(xdr): throw on unknown union discriminant in fromXdrObject

* fix(strkey): validate the claimable balance discriminant byte

* fix(xdr): reject non-decimal integer strings in JSON decoding

* V17.0.0 rc.1 (#1593)

* chore(release): cut v17.0.0-rc.1

* fix(spec): restore instanceof Map check lost in the v17 merge

* feat(xdr): add validateXdr static to every generated type (#1597)

* feat(xdr): add validateXdr static to every generated type

* fix(contract): declare error classes, make types self-contained (#1627)

* perf(strkey): reject by length and prefix before decodeCheck throws (#1629)

* fix: restore wide-int bounds statics, document Memo.text break (#1628)

* fix(xdr): restore wide-int MIN_VALUE/MAX_VALUE statics

---------

Co-authored-by: Iveta <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants