Skip to content

Provider.costModels is typed as number, narrower than the ledger allows #552

Description

@solidsnakedev

Provider.ProtocolParameters.costModels types every cost model value as number (packages/evolution/src/sdk/provider/Provider.ts:41-45). The ledger allows int64 here, and the transaction builder already converts each value with BigInt(v) when building the language views (sdk/builders/internal/txBuilder.ts:792-798). A cost model value above 2^53 would therefore be rounded at the provider boundary before reaching the builder, giving a wrong script data hash.

No live network carries such a value today: mainnet, preview and preprod PlutusV3 models were checked on 2026-09-24 and all 350 entries are small. This is a latent limit in the public type, not an observed failure, so it is low priority. Fixing it means bigint in the public costModels type, which is a breaking change for consumers that read these values, and should be batched with other breaking changes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions