This call was removed in v385

This call is no longer available in the current runtime. Existed from v361 to v385. Shown here for historical reference.

mark_decryption_failed

Call Removed v361 → v385 (removed) #3

Marks an encrypted submission as failed to decrypt, removing it from storage .

Click items to navigate. Pan and zoom to explore.

Used by: validators

The Big Picture

Sometimes decryption fails - maybe the user encrypted with the wrong key, used invalid format, or the ciphertext was corrupted. Validators use this call to formally mark such failures, which removes the submission and emits an event so the user knows what happened.

Why This Matters

Without a formal failure mechanism, failed decryptions would leave orphaned submissions in storage. This call provides transparency - users can see DecryptionFailed events and understand why their transaction didn't execute.

Example Scenario

You're a validator processing encrypted submissions. One submission fails ML-KEM decapsulation (wrong key epoch). You call mark_decryption_failed(submission_id, 'ML-KEM decapsulate failed'). The DecryptionFailed event fires, the submission is removed, and the user can diagnose the issue.

Common Questions

What are common decryption failure reasons?
1) User encrypted with wrong epoch's key (KeyExpired), 2) Invalid ciphertext format, 3) AEAD authentication failed (corruption), 4) ML-KEM decapsulation error.
Can validators abuse this to reject valid transactions?
They could, but it's auditable - all mark_decryption_failed calls are on-chain with reasons. Validators who falsely reject valid submissions would be identified and lose reputation.

Use Cases

  • Handle malformed encrypted submissions
  • Report encryption failures to users via events
  • Clean up failed submissions from storage

From Chain Metadata

Marks a submission as failed to decrypt and removes it from storage. Called by the block author when decryption fails at any stage (e.g., ML-KEM decapsulate failed, AEAD decrypt failed, invalid ciphertext format, etc.). This allows clients to be notified of decryption failures through on-chain events.

Part of: MEV Shield

Input Parameters

#NameTypeDescription
0
id
H256 id (H256)
1
reason
BoundedVec reason (BoundedVec)

Permissions

Origin
Unknown
Required Role

Permission data inferred from metadata. May be incomplete.

Requirements

  • Caller is the current block author (validator)
  • Submission with given ID exists in Submissions
  • Decryption genuinely failed (ML-KEM, AEAD, or format error)

Effects

Events Emitted

Storage Modified

Postconditions

  • Submission removed from Submissions storage
  • DecryptionFailed event emitted with reason

Side Effects

  • User's encrypted transaction will not execute
  • Provides audit trail of why decryption failed

Code Examples

import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";

const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });

// Build mark_decryption_failed call
const id = 0 as any /* H256 */;
const reason = 0 as any /* BoundedVec */;

const call = api.tx[stringCamelCase("MevShield")][stringCamelCase("mark_decryption_failed")](
  id,
  reason
);

Runtime Info

View Source
Pallet Index
30
Call Index
3
First Version
v361
Removed In
v385