Skip to content

Conversation

@benr-ml
Copy link
Collaborator

@benr-ml benr-ml commented Jan 1, 2026

Description

The key server calls the dry run API to evaluate Seal policies. To prevent abuse, the server currently uses a fixed gas budget of 500M MIST, which is 1% of the maximum value, to limit the cost of these calls.

Since Seal policies should not incur storage fees anyhow, this PR reduces the gas budget to the cost of ~50,000 computation units to further limit potential abuse. The rationale is as follows:

  • With a reference gas price (RGP) of 500, the currently used budget corresponds to the tier costing 1M computation units.
  • 50,000 computation units, two tiers lower, is still above the cost of any policies we have observed.
  • Since the "cost" of dry run is independent of the load on the chain (as it does not compete with other transactions), the enforced limit should not depend on the current Reference Gas Price, and instead be defined with regards to computation units.
  • Increasing this value in the future will be backward compatible.

Feedback on the proposed value is welcome.

@benr-ml benr-ml changed the title [Key Server] Reduce gas budget to 25M when evaluating Seal policies [Key Server] Reduce gas budget to 25M for the evaluation of Seal policies Jan 1, 2026
@benr-ml benr-ml changed the title [Key Server] Reduce gas budget to 25M for the evaluation of Seal policies [Key Server] Reduce gas budget for the evaluation of Seal policies Jan 1, 2026
@benr-ml benr-ml marked this pull request as ready for review January 7, 2026 14:51
@benr-ml benr-ml requested a review from amnn January 7, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants