Skip to content

Commit

Permalink
chore(relayer): Skip queries for V3 event types (#2068)
Browse files Browse the repository at this point in the history
The fast relayer doesn't need to care about these anymore. Most other
bots still do though.

---------

Signed-off-by: bennett <[email protected]>
Co-authored-by: nicholaspai <[email protected]>
Co-authored-by: nicholaspai <[email protected]>
Co-authored-by: bennett <[email protected]>
  • Loading branch information
4 people authored Feb 7, 2025
1 parent a9661d2 commit 02da14f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
5 changes: 2 additions & 3 deletions src/libexec/RelayerSpokePoolIndexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,8 @@ async function run(argv: string[]): Promise<void> {
if (latestBlock.number > startBlock) {
const events = [
"FundsDeposited",
"V3FundsDeposited",
"FilledRelay",
"FilledV3Relay",
"RequestedSpeedUpDeposit",
"RelayedRootBundle",
"ExecutedRelayerRefundRoot",
];
Expand All @@ -211,7 +210,7 @@ async function run(argv: string[]): Promise<void> {
oldestTime ??= latestBlock.timestamp;

// Events to listen for.
const events = ["FundsDeposited", "V3FundsDeposited", "RequestedSpeedUpV3Deposit", "FilledRelay", "FilledV3Relay"];
const events = ["FundsDeposited", "FilledRelay"];
const eventMgr = new EventManager(logger, chainId, quorum);
const providers = getWSProviders(chainId, quorum);
let nProviders = providers.length;
Expand Down
5 changes: 2 additions & 3 deletions src/libexec/SpokePoolListenerExperimental.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,8 @@ async function run(argv: string[]): Promise<void> {
if (latestBlock.number > startBlock) {
const events = [
"FundsDeposited",
"V3FundsDeposited",
"FilledRelay",
"FilledV3Relay",
"RequestedSpeedUpDeposit",
"RelayedRootBundle",
"ExecutedRelayerRefundRoot",
];
Expand All @@ -262,7 +261,7 @@ async function run(argv: string[]): Promise<void> {
oldestTime ??= latestBlock.timestamp;

// Events to listen for.
const events = ["FundsDeposited", "V3FundsDeposited", "FilledRelay", "FilledV3Relay"];
const events = ["FundsDeposited", "FilledRelay"];
const eventMgr = new EventManager(logger, chainId, quorum);

logger.debug({ at: "RelayerSpokePoolListener::run", message: `Starting ${chain} listener.`, events, opts });
Expand Down
4 changes: 2 additions & 2 deletions src/libexec/util/evm/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function getEventFilter(contract: Contract, eventName: string, filterArgs

/**
* Get a general event filter mapping to be used for filtering SpokePool contract events.
* This is currently only useful for filtering the relayer address on FilledV3Relay events.
* This is currently only useful for filtering the relayer address on FilledRelay events.
* @param relayer Optional relayer address to filter on.
* @returns An argument array for input to an Ethers EventFilter.
*/
Expand All @@ -30,7 +30,7 @@ export function getEventFilterArgs(relayer?: string): { [event: string]: (null |
? undefined
: [null, null, null, null, null, null, null, null, null, null, relayer];

return { FilledRelay, FilledV3Relay: FilledRelay };
return { FilledRelay };
}

/**
Expand Down

0 comments on commit 02da14f

Please sign in to comment.