-
Notifications
You must be signed in to change notification settings - Fork 251
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
Acp 176 config #1462
base: acp-176
Are you sure you want to change the base?
Acp 176 config #1462
Conversation
|
||
TimeToFillCapacity = 10 // in seconds | ||
TargetToMax = 2 // multiplier to convert from target per second to max per second | ||
TargetToPriceUpdateConversion = 87 // 87s ~= 60s * ln(2) which makes the price double at most every ~60 seconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if the calculation here made by using TargetToMax
if so we need to factor out 60s as a separate parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know Stephen thought about it, but the more intuitive parameter is this ratio between K
and T
, that produces the 60s doubling time. Note that the comment is actually backwards (since that equation is clearly not true).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relating to my comment above, this equation (as a function of this ratio and TargetToMax
, would look like this:
DoublingTime = TargetToPriceUpdateConversion * ln(2) / (TargetToMax - 1)
TimeToFillCapacity = 10 // in seconds | ||
TargetToMax = 2 // multiplier to convert from target per second to max per second | ||
TargetToPriceUpdateConversion = 87 // 87s ~= 60s * ln(2) which makes the price double at most every ~60 seconds | ||
MaxTargetChangeRate = 1024 // Controls the rate that the target can change per block. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is something we cannot parameterize because EVM also imposes the same limit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is something we can parameterize
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this the same value for https://github.com/ava-labs/subnet-evm/blob/master/params/protocol_params.go#L36?
|
||
TimeToFillCapacity = 10 // in seconds | ||
TargetToMax = 2 // multiplier to convert from target per second to max per second |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does 2
here control doubling the price? I.e does 3 here means triple it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the ratio between R
and T
, in variables from the ACP. In other words, we add twice as much gas to the bucket as is our target. This also defines our "sustained maximum capacity", so that with sustained 2 * T
sized blocks, we increase x
by T * dt
every block, so the fee will double every 60s. You can think of this as our excess gas over target. So I think that if you change this ratio to something else (say 3), then we get sustained higher excess (like 2 * T * dt
), so then this change will actually half the time to double. However, It's important to note that this is because this the time for the fee to double is linear in this "sustained excess gas", not the "sustained gas".
Why this should be merged
How this works
How this was tested
Need to be documented?
Need to update RELEASES.md?