BM-2012: Per-requestor and per-selector min_mcycle_price pricing overrides#1663
Open
BM-2012: Per-requestor and per-selector min_mcycle_price pricing overrides#1663
min_mcycle_price pricing overrides#1663Conversation
min_mcycle_price pricing overridesmin_mcycle_price pricing overrides
austinabell
reviewed
Feb 18, 2026
broker-template.toml
Outdated
Comment on lines
28
to
47
| # Optional path to a JSON file with per-requestor and per-selector pricing overrides. | ||
| # When set, the broker checks the file for a matching override before falling back to | ||
| # the global min_mcycle_price above. See the example file format: | ||
| # | ||
| # { | ||
| # "by_requestor": { | ||
| # "0xAbC...123": { "min_mcycle_price": "0.0001 USD" } | ||
| # }, | ||
| # "by_selector": { | ||
| # "0x12345678": { "min_mcycle_price": "0.0005 USD" } | ||
| # }, | ||
| # "by_requestor_selector": { | ||
| # "0xAbC...123:0x12345678": { "min_mcycle_price": "0.001 USD" } | ||
| # } | ||
| # } | ||
| # | ||
| # Resolution priority: requestor+selector > selector > requestor > global default. | ||
| # The file is automatically hot-reloaded every 60 seconds; no broker restart needed. | ||
| # Copy pricing-overrides.template.json to pricing-overrides.json to get started. | ||
| pricing_overrides_path = "pricing-overrides.json" |
Contributor
There was a problem hiding this comment.
Why have it as another file that is being watched instead of just handling it as toml within this config?
Contributor
Author
There was a problem hiding this comment.
It felt more natural to use a JSON for this particular data structure; and the idea was to keep this file clean.
But ultimately I'm fine with anything, don't have a strong opinion either way
willpote
reviewed
Feb 20, 2026
Contributor
willpote
left a comment
There was a problem hiding this comment.
Overall this looks good, I'm think we should name it "proof type" instead of "selector", as proof type is what we use in the docs + SDK
Comment on lines
519
to
525
| /// Per-requestor and per-selector `min_mcycle_price` overrides. | ||
| /// | ||
| /// When the broker evaluates an order, it resolves the effective `min_mcycle_price` | ||
| /// with priority: `by_requestor_selector` > `by_selector` > `by_requestor` > global default. | ||
| /// Changes to this section are picked up automatically when the broker reloads `broker.toml`. | ||
| #[serde(default)] | ||
| pub pricing_overrides: PricingOverrides, |
Contributor
There was a problem hiding this comment.
Overall this looks good, I'm think we should name it "proof type" instead of "selector", as proof type is what we use in the docs + SDK
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.
Adds support for configuring
min_mcycle_priceoverrides per requestor address, per selector, or per requestor+selector combo via the broker.toml file (market.pricing-overridessection). This allows operators to price specific requestors or proof types (e.g. Groth16) differently without changing the global default.