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

cmd,eth: use gas price monitor for all transactions instead of 'eth_gasPrice' from the ethereum JSON-RPC provider #1915

Merged
merged 1 commit into from
Jun 30, 2021

Conversation

kyriediculous
Copy link
Contributor

@kyriediculous kyriediculous commented Jun 11, 2021

What does this pull request do? Explain your changes. (required)
Improve transaction management with better UX

  • use gas price monitor for all transactions instead of 'eth_gasPrice' from the ethereum JSON-RPC provider

Specific updates (required)

  • Use GasPriceMonitor.GasPrice() instead of ethClient.SuggestGasPrice() in Backend.SuggestGasPrice(). Since Backend overwrites the eth.Transactor interface all transactions, also contract calls through the contract bindings, will use the gas price stored by the GasPriceMonitor.
  • Use the GasPriceMonitor regardless of the node being in O or B mode

How did you test each of these updates (required)

  • Unit tests

Does this pull request close any open issues?
Fixes #1906

Checklist:

Copy link
Member

@yondonfu yondonfu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a unit test checking that SuggestGasPrice on backend returns the value of GasPrice() on GasPriceMonitor?

cmd/livepeer/livepeer.go Outdated Show resolved Hide resolved
cmd/devtool/devtool.go Outdated Show resolved Hide resolved
@yondonfu yondonfu mentioned this pull request Jun 24, 2021
5 tasks
Copy link
Member

@yondonfu yondonfu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after squashing and fixing merge conflict.

Looks like GH actions is stuck for some reason...Let's see if it runs properly after a rebase against master...

…asPrice' from the ethereum JSON-RPC provider
@kyriediculous
Copy link
Contributor Author

The windows builds seem to be failing consistently for all PRs , not sure what's wrong there.

@yondonfu
Copy link
Member

The windows builds seem to be failing consistently for all PRs , not sure what's wrong there.

Yeah it has been failing consistently for reasons unrelated to recent code changes. We'll need to fix that separately. Let's go ahead with the merge for now.

@kyriediculous kyriediculous merged commit 8066e2b into master Jun 30, 2021
@kyriediculous kyriediculous deleted the nv/tx-fixes branch June 30, 2021 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed gas estimation with revert for txs when another tx affecting the same state is pending
2 participants