-
Notifications
You must be signed in to change notification settings - Fork 43
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
feat(connext): estimate fee for closechannel #2026
Conversation
@@ -900,6 +901,21 @@ class ConnextClient extends SwapClient { | |||
return parseInt(blockNumberResponse.result, 16); | |||
} | |||
|
|||
private getGasPrice = async () => { |
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.
A comment here would be helpful too in regards to what exactly this returns - is this getting the most recent average gas price? Or is this derived from some fee estimation logic built into geth?
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.
Shouldn't break anything on the rpc, but here a heads up for this upcoming change in geth how gas prices are calculated (moving from the current auction model/fee market based on which geth currently estimates gas prices -> moving average): ethereum/go-ethereum#21971
thanks for pointing me at it @michael1011
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.
The method call Karl is using returns data from GETHs internal fee estimation logic.
What Kilian mentioned is EIP-1559 which will be a breaking change in the way Ethereum handles gas prices and eventually be activated in a hardfork. But that won't matter for us since the REST endpoints of GETH won't change because of 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.
Comment added.
This PR adds fee estimation logic to
ConnextClient.closeChannel
. Previously, a static fee was used.Related issue: #2019