-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat(protocol): Add a setter where all fee calc params can be set with one go #13816
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adaki2004
requested review from
Brechtpd,
dantaik,
davidtaikocha,
cyberhorsey and
jscriptcoder
May 25, 2023 08:34
dantaik
approved these changes
May 25, 2023
dantaik
previously approved these changes
May 25, 2023
davidtaikocha
previously approved these changes
May 25, 2023
Brechtpd
approved these changes
May 25, 2023
davidtaikocha
approved these changes
May 25, 2023
jscriptcoder
approved these changes
May 25, 2023
Merged
davidtaikocha
added a commit
that referenced
this pull request
May 25, 2023
…h one go (#13816) Co-authored-by: adaki2004 <[email protected]> Co-authored-by: David <[email protected]>
davidtaikocha
added a commit
that referenced
this pull request
May 25, 2023
…3818) Co-authored-by: D <[email protected]> Co-authored-by: adaki2004 <[email protected]>
RogerLamTd
pushed a commit
that referenced
this pull request
May 25, 2023
…h one go (#13816) Co-authored-by: adaki2004 <[email protected]> Co-authored-by: David <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The idea behind this change is the following: We need to set all blockfee calculation related variables at one place because they are interconnected.
We thought the adjustment quotient can be a constant (or kind of a constant) which can be changed very infrequently with upgrades.
Well, yes it can but the problem is the following with the current devnet (described here, plotted down):
a. Fee is already low enough so it will not 'slow down' any curve if that curve is a flat line
b. We cannot set this alone because it would affect the math - so we need to reset 'everything'
Here you could see the simulation of the above I did with this update. Fee tanked, but at some point we reset to the same baseFee but with a slower curve and it works. (see simulation
test_scenario_where_blockfee_dumped_but_we_reset_parameters
)We could have 2 workarounds:
a. Redeploy the whole devnet (unconvenient since we will loose data as well as third-party providers/provers)
b. Call
setProofTimerParams()
to a low value, which will drive up the fees to the desired level, then, call them again with the normal parameters and THEN upgrade the contract to have a different (slow) adjustment quotient.None of these 2 are convenient so this is why we need this change, and put adjustment quotient into storage instead and have a setter.