Have a cordapp installed in a node (used obligation cordapp). Used the app to create a bunch of states in the vault. Decided that I no longer wanted that app so I removed it. This lead to node not able to start due to a check of vault states against installed cordapps.
Proposal: catch exception and log as warning to allow the node to start.
if you put the CorDapp back does the node start ok? If so then this is not a high priority bug
How do you 'properly' remove CorDapp?
We need to document the right procedure so users know that they should not just delete a CorDapp but do some clean-up?
Honestly, don't think anybody has thought of cordapp removal, hence the issue. I just deleted my cordapp jar. But indeed, at least documenting this behaviour should be done for GA. Really surprised this had not come up until now.
I assume that putting it back fixes the issue, but I disagree it's not a high priority. Assume operators want to decommission a cordapp for good for whatever reasons. This should not make the node unusable. Short of manually wiping the states from the vault, there is no way around this with 3.1 and RC06. And even deleting the states is not a good idea as they may be needed for future transactions.
We've discussed a possible fix on dev channel, and it shouldn't be difficult. If the scope will be changed from GA, then we at least need to document/warn about it.
Working on this. The fix is quite straightforward: a try-catch inside the forEach loop, with a warning in the end including types that couldn't be found.
That said, I hope our function to load states degrades them to the base type if the concrete one is not in the classpath.