indra icon indicating copy to clipboard operation
indra copied to clipboard

[contracts, client, node, apps] Move initial state validation to init() fn in appDefinition

Open ArjunBhuptani opened this issue 5 years ago • 2 comments

Right now, we have to create new initial state validation libraries for every new application that we write. This makes it harder to add new apps and makes the node code less easy to understand. We also have a weird pattern where a proposal can be countersigned by a responder, even if they disagree with the proposed values.

We can move these validators into an init() function within the appDefinition which is call from within the propose protocol. This way, any app that makes it through the propose protocol, must necessarily have already been validated.

ArjunBhuptani avatar May 10 '20 10:05 ArjunBhuptani

Related issue for moving validation from listeners into validation: #1158

LayneHaber avatar May 23 '20 19:05 LayneHaber

Deprioritizing this until we have a need to support many more apps

ArjunBhuptani avatar Jun 15 '20 08:06 ArjunBhuptani