Skip to content
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(BundleDataClient,SpokePoolClient): Log about duplicate events and delete getLatestProposedBundleData #884

Merged
merged 40 commits into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
b0a7a23
improve(BundleDataClient): Log about duplicate destination chain events
nicholaspai Feb 10, 2025
55783b7
Log duplicate deposits in spoke pool client
nicholaspai Feb 10, 2025
9850552
getLatestProposedBundleData should never load data from scratch
nicholaspai Feb 10, 2025
1ab05cc
lint
nicholaspai Feb 10, 2025
7c30e1a
Update BundleDataClient.ts
nicholaspai Feb 10, 2025
8c066af
Update BundleDataClient.ts
nicholaspai Feb 10, 2025
ce0be1d
Update SpokePoolClient.ts
nicholaspai Feb 10, 2025
bf3bae6
Update BundleDataClient.ts
nicholaspai Feb 10, 2025
faebdb8
exit after n == 4
nicholaspai Feb 10, 2025
42fb574
Update SpokePoolClient.ts
nicholaspai Feb 10, 2025
04d3592
Update BundleDataClient.ts
nicholaspai Feb 10, 2025
7545cf2
reduce noisiness of logs
nicholaspai Feb 11, 2025
2df77cf
Update BundleDataClient.ts
nicholaspai Feb 11, 2025
3f802dc
Update SpokePoolClient.ts
nicholaspai Feb 11, 2025
f2429b8
Clean up logs
nicholaspai Feb 11, 2025
2b6a8dd
Update BundleDataClient.ts
nicholaspai Feb 11, 2025
34ce1e0
Update BundleDataClient.ts
nicholaspai Feb 11, 2025
ea48db5
Update BundleDataClient.ts
nicholaspai Feb 11, 2025
331dd34
Update BundleDataClient.ts
nicholaspai Feb 11, 2025
fafbbb3
Update BundleDataClient.ts
nicholaspai Feb 12, 2025
9e3090b
refactor
nicholaspai Feb 12, 2025
e1c8599
Merge branch 'master' into log-duplicates
nicholaspai Feb 12, 2025
29b9464
duplicate event util
nicholaspai Feb 12, 2025
30a1abb
Add getPendingPoolRebalanceLeavesFromArweave
nicholaspai Feb 12, 2025
c90cb2f
Update BundleDataClient.ts
nicholaspai Feb 12, 2025
d2e23df
fix
nicholaspai Feb 12, 2025
00e1d7b
Update package.json
nicholaspai Feb 12, 2025
6e3ca4d
Update BundleDataClient.ts
nicholaspai Feb 12, 2025
d6b2a36
merge
nicholaspai Feb 13, 2025
54741d6
Update BundleDataClient.ts
nicholaspai Feb 13, 2025
7264854
Update BundleDataClient.ts
nicholaspai Feb 13, 2025
412fa8f
Revert "Update BundleDataClient.ts"
nicholaspai Feb 13, 2025
337adc8
Update BundleDataClient.ts
nicholaspai Feb 13, 2025
988356a
Update BundleDataClient.ts
nicholaspai Feb 13, 2025
34b6010
Update BundleDataClient.ts
nicholaspai Feb 13, 2025
aab61e9
Update src/clients/HubPoolClient.ts
nicholaspai Feb 13, 2025
329d44c
Update HubPoolClient.ts
nicholaspai Feb 13, 2025
4333390
Update SpokePoolClient.ts
nicholaspai Feb 13, 2025
70773e2
Update HubPoolClient.ts
nicholaspai Feb 13, 2025
502ed7f
Update package.json
nicholaspai Feb 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@across-protocol/sdk",
"author": "UMA Team",
"version": "4.1.8",
"version": "4.1.9",
"license": "AGPL-3.0",
"homepage": "https://docs.across.to/reference/sdk",
"files": [
Expand Down
12 changes: 10 additions & 2 deletions src/clients/BundleDataClient/BundleDataClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,11 @@ export class BundleDataClient {
}
}
} else {
throw new Error("Duplicate fill detected");
this.logger.warn({
at: "BundleDataClient#loadDataFromScratch",
message: "Detected duplicate fill",
fill,
});
}
return;
}
Expand Down Expand Up @@ -1115,7 +1119,11 @@ export class BundleDataClient {
validatedBundleSlowFills.push(matchedDeposit);
}
} else {
throw new Error("Duplicate slow fill request detected.");
this.logger.warn({
at: "BundleDataClient#loadDataFromScratch",
message: "Detected duplicate slow fill request",
slowFillRequest,
});
}
return;
}
Expand Down
15 changes: 15 additions & 0 deletions src/clients/SpokePoolClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,21 @@ export class SpokePoolClient extends BaseAbstractClient {
}

if (this.depositHashes[getRelayEventKey(deposit)] !== undefined) {
// Sanity check that this event is not a duplicate, even though the relay data hash is a duplicate.
const allDeposits = this._getDuplicateDeposits(deposit).concat(this.depositHashes[getRelayEventKey(deposit)]);
if (
allDeposits.some((e) => {
return e.transactionHash === deposit.transactionHash && e.logIndex === deposit.logIndex;
})
) {
this.logger.warn({
at: "SpokePoolClient#update",
chainId: this.chainId,
message: "Duplicate deposit found with same transaction hash and log index",
deposit,
});
continue;
}
assign(this.duplicateDepositHashes, [getRelayEventKey(deposit)], [deposit]);
continue;
}
Expand Down