Node won't start if cordapps generate states prior to deletion

Description

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.

Activity

Show:
Gavin Thomas
June 22, 2018, 3:33 PM

if you put the CorDapp back does the node start ok? If so then this is not a high priority bug

Andrey Brozhko
June 22, 2018, 3:41 PM

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?

Bogdan Paunescu
June 23, 2018, 7:03 PM

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.

Michele Sollecito
June 25, 2018, 8:45 AM

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.

Katelyn Baker
September 10, 2018, 2:41 PM

Assignee

Michele Sollecito

Reporter

Bogdan Paunescu

Labels

None

Sprint

None

Epic Link

None

Priority

High

Severity

None

CVSS Score

None

CVSS Vector

None

Due Date

None

Engineering Teams

None

Fix versions

Affects versions

None

Ported to...

None

Story Points / Dev Days

None
Configure