linera-io / linera-protocol

Main repository for the Linera protocol
Apache License 2.0
1.44k stars 167 forks source link

Charge for system API calls #2905

Open jvff opened 3 hours ago

jvff commented 3 hours ago

Motivation

Execution across the Wasm interface between the host node and the guest application costs resources in terms of execution time, but it is currently not charged for any fees.

Proposal

Update the TransactionTracker to track system API calls and charge a fee (even if zero) on each and every one of them.

ma2bd commented 3 hours ago

I suspect the only design decision is whether the fees are specified as "dense" struct (continuing the existing code) or as a sparse map (say by using strings as keys or defining an enum of system-api names).