mina
mina copied to clipboard
verificationKey as base64 and signature helpers to snarkyjs
-
checkAccountUpdateSignature
to verify the signature for an account update - exports the verificationKey of a zkApp account in ~~base58~~ base64 format and its hash
- now uses base64 entirely
Companion of https://github.com/o1-labs/snarkyjs/pull/421
!ci-build-me
We're using Base64 in the archive database for verification keys, which is faster than using Base58Check.
Encoding time of a key:
BASE58: 0.024964
BASE64: 0.000017
Encoding + decoding time:
BASE58: 0.048735
BASE64: 0.000078
Is it possible to use Base64 in SnarkyJS, so we have uniformity, and best performance?
The Base64 string is the base64 encoding of the Bin_prot
-serialization of the key.
cc @mitschabaude how much of an issue would it be to use base64 instead? I am unsure of the scope
seems useful for us to have the base64 {en,de}coder support on the SnarkyJS side given that the protocol is moving towards using this in more places anyway so it's probably worth handling sooner rather than later