MinaProtocol / mina

Mina is a cryptocurrency protocol with a constant size blockchain, improving scaling while maintaining decentralization and security.

Home Page:https://minaprotocol.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Transaction pool rejects transaction which sets and immediately uses the verification key

mitschabaude opened this issue · comments

It should be possible to send a zkapp deployment account update (i.e., setting the verification key) and another account update which already uses proof authorization, in the same transaction.
The tx logic which is embedded in snarkyjs also allows such behaviour.
However, a user reports that the graphQL endpoint returns an error:

Couldn't send zkApp command: (Verification_failed "Missing_verification_key: [B62qmjXoXSKzrMGSncSoAnh9i7LhTRuuTWdDbdAe8Nxbo5DH8X7zdWq]")

This seems to indicate to me that the graphQL endpoint doesn't use the verification key updated in the same transaction.

Here is the failing transaction:
https://app.zenhub.com/files/114581326/913f6a1c-f468-496b-9674-86e5ab64bd96/download

Unfortunately, to my memory (I might be wrong), this is not possible in the current version of the protocol. If you just set the verification key then you need to wait for that account update to be included in the transition frontier and the staged ledger being updated, then you can use that verification key in your account update.

I’m fixing that here:

#12398

waiting on #12380