Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-Shard Congestion Control #539

Merged
merged 31 commits into from
Oct 1, 2024
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
81530e6
first nep draft for sharing with project team
jakmeier Mar 22, 2024
9262ddb
clean up a first reasonably presentable draft
jakmeier Mar 22, 2024
262d576
assign nep number from pr
jakmeier Mar 22, 2024
fc56f4c
Apply suggestions from code review
jakmeier Mar 25, 2024
41769c7
fix pseudo code formulas
jakmeier Apr 2, 2024
315952a
formatting
jakmeier Apr 2, 2024
7af5edb
Update neps/nep-0539.md
jakmeier Apr 2, 2024
4c96103
first draft of section "Reference Implementation"
jakmeier Apr 2, 2024
5b018a9
add link to reference impl PR
jakmeier Apr 2, 2024
690fef1
simplify delayed receipts gas tracking
jakmeier Apr 3, 2024
99ec21f
describe buffered receipts queue in more details
jakmeier Apr 5, 2024
8d6cf6c
describe combination with transaction priority
jakmeier Apr 5, 2024
c3dd730
finish all missing sections
jakmeier Apr 20, 2024
ec7528f
remove postponed receipts from spec
jakmeier Apr 21, 2024
b82d806
remove yielded receipts from spec
jakmeier Apr 21, 2024
e93d079
Update nep-0539.md
wacban Apr 23, 2024
67fbc91
change order of fields in CongestionInfo
wacban Apr 23, 2024
2f96c15
described alternatives for efficient congestion info calculation
wacban Apr 23, 2024
cd243a6
updated shard id type to u32
wacban Apr 23, 2024
cb145a0
integration with resharding
wacban Apr 24, 2024
8029abf
fix: gas from step 3 -> step 4
jakmeier Apr 26, 2024
3b9336c
fix condition of tx rejection
jakmeier May 1, 2024
3d7dea5
update the preferred option and added state sync integration
wacban May 2, 2024
d2c6abf
Merge pull request #2 from jakmeier/wacban-patch-1
jakmeier May 3, 2024
f33e622
Correct some typos, grammar issues, and clarify some text.
robin-near May 14, 2024
1e85668
Merge pull request #3 from robin-near/congestion
jakmeier May 15, 2024
fbb674c
clean up and add section on concepts
jakmeier May 15, 2024
8be43a3
markdown lints
jakmeier May 15, 2024
8d1f88c
Apply suggestions from code review
jakmeier May 22, 2024
dc27a23
Apply suggestions from code review
jakmeier May 22, 2024
53c9d45
Merge branch 'master' into congestion-control
flmel Oct 1, 2024
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
Prev Previous commit
Next Next commit
fix: gas from step 3 -> step 4
  • Loading branch information
jakmeier committed Apr 26, 2024
commit 8029abf651ff5251819a15e06af9db3fe30964da
2 changes: 1 addition & 1 deletion neps/nep-0539.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,10 @@
receipt_bytes: u64,
allowed_shard: u32`,
}
```

Check failure on line 178 in neps/nep-0539.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Fenced code blocks should be surrounded by blank lines [Context: "```"]

neps/nep-0539.md:178 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```"]
2. (new) Compute bandwidth limits to other shards based on the congestion information.
The formula is:
```python

Check failure on line 181 in neps/nep-0539.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Fenced code blocks should be surrounded by blank lines [Context: "```python"]

neps/nep-0539.md:181 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```python"]
for receiver in other_shards:
MAX_CONGESTION_INCOMING_GAS = 20 Pgas
incoming_congestion = gas_backlog[receiver] / MAX_CONGESTION_INCOMING_GAS
Expand All @@ -204,7 +204,7 @@
MAX_GAS_FORWARDING = 300 Pgas
outgoing_gas_limit[receiver]
= mix(MAX_GAS_FORWARDING, MIN_GAS_FORWARDING, congestion)
```

Check failure on line 207 in neps/nep-0539.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Fenced code blocks should be surrounded by blank lines [Context: "```"]

neps/nep-0539.md:207 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```"]
3. (new) Drain receipts in the outgoing buffer from the previous round-
- Subtract `receipt.gas()` from `outgoing_gas_limit[receipt.receiver]` for
each receipt drained.
Expand All @@ -223,7 +223,7 @@
the local shard.
5. Execute receipts in the order of `local`, `delayed`, `incoming`, `yield-resume time-out`.
- Don't stop before all receipts are executed or more than 1000 Tgas have
been burnt. Burnt gas includes the burnt gas from step 3.
been burnt. Burnt gas includes the burnt gas from step 4.
birchmd marked this conversation as resolved.
Show resolved Hide resolved
- Outgoing receipts up to what is left in
`outgoing_gas_limit[receipt.receiver]` per shard (after step 3) go to the
outgoing receipts list of the chunk.
Expand Down Expand Up @@ -265,8 +265,8 @@

We add two trie columns:

* `BUFFERED_RECEIPT_INDICES: u8 = 13;`

Check failure on line 268 in neps/nep-0539.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Unordered list style [Expected: dash; Actual: asterisk]

neps/nep-0539.md:268:1 MD004/ul-style Unordered list style [Expected: dash; Actual: asterisk]
* `BUFFERED_RECEIPT: u8 = 14`

Check failure on line 269 in neps/nep-0539.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Unordered list style [Expected: dash; Actual: asterisk]

neps/nep-0539.md:269:1 MD004/ul-style Unordered list style [Expected: dash; Actual: asterisk]

The `BUFFERED_RECEIPT_INDICES` column only has one value, which stores a borsh-serialized instance of
`BufferedReceiptIndices` defines as follows:
Expand Down Expand Up @@ -653,7 +653,7 @@
## Consequences


###

Check failure on line 656 in neps/nep-0539.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Heading style [Expected: atx; Actual: atx_closed]

neps/nep-0539.md:656 MD003/heading-style/header-style Heading style [Expected: atx; Actual: atx_closed]

### Positive

Expand Down
Loading