-
Notifications
You must be signed in to change notification settings - Fork 699
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
PVF worker: refactor worker/job errors #2195
Labels
T0-node
This PR/Issue is related to the topic “node”.
Comments
(1) and (2) have been addressed in #4071. |
bkontur
pushed a commit
that referenced
this issue
May 14, 2024
* Use compact proofs for parachains * Remove StorageProofChecker * Cleanup Reuse messages proof generation from messages pallet (#2195) * reuse messages proof generation from messages pallet * incorrect merge fixed remaining TODOs after messages pallet Config refactoring (#2196) Return UntrustedVecDb from prove_storage() (#2197) Storage proofs related renamings (#2198) * Storage proofs related renamings * Leftovers * StorageSize -> StorageProofSize
bkontur
pushed a commit
that referenced
this issue
May 14, 2024
* Use compact proofs for parachains * Remove StorageProofChecker * Cleanup Reuse messages proof generation from messages pallet (#2195) * reuse messages proof generation from messages pallet * incorrect merge fixed remaining TODOs after messages pallet Config refactoring (#2196) Return UntrustedVecDb from prove_storage() (#2197) Storage proofs related renamings (#2198) * Storage proofs related renamings * Leftovers * StorageSize -> StorageProofSize
bkontur
pushed a commit
that referenced
this issue
May 15, 2024
* Use compact proofs for parachains * Remove StorageProofChecker * Cleanup Reuse messages proof generation from messages pallet (#2195) * reuse messages proof generation from messages pallet * incorrect merge fixed remaining TODOs after messages pallet Config refactoring (#2196) Return UntrustedVecDb from prove_storage() (#2197) Storage proofs related renamings (#2198) * Storage proofs related renamings * Leftovers * StorageSize -> StorageProofSize
bkontur
pushed a commit
that referenced
this issue
May 15, 2024
* Use compact proofs for parachains * Remove StorageProofChecker * Cleanup Reuse messages proof generation from messages pallet (#2195) * reuse messages proof generation from messages pallet * incorrect merge fixed remaining TODOs after messages pallet Config refactoring (#2196) Return UntrustedVecDb from prove_storage() (#2197) Storage proofs related renamings (#2198) * Storage proofs related renamings * Leftovers * StorageSize -> StorageProofSize
bkontur
pushed a commit
that referenced
this issue
May 15, 2024
* Use compact proofs for parachains * Remove StorageProofChecker * Cleanup Reuse messages proof generation from messages pallet (#2195) * reuse messages proof generation from messages pallet * incorrect merge fixed remaining TODOs after messages pallet Config refactoring (#2196) Return UntrustedVecDb from prove_storage() (#2197) Storage proofs related renamings (#2198) * Storage proofs related renamings * Leftovers * StorageSize -> StorageProofSize
bkontur
pushed a commit
that referenced
this issue
May 15, 2024
* Use compact proofs for parachains * Remove StorageProofChecker * Cleanup Reuse messages proof generation from messages pallet (#2195) * reuse messages proof generation from messages pallet * incorrect merge fixed remaining TODOs after messages pallet Config refactoring (#2196) Return UntrustedVecDb from prove_storage() (#2197) Storage proofs related renamings (#2198) * Storage proofs related renamings * Leftovers * StorageSize -> StorageProofSize
bkontur
pushed a commit
that referenced
this issue
May 16, 2024
* Use compact proofs for parachains * Remove StorageProofChecker * Cleanup Reuse messages proof generation from messages pallet (#2195) * reuse messages proof generation from messages pallet * incorrect merge fixed remaining TODOs after messages pallet Config refactoring (#2196) Return UntrustedVecDb from prove_storage() (#2197) Storage proofs related renamings (#2198) * Storage proofs related renamings * Leftovers * StorageSize -> StorageProofSize
bkontur
pushed a commit
that referenced
this issue
May 17, 2024
* Use compact proofs for parachains * Remove StorageProofChecker * Cleanup Reuse messages proof generation from messages pallet (#2195) * reuse messages proof generation from messages pallet * incorrect merge fixed remaining TODOs after messages pallet Config refactoring (#2196) Return UntrustedVecDb from prove_storage() (#2197) Storage proofs related renamings (#2198) * Storage proofs related renamings * Leftovers * StorageSize -> StorageProofSize
bkontur
pushed a commit
that referenced
this issue
May 17, 2024
* Use compact proofs for parachains * Remove StorageProofChecker * Cleanup Reuse messages proof generation from messages pallet (#2195) * reuse messages proof generation from messages pallet * incorrect merge fixed remaining TODOs after messages pallet Config refactoring (#2196) Return UntrustedVecDb from prove_storage() (#2197) Storage proofs related renamings (#2198) * Storage proofs related renamings * Leftovers * StorageSize -> StorageProofSize
bkontur
pushed a commit
that referenced
this issue
May 17, 2024
* Use compact proofs for parachains * Remove StorageProofChecker * Cleanup Reuse messages proof generation from messages pallet (#2195) * reuse messages proof generation from messages pallet * incorrect merge fixed remaining TODOs after messages pallet Config refactoring (#2196) Return UntrustedVecDb from prove_storage() (#2197) Storage proofs related renamings (#2198) * Storage proofs related renamings * Leftovers * StorageSize -> StorageProofSize
bkontur
pushed a commit
that referenced
this issue
May 20, 2024
* Use compact proofs for parachains * Remove StorageProofChecker * Cleanup Reuse messages proof generation from messages pallet (#2195) * reuse messages proof generation from messages pallet * incorrect merge fixed remaining TODOs after messages pallet Config refactoring (#2196) Return UntrustedVecDb from prove_storage() (#2197) Storage proofs related renamings (#2198) * Storage proofs related renamings * Leftovers * StorageSize -> StorageProofSize
bkontur
pushed a commit
that referenced
this issue
May 21, 2024
* Use compact proofs for parachains * Remove StorageProofChecker * Cleanup Reuse messages proof generation from messages pallet (#2195) * reuse messages proof generation from messages pallet * incorrect merge fixed remaining TODOs after messages pallet Config refactoring (#2196) Return UntrustedVecDb from prove_storage() (#2197) Storage proofs related renamings (#2198) * Storage proofs related renamings * Leftovers * StorageSize -> StorageProofSize
bkontur
pushed a commit
that referenced
this issue
May 22, 2024
* Use compact proofs for parachains * Remove StorageProofChecker * Cleanup Reuse messages proof generation from messages pallet (#2195) * reuse messages proof generation from messages pallet * incorrect merge fixed remaining TODOs after messages pallet Config refactoring (#2196) Return UntrustedVecDb from prove_storage() (#2197) Storage proofs related renamings (#2198) * Storage proofs related renamings * Leftovers * StorageSize -> StorageProofSize
bkontur
pushed a commit
that referenced
this issue
May 23, 2024
* Use compact proofs for parachains * Remove StorageProofChecker * Cleanup Reuse messages proof generation from messages pallet (#2195) * reuse messages proof generation from messages pallet * incorrect merge fixed remaining TODOs after messages pallet Config refactoring (#2196) Return UntrustedVecDb from prove_storage() (#2197) Storage proofs related renamings (#2198) * Storage proofs related renamings * Leftovers * StorageSize -> StorageProofSize
bkontur
pushed a commit
that referenced
this issue
May 30, 2024
* Use compact proofs for parachains * Remove StorageProofChecker * Cleanup Reuse messages proof generation from messages pallet (#2195) * reuse messages proof generation from messages pallet * incorrect merge fixed remaining TODOs after messages pallet Config refactoring (#2196) Return UntrustedVecDb from prove_storage() (#2197) Storage proofs related renamings (#2198) * Storage proofs related renamings * Leftovers * StorageSize -> StorageProofSize
bkontur
pushed a commit
that referenced
this issue
Jun 4, 2024
* Use compact proofs for parachains * Remove StorageProofChecker * Cleanup Reuse messages proof generation from messages pallet (#2195) * reuse messages proof generation from messages pallet * incorrect merge fixed remaining TODOs after messages pallet Config refactoring (#2196) Return UntrustedVecDb from prove_storage() (#2197) Storage proofs related renamings (#2198) * Storage proofs related renamings * Leftovers * StorageSize -> StorageProofSize
bkontur
pushed a commit
that referenced
this issue
Jun 5, 2024
* Use compact proofs for parachains * Remove StorageProofChecker * Cleanup Reuse messages proof generation from messages pallet (#2195) * reuse messages proof generation from messages pallet * incorrect merge fixed remaining TODOs after messages pallet Config refactoring (#2196) Return UntrustedVecDb from prove_storage() (#2197) Storage proofs related renamings (#2198) * Storage proofs related renamings * Leftovers * StorageSize -> StorageProofSize
bkontur
pushed a commit
that referenced
this issue
Jun 7, 2024
* Use compact proofs for parachains * Remove StorageProofChecker * Cleanup Reuse messages proof generation from messages pallet (#2195) * reuse messages proof generation from messages pallet * incorrect merge fixed remaining TODOs after messages pallet Config refactoring (#2196) Return UntrustedVecDb from prove_storage() (#2197) Storage proofs related renamings (#2198) * Storage proofs related renamings * Leftovers * StorageSize -> StorageProofSize
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As part of #1685 I did a big refactor of errors, but they need some more work. I left it out of that PR because it was already turning into a monster.
As I was refactoring errors in #1685 I noticed some security issues. Some errors from the execute job were being treated as internal, even though malicious code can send back arbitrary errors! That's why it's important that the error handling here is robust and accurate.
1. Refactor execute
WorkerResponse
(#2604)We should refactor
WorkerResponse
for more idiomatic error handling:type WorkerResult = Result<WorkerResponse, WorkerError>
.That is, move the
Ok
variant into aWorkerResponse
type and the rest of the variants intoWorkerError
. See e.g.JobResponse
andJobError
.2. Move more of the execute
WorkerIntfError
s toInternalValidationError
(#2604)Now that the worker and job are separate processes, some worker-specific errors can potentially be treated as internal now.
3. Have
JobResponse
/JobError
types for prepare like we did for executeRight now preparation returns a
PrepareResult
, which gets turned into anOutcome
, which gets turned into aPrepareError
again. Note that in prepration itself, many of the variants ofPrepareError
are never constructed. We should have aJobError
type that limits the possible errors of a job, like we did for execution jobs.4. Don't allow prepare jobs to raise non-deterministic errors
It's an existing issue, and not so critical for preparation as for execution, so I left it out of the PR. It's not critical because we treat all preparation errors as internal because we assume that real errors were caught and filtered during prechecking.
But still, we should get the story right. It could make prechecking more secure. So, preparation jobs should not trigger internal preparation errors. See
NonDeterministicPrepareError
.Related
Follow-up of #1685
The text was updated successfully, but these errors were encountered: