Skip to content

generate-cost-model fails on master: no off-diagonal benchmark data for EqualsByteString/EqualsString #7868

Description

@Unisay

#7804 rewrote equalsByteStringModel and equalsStringModel to use the new linearOnDiagonal helper, which requires benchmark rows with x_mem != y_mem and stops otherwise. benching-conway.csv only has on-diagonal rows for these two functions, so fitting fails on a clean master checkout:

$ cd plutus-core/cost-model/data
$ cabal run plutus-core:generate-cost-model -- --csv benching-conway.csv -o /tmp/model.json
generate-cost-model: R Runtime Error: Error in linearOnDiagonal("EqualsByteString") :
  No off-diagonal data found for EqualsByteString

cost-model-test fails the same way, since it fits the R models from the same files.

Two ways to fix: run the extended EqualsByteString/EqualsString benchmarks from #7804 on the reference machine and merge the rows into benching-conway.csv, or make linearOnDiagonal fall back to the previous min-based off-diagonal constant when no such rows exist. Until then, every costing PR has to patch models.R locally to fit anything.

Found while fitting the multiIndexArray cost model (#7869).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions