-
Notifications
You must be signed in to change notification settings - Fork 1
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
SHARD-1386 : Harden relayer collector syncing #35
Conversation
718c6f8
to
fac3f75
Compare
console.log('VERY SLOW QUERY', sql, time) | ||
} | ||
}) | ||
// NOT SUPPORTED IN BETTER-SQLITE3 |
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.
what's an option for this? we may need to have some profiling
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.
we could make a db wrapper class than can proxy the run, prepare, all , etc calls to run the profiling. that way we wouldnt' need to replace all usages of db.x instead could just import our wrapper class as db = new WrapperDatabase and everything should still work
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.
maybe we address this in another ticket?
src/class/validateData.ts
Outdated
@@ -5,6 +5,7 @@ import { insertOrUpdateCycle } from '../storage/cycle' | |||
import { processReceiptData } from '../storage/receipt' | |||
import { processOriginalTxData } from '../storage/originalTxData' | |||
import { CycleLogWriter, ReceiptLogWriter, OriginalTxDataLogWriter } from './DataLogWriter' | |||
import * as checkpoint from '../storage/checkpoint' |
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 import isn't needed
src/collector.ts
Outdated
console.log('Attempting fix..') | ||
|
||
// Starts the syncing process from the beginning | ||
const status = await startPatching(0) |
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 is not correct right? it should start syncing from whatever checkpoint we have in DB.
I also hope we considered syncing last 100 cycles by default on restart @abdulazeem-tk4vr
…ts asynchronously
2f42801
to
e074b18
Compare
…ustness fix : add error logs fix: ensure start cycle does not go below zero in patching process
e074b18
to
f9b55f4
Compare
…or missing cycles
…w all data to be inserted in collector.
linear: https://linear.app/shm/issue/SHARD-1386/harden-relayer-collector-syncing