Skip to content

Add maxRouteLength guidance to Solana support docs#265

Open
warengonzaga wants to merge 2 commits intorelayprotocol:mainfrom
warengonzaga:waren/solana-maxroutelength-docs
Open

Add maxRouteLength guidance to Solana support docs#265
warengonzaga wants to merge 2 commits intorelayprotocol:mainfrom
warengonzaga:waren/solana-maxroutelength-docs

Conversation

@warengonzaga
Copy link
Member

Summary

  • Adds a Transaction Size Optimization section to the Solana Support guide
  • Explains the 1232-byte Solana transaction size limit and how it affects integrators who append custom instructions
  • Documents the maxRouteLength parameter with recommended values (4 to start, 3 as fallback)
  • Includes includedOriginSwapSources: ["jupiter"] as a last resort option
  • Provides a code example showing the parameter in a quote request

Context

Based on internal discussion where Jacob recommended maxRouteLength: 4 for 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 maxRouteLength as a parameter — this PR adds the deeper guidance to the Solana Guide where integrators are most likely to look.

Test plan

  • Verify the new section renders correctly on the docs site
  • Confirm the code example is valid and the parameter name matches the API

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings March 3, 2026 07:30
@warengonzaga
Copy link
Member Author

Kindly verify this @pedromcunha thanks!

Copy link
Contributor

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 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 maxRouteLength quote parameter with recommended values (4, fallback to 3).
  • 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>
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