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
eth,misc: Use transaction manager with confirmation and optional replacement queue #1923
Conversation
70df136
to
e09c66f
Compare
@yondonfu Do we want persistent storage for the transaction confirmation queue to avoid unexpected behaviour between node restarts when transactions are still pending ? |
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.
How were these changes tested?
Given that the logic of the transaction manager for handling replacing pending transactions is important for funds management and node operation could we add unit tests particularly around the automated transaction replacement flow?
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.
Just two comments to address:
Let's also rebase on top of master to resolve the conflicts. Feel free to do this in conjunction with addressing the remaining comments.
Rebased, resolved merge conflicts and addresses the remaining changes. Also moved min and max gas price completely into |
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.
LGTM after squashing 🚢
What does this pull request do? Explain your changes. (required)
Use a
TransactionManager
to handle transactions. This service will forward transactions to the ethereum JSON-RPC, when a transaction is broadcasted to the ethereum network it will be added to the queue. Lowest non-confirmed transactions are popped off the queue to wait until they are mined and retrieve their transaction receipt.Once the transaction receipt is found it will be sent over a subscription of transaction receipts that services that want feedback on tx confirmation can subscribe to. This subscription service now powers
LivepeerEthClient.CheckTx()
under the hood.Specific updates (required)
75eed97 eth: transaction manager with confirmation queue and optional replacement transactions
60d33a0 pm: handle ticket revert error
a7b7c5e eth: remove replacement transactions from reward service
d4886f6 eth,server: move max gas price logic to gas price monitor
b12a24d eth: make abiMap and txLog helpers in the eth package rather than Backend methods
1b89b5c cmd: replace transaction flag
efa84b4 cmd,eth: use struct for LivepeerEthClient constructor parameters that aren't other services
How did you test each of these updates (required)
Unit tests
TODO add
TransactionManager
unit testsDoes this pull request close any open issues?
Fixes #1906
Checklist:
make
runs successfully./test.sh
pass