miner: fixed default gasPriceOracle min price for private networks #28487
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.
Should fix #27517 and any possibly related gasPrice issues with private networks.
Currently, the default settings for the merge chains allow using the default baseFeePerGas from block header for maxPriorityFeePerGas value for transactions
Example that a tx with 12 wei is mined on Goerli testnet
https://goerli.etherscan.io/tx/0xd3aca9687bdee8ae0e1b2a6ea9c0acb950ed2f1912a4724b7064872cea708ab6
However, with non-merge private networks spawned through Geth ( Clique ) doesn't allow transactions less than 1 gwei to be confirmed by miners which causes problem since many libraries like ethers.js or hardhat uses block.baseFeePerGas value by default which causes unconfirmation of transactions generated by those libraries
https://github.com/ethers-io/ethers.js/blob/main/src.ts/providers/abstract-provider.ts#L915
Therefore, this PR will fix the potential bug and will allow EIP-1559 functionality to be recovered.
( The value 2 wei matches with the default params here https://github.com/ethereum/go-ethereum/blob/master/eth/gasprice/gasprice.go#L39 )