-
Notifications
You must be signed in to change notification settings - Fork 380
fix: replace SuggestGasPrice with custom SuggestedFeeAndTip #5144
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
b88af30
fix: remove SuggestGasPrice
gacevicljubisa 014b1e9
fix: update trnsaction tests
gacevicljubisa e99af47
refactor: improve SuggestedFeeAndTip
gacevicljubisa a5e7029
fix: move const MinimumGasTipCap to transaction pkg
gacevicljubisa d598c78
fix: move const MinimumGasTipCap to transaction pkg
gacevicljubisa ab07500
fix(wrapped): set both fee caps to user-specified gasPrice
gacevicljubisa b9b021f
feat: add minimum-gas-tip-cap flag
gacevicljubisa b3dc070
fix(transaction): clean up transaction_test.go
gacevicljubisa e98a057
test(wrapped): add unit tests for SuggestedFeeAndTip
gacevicljubisa 1d61647
fix(backend): add header
gacevicljubisa 682154c
chore(transaction): rename interface to backend.Geth and remove unuse…
gacevicljubisa 368c918
fix(transaction): reduce rpc calls in IsSynced
gacevicljubisa d5285a7
fix(transaction): update TestIsSynced to use only HeaderbyNumber with…
gacevicljubisa be8cc0c
chore(wrapped): update header of the file
gacevicljubisa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| // Copyright 2025 The Swarm Authors. All rights reserved. | ||
| // Use of this source code is governed by a BSD-style | ||
| // license that can be found in the LICENSE file. | ||
|
|
||
| package backend | ||
|
|
||
| import ( | ||
| "context" | ||
| "math/big" | ||
|
|
||
| "github.com/ethereum/go-ethereum" | ||
| "github.com/ethereum/go-ethereum/common" | ||
| "github.com/ethereum/go-ethereum/core/types" | ||
| ) | ||
|
|
||
| // Geth is the interface that an ethclient.Client satisfies. | ||
| type Geth interface { | ||
| BalanceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error) | ||
| BlockNumber(ctx context.Context) (uint64, error) | ||
| CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) | ||
| ChainID(ctx context.Context) (*big.Int, error) | ||
| Close() | ||
| EstimateGas(ctx context.Context, msg ethereum.CallMsg) (uint64, error) | ||
| FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error) | ||
| HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error) | ||
| NonceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error) | ||
| PendingNonceAt(ctx context.Context, account common.Address) (uint64, error) | ||
| SendTransaction(ctx context.Context, tx *types.Transaction) error | ||
| SuggestGasTipCap(ctx context.Context) (*big.Int, error) | ||
| TransactionByHash(ctx context.Context, hash common.Hash) (tx *types.Transaction, isPending bool, err error) | ||
| TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
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.
in a future PR, this could be dynamic based on how far the node is from the end of the round phase. wdyt?
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.
That is nice idea