Skip to content

Bid a fee from fee stats instead of the minimum in Java examples - #3110

Merged
ElliotFriend merged 1 commit into
mainfrom
docs-agent/3106-java-fee-stats
Nov 11, 2026
Merged

ElliotFriend merged 1 commit into
mainfrom
docs-agent/3106-java-fee-stats

Conversation

@stellar-doxie

@stellar-doxie stellar-doxie Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

🤖 Automated message from the Stellar Triage Bot.

Refs #3106

Working this because @oceans404 asked with /triage, and @ElliotFriend chose one PR per language. This is the Java PR. Python is #3108 and Go is #3109.

The Java examples now bid the fee-stats p90, capped at maxFee, in place of Transaction.MIN_BASE_FEE or 100. This matches the JavaScript change in #3107.

  • RPC examples use getFeeStats(): getInclusionFee() for classic transactions, getSorobanInclusionFee() for contract calls.
  • Horizon examples use feeStats().execute().getFeeCharged().getP90().
  • 13 sites on 9 pages.

Fixed in blocks this PR already edits:

  • working-with-contract-specs.mdx: the hello example set no base fee and no timeout. The Java SDK requires both, so build() failed. It now sets both.
  • create-account.mdx called SorobanServer.loadAccount, which does not exist. It now calls getAccount.

Not fixed: the rest of the Java block on create-account.mdx still does not compile. Its wildcard imports of org.stellar.sdk.* and org.stellar.sdk.xdr.* clash on Transaction and Asset. Fixing that means rewriting the block. I can do that in a separate PR if you want it.

Verified against java-stellar-sdk 6.0.0 source: GetFeeStatsResponse and FeeStatsResponse p90 are Long, setBaseFee(long), and both fee-stats calls throw only unchecked exceptions. I also checked the live testnet RPC and Horizon responses. The issue cites no version. Two pages pin 3.1.0 in a comment. getFeeStats(), getAccount(), the Long p90 fields and setBaseFee(long) are the same in 3.1.0.

Not verified: I did not compile the Java code. No JDK is available in this lane.

Merge order: #3107 first. This PR overlaps #3107 on 7 pages (all but working-with-contract-specs.mdx and invoke-contract-tx-sdk.mdx), #3108 on 8 pages and #3109 on 4 pages. The edits are in other code blocks.

pnpm check passes. pnpm check:links reports only the known broken links in .mintlify/skills/.

@mintlify

mintlify Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
stellar-docs 🟢 Ready View Preview Nov 11, 2026, 7:07 PM

@ElliotFriend

Copy link
Copy Markdown
Contributor

yes, please make a separate PR to update the create-account.mdx Java block

@ElliotFriend
ElliotFriend merged commit ec8c9dd into main Nov 11, 2026
8 checks passed
@ElliotFriend
ElliotFriend deleted the docs-agent/3106-java-fee-stats branch November 11, 2026 20:07

This branch was successfully deployed

1 active deployment
staging — aad2bdcd Deployed Nov 11, 2026 by mintlify[bot]
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.

1 participant