Skip to content
This repository was archived by the owner on Apr 13, 2022. It is now read-only.
This repository was archived by the owner on Apr 13, 2022. It is now read-only.

Persistent modifier validation improvement #317

@oskin1

Description

@oskin1

Now we have quite flat validation algorithm for persistent modifiers - it does many checks in one step, this leads to impossiblity of handling all validation-failure cases properly. For example, if we're trying to validate block section (S) for some header (H) and validation fails at the first step then there are few cases which further application handling depends on:

  1. S does not really relates to H - so we should just invalidate S
  2. S relates to H but was malformed - here we should invalidate S and also H
    Current validation implementation in Scorex does not allow to distinguish case 1 and 2.
    https://github.com/ScorexFoundation/Scorex/blob/8adeddbaba7a49e0614f7df7de31fcaf73a263de/src/main/scala/scorex/core/NodeViewHolder.scala#L268

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions