Skip to content

Commit

Permalink
comment tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
mitschabaude committed May 9, 2024
1 parent b85dc0c commit d664b6b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/lib/mina/account-update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,24 +218,24 @@ let Permission = {
* - `proof` is replaced by `proofDuringCurrentVersion`
*
* The issue is that a future hardfork which changes the proof system could mean that old verification keys can no longer
* be used to verify proofs in the new proof system, and the zkApp would have to be redeployed to adapt the verification key to the new proof system.
* be used to verify proofs in the new proof system, and the zkApp would have to be redeployed to adapt the verification key.
*
* Having either `impossible` or `proof` would mean that these zkApps can't be upgraded after this hypothetical hardfork, and would become unusable.
*
* Such a future hardfork would manifest as an increment in the "transaction version" of zkApps, which you can check with {@link TransactionVersion.current()}.
*
* The `impossibleDuringCurrentVersion` and `proofDuringCurrentVersion` have an additional `txnVersion` field.
* These permissions follow the same semantics of not upgradable, or only upgradable with proofs,
* _as long as_ the current transaction version is the same as the one one the permission.
* _as long as_ the current transaction version is the same as the one on the permission.
*
* Once the current transaction version is higher than the one on the permission, the permission is treated as `signature`,
* and the zkApp can be redeployed with a signature of the original account owner.
*/
VerificationKey: {
/**
* Modification is impossible, until the next hardfork.
* Modification is impossible, as long as the network accepts the current {@link TransactionVersion}.
*
* After a hardfork which changes the {@link TransactionVersion}, the permission is treated as `signature`.
* After a hardfork that increments the transaction version, the permission is treated as `signature`.
*/
impossibleDuringCurrentVersion: () =>
VerificationKeyPermission.withCurrentVersion(Permission.impossible()),
Expand All @@ -246,9 +246,9 @@ let Permission = {
none: () => VerificationKeyPermission.withCurrentVersion(Permission.none()),

/**
* Modification is permitted by zkapp proofs only; but only until the next hardfork.
* Modification is permitted by zkapp proofs only; as long as the network accepts the current {@link TransactionVersion}.
*
* After a hardfork which changes the {@link TransactionVersion}, the permission is treated as `signature`.
* After a hardfork that increments the transaction version, the permission is treated as `signature`.
*/
proofDuringCurrentVersion: () =>
VerificationKeyPermission.withCurrentVersion(Permission.proof()),
Expand Down

0 comments on commit d664b6b

Please sign in to comment.