Add maxRouteLength guidance to Solana support docs#265
Open
warengonzaga wants to merge 2 commits intorelayprotocol:mainfrom
Open
Add maxRouteLength guidance to Solana support docs#265warengonzaga wants to merge 2 commits intorelayprotocol:mainfrom
warengonzaga wants to merge 2 commits intorelayprotocol:mainfrom
Conversation
Add a Transaction Size Optimization section explaining the 1232-byte Solana transaction size limit and how to use maxRouteLength to reduce swap routing hops. Includes recommended values (start at 4, try 3) and the includedOriginSwapSources fallback option. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
Author
|
Kindly verify this @pedromcunha thanks! |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds guidance to the Solana API guide for integrators who hit Solana’s transaction size limits, documenting how to constrain routing complexity via quote parameters.
Changes:
- Adds a new Transaction Size Optimization section explaining Solana’s 1232-byte transaction size limit and why appended instructions can cause failures.
- Documents the
maxRouteLengthquote parameter with recommended values (4, fallback to3). - Notes
includedOriginSwapSources(Jupiter-only) as a last-resort knob and provides a cURL quote request example.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
pedromcunha
approved these changes
Mar 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
maxRouteLengthparameter with recommended values (4to start,3as fallback)includedOriginSwapSources: ["jupiter"]as a last resort optionContext
Based on internal discussion where Jacob recommended
maxRouteLength: 4for integrators hitting tx size limits. Peter flagged this as a docs gap for both the Solana Guide and Quote API docs.The Quote API reference already lists
maxRouteLengthas a parameter — this PR adds the deeper guidance to the Solana Guide where integrators are most likely to look.Test plan
🤖 Generated with Claude Code