taikoxyz / raiko

Multi-proofs for Taiko. SNARKS, STARKS and Trusted Execution Enclave. Our previous ZK-EVM circuits are deprecated.
Apache License 2.0
110 stars 85 forks source link

feat(raiko): abstract task manager and impl a mem db for easy integration #296

Closed smtmfft closed 3 months ago

smtmfft commented 3 months ago

Address my own concerns in https://github.com/taikoxyz/raiko/pull/208#pullrequestreview-2124361373. Ideas are simple:

maybe not well designed, but can be refined later with more discussions.

The simple sqlite db is not recommended inside raiko mainly because it requires file system and consequently need volume support. As we can tolerance the in-memory loss (if raiko crashes unexpectedly), the in-mem db is better. An alternative as Mamy mentioned is sqlite has in-mem mode, so we use it as an advanced alternative.

petarvujovic98 commented 3 months ago

@smtmfft I suggest you just get this PR to pass CI and then we can do the rest of the changes on top of the base PR?

petarvujovic98 commented 3 months ago

@smtmfft Anything else left to do here before merging into #208?

smtmfft commented 3 months ago

@smtmfft Anything else left to do here before merging into #208?

I am adding the feature to enable both in mem & sqlite, but unfortunately still struggling with lifetime issue, I think we can merge it first to the main taskdb dev branch & I can keep updating there to avoid further diverge.

petarvujovic98 commented 3 months ago

@smtmfft Anything else left to do here before merging into #208?

I am adding the feature to enable both in mem & sqlite, but unfortunately still struggling with lifetime issue, I think we can merge it first to the main taskdb dev branch & I can keep updating there to avoid further diverge.

Sounds good, I can help out with the lifetime issue