Skip to content

fix: Do not charge pay-as-you-go base fee on system subnets - #11209

Open
eichhorl wants to merge 2 commits into
masterfrom
eichhorl/fix-payg-system-subnet
Open

fix: Do not charge pay-as-you-go base fee on system subnets#11209
eichhorl wants to merge 2 commits into
masterfrom
eichhorl/fix-payg-system-subnet

Conversation

@eichhorl

@eichhorl eichhorl commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

System subnets have a normal cost schedule, but HTTP outcalls are still free.

This was already correctly enforced for the per-replica and consensus fees under the new pay-as-you-go pricing.

With this PR we also enforce a free base fee on system subnets.

Additionally, similar to (non-)replicated outcalls, we disable flexible outcalls on subnets where the http_requests feature is disabled.

@github-actions github-actions Bot added the fix label Aug 19, 2026
@eichhorl
eichhorl marked this pull request as ready for review August 19, 2026 08:09
@eichhorl
eichhorl requested a review from a team as a code owner August 19, 2026 08:09
@zeropath-ai

zeropath-ai Bot commented Aug 19, 2026

Copy link
Copy Markdown

No security or compliance issues detected. Reviewed everything up to 702eca7.

Security Overview
Detected Code Changes
Change Type Relevant files
Enhancement ► rs/embedders/src/wasmtime_embedder/system_api.rs
    Cost schedule handling: free outcalls on system subnets implemented plus adjustment to subnet_cycles_config
Enhancement ► rs/execution_environment/src/execution_environment.rs
    Subnets: system subnets have Free cost schedule for HTTP outcalls; pricing version logic updated based on subnet type and http_requests feature; adjust pricing calculation and available options for flexible outcalls
Enhancement ► rs/execution_environment/src/execution_environment.rs
    Update to use cost_schedule from context and align cycles config for HTTP outcalls
Enhancement ► rs/execution_environment/src/execution_environment.rs
    Remove http_outcalls_are_free helper and inline free check against cost_schedule where used
Enhancement ► rs/execution_environment/src/execution_environment/tests.rs
    Add tests around free outcalls on system subnet and free cost schedule, including various pricing versions for HTTP requests and flexible requests
Enhancement ► rs/execution_environment/tests/hypervisor.rs
    Add tests verifying cost_http_request_v2 is free on system subnet and on free cost schedule
Enhancement ► rs/execution_environment/tests/hypervisor.rs
    New test helper cost_http_request_v2_is_free_on and related tests for free scenarios

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant