Repository navigation
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
0x2me
force-pushed
the
remove-optional-solver-fee
branch
2 times, most recently
from
September 23, 2026 12:19
3fc121b to
52c1836
Compare
Author
|
I have read the CLA Document and I hereby sign the CLA |
Author
|
recheck |
0x2me
force-pushed
the
remove-optional-solver-fee
branch
from
September 23, 2026 12:36
52c1836 to
2e2b6db
Compare
|
This pull request has been marked as stale because it has been inactive a while. Please update this pull request or it will be automatically closed. |
Author
|
Reopened as #5100 (rebased on main; GitHub would not reopen this one after the force-push). |
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.
Description
Finishes #2507.
Error::ProtocolFeeOnStaticOrderwas already removed in #4832; this is the dependent cleanup the issue asks for:feeonFulfillmentandJitTradeinsolvers-dtobecomes a plainU256instead ofOption<U256>.Same approach as #3822 (approved in principle there), but narrower: the driver
surplus_fee()refactor is left for a follow-up so this stays a small review.Breaking change to the solver API (
crates/solvers/openapi.yml).feeonFulfillmentwas documented as "only gets returned for limit orders" and is now required. A solver response containing a fulfillment withoutfeeis rejected at deserialisation by the driver, including on the quoting path, and the whole response is discarded, not just that trade.JitTradealready listedfeeas required, so this only tightens theFulfillmenthalf. Every in-tree solver always emittedfee, so the exposure is limited to external solver engines that relied on the old wording. If a softer landing is preferred,#[serde(default)]on the two fields delivers the same code cleanup while keeping old payloads working; happy to switch.Changes
solvers-dto:fee: U256onFulfillmentandJitTrade; serde tests for missing and present fee.solvers: drop theSome(..)wrapping in the solution DTO.driver: readfeedirectly instead ofunwrap_or_default(); the test mock solver always emitsfee.e2e: fixtures updated.openapi.yml:feeadded toFulfillment.required, description rewritten and typed asTokenAmount.How to test
cargo nextest run -p solvers-dto(new:fulfillment_requires_fee,fulfillment_fee_round_trips,jit_trade_requires_fee).cargo nextest runandcargo clippy --locked --workspace --all-features --all-targets -- -D warnings: green locally.RUST_MIN_STACK=3145728 cargo nextest run -p driver --test-threads 1 --run-ignored ignored-only: 96/96 locally.cargo check -p e2e --tests), not run locally; please watch CI.Related Issues
Fixes #2507