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
It takes approximately ~9 seconds to get public key, as well as a decent amount of gas is spent.
Is there a reason why we have to call schnorr_public_key or ecdsa_public_key each time a user wants to get an address? If not then storing public keys in a static variable would maintain state across different calls to the canister and save lots of time and gas.
I understand that this is just an example, but perhaps this optimization would show some devs how to reduce cycle burn rate.
It is indeed reasonable to cache the public key in a variable instead of repeatedly making calls to the management canister. We will try to address this soon, but feel free to open a PR yourself if you like.
It is indeed reasonable to cache the public key in a variable instead of repeatedly making calls to the management canister. We will try to address this soon, but feel free to open a PR yourself if you like.
BASIC_BITCOIN example
It takes approximately ~9 seconds to get public key, as well as a decent amount of gas is spent.
Is there a reason why we have to call
schnorr_public_key
orecdsa_public_key
each time a user wants to get an address? If not then storing public keys in a static variable would maintain state across different calls to the canister and save lots of time and gas.I understand that this is just an example, but perhaps this optimization would show some devs how to reduce cycle burn rate.
Something like:
The text was updated successfully, but these errors were encountered: