-
Notifications
You must be signed in to change notification settings - Fork 85
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
fix: lower priority fee #2148
fix: lower priority fee #2148
Conversation
581d950
to
1ad78b9
Compare
hotshot-state-prover/src/service.rs
Outdated
.unwrap() | ||
.into(); | ||
inner.max_fee_per_gas = Some(safe_max_fee); | ||
inner.max_priority_fee_per_gas = Some(safe_max_fee - base_fee); |
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.
@alxiong It looks like this could underflow it would probably lead to the transaction being rejected because we don't have the funds but let's not rely on 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.
see if you like 6106914
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 outdated, see the latest commits that use blocknative and trait PriceOracle
from ethers-rs
hotshot-state-prover/src/service.rs
Outdated
.unwrap() | ||
.into(); | ||
let base_fee: U256 = parse_units(res.result.base_fee.clone(), "gwei") | ||
.unwrap() |
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.
Suggest removing unwraps, maybe add a helper function or From
impl to parse the API response into a type that is convenient for us to work with and won't panic.
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.
should we just return error (propagate err up) or still use unwrap but hide inside some helper function?
separate the part of the changes originally included in #2148 ### This PR: - Switch to the right version of PlonkVerifier (in the deployer.rs we incorrectly deployed PlonkVerifier2.sol which is secure but less efficient)
this is annoying: ethers-middleware define this field from BlockNative's feed to be Most likely Blocknative changed its feed since it has been 2 years since ethers-rs touch that code. It might work at the time of its writing. |
a nice to have would be a test for this added functionality |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release-gambit
git worktree add -d .worktree/backport-2148-to-release-gambit origin/release-gambit
cd .worktree/backport-2148-to-release-gambit
git switch --create backport-2148-to-release-gambit
git cherry-pick -x 711ab84f811e814362ab97c1ba513e3d9055f8c8 |
* use (updated) blocknative oracle from ethers-rs * log err if price oracle failed (cherry picked from commit 711ab84)
Closes #2147
This PR:
Switch to the right version of PlonkVerifier (in thedeployer.rs
we incorrectly deployed PlonkVerifier2.sol which is secure but less efficient)Comments