We have batching implemented on the pallet side, which means that oftentimes Batch<Proposal> batches are signed containing more than 1 proposal. For this to completely land, we need to update the relayer to listen for batches and process them against the right transaction on the SignatureBridge.sol.
We need to ensure that SetResourceProposal is only batched together with other SetResourceProposals. It cannot be batched with an AnchorUpdateProposal for example. This is due to the fact that we handle it exclusively on the SignatureBridge.sol in an entirely separate fashion. For example if we batchExecuteProposalsWithSignature or executeProposalWithSignature with a SetResourceProposal nothing will happen because there is no "handler" for this proposal type.
Event handling
The batch signed event is new and should be handled as such by the relayer, ProposalBatchSigned.
Checklist
[x] Update contracts on webb-rs to new 1.0.0+ versions
[x] Update the relayer to leverage this new function batchAdminSetResourceWithSignature and batchExecuteProposalsWithSignature (do match statement over the batch size).
[ ] If the batch contains 1 proposal, consider just calling the normal original function (executeProposalWithSignature, adminSetResourceWithSignature)
[ ] We need to handle SetResourceProposals properly and currently we aren't at all. Parse the proposal type in order to switch between the set resource flow and the execute proposal flow.
Overview
We have batching implemented on the pallet side, which means that oftentimes
Batch<Proposal>
batches are signed containing more than 1 proposal. For this to completely land, we need to update the relayer to listen for batches and process them against the right transaction on theSignatureBridge.sol
.Contract
https://github.com/webb-tools/protocol-solidity/blob/main/packages/contracts/contracts/SignatureBridge.sol#L144-L153
Nuances
The functions in question are:
batchAdminSetResourceWithSignature
batchExecuteProposalsWithSignature
We need to ensure that
SetResourceProposal
is only batched together with otherSetResourceProposal
s. It cannot be batched with anAnchorUpdateProposal
for example. This is due to the fact that we handle it exclusively on theSignatureBridge.sol
in an entirely separate fashion. For example if webatchExecuteProposalsWithSignature
orexecuteProposalWithSignature
with aSetResourceProposal
nothing will happen because there is no "handler" for this proposal type.Event handling
The batch signed event is new and should be handled as such by the relayer,
ProposalBatchSigned
.Checklist
batchAdminSetResourceWithSignature
andbatchExecuteProposalsWithSignature
(do match statement over the batch size).executeProposalWithSignature
,adminSetResourceWithSignature
)SetResourceProposals
properly and currently we aren't at all. Parse the proposal type in order to switch between the set resource flow and the execute proposal flow.