Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion harnesses/rpc-cost/cmd/script/curve.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ type CurveProvider struct {
Cohort string `json:"cohort"`
Unit string `json:"unit"`
Points []CurvePoint `json:"points"`
// PlanNames maps the plan ids the points carry to the catalogue's own
// names: "bc-t3-large-us-east-1" is a key, not something to show.
PlanNames map[string]string `json:"planNames,omitempty"`
}

type CurveProfile struct {
Expand Down Expand Up @@ -240,7 +243,7 @@ func BuildCurves(c *Catalogue) CurveFile {
}
grid := logGrid(36)

for _, pr := range Profiles {
for _, pr := range append(append([]Profile{}, Profiles...), CurveOnlyProfiles...) {
cp := CurveProfile{ID: pr.ID, Label: pr.Label, Chain: pr.Chain}
for _, p := range c.Providers {
// The slider has to carry exactly the cohort the gauges carry,
Expand Down Expand Up @@ -295,8 +298,17 @@ func BuildCurves(c *Catalogue) CurveFile {
if len(pts) == 0 {
continue
}
names := map[string]string{}
for _, pt := range pts {
for _, pl := range p.Plans {
if pt.Plan != "" && pl.ID == pt.Plan && pl.Name != "" {
names[pl.ID] = pl.Name
}
}
}
cp.Providers = append(cp.Providers, CurveProvider{
Slug: p.Slug, Name: p.Name, Cohort: p.Cohort, Unit: p.Unit, Points: pts,
PlanNames: names,
})
}
sort.Slice(cp.Providers, func(i, j int) bool { return cp.Providers[i].Slug < cp.Providers[j].Slug })
Expand Down
2 changes: 1 addition & 1 deletion harnesses/rpc-cost/cmd/script/curve_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func TestCurveAgreesWithTheModelAtPublishedVolumes(t *testing.T) {
checked := 0
for _, cp := range f.Profiles {
var pr Profile
for _, cand := range Profiles {
for _, cand := range append(append([]Profile{}, Profiles...), CurveOnlyProfiles...) {
if cand.ID == cp.ID {
pr = cand
}
Expand Down
23 changes: 23 additions & 0 deletions harnesses/rpc-cost/cmd/script/profiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,29 @@ var Profiles = []Profile{
},
}

// CurveOnlyProfiles are priced into the slider's curve file and nowhere
// else: no gauge, no tab. The page's archive checkbox needs the dapp mix
// with every call reading state old enough to bill as archive, which is a
// question for one reader's bill, not a fourth ranked workload.
var CurveOnlyProfiles = []Profile{
{
ID: "dapp-archive",
Label: "Dapp frontend, archive",
Chain: "ethereum",
Archive: true,
Mix: profileByID("dapp").Mix,
},
}

func profileByID(id string) Profile {
for _, pr := range Profiles {
if pr.ID == id {
return pr
}
}
panic("no profile " + id)
}

// MixOrder returns this profile's methods in a fixed order.
//
// Summing a weighted mix by ranging over the map adds the same terms in a
Expand Down
2 changes: 1 addition & 1 deletion harnesses/rpc-cost/pricing/catalogue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Every number here traces to a wave-2-verified value, or to a wave-1 value wave 2 did not contradict.
# Where a figure exists only as an assumption it is null and the assumption is in `note`.
version: 1
as_of: "2026-09-29"
as_of: "2026-10-16"

fx:
eur_usd: 1.1355
Expand Down
16 changes: 9 additions & 7 deletions src/app/benchmarks/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,14 @@ export default async function BenchmarkPage({
the page to a pasteable quote or a JSON endpoint. */}
{!isDraft && <CitationBar slug={benchmark.slug} />}

{/* Bench 282 opens on its calculator instead of the generic body: one
volume slider and an archive checkbox answer "which plan do I buy",
where four rows of selectors (cohort, plan band, volume, workload)
over a three-volume ledger made the reader assemble the answer.
The slider reads a curve the same harness emits through the same
model as the gauges, so the two cannot drift apart. */}
{!isDraft && benchmark.slug === "rpc-cost" && <RpcCostSlider />}

{/* Methodology - expanded by default so readers can verify the
measurement before reading the numbers. Collapsible for repeat
visitors who already know the harness. */}
Expand Down Expand Up @@ -931,7 +939,7 @@ export default async function BenchmarkPage({
{/* Body: chain tabs + summary + chart + ledger + share. Receives every
chain variant pre-fetched server-side. flipping a tab swaps which
variant is rendered, instantly, no network round-trip. */}
{!isDraft && (
{!isDraft && benchmark.slug !== "rpc-cost" && (
<Suspense
// The served HTML is this fallback (useSearchParams in the body
// bails out of static rendering): the endpoint URLs must be in
Expand Down Expand Up @@ -1012,12 +1020,6 @@ export default async function BenchmarkPage({
{benchmark.slug === "terminal-fill-quality" && <TerminalFillAudit />}
{benchmark.slug === "terminal-execution-quality" && <TerminalFillAudit exec />}

{/* Bench 282: the ledger prices 10M, 100M and 1B requests a month,
because a metric needs a fixed label, and most readers are
somewhere else. This prices any volume off a committed curve the
same harness emits through the same model, so the panel and the
ledger cannot drift apart. */}
{!isDraft && benchmark.slug === "rpc-cost" && <RpcCostSlider />}

{/* SEO-friendly per-chain H2 block. Renders server-side so the
long-tail "Ethereum finality time", "Solana finality time"
Expand Down
Loading
Loading