Understanding Inconsistent Keys error from JSON API

Hi everyone!

I’m looking at the documentation page on consistency/integrity and trying to match it up with real errors returned by the JSON API, and having a little trouble.

For example, I’m currently getting “InconsistentKeys: at least one contract key has changed since the submission” and I’m not 100% sure what that means. Is it saying that an action was in progress when the command was submitted, so the instance of the contract referred to by that key is not the same as when the command was submitted? If I recall correctly, previously this would have simply returned a “couldn’t find key” error.

Is there a page anywhere with common error messages and a little more information regarding what might cause them? If not, something like that could be very useful.


I had a quick look at the code (here and here). The message you are seeing is not specific to the JSON API, from what I can tell it’s an error returned by the ledger that is raised when two commands race to consume a contract based on its key. As this conflict is resolved, either update will succeed while the other will find a contract key associated with a new contract or no contract at all, causing the error.