-
Notifications
You must be signed in to change notification settings - Fork 22
A redeployment of an existing contract fails with Missing State Key #114
Comments
Did you redo the PTT with the new address? |
As far as I understand, the P2P subscribes to epoch changes, and that's the only time when it triggers PTT requests to/from Shouldn't it be cc:@moria |
No. If there's a new contract in the middle of the epoch it should be the p2p responsibility to initiate a new PTT. |
Well, then I would like @lenak25 and @Isan-Rivkin to comment on this. |
Similar to #113, I had misidentified this issue as well, and the underlying issue is in the P2P repo as reported here: GetStateKeys before deploying a contract So closing this issue in favor of the issue reported in P2P. |
Describe the bug
A second attempt to redeploy a contract, regardless of whether the first one succeeded or failed (as in #113), errors out with
Cryptography Error: MissingKeyError { key_type: "State Key" }
. This seems to have nothing to do withcore
's ability to request the right state keys from the Key Management node, as this behavior can be observed when the 1st and 2nd deployment happen in the same epoch, when the state keys should be arguably the same.To Reproduce
Expected behavior
If a contract exists at a given address, it should error out with a relevant message.
This opens the question on whether two different people cannot deploy the same contract with the same address that is derived from the same
preCode
Backtrace
The text was updated successfully, but these errors were encountered: