Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
165 commits
Select commit Hold shift + click to select a range
7d44f76
Just copy the template
ryoqun Jul 5, 2023
2bd5351
Fill the summary and basics
ryoqun Jul 5, 2023
f864599
Enter drafting mode!
ryoqun Jul 5, 2023
3dd3f6d
Fold long lines...
ryoqun Jul 5, 2023
e49a63c
Enter drafting mode!
ryoqun Jul 5, 2023
da4724f
Enter drafting mode!
ryoqun Jul 5, 2023
59c98f5
save
ryoqun Jul 5, 2023
1e7b9aa
Add links and titles
ryoqun Jul 6, 2023
5f0c74c
Add simulation
ryoqun Jul 21, 2023
1bfda18
save 2023y07m22d14h56m18s247730422ns
ryoqun Jul 22, 2023
dad9b5d
save 2023y07m22d14h57m47s276914267ns
ryoqun Jul 22, 2023
48b4504
save 2023y07m22d14h58m02s311010827ns
ryoqun Jul 22, 2023
cad6027
save 2023y07m22d14h58m15s271718405ns
ryoqun Jul 22, 2023
c894a72
save 2023y07m22d14h59m50s190325881ns
ryoqun Jul 22, 2023
97c9ff2
save 2023y07m22d15h00m13s028519240ns
ryoqun Jul 22, 2023
007db4c
save 2023y07m22d15h01m02s473368905ns
ryoqun Jul 22, 2023
f5b2f4d
save 2023y07m22d15h01m33s306882011ns
ryoqun Jul 22, 2023
30de97f
save 2023y07m22d15h01m51s743617042ns
ryoqun Jul 22, 2023
7e90dbd
save 2023y07m22d15h02m19s832015808ns
ryoqun Jul 22, 2023
40f6cd4
save 2023y07m22d15h02m30s940265691ns
ryoqun Jul 22, 2023
686fd08
save 2023y07m22d15h02m41s353240710ns
ryoqun Jul 22, 2023
d90f9cd
save 2023y07m22d15h03m46s930281763ns
ryoqun Jul 22, 2023
6c6e694
save 2023y07m22d15h06m26s424836963ns
ryoqun Jul 22, 2023
c30f359
save 2023y07m22d15h06m51s727166322ns
ryoqun Jul 22, 2023
7ce2535
save 2023y07m22d15h07m08s589198490ns
ryoqun Jul 22, 2023
686e34f
save 2023y07m22d15h07m53s723715508ns
ryoqun Jul 22, 2023
2db8d93
save 2023y07m22d15h08m27s169256928ns
ryoqun Jul 22, 2023
d258524
save 2023y07m22d15h09m05s487132385ns
ryoqun Jul 22, 2023
4a91e2e
save 2023y07m22d15h10m26s574333460ns
ryoqun Jul 22, 2023
6c92109
save 2023y07m22d15h10m56s990820980ns
ryoqun Jul 22, 2023
75652ab
save 2023y07m22d15h11m18s220203526ns
ryoqun Jul 22, 2023
c3bf6a1
save 2023y07m22d15h12m06s247407022ns
ryoqun Jul 22, 2023
8ef9764
save 2023y07m22d15h15m45s486535931ns
ryoqun Jul 22, 2023
8b86721
save 2023y07m22d15h16m30s961434976ns
ryoqun Jul 22, 2023
1abf39d
save 2023y07m22d15h17m52s010725096ns
ryoqun Jul 22, 2023
13f2140
save 2023y07m22d15h20m19s306117015ns
ryoqun Jul 22, 2023
9dd03eb
save 2023y07m22d15h22m18s779757758ns
ryoqun Jul 22, 2023
7175e35
save 2023y07m22d15h23m12s137795090ns
ryoqun Jul 22, 2023
5a51fa6
save 2023y07m22d15h23m38s018517304ns
ryoqun Jul 22, 2023
d3853d0
save 2023y07m22d15h24m42s906783572ns
ryoqun Jul 22, 2023
8f09a5c
save 2023y07m22d15h25m35s192536558ns
ryoqun Jul 22, 2023
b192781
save 2023y07m22d15h26m05s795432685ns
ryoqun Jul 22, 2023
753c002
save 2023y07m22d15h26m44s761813068ns
ryoqun Jul 22, 2023
abf5f22
save 2023y07m22d15h26m49s344800529ns
ryoqun Jul 22, 2023
723914e
save 2023y07m22d15h26m53s846180784ns
ryoqun Jul 22, 2023
9a2e9f2
save 2023y07m22d15h27m10s937285180ns
ryoqun Jul 22, 2023
25d64a9
save 2023y07m22d15h27m45s499307556ns
ryoqun Jul 22, 2023
84165e5
save 2023y07m22d15h28m48s848688421ns
ryoqun Jul 22, 2023
cac4398
save 2023y07m22d15h28m57s762298270ns
ryoqun Jul 22, 2023
750d5d3
save 2023y07m22d15h29m08s600866405ns
ryoqun Jul 22, 2023
f7ee07b
save 2023y07m22d15h29m36s908495617ns
ryoqun Jul 22, 2023
6e54692
save 2023y07m22d15h29m56s494755554ns
ryoqun Jul 22, 2023
040fb2a
save 2023y07m22d15h30m16s229536086ns
ryoqun Jul 22, 2023
74213a7
save 2023y07m22d15h30m28s669242101ns
ryoqun Jul 22, 2023
82dc9be
save 2023y07m22d15h33m11s482788689ns
ryoqun Jul 22, 2023
1de4905
save 2023y07m22d15h33m51s641430570ns
ryoqun Jul 22, 2023
5a8c77a
save 2023y07m22d15h34m23s284051474ns
ryoqun Jul 22, 2023
19d3f9d
save 2023y07m22d15h34m39s481139286ns
ryoqun Jul 22, 2023
01b6d12
save 2023y07m22d15h35m38s597093927ns
ryoqun Jul 22, 2023
41ca9c3
save 2023y07m22d15h36m57s853102964ns
ryoqun Jul 22, 2023
17ba8aa
save 2023y07m22d15h37m27s093569993ns
ryoqun Jul 22, 2023
aef465d
save 2023y07m22d15h38m54s458200762ns
ryoqun Jul 22, 2023
5a87682
save 2023y07m22d15h39m12s880409588ns
ryoqun Jul 22, 2023
746a7d0
save 2023y07m22d15h39m35s900147449ns
ryoqun Jul 22, 2023
8663a99
save 2023y07m22d15h39m53s497620565ns
ryoqun Jul 22, 2023
95c598b
save 2023y07m22d15h40m09s102636250ns
ryoqun Jul 22, 2023
2050d17
save 2023y07m22d15h40m23s045430500ns
ryoqun Jul 22, 2023
970e535
save 2023y07m22d15h41m03s166245240ns
ryoqun Jul 22, 2023
9ff200b
save 2023y07m22d15h41m10s313298597ns
ryoqun Jul 22, 2023
96ba8c4
save 2023y07m22d15h41m24s037385125ns
ryoqun Jul 22, 2023
e78a111
save 2023y07m22d15h41m32s623572640ns
ryoqun Jul 22, 2023
73d895c
save 2023y07m22d15h41m42s788520397ns
ryoqun Jul 22, 2023
2fc579c
save 2023y07m22d15h42m13s193783265ns
ryoqun Jul 22, 2023
3772b44
save 2023y07m22d15h42m32s972910692ns
ryoqun Jul 22, 2023
51b5be2
save 2023y07m22d15h43m57s037087846ns
ryoqun Jul 22, 2023
e47bee6
save 2023y07m22d15h45m17s731532820ns
ryoqun Jul 22, 2023
22011ab
save 2023y07m22d15h45m44s739463491ns
ryoqun Jul 22, 2023
a8c4ec9
save 2023y07m22d15h46m29s365410139ns
ryoqun Jul 22, 2023
dcccbc3
save 2023y07m22d15h47m51s364815239ns
ryoqun Jul 22, 2023
4d9dbf5
save 2023y07m22d15h48m48s574797813ns
ryoqun Jul 22, 2023
b17bb17
save 2023y07m22d15h49m01s283258193ns
ryoqun Jul 22, 2023
d48ac6a
save 2023y07m22d15h49m16s942399131ns
ryoqun Jul 22, 2023
3c461ec
save 2023y07m22d15h49m36s004124936ns
ryoqun Jul 22, 2023
29d3005
save 2023y07m22d15h49m44s987776665ns
ryoqun Jul 22, 2023
fe19636
save 2023y07m22d15h50m57s435033442ns
ryoqun Jul 22, 2023
d0acf01
save 2023y07m22d15h51m04s604750093ns
ryoqun Jul 22, 2023
53ac79e
save 2023y07m22d15h51m19s671892153ns
ryoqun Jul 22, 2023
621c21e
save 2023y07m22d15h51m34s344422297ns
ryoqun Jul 22, 2023
79266d8
save 2023y07m22d15h51m48s772684335ns
ryoqun Jul 22, 2023
4f650d3
save 2023y07m22d15h52m36s615118103ns
ryoqun Jul 22, 2023
e5cf4da
save 2023y07m22d15h53m52s078929093ns
ryoqun Jul 22, 2023
eb25106
save 2023y07m22d15h54m02s257028669ns
ryoqun Jul 22, 2023
da46be2
save 2023y07m22d15h54m20s550428843ns
ryoqun Jul 22, 2023
a094b27
save 2023y07m22d15h54m32s593353581ns
ryoqun Jul 22, 2023
6f99167
save 2023y07m22d15h54m45s685805753ns
ryoqun Jul 22, 2023
a68f430
save 2023y07m22d15h54m55s435690498ns
ryoqun Jul 22, 2023
d5e0373
save 2023y07m22d15h55m17s622070816ns
ryoqun Jul 22, 2023
f397a33
save 2023y07m22d15h55m43s371162129ns
ryoqun Jul 22, 2023
937ac58
save 2023y07m22d15h56m40s568825906ns
ryoqun Jul 22, 2023
9c4bc50
save 2023y07m22d15h56m56s094780983ns
ryoqun Jul 22, 2023
c315abc
save 2023y07m22d15h57m58s083843071ns
ryoqun Jul 22, 2023
9aaa368
save 2023y07m22d15h58m19s211401880ns
ryoqun Jul 22, 2023
d08c4f4
save 2023y07m22d15h58m40s620260042ns
ryoqun Jul 22, 2023
36d2f6e
save 2023y07m22d15h58m53s480208674ns
ryoqun Jul 22, 2023
a75229e
save 2023y07m22d15h59m38s455191648ns
ryoqun Jul 22, 2023
97cfdd5
save 2023y07m22d16h00m16s701155692ns
ryoqun Jul 22, 2023
6741109
save 2023y07m22d16h00m27s445360068ns
ryoqun Jul 22, 2023
05893dc
save 2023y07m22d16h00m33s408742908ns
ryoqun Jul 22, 2023
046d20a
save 2023y07m22d16h01m11s452596487ns
ryoqun Jul 22, 2023
c5f653b
save 2023y07m22d16h03m45s382170153ns
ryoqun Jul 22, 2023
46c16d1
save 2023y07m22d16h07m28s819608851ns
ryoqun Jul 22, 2023
a1204fc
save 2023y07m22d16h07m38s691798047ns
ryoqun Jul 22, 2023
21ed169
save 2023y07m22d16h12m22s602074334ns
ryoqun Jul 22, 2023
d2c36f5
save 2023y07m22d16h14m55s346116120ns
ryoqun Jul 22, 2023
8dd1504
save 2023y07m22d16h15m08s024408501ns
ryoqun Jul 22, 2023
d1a7656
save 2023y07m22d16h15m36s433921904ns
ryoqun Jul 22, 2023
e752a03
save 2023y07m22d16h18m03s088652188ns
ryoqun Jul 22, 2023
e5cdd3f
save 2023y07m22d16h18m19s827990278ns
ryoqun Jul 22, 2023
5bd8d50
save 2023y07m22d16h18m25s796643716ns
ryoqun Jul 22, 2023
f7f16ce
save 2023y07m22d16h18m38s084050996ns
ryoqun Jul 22, 2023
3f928c9
save 2023y07m22d16h18m58s840455694ns
ryoqun Jul 22, 2023
04bee63
save 2023y07m22d16h19m29s534686700ns
ryoqun Jul 22, 2023
2503983
save 2023y07m22d16h20m12s005646048ns
ryoqun Jul 22, 2023
8c5374c
save 2023y07m22d16h20m24s325105825ns
ryoqun Jul 22, 2023
e9b0e8c
save 2023y07m22d16h20m49s705891509ns
ryoqun Jul 22, 2023
d2acc06
save 2023y07m22d16h21m25s910847883ns
ryoqun Jul 22, 2023
59bb565
save 2023y07m22d16h21m52s231643890ns
ryoqun Jul 22, 2023
9371b1e
save 2023y07m22d16h22m01s437122273ns
ryoqun Jul 22, 2023
07c103b
save 2023y07m22d16h22m25s568045165ns
ryoqun Jul 22, 2023
b07780f
save 2023y07m22d16h22m52s618476690ns
ryoqun Jul 22, 2023
316a63f
save 2023y07m22d16h23m23s152410999ns
ryoqun Jul 22, 2023
886303c
save 2023y07m22d16h23m37s672379234ns
ryoqun Jul 22, 2023
048a6f0
save 2023y07m22d16h25m36s056162397ns
ryoqun Jul 22, 2023
a59f6ca
save 2023y07m22d16h27m30s296243062ns
ryoqun Jul 22, 2023
7d65ac8
save 2023y07m22d16h29m12s364109496ns
ryoqun Jul 22, 2023
56c9a32
save 2023y07m22d16h29m17s707210187ns
ryoqun Jul 22, 2023
313021b
save 2023y07m22d16h42m55s943643489ns
ryoqun Jul 22, 2023
a1dd5f6
save 2023y07m22d16h43m16s461773460ns
ryoqun Jul 22, 2023
0acd39d
save 2023y07m22d16h45m35s233167010ns
ryoqun Jul 22, 2023
ca02f2f
save 2023y07m22d16h45m45s633889286ns
ryoqun Jul 22, 2023
bfb7633
save 2023y07m22d16h46m47s809952347ns
ryoqun Jul 22, 2023
0b55baa
save 2023y07m22d16h47m36s199751802ns
ryoqun Jul 22, 2023
64382b1
save 2023y07m22d16h48m14s698554342ns
ryoqun Jul 22, 2023
16efebf
Move 2_f64 into Policy
ryoqun Jul 24, 2023
62fbdbc
save 2023y07m24d14h58m02s347445058ns
ryoqun Jul 24, 2023
755140a
save 2023y07m24d15h02m35s815092628ns
ryoqun Jul 24, 2023
f5a34dc
save 2023y07m24d16h12m46s770953873ns
ryoqun Jul 24, 2023
01f7fe1
save 2023y07m24d16h16m57s447200587ns
ryoqun Jul 24, 2023
7fe16f7
save 2023y07m24d16h18m56s321682236ns
ryoqun Jul 24, 2023
5c5f9cc
save 2023y07m24d16h21m58s455110290ns
ryoqun Jul 24, 2023
e1109df
save 2023y07m24d16h23m14s059705900ns
ryoqun Jul 24, 2023
46b8a4a
save 2023y07m24d16h26m01s533901620ns
ryoqun Jul 24, 2023
e4694f7
save 2023y07m24d16h28m51s423170476ns
ryoqun Jul 24, 2023
54dd44a
save 2023y07m24d16h36m11s948090501ns
ryoqun Jul 24, 2023
47cd21f
save 2023y07m24d16h37m59s608839215ns
ryoqun Jul 24, 2023
30c6cbe
save 2023y07m24d16h38m26s380627544ns
ryoqun Jul 24, 2023
d88ccaa
save 2023y07m24d16h39m30s655449634ns
ryoqun Jul 24, 2023
3934373
save 2023y07m24d16h43m26s080404150ns
ryoqun Jul 24, 2023
28d50dc
save 2023y07m24d16h47m10s459954098ns
ryoqun Jul 24, 2023
7e59f68
save 2023y07m24d16h49m43s061968433ns
ryoqun Jul 24, 2023
7386a6b
save 2023y07m24d16h58m45s808939043ns
ryoqun Jul 24, 2023
471e46f
save 2023y07m24d17h00m20s029858253ns
ryoqun Jul 24, 2023
f099bc5
save 2023y07m24d17h23m26s669037706ns
ryoqun Jul 24, 2023
d5b6cf8
save 2023y07m24d21h22m49s808310903ns
ryoqun Jul 24, 2023
7d6843d
save 2023y07m24d21h23m39s641359351ns
ryoqun Jul 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
258 changes: 258 additions & 0 deletions proposals/0061-fair-congestion-control.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,258 @@
---
simd: '0061'
title: Fair congestion control with intra-block exponential local base fee
authors:
- Ryo Onodera (Solana Labs)
category: Standard/Meta
type: Core
status: Draft
created: 2023-07-05
feature: (fill in with feature tracking issues once accepted)
---

## Summary

This feature is a fair congestion-control mechanism in the form of an extension
to local fee markets while leaving their locality of transaction fee dynamics
intact.

To that end, it introduces a exponentially-scaled dynamic base fees to
individual local fee markets. It also attains very short feedback loop of
per-tx frequency to maintain full efficacy of Solana's peculiar execution
model compared to other blockchains: multi-threaded and low latency.

This is realized by means of some incentive tweaks to combat against the
obvious base fee manipulation with such short intervals.

## Motivation

(still in half-finished...)

- Write lock cu limit is bad (bot can lock out at the very first of block for
the entire duration of whole blocktime (400ms)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to lock out an account for entire slot, wouldn't bot need to time they 10M cu txs are at the top of the queue when a block starts, by paying the highest priority fee for that account? If SIMD #50 is approved, bot would be economically disincentivized, wouldn't it?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(thanks for peeking into this half-based proposal)

In order to lock out an account for entire slot, wouldn't bot need to time they 10M cu txs are at the top of the queue when a block starts, by paying the highest priority fee for that account?

yes. i think this is problem per se. this creates uneven value of time only around block boundaries. ideally, there should be some measure to unlock the limit if economically desired by users.

If SIMD #50 is approved, bot would be economically disincentivized, wouldn't it?

i guess that's limited. with 10M cus, it's just auction by the increments of 10_000 lamports? I think it's still cheap, considering arb's profits could be unbounded.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's still cheap.

it really depends on who you asking 😉

- Increased Defi activities around any volatile financial markets could starve
payment transactions for extended time
- Inter-block and linear Voluntary fee escalation with vanilla fee market
auction can't guarantee the scheduling deadline of casual payment txes (which
needs 99.99% sub-second confirmation at very minimum).

## Overview of the Design

This proposal tries to localize congestions by means of increasing minimum
required `cu_price`s for each write-locked addresses (= `base_cu_price`), which
is newly introduced by this proposal. This increase will be calculated
exponentially, measured by the CU consumed by each addresses at the moment.
This means a transaction must cost the sum of `requested_cu * base_cu_price`
for all of its write-locked addresses at least. This results in selectively
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is base_cu_price per writ-locked account, will/should there be a base-cu-price for the block itself (in case the congestion is for block)?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is base_cu_price per writ-locked account

yes.

will/should there be a base-cu-price for the block itself (in case the congestion is for block)?

no, there shouldn't be no such thing as written below in the proposal.

pricing out crowded subset of transactions waiting for block inclusion, while
allowing other transactions to be processed for block inclusion.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not perfectly clear the particular scenario trying to solve, but my intuition would be make base fee dynamic while leave priority ass is.

Copy link
Copy Markdown
Author

@ryoqun ryoqun Jul 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assume block is saturated like this: L highly lucrative trading pairs like sol/usdc, btc/usdc, eth/usdc and banking thread N. and L >= N with 100 market makers quoting 10/s paying 1 cents for priority fee.

so, normal spl transfers will cost at least 1 cents (assuming quoting and transfer consume around same amount of cu).

also, when market gets volatile for some economic news, normal spl transfers wil need to pay the more priority fee during that period, than normal days.

I think these are bad.

Copy link
Copy Markdown
Contributor

@tao-stones tao-stones Jul 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. If all defi transactions take up block space (after taking up all write-lock account limit), one might be able to say to transfer transaction that "block limit is reached" therefore indeed time to use priority fee. There probably room in scheduler to optimize it.


In this way, under-capitalized usage demand like spl-token transfers among
wallets will still find its way for _timely_ block inclusion, accomplishing
this mechanism's advertised _fairness_ in the sense of blockspace allocation
and transaction fee isolation for each independent local fee markets even at
the time of financial market's volatility, which entices well-capitalized usage
demand in DeFi activities on chain.

This rate-limiting gets enforced only when the cluster deemed to be congested,
meaning no idling block space is wasted when not congested. Also, those
exponentially-increased `base_cu_price`s will be decreased exponentially
likewise in terms of consumed CUs in a block (= `block_cu`), as long as its
address-specific CUs (= `address_cu`) remain to be unchanged due to the
temporal stalemate of relevant transaction processing. Collectively, each
addresses get equal amount of opportunity to execute transactions in
round-robin fashion while contributing to the decrease of other
`base_cu_price`s, assuming no exponential priority-fee premium is paid among
users to interrupt the orderly processing with such a high economical
justification.

On top of the direct appreciation of aforementioned fairness, this proposal
also obsoletes both the existing block-wide CU limit and the account-write CU
limit to overcome their inherent unfairness and problems. Also, no global
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the dynamic base-cu-price fully safe-guard reply timeliness (eg <=400ms)? Is it still somewhat desirable to have a hard limit to be safe?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm no? being not bankless, leaders are responsible and incentivised to generate block which should be replayed around 400ms. otherwise, they just risk missed block rewards.

likewise, replay should discard long-running blocks, assuming others won't vote as well.

`base_cu_price` is introduced for simplicity, relying on natural block-wide
market-rate ceiling from individual active `base_cu_prices`s.

Also, this proposal was conceived with the intent of reinforcement of Solana's
multi-threaded, real-time, and low-latency transaction execution. Towards that
high-achieving objective, rather drastic technical and economical changes are
needed for the introduction of this consensus-level congestion control as
described below in detail.

## Detailed Design

### Introductory example

Due to this proposal's inherent complexities, the following very-simplified
example is presented at first before diving into each design topic:

Assume all transactions request 100k CU and always succeed after consuming 100k
CU. Also assume the cluster is always congested.

Available transactions for block inclusion (= `bufferd transactions`):

- `Tx1_AB@9` (read: transaction numbered as `1`, which write-locks both address `A`
and address `B` with `cu_price == 9`)
- `Tx2_A@8`
- `Tx3_C@8`

(1)

#### update freq

why block interval is bad?
this proposal's primary objective is for congestion control, not like EIP 1559's price discovery
so non-interactiveness is desired for little or no room of active auctioning
so, quick and acute is desired much like tcp's rwin.

### Incentive alignment






### `base_cu_price` Calculation and block reward adjustment

processing model is transactions are linearized by the order of appearance in ledger entries.

### `reserved_fee` calculation and its accruing


### Congestion Detection

thread count or runnable/scheduled tx queue len?


### Nonconflicting transaction group










(i jotted this down in 10min before going to bed! pardon for being so random
writings...)

to *determiniscally* define active thread count (`TC_a`), additionally record
transaction termination events into poh stream.

also, derive stake-weighted average transaction execution thread count
(`TC_stake_weighted`).

so, full is defined as the duration when `TC_a == TC_stake_weighted` (this is
updated at ~10ms intervals).

when not full, maximize throughput of each of any single threaded transaction
executions. note that, this mode exponentially cools down any hot addresses if
any.

when full, effectively pause any txes touching the hot state by exponentially
increasing the local base fees. so casual txes can be executed.

so, leaders are incentivised to manipulate in this naive form.

so, split priority fee into two parts: (1) collected, (2) accrued for the next
tx's base fee payment. The portion of (1) is calculated as if tx's cu *
`TC_stake_weighted`. (i.e. as if validator stuffed spam txes to capture the
exessive part (2) of prirotiy fee)

in this way, there's no meaning to spam blocks by leaders. at the same time,
it's still incentivied to pack txes according to p.f. desceding order, because
leaders and clients alike are want to increse of their single threaded tps)

also requested fee is basis for fee cals, block fullness calc, not the actual
cu.
- to prevent bad behavior, rebate 50% of (requested CU - actual CU)?
- so that leaders want txes success (want to increase actual CU) => usually
execute in the order
- specified by user
- so that users want txes fail fast (want to decrease actual CU)
- 25% is burntd and 25% is collected to leaders
- so, avoid too much requested cu.

finally, when substantial blocks are full for extended duration, the global base-fee
will naturally starts ceiling up. That's unavoidable no matter what.

priority fee isn't collected at all.
banking can implement this congenstion mechanism without forced consensus rules if disired for experiment

### Example

`TC_stake_weighted == 10`

100 kcu

tx1a -- tx2a -- tx3a

tx1a:
cu 100kcu
base fee:

tx2a:
cu 200kcu

tx3a:
cu 300kcu

why leaders are incentized for picking more prioritized txes even if they only receive fixed base fees?
predictable auction mechanism and ceiling base fee as much as possible
compound reserve from firstly-executed txes?


## Impact

How will the implemented proposal impacts dapp developers, validators, and core contributors?

## Security Considerations

What security implications/considerations come with implementing this feature?
Are there any implementation-specific guidance or pitfalls?

## Drawbacks *(Optional)*

Why should we not do this?

## Backwards Compatibility *(Optional)*

Does the feature introduce any breaking changes? All incompatibilities and
consequences should be listed.

## Alternatives Considered

Related proposals:

(TODO: add any relation of this to them)

dynamic base fees
https://github.com/solana-foundation/solana-improvement-documents/pull/4

program rebatable account write fees:
https://github.com/solana-foundation/solana-improvement-documents/pull/16

asynchronous program execution:
https://github.com/solana-foundation/solana-improvement-documents/pull/45

increase prioritization fee:
https://github.com/solana-foundation/solana-improvement-documents/pull/50

bankless
https://github.com/solana-foundation/solana-improvement-documents/pull/5

## New Terminology

Is there any new terminology introduced with this proposal?

casual tx:
fairness:
block fullness in terms of number of actively-execution threads
dark/filler tx:
tx base fee:
address base fee:
reserve <=> reward
requested <=> required
buffered

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
7 changes: 7 additions & 0 deletions proposals/0061-fair-congestion-control/simulation/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions proposals/0061-fair-congestion-control/simulation/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[package]
name = "fair-congestion-control-simulation"
version = "0.1.0"
edition = "2021"
Loading