-
Notifications
You must be signed in to change notification settings - Fork 6
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
Implement l2 transactions preprocessing #422
Conversation
L2B-1752 Update preprocessors for l2_transactions
L2 Statistics For statistics in state update view:
For statistics in user view:
For home page: same but for preproceessed_state_update |
dc7c34d
to
a11cbb0
Compare
a1e21da
to
919ff3b
Compare
packages/backend/src/peripherals/database/PreprocessedStateDetailsRepository.ts
Show resolved
Hide resolved
packages/backend/src/peripherals/database/PreprocessedStateDetailsRepository.ts
Show resolved
Hide resolved
packages/backend/src/peripherals/database/PreprocessedUserStatisticsRepository.ts
Outdated
Show resolved
Hide resolved
packages/backend/src/core/preprocessing/StateDetailsPreprocessor.ts
Outdated
Show resolved
Hide resolved
packages/backend/src/core/preprocessing/UserStatisticsPreprocessor.ts
Outdated
Show resolved
Hide resolved
packages/backend/src/peripherals/database/PreprocessedUserStatisticsRepository.ts
Outdated
Show resolved
Hide resolved
f288df1
to
589c945
Compare
589c945
to
e7ccddd
Compare
packages/backend/src/core/preprocessing/StateDetailsPreprocessor.ts
Outdated
Show resolved
Hide resolved
packages/backend/src/core/preprocessing/StateDetailsPreprocessor.ts
Outdated
Show resolved
Hide resolved
packages/backend/src/peripherals/database/PreprocessedUserL2TransactionsStatisticsRepository.ts
Outdated
Show resolved
Hide resolved
packages/backend/src/core/preprocessing/UserL2TransactionsPreprocessor.ts
Outdated
Show resolved
Hide resolved
table.string('stark_key').notNullable() | ||
table.jsonb('l2_transactions_statistics').notNullable() | ||
table.jsonb('cumulative_l2_transactions_statistics').notNullable() | ||
table.index(['stark_key', 'state_update_id']) |
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.
The order of columns in the index is important. Since we often select by state_update_id
only, it should come first, because if it comes second, this index won't be used (unless something changed since I learned about pg indexes :)).
BTW, we still need to spend some time afterwards and make sure we're not missing any indexes, and the ones we have are utilized and don't have too much data.
Resolves L2B-1752