-
Notifications
You must be signed in to change notification settings - Fork 41
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: On-chain proposal validation #756
Conversation
Solidity API documentation preview available in the artifacts of the https://github.com/keep-network/tbtc-v2/actions/runs/7089700942 check. |
Here we introduce the contract that will expose view functions allowing to validate wallet action proposals using a single ETH call. This mechanism was specified in the RFC 12. The `WalletProposalValidator` contract will pick those features from the existing `WalletCoordinator` but will not expose any write functions and will be non-upgradeable. This changeset introduces deposit sweep validation.
fab57b9
to
8f73694
Compare
Solidity API documentation preview available in the artifacts of the https://github.com/keep-network/tbtc-v2/actions/runs/7089742686 check. |
Solidity API documentation preview available in the artifacts of the https://github.com/keep-network/tbtc-v2/actions/runs/7099888992 check. |
Solidity API documentation preview available in the artifacts of the https://github.com/keep-network/tbtc-v2/actions/runs/7100235287 check. |
Solidity API documentation preview available in the artifacts of the https://github.com/keep-network/tbtc-v2/actions/runs/7100889765 check. |
Solidity API documentation preview available in the artifacts of the https://github.com/keep-network/tbtc-v2/actions/runs/7100966887 check. |
Solidity API documentation preview available in the artifacts of the https://github.com/keep-network/tbtc-v2/actions/runs/7101571877 check. |
984b12b
to
7b190d2
Compare
Solidity API documentation preview available in the artifacts of the https://github.com/keep-network/tbtc-v2/actions/runs/7101616534 check. |
Solidity API documentation preview available in the artifacts of the https://github.com/keep-network/tbtc-v2/actions/runs/7101638167 check. |
Solidity API documentation preview available in the artifacts of the https://github.com/keep-network/tbtc-v2/actions/runs/7101723880 check. |
…or and final cleanup (#3751) Refs: keep-network/tbtc-v2#737 Here we present the sixth part of the changes meant to implement [RFC 12: Decentralized wallet coordination](https://github.com/keep-network/tbtc-v2/blob/main/docs/rfc/rfc-12.adoc) in the tBTC wallet client. This pull request focuses on integrating with the new `WalletProposalValidator` contract introduced in keep-network/tbtc-v2#756. It also aims to clean up all leftovers related to the old mechanism based on the `WalletCoordinator` contract. ### Use `WalletProposalValidator` for on-chain proposal validation We re-generated contract bindings to leverage the new WalletProposalValidator contract for on-chain proposal validation. Incoming deposit sweep, redemption, and heartbeat proposals are now validated against this contract, and we no longer use `WalletCoordinator` for that purpose. ### Cleanup `WalletCoordinator` leftovers We completely removed the `WalletCoordinator` contract from the mix. The client no longer uses it in any way. This pull request's scope includes all necessary code cleanup and adjustments. ### Adjust SPV maintainer The SPV maintainer was using recent proposals submitted to the `WalletCoordinator` contract to determine a list of wallets that must be checked as part of the SPV proof submission process. As `WalletCoordinator` is no longer used, we modified that behavior. The SPV maintainer now examines recent deposit revealed and redemption requested events to build a list of wallets that likely have unproven transactions. ### Adjust maintainer deployment manifests As wallet coordination was removed from the Keep maintainer bot, we adjusted Kubernetes manifests that are used to deploy the maintainer on production and test clusters. Now, only SPV and Bitcoin difficulty modules are in use.
Refs: #737
Here we present the fifth part of the changes meant to implement RFC 12: Decentralized wallet coordination in the tBTC wallet client. This pull request focuses on the on-chain proposal validation, i.e. the
WalletProposalValidator
contract described in RFC 12.The
WalletProposalValidator
contractHere we introduce the read-only, non-upgradeable,
WalletProposalValidator
contract that allows validating wallet action proposals. This contract exposes three functions:validateDepositSweepProposal
that allows validating deposit sweep proposals. This function was ported from theWalletCoordinator
contract.validateRedemptionProposal
that allows validating redemption proposals. This function was ported from theWalletCoordinator
contract.validateHeartbeatProposal
that allows validating heartbeat proposals.Remove
WalletCoordinator
contractWe are also removing the
WalletCoordinator
contract. It is no longer needed with the new RFC-12-based coordination mechanism. The relevant view validation functions were ported to the aforementionedWalletProposalValidator
contract.By the way, we are also adjusting the deployment scripts to reflect contract changes made in this PR.
Next steps
The next steps on the way towards RFC 12 implementation are:
WalletProposalValidator
contract with the client and cleanupWalletCoordinator
leftovers thereWalletCoordinator
's events during unproven transactions lookup