From 9594b7fdcee318767a0c362d567035239919d022 Mon Sep 17 00:00:00 2001 From: Greg Fitzgerald Date: Thu, 14 Mar 2019 13:38:14 -0600 Subject: [PATCH] Use stake-weighted congestion statistics --- proposals/src/transaction-fees.md | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/proposals/src/transaction-fees.md b/proposals/src/transaction-fees.md index 822c9d96cc..b7b76fa581 100644 --- a/proposals/src/transaction-fees.md +++ b/proposals/src/transaction-fees.md @@ -13,28 +13,25 @@ dislike about Ethereum's "gas", non-determinism. This design is not yet implemented, but is written as though it has been. Once implemented, delete this comment. -### The Fees Program +### Congestion-driven fees -The Solana cluster has an on-chain program called Fees with just one global -account called the *fees account*. The account holds a set of fee parameters -that the cluster will use to calculate transaction fees in the following epoch. -Any slot leader may submit congestion statistics to the fees account and the -Fees program uses that data to automatically adjust the fees to maximize -resource usage. Each validator checks congestion statistics and rejects blocks -that include congestion data inconsistent with its own observations. +Each validator submits network congestion data to its voting account. The +cluster then uses a stake-weighted average from all voting accounts to +calculate fee parameters. In the first implementation of this design, `tps` and +`tps_capacity` are the only statistics uploaded. They are uploaded once per +epoch. + +### Calculating fees The client uses the JSON RPC API to query the cluster for the current fee parameters. Those parameters are tagged with a blockhash and remain valid until that blockhash is old enough to be rejected by the slot leader. -### Calculating fees - -The fees account contains a variety of fee parameters. Before sending a -transaction to the cluster, a client may submit the transaction and fee account -data to an SDK module called the *fee calculator*. So long as the client's SDK -version matches the slot leader's version, the client is assured that its -account will be changed exactly the same number of lamports as returned by the -fee calculator. +Before sending a transaction to the cluster, a client may submit the +transaction and fee account data to an SDK module called the *fee calculator*. +So long as the client's SDK version matches the slot leader's version, the +client is assured that its account will be changed exactly the same number of +lamports as returned by the fee calculator. ### Fee Parameters