stellar / stellar-core

Reference implementation for the peer-to-peer agent that manages the Stellar network.
https://www.stellar.org
Other
3.11k stars 968 forks source link

Soroban resource fee tuning #3695

Open dmkozh opened 1 year ago

dmkozh commented 1 year ago

https://github.com/stellar/stellar-protocol/blob/master/core/cap-0046-07.md relies on network-wide fees for all the resources as the main means for spam prevention (inclusion fees are independent of the transaction size).

We need to come up with some reasonable baseline for every resource. Probably it's easier to come up with a maximum fee for every resource and then just divide it by the respective resource limit.

MonsieurNicolas commented 1 year ago

This tracks what the "default settings" should be (that would work on all networks) and what we should pick for testnet (with an eye on the public network later, that way we can have a sane recommendation), right?

On the "sane default" front, something I discussed with @dmkozh was that for storage, we probably want to set bucketListGrowthFactor to 0: that way it does not cost "millions of dollars" when upgrading a network with an existing & large bucket list (like what will happen in pubnet). Reason it could cost a lot is that on initial protocol upgrade, we start with conservative settings that need to be changed: so somebody will have to install a contract that allows to store some state on ledger to perform network settings upgrade (and if bucket list size is greater than bucketListSizeBytes, the multiplier would kick in) .

dmkozh commented 4 months ago

The fees for Soroban phase 1 should be a reasonable starting point and should work for some time.