Module common_validation

Module common_validation 

Source

Constants§

ENCRYPTED_NOTE_SIZE
Expected size of the encrypted_note field in each SerializedAction. This is epk (32) + enc_ciphertext (104) + out_ciphertext (80) = 216 bytes. Canonical source of truth — drive-abci imports this constant.

Functions§

validate_actions_count
Validate that the actions list is not empty and does not exceed the maximum.
validate_anchor_not_zero
Validate that the anchor is not all zeros (for transitions that consume notes).
validate_encrypted_note_sizes
Defense-in-depth: validate that every action’s encrypted_note field is exactly ENCRYPTED_NOTE_SIZE (216) bytes. This rejects malformed data early at the DPP layer before it reaches the ABCI bundle reconstruction, saving network bandwidth.
validate_proof_not_empty
Validate that the proof is not empty.