-
Notifications
You must be signed in to change notification settings - Fork 53
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
improve(relayer): Drop slow fill request queries #1340
Conversation
Making room for follow-up changes to improve relayer performance.
Rather than duplicating the array of unfilled deposits, just check it as the first conditional in the subsequent loop. This allows the entire function to be subsequently factored away, which will occur in a follow-up commit.
Factoring out this functionality permits it to be executed in parallel per destination chain.
…layerRefactorEvaluate
…layerRefactorEvaluate
The relayer currently implements late-stage checking of the fill status on a per-deposit basis. This is fairly slow and inefficient, but does successfully protect against an avalanche of failed fill simulations that result from overlapping bot runs. This change implements batched querying of all deposits for each destination chain. This is significantly more efficient in terms of RPC consumption, and should allow for subsequent "already filled" filtering to occur much faster. It's also a key enabler for some subsequent efficiency improvements.
By retaining the deposit FillStatus on the destination chain it's possible to skip scraping for RequestedV3SpeedUp events. This reduces the RPC load during SpokePoolClient update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also seems good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although I agree that a slow depositor should trigger a slow relay every time, I'm not sure we want to remove the configuration to be able to disable slow relays from a given relayer.
Agree - that's not changed here and it remains as-is 👍 Slow relays is still 100% opt-in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will also cause bundle refund construction problematic since we need slow fill requests to compute bundle data correctly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not merge yet until bundle data can be fetched without using SlowFillRequest events
That's important for the proposer/disputer, but is relevant for the relayer? This PR only affects the relayer's SpokePoolClient update, and deposit update requests don't affect relayer repayments so I can't see any obvious problem with ignoring them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can revisit this now that we load most bundle data from arweave. I also think this probably wasn't an issue affecting bundle refund computation
Yeah - I also wasn't able to reason my way to any problem with dropping these events. I'll merge this on Monday 👍 |
By retaining the deposit FillStatus on the destination chain it's possible to skip scraping for RequestedV3SpeedUp events. This reduces the RPC load during SpokePoolClient update.