Proof Provider: Persistent TaskExecutorId#874
Merged
Conversation
dc20466 to
487bf26
Compare
487bf26 to
562a78d
Compare
akokoshn
reviewed
May 2, 2025
oclaw
approved these changes
May 2, 2025
| return fmt.Errorf("failed to get current executor id: %w", err) | ||
| } | ||
|
|
||
| isActiveFunc := func(ctx context.Context, id types.TaskId) (bool, error) { |
Contributor
There was a problem hiding this comment.
What do we mean here by isActive?
Contributor
Author
There was a problem hiding this comment.
This function checks if a task with the given Id is still active
Renamed to isTaskActiveFunc
562a78d to
8005816
Compare
Refactor `TaskExecutor` and related components to use `executor.IdSource` for generating `TaskExecutorId`s. Previously, both `Prover` and `ProofProvider` used randomly generated "nonce" IDs that were regenerated on each service startup. While it's fine for `Prover` to use a volatile identifier, `ProofProvider` requires a persistent ID to support top-level task result submission after a restart. Introduced `IdSource` implementations: * `InMemoryIdSource` – used by `Prover` * `PersistentIdSource` – backed by a database and used by `ProofProvider`
8005816 to
202b6a4
Compare
202b6a4 to
8e6a2f2
Compare
8e6a2f2 to
cebf2ac
Compare
akokoshn
approved these changes
May 5, 2025
* Replaced `testaide.RandomExecutorId()` with the new `types.NewRandomExecutorId()` function in tests * Renaming: `CheckIfTaskExists(...) -> CheckIfTaskIsActive(...)`
cebf2ac to
c92e0aa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proof Provider: Persistent TaskExecutorId
Refactor
TaskExecutorand related components to useexecutor.IdSourcefor generatingTaskExecutorIdPreviously, both
ProverandProofProviderused random "nonce" IDs that were regenerated on each service startup. While it's fine forProverto use a volatile identifier,ProofProviderrequires a persistent ID to support top-level task result submission after a restartIntroduced
IdSourceimplementations:InMemoryIdSource– used byProverPersistentIdSource– backed by a database and used byProofProvider