-
Notifications
You must be signed in to change notification settings - Fork 248
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
Refactor TxQueueManager and TxQueue #338
Comments
Currently, we have two separate flows to send a transaction depending on which node is used (local vs remote). I will describe these two flows but I will skip transaction queuing. Local node
Remote node
IssuesAs you can see, these two flows are different and as the differences are subtle, they should not exist. Proposed solutionCreate a proper function similar to If it turns out not possible, we can create a service in go-ethereum which will expose a proper function. However, it should be independent of // "github.com/ethereum/go-ethereum/status"
var status *status.Backend
runningNode.Service(&status) |
Problem
As we moved the transaction queue from go-ethereum to status-go, we haven't refactored it. The code has some unused fragments and
TxQueue
is overly complicated.Implementation
transaction
,common.QueuedTxID
,NewTransactionQueue
to NewQueue`,StatusBackend.registerHandlers()
,Queue
totransaction.Manager
,CompleteTransaction
divided into steps: get a transaction, mark it as being processed, verify params, perform actual sending,Acceptance Criteria
Notes
Keep in mind that the queue manager and transaction queue must be thread-safe and when
CompleteTransaction
is called, a given transaction should be blocked from completing it again in the same time.For easier testing,
QueueManager
should be configurable which errors are retriable.Future Steps
TBD
The text was updated successfully, but these errors were encountered: