-
Notifications
You must be signed in to change notification settings - Fork 182
A list of APIs to be changed or added for dynamic gas price #1452
Conversation
governance/api.go
Outdated
@@ -62,22 +63,33 @@ var ( | |||
errInvalidUpperBound = errors.New("upperboundbasefee cannot be set lower than lowerboundbasefee") | |||
) | |||
|
|||
// TODO-Klaytn-Governance: Refine this API and consider the gas price of txpool | |||
// GasPriceAt returns the baseFeePerGas of the given block in peb. |
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.
// GasPriceAt returns the baseFeePerGas of the given block in peb. | |
// GasPriceAt returns the baseFeePerGas of the given block in peb. | |
// It returns unit price by using governance if there is no base fee set in header. |
api/api_ethereum.go
Outdated
@@ -308,7 +311,8 @@ func (api *EthereumAPI) GasPrice(ctx context.Context) (*hexutil.Big, error) { | |||
|
|||
// MaxPriorityFeePerGas returns a suggestion for a gas tip cap for dynamic fee transactions. | |||
func (api *EthereumAPI) MaxPriorityFeePerGas(ctx context.Context) (*hexutil.Big, error) { | |||
return api.publicKlayAPI.MaxPriorityFeePerGas(ctx) | |||
// TODO-Klaytn maybe need to branch kip71 hardfork |
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.
We'd better make sure this. Do we need to do different action based on the hardfork or not?
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 think we can remove this TODO
comment.
api.GasPrice
will return unit price before hard fork and return next block'sm baseFee after hard fork.
@bobpkr Please let me know if i misunderstood
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.
We need to discuss this! What to do with maxPriorityFeePerGas...! Please share your opinions.
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.
First of all, you are right.
I heard that @kjeom will be more organized and will give you some feedback.
- add a condition for checking maxFeePerGas and maxPriorityFeePerGas
Proposed changes
Types of changes
Please put an x in the boxes related to your change.
Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.
$ make test
)Related issues