Skip to content

Thread panics on get_public_key() #45

@punkZK

Description

@punkZK

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions