Use stake-weighted congestion statistics
This commit is contained in:
parent
1adf8355f2
commit
9594b7fdce
|
@ -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
|
This design is not yet implemented, but is written as though it has been. Once
|
||||||
implemented, delete this comment.
|
implemented, delete this comment.
|
||||||
|
|
||||||
### The Fees Program
|
### Congestion-driven fees
|
||||||
|
|
||||||
The Solana cluster has an on-chain program called Fees with just one global
|
Each validator submits network congestion data to its voting account. The
|
||||||
account called the *fees account*. The account holds a set of fee parameters
|
cluster then uses a stake-weighted average from all voting accounts to
|
||||||
that the cluster will use to calculate transaction fees in the following epoch.
|
calculate fee parameters. In the first implementation of this design, `tps` and
|
||||||
Any slot leader may submit congestion statistics to the fees account and the
|
`tps_capacity` are the only statistics uploaded. They are uploaded once per
|
||||||
Fees program uses that data to automatically adjust the fees to maximize
|
epoch.
|
||||||
resource usage. Each validator checks congestion statistics and rejects blocks
|
|
||||||
that include congestion data inconsistent with its own observations.
|
### Calculating fees
|
||||||
|
|
||||||
The client uses the JSON RPC API to query the cluster for the current fee
|
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
|
parameters. Those parameters are tagged with a blockhash and remain valid
|
||||||
until that blockhash is old enough to be rejected by the slot leader.
|
until that blockhash is old enough to be rejected by the slot leader.
|
||||||
|
|
||||||
### Calculating fees
|
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*.
|
||||||
The fees account contains a variety of fee parameters. Before sending a
|
So long as the client's SDK version matches the slot leader's version, the
|
||||||
transaction to the cluster, a client may submit the transaction and fee account
|
client is assured that its account will be changed exactly the same number of
|
||||||
data to an SDK module called the *fee calculator*. So long as the client's SDK
|
lamports as returned by the fee calculator.
|
||||||
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
|
### Fee Parameters
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue