Conversation
…andidates) subsuming fallback, ladder, runoff, and the improvement fee — calldata-forwarding assembly self-calls, per-candidate gas caps, plain args
…he golf template)
…receiver address as a todo
…on a false measurement
…drome Slipstream)
…stLogic house idioms)
…ever influenced ranking; 4-arg SELECT/SELECT_VIP, candidates head word 0x80→0x60, unit tests 10/10
Keep SELECT on Base and leave production Mainnet unchanged for deployment size. Co-Authored-By: OpenAI Codex <codex@openai.com>
Co-Authored-By: Claude (Fable 5, Claude Code) <noreply@anthropic.com>
Co-Authored-By: Claude (Fable 5, Claude Code) <noreply@anthropic.com>
Meta-txn witnesses hash only the declared outer action bytes, so nested candidate offsets that escape into trailing calldata would let a relayer execute unsigned actions. Reject out-of-bounds blobs and add a regression. Co-authored-by: Cursor <cursoragent@cursor.com>
SELECT is chain-agnostic, so handle it in the shared base dispatch. Chains that call super._dispatch get it for free; Mainnet keeps its copied arm. Drops the per-chain Select mixin from Base/Mainnet. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep only the SELECT wiring edits; restore original comment and indentation style so the PR stays reviewable. Co-authored-by: Cursor <cursoragent@cursor.com>
…st success Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: OpenAI Codex <codex@openai.com>
`select` follows the `targets` and `candidates` offset words and enforces the same bounds, at the same points, as the standard ABI decoder: array contents must lie inside the action data, and each candidate offset must leave room for its length word, checked when that candidate's trial runs. Candidate offsets may alias or appear in any order. The candidate region is copied once into a shared callback buffer; each trial selects its candidate by rewriting only the callback's dynamic offset and target words, and the callback follows that offset to the candidate's actions.
Every candidate now runs regardless of how much gas remains. A successful trial commits even when EIP-150 clamped its requested trial gas limit. A failed trial is skipped only when the pre-call gas measurement proves the trial received its whole cap; any other failure consumes all remaining gas with INVALID so that the gas supplied to the transaction cannot steer route selection. The final trial still runs uncapped and bubbles its revert data when fully funded. Funding is measured before the call because, after a failure, a fully funded trial that consumed its gas is indistinguishable from a starved one. _SELECT_OVERHEAD_GAS overestimating the measurement-to-CALL plumbing is the soundness condition for skipping a failed trial. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Co-Authored-By: OpenAI Codex <codex@openai.com>
A starved trial's success commits; a starved trial's failure consumes all gas instead of falling through or bubbling; a fully funded failure still falls through. The scenario that previously reverted before the first candidate for want of a whole-tail reserve now succeeds and is tested as such. Gas snapshots track the cheaper loop. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
🛡️ Immunefi PR ReviewsWe noticed that your project isn't set up for automatic code reviews. If you'd like this PR reviewed by the Immunefi team, you can request it manually using the link below: Once submitted, we'll take care of assigning a reviewer and follow up here. |
jparklev
reviewed
Sep 8, 2026
| /// its score `target`. A score is the increase in the `token` balance held by Settler. A | ||
| /// zero `target` commits any non-reverting candidate. Native asset output only scores if | ||
| /// wrapped to wrapped-native in the candidate actions. Candidates must not contain | ||
| /// `CHECK_SLIPPAGE`. `targets` are the per-candidate minimum outputs that terminate the |
Contributor
There was a problem hiding this comment.
For reviewers: we’ll add NATIVE_CHECK to this comment for clarity. Both CHECK_SLIPPAGE and NATIVE_CHECK should stay outside SELECT candidates
duncancmt
added this pull request to stack #648
September 9, 2026 12:37
duncancmt
force-pushed
the
dcmt/select
branch
from
September 9, 2026 12:53
ba7310d to
f358d81
Compare
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.
Copied from 0xProject/0x-settler-private#6 . Most of this work is from @jparklev
_selectif we choose to add it back (same selector and encoding)