-
Notifications
You must be signed in to change notification settings - Fork 5
Description
This ticket should allow ledger to perform block verification.
-
Collect all validation errors into ValidationError struct values, and have a list of them at the end of each message processing.
-
Check Intention enum in BlockInfo:
a) If it is 'Apply', then work as usual, and errors are to be printed.b) If it is 'Verify', then no internal structures are to be updated, and the errors are to be sent to validation channel ('cardano.validation.account'), using ValidationStatus enum. For simplicity, only the first error is to be passed through the channel, although the implementation should collect all known errors, and have them in vector at the send moment.
If no errors found, ValidationStatus::Go message is mandatory, so module must send always exactly one ValidationStatus message in 'Verify' mode.
c) if both flags are set, then 'Apply' should take place if 'Verify' was successful (no errors) -- this may be implemented at later stage, if it is a complicated change; then a new ticket should be created, and info about that should be mentioned in the PR/this ticket.
All other functionality (like passing messages further) should work as usual.