You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am experimenting with the zkSync Library and so started with some basic examples. It looks like get_public_key() can not handle manually created PK
import os
from zksync_sdk import ZkSyncLibrary
def main():
library = ZkSyncLibrary()
# I originally had a Metamask generated Private Key here as well
# and it blew up too; so just creating a fake one here for the bug report.
key1 = b"3" * 32
pub_key = library.get_public_key(key1)
if __name__ == "__main__":
main()
$ python test_zk.py
thread '' panicked at 'failed to get private key from bytes: NotInField("0x3333333333333333333333333333333333333333333333333333333333333333")', zks-crypto-c/src/utils.rs:144:53
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
Abort trap: 6
The text was updated successfully, but these errors were encountered:
thread '<unnamed>' panicked at 'failed to get private key from bytes: NotInField("0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")', zks-crypto-c\src\utils.rs:144:53
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Traceback (most recent call last):
File "D:\zkex-test\zkex-api-test.py", line 29, in <module>
zk_account()
File "D:\zkex-test\zkex-api-test.py", line 14, in zk_account
signer = ZkSyncSigner(lib, key)
File "C:\Python39\lib\site-packages\zksync_sdk\zksync_signer.py", line 24, in __init__
self.public_key = self.library.get_public_key(self.private_key)
File "C:\Python39\lib\site-packages\zksync_sdk\lib.py", line 66, in get_public_key
self.lib.zks_crypto_private_key_to_public_key(pk, public_key)
OSError: exception: access violation reading 0x0000004369BF0000
I am experimenting with the zkSync Library and so started with some basic examples. It looks like get_public_key() can not handle manually created PK
$ python test_zk.py
thread '' panicked at 'failed to get private key from bytes: NotInField("0x3333333333333333333333333333333333333333333333333333333333333333")', zks-crypto-c/src/utils.rs:144:53
note: run with
RUST_BACKTRACE=1
environment variable to display a backtracefatal runtime error: failed to initiate panic, error 5
Abort trap: 6
The text was updated successfully, but these errors were encountered: