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

FeeHistory estimator #13833

Merged
merged 49 commits into from
Sep 4, 2024
Merged
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
9e9858d
Introduce universal estimator
dimriou Jul 4, 2024
72b368b
Merge remote-tracking branch 'origin' into universal_estimator
dimriou Jul 4, 2024
f750b07
Fixes
dimriou Jul 5, 2024
1761021
Use WeiMin to cap bump price
dimriou Jul 8, 2024
4128630
Update connectivity logic
dimriou Jul 11, 2024
7ec8c3f
Fix error
dimriou Jul 11, 2024
937ad92
Fixes
dimriou Jul 11, 2024
22ffb0f
Merge branch 'develop' into universal_estimator
dimriou Jul 11, 2024
5e9716a
Cover an edge case when enforcing limits
dimriou Jul 12, 2024
1d6e223
Add changeset
dimriou Jul 12, 2024
7e447fd
Update mempool check logic
dimriou Jul 17, 2024
caaaf2d
Update config names
dimriou Jul 17, 2024
ead3fa2
Convert Universal Estimator to service
dimriou Jul 18, 2024
d7c8840
Client changes to support UE
dimriou Jul 18, 2024
042256d
Introduce configs
dimriou Jul 18, 2024
c4a71f6
Merge branch 'develop' into universal_estimator
dimriou Jul 18, 2024
1d73eaa
Update mocks
dimriou Jul 18, 2024
e0e28a8
Fix lint
dimriou Jul 18, 2024
bb4f75c
Fix test cases
dimriou Jul 18, 2024
e38cef7
Fix mockery
dimriou Jul 18, 2024
68b22c3
Fix test cases
dimriou Jul 18, 2024
377e870
Update comment
dimriou Jul 19, 2024
c7b8644
Fix Start/Close sync issue
dimriou Jul 19, 2024
77eee26
Address feedback
dimriou Jul 30, 2024
25263c7
Merge branch 'develop' into universal_estimator
dimriou Jul 30, 2024
700549f
Fix lint
dimriou Jul 30, 2024
0730018
Fix lint
dimriou Jul 30, 2024
8ea3847
More changes
dimriou Jul 31, 2024
1b0329d
Add more comments
dimriou Aug 14, 2024
6ad2105
Merge branch 'develop' into universal_estimator
dimriou Aug 14, 2024
9ec8cba
Fix merge conflicts
dimriou Aug 14, 2024
dfdc272
Update CONFIG
dimriou Aug 14, 2024
0d36e05
Merge branch 'develop' into universal_estimator
dimriou Aug 14, 2024
4f22d64
Merge branch 'develop' into universal_estimator
dimriou Aug 19, 2024
abb2d37
Rename to FeeHistory estimator
dimriou Aug 23, 2024
0874564
Merge branch 'develop' into universal_estimator
dimriou Aug 23, 2024
b008b5a
Rename
dimriou Aug 26, 2024
09d474b
Exclude zero priced priority fees
dimriou Aug 28, 2024
9a09ceb
Remove HasMempool
dimriou Aug 28, 2024
034deb3
Remove testing commit
dimriou Aug 28, 2024
b1dd7b5
Fixes
dimriou Sep 2, 2024
c3dfeec
Merge branch 'develop' into universal_estimator
dimriou Sep 2, 2024
3f70efa
Add DefaultJitter
dimriou Sep 2, 2024
8fcf025
Add optimizations
dimriou Sep 3, 2024
6de76f6
Merge branch 'develop' into universal_estimator
dimriou Sep 3, 2024
03d41a8
Fix testscripts
dimriou Sep 3, 2024
fc5d559
Merge branch 'develop' into universal_estimator
dimriou Sep 3, 2024
4ef8191
Fix name
dimriou Sep 3, 2024
9045f19
Update error messages
dimriou Sep 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use WeiMin to cap bump price
  • Loading branch information
dimriou committed Jul 8, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 176102126f462f40b45dc8dbbf7c670b42c6a118
4 changes: 1 addition & 3 deletions core/chains/evm/gas/universal_estimator.go
Original file line number Diff line number Diff line change
@@ -362,9 +362,7 @@ func (u *UniversalEstimator) BumpDynamicFee(ctx context.Context, originalFee Dyn
// makes sense anyway.
func (u *UniversalEstimator) limitBumpedFee(originalFee *assets.Wei, currentFee *assets.Wei, bufferedFee *assets.Wei, maxPrice *assets.Wei) (*assets.Wei, error) {
bumpedFee := assets.WeiMax(currentFee, bufferedFee)
if bumpedFee.Cmp(maxPrice) > 0 {
bumpedFee = maxPrice
}
bumpedFee = assets.WeiMin(bumpedFee, maxPrice)

if bumpedFee.Cmp(originalFee.AddPercentage(minimumBumpPercentage)) < 0 {
return nil, fmt.Errorf("bumpedFee: %s is bumped less than minimum allowed percentage(%s) from originalFee: %s - maxPrice: %s",