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

RFC 12 Implementation: Coordination result processing #3750

Merged
merged 4 commits into from
Dec 5, 2023

Conversation

lukasz-zimnoch
Copy link
Member

@lukasz-zimnoch lukasz-zimnoch commented Dec 4, 2023

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 the node 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 handlers

Due to the above changes, from now on, the node component fires wallet actions based on incoming coordination results. The node component no longer listens for events coming from the WalletCoordinator 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:

  • Write WalletProposalValidator contract and integrate it with the client
  • Cleanup WalletCoordinator leftovers in the client
  • Modify the SPV maintainter to not rely on WalletCoordinator's events during unproven transactions lookup

Here we implement coordination result processing which calls the right
node's handler depending on the result proposal's type.
Base automatically changed from rfc-12-impl-2 to main December 4, 2023 17:03
@lukasz-zimnoch lukasz-zimnoch marked this pull request as ready for review December 5, 2023 10:30
@tomaszslabon tomaszslabon merged commit 130c988 into main Dec 5, 2023
29 checks passed
@tomaszslabon tomaszslabon deleted the rfc-12-impl-3 branch December 5, 2023 11:35
@lukasz-zimnoch lukasz-zimnoch added this to the v2.0.0 milestone Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants