-
Notifications
You must be signed in to change notification settings - Fork 575
refactor: more robust tagging index sync as recipient #19030
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
refactor: more robust tagging index sync as recipient #19030
Conversation
11a7226 to
bcf2da9
Compare
4097236 to
46b912e
Compare
a78d1a8 to
bb588b3
Compare
b03272a to
6d590c5
Compare
6d590c5 to
bfd7013
Compare
e52830e to
eb5f940
Compare
71a3b8a to
d8fc670
Compare
370568a to
1b335df
Compare
yarn-project/pxe/src/tagging/recipient_sync/utils/load_logs_for_range.ts
Show resolved
Hide resolved
yarn-project/pxe/src/tagging/recipient_sync/utils/load_logs_for_range.ts
Show resolved
Hide resolved
yarn-project/pxe/src/tagging/recipient_sync/utils/load_logs_for_range.ts
Show resolved
Hide resolved
1b335df to
fc54bb0
Compare
fc54bb0 to
32cf7bd
Compare
mverzilli
left a comment
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.
Looks awesome, just want to sync particularly regarding data storage
yarn-project/pxe/src/tagging/recipient_sync/utils/load_logs_for_range.ts
Show resolved
Hide resolved
yarn-project/pxe/src/tagging/recipient_sync/utils/load_logs_for_range.ts
Show resolved
Hide resolved
yarn-project/pxe/src/tagging/recipient_sync/utils/load_logs_for_range.ts
Outdated
Show resolved
Hide resolved
yarn-project/pxe/src/tagging/recipient_sync/utils/load_logs_for_range.test.ts
Show resolved
Hide resolved
yarn-project/pxe/src/tagging/recipient_sync/utils/load_logs_for_range.ts
Show resolved
Hide resolved
yarn-project/pxe/src/tagging/recipient_sync/new_recipient_tagging_data_provider.ts
Show resolved
Hide resolved
yarn-project/pxe/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts
Outdated
Show resolved
Hide resolved
yarn-project/pxe/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts
Show resolved
Hide resolved
yarn-project/pxe/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts
Show resolved
Hide resolved
yarn-project/pxe/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts
Show resolved
Hide resolved
mverzilli
left a comment
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.
🚀
Fixes #17775 In this PR I implement a new log sync algorithm we've come up with in Buenos Aires that should be fully robust against any kind of private log losses. The algorithm is explained in the body of `loadPrivateLogsForSenderRecipientPair` function. That function should be the entrypoint when reviewing this PR (if checking the utility functions first you would not have enough context). Unfortunately this PR introduces a performance regression that is tracked by [this issue](https://linear.app/aztec-labs/issue/F-229/improve-log-sync-performance). I am fairly certain that the regression is caused by an unreasonable number of requests performed by the `loadLogsForRange` function - that will be tackled in a followup PR. In this PR the algorithm is not yet integrated into the system. That is done in a [PR up the stack](#19125). The directory structure is not yet final - I wanted to keep this PR contained in one place to not have conflicts with Martin's PR. So please ignore that for now (will move stuff around in a final pass). My plan is as follows: 1. Merge this PR, 2. fix the regression by modifying the `getLogsByTag` API such that it gives me all the info I need (now it doesn't give me block timestamp), 3. once that PR is merged most likely wait for Martin's refactor to be merged and then rebase and polish my integrating new log sync PR, 4. move some files around to make it all cuter. ## Update on regression of time in e2e tests Unfortunately realized that this has caused a regression and log sync is now significantly slower. Did 2 runs of the `e2e_l1_with_wall_time` test and on `next` the results are 337 and 334 seconds but with the new code it's 661 and 658 seconds. Will work on dropping that down before merging that "integrating new log sync" PR.
6ac2b16 to
262640c
Compare
Flakey Tests🤖 says: This CI run detected 2 tests that failed, but were tolerated due to a .test_patterns.yml entry. |

Fixes #17775
In this PR I implement a new log sync algorithm we've come up with in Buenos Aires that should be fully robust against any kind of private log losses. The algorithm is explained in the body of
loadPrivateLogsForSenderRecipientPairfunction. That function should be the entrypoint when reviewing this PR (if checking the utility functions first you would not have enough context).Unfortunately this PR introduces a performance regression that is tracked by this issue. I am fairly certain that the regression is caused by an unreasonable number of requests performed by the
loadLogsForRangefunction - that will be tackled in a followup PR.In this PR the algorithm is not yet integrated into the system. That is done in a PR up the stack.
The directory structure is not yet final - I wanted to keep this PR contained in one place to not have conflicts with Martin's PR. So please ignore that for now (will move stuff around in a final pass).
My plan is as follows:
getLogsByTagAPI such that it gives me all the info I need (now it doesn't give me block timestamp),Update on regression of time in e2e tests
Unfortunately realized that this has caused a regression and log sync is now significantly slower.
Did 2 runs of the
e2e_l1_with_wall_timetest and onnextthe results are 337 and 334 seconds but with the new code it's 661 and 658 seconds.Will work on dropping that down before merging that "integrating new log sync" PR.