Skip to content

count a delivery proof the chain can never confirm as missing, not as a reason to stop every evaluation - #47

Open
anuraggdubey wants to merge 1 commit into
MultiAgency:mainfrom
anuraggdubey:fix/unconfirmable-delivery-proof
Open

anuraggdubey wants to merge 1 commit into
MultiAgency:mainfrom
anuraggdubey:fix/unconfirmable-delivery-proof

Conversation

@anuraggdubey

Copy link
Copy Markdown
Contributor

Fixes #46.

readDeliverables labelled every RPC error and every hash or signer mismatch as unverified, and runEvaluation stops the whole run on unverified. A proof that can never confirm, such as a delivery_tx the chain has never seen, therefore stopped every evaluation of the objective, and no review was ever produced.

Changes

  • fastdata.ts: a final transaction with another hash or signer is missing, and so is a proof the RPC can't parse (REQUEST_VALIDATION_ERROR). Only the proof's hash and signer vary in that request. UNKNOWN_TRANSACTION gets a new kind, unknown. Transport errors, other RPC errors and a transaction not yet FINAL stay unverified.
  • precheck.ts: unknownProofRule times an unknown transaction the way retryRule times an unreachable host. The first sighting is recorded and stops the run. Within RETRY_MS, it still stops the run. After that, only that slot counts as missing, and the review is failed, never achieved. A slot whose proof settles either way forgets the sighting. Every slot is settled before the run stops, so each unknown transaction is timed from its own first sighting. Keys are <objective>:delivery:<contributor> in the existing unreachableSince map. A criterion id has no colon, so the two kinds of key never meet.
  • skill.md:56 and docs/app.md §Delivery proof describe which proofs count as missing and which stop the run.

Tests

  • provenance.test.ts: classification of an unknown transaction (unknown); another hash, another signer and an unparsable hash (missing); not yet final, an RPC timeout and an RPC 503 (unverified).
  • precheck.test.ts, using the issue's reproduction: one slot fails numeric_match and the other's transaction is unknown. The run stops at 10:00 ("Recorded"), still stops at 10:05 ("Still within the 10-minute retry window"), and at 10:11 returns a failed review with missing: [second]. Also covered: a mismatch is missing at once, an unverified proof keeps stopping the run however long it lasts, and a transaction the chain comes to know forgets its sighting.
  • Without the fix, the 5 tests that cover the new behaviour fail. pnpm typecheck passes.

Not included

  • e2e/outlayer-evaluator reads proofs its caller passes in and refuses on any RPC error. It is not this app's evaluation path.

… a reason to stop every evaluation

A transaction with another hash or signer, or one the RPC can't parse, makes its slot missing at once. A transaction
the chain does not know stops the run, and its slot is missing once it stays unknown for RETRY_MS. Only a proof that
can still confirm (not yet final, or the RPC unavailable) keeps stopping the run.

Fixes MultiAgency#46.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A delivery proof the chain can never confirm stops every evaluation of the objective

1 participant