Feature - Eliminate race condition between event loops
1. Description
The block observer event loop notifies both the transaction-signer and the transaction-coordinator event loops whenever it observes a new bitcoin block. The transaction-signer event loop is the one that votes on the requests (as well as signing), while the transaction-coordinator is the one that constructs any bitcoin and stacks transactions. They both currently act in parallel, but the transaction-coordinator uses the output of the transaction-signer when it acts.
1.1 Context & Purpose
The problem is that the transaction-signer might not be done with gathering votes on a request before the transaction-coordinator starts looking for accepted requests to process. The effect is that the signers will wait an additional bitcoin block before acting on deposit requests.
2. Technical Details:
The simplest thing to do is to replace the channel between the block-observer and the transaction-coordinator with a channel between the transaction-signer and the transaction-coordinator. Then we just notify the transaction-coordinator at the end of TxSignerEventLoop::handle_new_requests.
2.1 Acceptance Criteria:
[ ] If there is a new deposit request, we can process it at right after the next bitcoin block.
Feature - Eliminate race condition between event loops
1. Description
The block observer event loop notifies both the
transaction-signer
and thetransaction-coordinator
event loops whenever it observes a new bitcoin block. Thetransaction-signer
event loop is the one that votes on the requests (as well as signing), while thetransaction-coordinator
is the one that constructs any bitcoin and stacks transactions. They both currently act in parallel, but thetransaction-coordinator
uses the output of thetransaction-signer
when it acts.1.1 Context & Purpose
The problem is that the
transaction-signer
might not be done with gathering votes on a request before thetransaction-coordinator
starts looking for accepted requests to process. The effect is that the signers will wait an additional bitcoin block before acting on deposit requests.2. Technical Details:
The simplest thing to do is to replace the channel between the
block-observer
and thetransaction-coordinator
with a channel between thetransaction-signer
and thetransaction-coordinator
. Then we just notify thetransaction-coordinator
at the end ofTxSignerEventLoop::handle_new_requests
.2.1 Acceptance Criteria:
3. Related Issues and Pull Requests (optional):