danekshea / blockchain-migration-tool-backend

MIT License
1 stars 0 forks source link

Persist Last Scanned/Processed Block #2

Open ogous opened 4 months ago

ogous commented 4 months ago

Hey @danekshea Immutable team shared this repo as an example of a migration tool. Thanks for your work!

I see, you preferred recursive polling for monitoring instead of web-hooks and scheduled jobs. Can you share your reasons, you work this since 2022?

This tool will lose some block events if instance fails, and can not retrieve latest state. I think it is better to add to below section, also a record lastScannedBlock with a database transaction. So if it fails, it can start last scanned block instead of current block. What do you think?

https://github.com/danekshea/blockchain-migration-tool-backend/blob/6f9ab19f7973589ec3ee056c1886b1acb36d5e70/src/burnwatcher.ts#L116-L118

PS. Discussion section is disabled, so I wrote here.

danekshea commented 4 months ago

hey @ogous, I just enabled the discussions. Thanks for reaching out mate. So I'm actually working on a refactor of this here: https://github.com/danekshea/webhook-migration-backend. It should be working in the course of next week.

Which project are you from and who are you in contact with at Immutable? I'd love to get in touch with you directly to hear your use case & requirements.