-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add txnVersion to verification key permission #1208
Conversation
}, | ||
"approveRegistrations": { | ||
"rows": 1146, | ||
"digest": "197ce95e1895f940278034d20ab24274" | ||
"rows": 1147, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am actually a bit surprised by this change - this change shouldn't impact this as far as I understand, but maybe something on the Mina branch changed how snarky works 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the new transaction version becomes part of the hash input when hashing the account update. since the constraints don't change by a lot, it seems the number of poseidon rounds doesn't increase, but what does increase potentially is the number of operations for packing the new UInt32
into the field elements that are hashed (well only if the addition is not part of a chain of added constants already).
Also, every new constant adds half a row. We probably didn't use the constant 3 before in this circuit. I think this is what causes the constraint increase in most of these methods
🤓
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats right! Didnt think about that at all
}, | ||
"approveRegistrations": { | ||
"rows": 1146, | ||
"digest": "197ce95e1895f940278034d20ab24274" | ||
"rows": 1147, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the new transaction version becomes part of the hash input when hashing the account update. since the constraints don't change by a lot, it seems the number of poseidon rounds doesn't increase, but what does increase potentially is the number of operations for packing the new UInt32
into the field elements that are hashed (well only if the addition is not part of a chain of added constants already).
Also, every new constant adds half a row. We probably didn't use the constant 3 before in this circuit. I think this is what causes the constraint increase in most of these methods
🤓
o1js implementation of the protocol change described by this RFC
This change enables developers to flag contracts as immutable but not prevent them from deadlocking with future protocol changes. In addition to the permission type a developer wants to specify for
setVerificationKey
, it is now possible to also specify atxnVersion: UInt32
which will be stored on-chain as part of the zkApp accounts permission field. If thetxnVersion
matches the current protocol version, permissions of typeProof
andImpossible
act normal. If thetxnVersion
is older than the current protocol version, the permission falls back toSignature
automatically, so that now broken smart contracts can be upgraded using a Signatures.TODO: docs MinaProtocol/docs2#750
companion of MinaProtocol/mina#14407
bindings o1-labs/o1js-bindings#195