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.
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
Create uninitialized task for v1 gas price service #2442
Create uninitialized task for v1 gas price service #2442
Changes from 47 commits
448d8c2
c5866a3
c54f098
fcf4477
159d5b4
ba080ff
d2b3c28
128a9ba
5f19932
922f3e0
d7e9bdd
12c517e
f8dca06
2bb86fe
60771e9
03da963
ea14e6f
b615b33
cfd1a71
d983891
4c2b844
1836656
48fe978
18fefb7
b15a93f
279191c
63b0266
477c731
b578a8e
7ca55c7
6ac41de
f2af4aa
4e07415
cc90cbd
11df7ae
7ac01aa
ca6e1e5
2592ad0
eb233ab
d32b347
9f78fa6
6b9969c
fc8c427
87dc547
008f5fb
a409e6e
2a06ec0
b9d6571
0c4640e
f443289
f43f00d
51d41c7
a642cb7
0b6b1d9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
is there a reason this isn't
StateWatcher::default()
?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.
There were some places that
process_l2_block_res
wasn't getting called because ofget_l2_block
yielding a result, but because the service was shutting down (and we always check if there is an l2 block available before shutting down).I added the
started
in a few places that it was shutting down early.That being said, this isn't doing what the test says it's doing
next__new_l2_block_saves_old_metadata
. It's checking the gas price:So I'll fix that.
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.
Fixed.
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.
Why do we multiple by the
gas_price_factor
here? And what isgas_price_factor
? I don't see where this value comes from and it is not clear what is the purpose of 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.
The
gas_price_factor
is just a scaling factor to make sure we can track the change between small values. Like we do for gas costs. If the gas price is 1, it is stored as 100 as thescaled
value, then we can increase it by 10% or 5% under the hood but it will still be returned as 1 until it crosses 150 or whatever.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.
The gas price factor can be different on different heights. Do we take it into account?
I though we work with Wei and because of that we don't need to scale gas price.
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.
What if the price is 1 Wei, which it often is? Possibly less so in the future, but still.
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'll add a test.
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 added a TODO to remove this with this issue:
#2481
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.
It would be better if you added todo for the field of the config instead of here=)
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'll move it in my next pr. Gonna merge.
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.
Moved here:
abf0cca