Skip to content

add v15 migration guide#955

Merged
oceans404 merged 3 commits into
masterfrom
v15-migration-guide
Apr 2, 2026
Merged

add v15 migration guide#955
oceans404 merged 3 commits into
masterfrom
v15-migration-guide

Conversation

@oceans404
Copy link
Copy Markdown
Contributor

@oceans404 oceans404 commented Mar 30, 2026

Summary

Adds a migration guide for upgrading from @stellar/stellar-base v14.x to v15.0.0 (Protocol 26).

  • Documents all 3 breaking changes: immutable networkPassphrase, XDR integer overflow/underflow now throws (via @stellar/js-xdr v4), Hermes typed-array polyfill removal
  • Covers behavioral fixes that may surprise consumers: Memo.id stricter validation, Soroban.parseTokenAmount excess decimal rejection, Keypair.verify returning false instead of throwing, TransactionBuilder.cloneFrom fixes
  • Lists new Protocol 26 XDR enum variants that require TypeScript exhaustive switch updates (txFrozenKeyAccessed, trustline-frozen result codes, BN254 cost types)
  • Includes before/after code examples, severity ratings, grep commands to find affected code, and a FAQ mapping error messages to solutions

Follow-up commit corrects Memo.id error strings to match the actual thrown message ("Expects a uint64 as a string. Got <value>"), and fixes all grep patterns to use POSIX-portable ERE syntax (-rnE, [[:space:]]) so they work on macOS BSD grep.

Test plan

  • Verify all internal links and anchor tags resolve correctly
  • Confirm Memo.id error strings match src/memo.js line 99
  • Spot-check grep commands on macOS (BSD grep) and Linux (GNU grep)
  • Cross-reference XDR enum variant names against types/curr.d.ts

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 30, 2026

Size Change: 0 B

Total Size: 3.54 MB

ℹ️ View Unchanged
Filename Size
dist/stellar-base.js 2.62 MB
dist/stellar-base.min.js 926 kB

compressed-size-action

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new migration guide to help consumers upgrade @stellar/stellar-base from v14.x to v15.0.0 (Protocol 26), summarizing breaking changes and behavior fixes with actionable steps.

Changes:

  • Introduces a v15 upgrade document covering critical breaking changes (immutability, XDR integer overflow, Hermes polyfill removal).
  • Documents behavioral fixes (e.g., Memo.id, Soroban.parseTokenAmount, Keypair.verify, TransactionBuilder.cloneFrom).
  • Adds troubleshooting/verification steps, including TypeScript exhaustive-switch updates for new XDR enum variants.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/upgrade/v15.md Outdated
Comment thread docs/migration-guide/v15.md
Comment thread docs/upgrade/v15.md Outdated
Comment thread docs/upgrade/v15.md Outdated
Comment thread docs/upgrade/v15.md Outdated
Comment thread docs/migration-guide/v15.md
Comment thread docs/upgrade/v15.md Outdated
Comment on lines +357 to +358
**Q: Do I need to update if I'm not on a Protocol 26 network yet?**
A: Yes — the breaking changes (immutable passphrase, integer overflow, Hermes polyfill) apply regardless of protocol version. The new XDR types only appear on Protocol 26 networks, but the behavioral changes affect all usage.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Depending on when the user might read this, it might be helpful to add dates on which P26 will be deployed on Testnet/Mainnet (otherwise it might sound like P26 is opt-in).

@oceans404
Copy link
Copy Markdown
Contributor Author

todo: put in new folder docs/migration-guide/v15.md?

- Use v15.x instead of v15.0.0 to cover future minor releases
- Add recommendation that all consumers upgrade
- Move guide from docs/upgrade/ to docs/migration-guide/
- Add migration guide link to CHANGELOG.md v15.0.0 section
- Fix Hermes polyfill FAQ: clarify silent wrong results, not a crash
- Add P26 deployment dates (Testnet Apr 16, Mainnet May 6) with link
@oceans404 oceans404 merged commit 7ae2c09 into master Apr 2, 2026
8 checks passed
@oceans404 oceans404 deleted the v15-migration-guide branch April 2, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants