Repository navigation
refactor: transactions options - #5720
Open
sbackend123 wants to merge 5 commits into
Open
sbackend123 wants to merge 5 commits into
sbackend123 wants to merge 5 commits into
Conversation
sbackend123
marked this pull request as ready for review
November 27, 2026 16:41
sbackend123
requested review from
acud,
gacevicljubisa and
martinconic
as code owners
November 27, 2026 16:41
This branch has not been deployed
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.
Checklist
Description
Refactoring of transaction fees. The gas price, the gas limit, and Fee-Priority are no longer hidden in the request context. Callers pass them explicitly as
transaction.Option. The formulas are the same as on master, but they live inpkg/transactioninstead of the Ethereum client wrapper.Behavior is unchanged except for the following
Fee-PriorityandGas-Pricecan no longer be set together. PreviouslyFee-Prioritysilently won and the gas price was dropped. Now HTTP returns 400:Fee-Priority cannot be combined with Gas-Price.Fee-Priorityalso fail before any network call. Previously the rejection came after an extra RPC.Gas-Limitis now really applied onPOST /chequebook/deposit,POST /chequebook/withdraw, andPOST /wallet/withdraw/BZZ. On master the header was only validated: garbage returned 400, but the limit was not used and gas was estimated. With no header or 0, gas is still estimated.POST /wallet/withdraw/NativeTokenis unchanged: the header value, or 300000 when it is omitted.Open API Spec Version Changes (if applicable)
Swarm.yaml 9.0.1 → 9.1.0. SwarmCommon.yaml is unchanged.
The minor bump is for Gas-Limit on POST /chequebook/deposit, POST /chequebook/withdraw, and POST /wallet/withdraw/{coin}: the header is now documented and applied. Omitting it keeps the previous behavior.
Motivation and Context (Optional)
Previously, transaction send options (gas limit, gas price, Fee-Priority) were passed implicitly through the request context, and there was no single place that validated them. As a result, options could fail to reach the final call or be overwritten without the caller noticing.
After Fee-Priority was introduced, the split of this logic between the wrapped backend and the transaction service got worse: callers had to check Fee-Priority themselves and decide how the transaction fee would be calculated.
Related Issue
Screenshots (if appropriate):
AI Disclosure