Closed shekohex closed 1 year ago
This PR is ready for review, However, DO NOT MERGE IT YET, as I'm working on a Simulation to show the improvements using the Smart Anchor Updates.
I wrote a simulation that does N
deposits across X
chains, and ran it with Smart Anchor Updates Disabled and then Enabled.
After Running the Simulation using yarn sim
we see this result:
N = 50 # Number of deposits
X = 7 # Number of chains
For 50 deposits: | Smart Anchor Updates | Total TXs | avg. TXs | Total Gas Used (ETH) | avg. Gas Used (ETH) | Total Wait Time To Relay All Roots (ms) |
---|---|---|---|---|---|---|
Disabled | 298 | 43 | 2.3089 | 0.3299 | 190886 | |
Enabled | 6 | 1 | 0.0976 | 0.01395 | 95068 |
Diff (across all chains):
Some Notes:
Summary of changes
BridgeWatcher
was updated to use theQueueStore
trait for bothtransaction::eip2718::TypedTransaction
andBridgeCommand
.ProposalStore
trait was removed from the trait bounds.ProposalStore
were removed, and import statements forQueueStore
were added.ProposalStore
was removed, and the requirement to implementQueueStore
was added.ProposalStore
import was removed fromwebb_relayer_store
, and theQueueStore
import was added.handle_proposal
function was updated to accept a genericProposalSigningBackend
type parameter.handle_proposal
andevm_anchor_update_proposal
functions.ProposalPolicy
trait was added, defining a policy applied to proposals in a queue.nonce
andtime
, were added to implement theProposalPolicy
trait.ProposalPolicy
trait were added for tuples of up to 5 elements andOption
types.Reference issue to close (if applicable)
Code Checklist