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

L1 fee throttle #1528

Open
wants to merge 10 commits into
base: nightly
Choose a base branch
from
Open

L1 fee throttle #1528

wants to merge 10 commits into from

Conversation

jfldde
Copy link
Contributor

@jfldde jfldde commented Nov 27, 2024

Description

  • L1 fee throttle

Default throttle values :

            (0.0, 1.0),   // No usage
            (0.25, 1.0),  // Below threshold
            (0.5, 1.0),   // At threshold
            (0.6, 1.016), // Above threshold, start increasing fee
            (0.7, 1.256),
            (0.8, 2.296),
            (0.85, 3.40),
            (0.9, 4.0), // Max multiplier hit
            (0.95, 4.0),
            (1.0, 4.0),

No fee increase below 0.5 threshold, then slowly increase towards 0.7 with a 1.25~ multiplier then a sharp increase to the max multiplier of 4.0.

These values were arbitrarily chosen to slowly disincentivize tx in block between 0.5 and 0.7 L1 usage and then sharply increase.
This is configurable via sequencer config https://github.com/chainwayxyz/citrea/pull/1528/files#diff-7fd132bbf4762e829ab08aac6cfc52089b4674fac321c2faf1dc961f9fbc1237

Linked Issues

@jfldde jfldde marked this pull request as ready for review November 28, 2024 10:02
Copy link

codecov bot commented Nov 28, 2024

Codecov Report

Attention: Patch coverage is 64.07407% with 97 lines in your changes missing coverage. Please review.

Project coverage is 76.2%. Comparing base (d7f5037) to head (e58e059).

Files with missing lines Patch % Lines
crates/bitcoin-da/src/monitoring.rs 43.9% 46 Missing ⚠️
crates/common/src/config/mod.rs 82.0% 21 Missing ⚠️
crates/bitcoin-da/src/rpc.rs 5.8% 16 Missing ⚠️
crates/bitcoin-da/src/service.rs 33.3% 10 Missing ⚠️
bin/citrea/src/rollup/bitcoin.rs 0.0% 2 Missing ⚠️
bin/citrea/src/rollup/mod.rs 88.8% 1 Missing ⚠️
crates/bitcoin-da/src/fee.rs 96.4% 1 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
bin/citrea/src/rollup/mock.rs 72.4% <ø> (ø)
...ule-system/sov-modules-rollup-blueprint/src/lib.rs 100.0% <ø> (ø)
bin/citrea/src/rollup/mod.rs 75.6% <88.8%> (+0.4%) ⬆️
crates/bitcoin-da/src/fee.rs 58.1% <96.4%> (+9.5%) ⬆️
bin/citrea/src/rollup/bitcoin.rs 0.0% <0.0%> (ø)
crates/bitcoin-da/src/service.rs 72.0% <33.3%> (-0.9%) ⬇️
crates/bitcoin-da/src/rpc.rs 3.0% <5.8%> (+0.5%) ⬆️
crates/common/src/config/mod.rs 92.1% <82.0%> (ø)
crates/bitcoin-da/src/monitoring.rs 41.4% <43.9%> (+0.2%) ⬆️

... and 3 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sequencer DA limit throttling
1 participant