Skip to content

Modify address_state to report errors as validation result. #399

@shd

Description

@shd

This ticket should allow ledger to perform block verification.

  1. Collect all validation errors into ValidationError struct values, and have a list of them at the end of each message processing.

  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions