Skip to content

Stop using BASE_FEE as the transaction fee in code examples #3106

Closed

Description

@oceans404

Many code examples set fee: BASE_FEE. That's the network minimum, not a recommended fee, so transactions that only bid the minimum can get outbid when the network is busy.

Update the examples to get a fee from feeStats() and cap it, same as the SDK docs change in stellar/js-stellar-sdk#1891.

Find them with: grep -rlE "BASE_FEE|fetchBaseFee" docs

Activity

  1. oceans404 commented on Nov 11, 2026

    @oceans404
    ContributorAuthor

    /triage

  2. stellar-doxie commented on Nov 11, 2026

    @stellar-doxie
    Contributor

    🤖 Automated message from the Stellar Triage Bot.

    Working this because @oceans404 asked with /triage.

    I am checking the BASE_FEE examples against stellar/js-stellar-sdk#1891 now. I will post the result here.

  3. stellar-doxie commented on Nov 11, 2026

    @stellar-doxie
    Contributor

    🤖 Automated message from the Stellar Triage Bot.

    Working this because @oceans404 asked with /triage.

    #3107 fixes the JavaScript examples (34 pages). It bids the fee-stats p90 capped at MAX_FEE, as in stellar/js-stellar-sdk#1891. It says "Refs", not "Closes", because of one open question.

    Decision needed: should the Python, Go and Java tabs get the same change? @kaankacar @ElliotFriend

    They still bid the minimum in about 40 places on 16 pages (base_fee=100, Transaction.MIN_BASE_FEE, txnbuild.MinBaseFee). Each SDK has a fee-stats call, so the fix is mechanical.

    Options:

    1. Yes, in a follow-up PR after Bid a fee from fee stats instead of BASE_FEE in JavaScript examples #3107 merges. I can build it when you call me back.
    2. Yes, added to Bid a fee from fee stats instead of BASE_FEE in JavaScript examples #3107. That makes one PR of about 45 pages.
    3. No. Keep this to JavaScript, the SDK that Update Band #1891 covers, and close the issue when Bid a fee from fee stats instead of BASE_FEE in JavaScript examples #3107 merges.

    Note: stellar/js-stellar-sdk#1891 is still open. If its pattern changes in review, #3107 should follow it.

  4. added
    bot:needs-decision
    on Nov 11, 2026
  5. ElliotFriend commented on Nov 11, 2026

    @ElliotFriend
    Contributor

    hey, triage bot! yes, the python, go, and java examples should get the same changes. option 1 sounds best to me. one distinct PR for each language

  6. stellar-doxie commented on Nov 11, 2026

    @stellar-doxie
    Contributor

    🤖 Automated message from the Stellar Triage Bot.

    Back on this because @ElliotFriend replied.

    Thanks. Done as option 1, one PR per language:

    Each one bids the fee-stats p90, capped at a max fee, the same as #3107. Merge #3107 first. The others touch other code blocks on the same pages.

    Each PR also fixes a few broken lines in the blocks it edits. The PR bodies list them.

    Not run: I could not run Python, Go or Java here. I checked every call against the newest SDK source.

    All four PRs say "Refs #3106". Close this issue when the last one merges.

  7. removed
    bot:needs-decision
    on Nov 11, 2026
  8. ElliotFriend commented on Nov 11, 2026

    @ElliotFriend
    Contributor

    Done in #3107 (JavaScript), #3108 (Python), #3109 (Go), and #3110 (Java). The examples now bid the capped fee-stats p90 instead of the network minimum.

    Still open from this work: the Java block in create-account.mdx doesn't compile (an import clash plus a few wrong class paths), and that fix is going in a separate PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions