RFC 12 Implementation: Coordination result processing #3750
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refs: keep-network/tbtc-v2#737
Depends on: #3747
Here we present the fourth part of the changes meant to implement RFC 12: Decentralized wallet coordination in the tBTC wallet client. This pull request focuses on the coordination result processing.
Result processor
Here we implement the
processCoordinationResult
function that receives coordination results, detects the proposal type, and triggers the appropriate proposal handler exposed by thenode
component. This function also sets up the proposal processing start block (i.e. coordination window end block) and the proposal expiry block.Detach
WalletCoordinator
event handlersDue to the above changes, from now on, the
node
component fires wallet actions based on incoming coordination results. Thenode
component no longer listens for events coming from theWalletCoordinator
contract. We are taking the opportunity and remove those handlers along with the auxiliary code (e.g. events deduplication).Next steps
The next steps on the way towards RFC 12 implementation are:
WalletProposalValidator
contract and integrate it with the clientWalletCoordinator
leftovers in the clientWalletCoordinator
's events during unproven transactions lookup