Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example of a script to add a key to existing account #1403

Merged

Conversation

justinbarry
Copy link
Contributor

@justinbarry justinbarry commented Feb 7, 2022

Description

When I was skimming the docs the call to AuthAccount in the middle of the of provided example really threw me off. An additional example would have made it clear.


  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding an example for the more common case 👍

@turbolent turbolent added the Documentation Improvements or additions to documentation label Feb 7, 2022
@justinbarry justinbarry force-pushed the add-example-of-adding-additional-public-key-to-account branch from f98d9d1 to ff0c180 Compare February 7, 2022 19:46
Co-authored-by: Bastian Müller <[email protected]>
@github-actions
Copy link

github-actions bot commented Feb 7, 2022

Cadence Benchstat comparison

This branch with compared with the base branch onflow:master commit 1e976a6
The command for i in {1..N}; do go test ./... -run=XXX -bench=. -shuffle=on; done was used.
Bench tests were run a total of 7 times on each branch.

Results

old.txtnew.txt
time/opdelta
ParseInfix-29.66µs ± 1%9.99µs ± 6%+3.39%(p=0.015 n=6+7)
RuntimeResourceDictionaryValues-214.7ms ± 2%14.8ms ± 3%~(p=0.628 n=6+7)
RuntimeFungibleTokenTransfer-21.26ms ±26%1.25ms ±24%~(p=0.710 n=7+7)
ParseDeploy/byte_array-221.3ms ± 1%21.1ms ± 2%~(p=0.128 n=7+7)
ParseDeploy/decode_hex-21.17ms ± 1%1.17ms ± 1%~(p=0.589 n=6+6)
ParseFungibleToken-2187µs ± 6%183µs ± 2%~(p=0.101 n=7+6)
ParseArray-212.9ms ± 1%13.1ms ± 1%~(p=0.240 n=6+6)
QualifiedIdentifierCreation/One_level-22.34ns ± 0%2.35ns ± 0%~(p=0.162 n=6+7)
QualifiedIdentifierCreation/Three_levels-2140ns ± 2%140ns ± 2%~(p=0.859 n=7+6)
CheckContractInterfaceFungibleTokenConformance-2133µs ± 1%132µs ± 2%~(p=0.534 n=7+6)
NewInterpreter/new_interpreter-21.06µs ± 1%1.07µs ± 1%~(p=0.223 n=6+6)
NewInterpreter/new_sub-interpreter-22.11µs ± 0%2.10µs ± 1%~(p=0.068 n=7+7)
InterpretRecursionFib-22.42ms ± 2%2.46ms ± 4%~(p=0.181 n=6+7)
ContractInterfaceFungibleToken-240.1µs ± 1%39.5µs ± 2%−1.46%(p=0.026 n=7+7)
 
alloc/opdelta
RuntimeResourceDictionaryValues-24.05MB ± 0%4.05MB ± 0%~(p=0.111 n=6+7)
RuntimeFungibleTokenTransfer-2278kB ± 0%278kB ± 0%~(p=0.805 n=7+7)
QualifiedIdentifierCreation/One_level-20.00B 0.00B ~(all equal)
QualifiedIdentifierCreation/Three_levels-264.0B ± 0%64.0B ± 0%~(all equal)
CheckContractInterfaceFungibleTokenConformance-266.2kB ± 0%66.2kB ± 0%~(all equal)
ContractInterfaceFungibleToken-226.6kB ± 0%26.6kB ± 0%~(all equal)
NewInterpreter/new_interpreter-2768B ± 0%768B ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-21.24kB ± 0%1.24kB ± 0%~(all equal)
InterpretRecursionFib-21.24MB ± 0%1.24MB ± 0%~(p=0.972 n=6+7)
 
allocs/opdelta
RuntimeResourceDictionaryValues-2102k ± 0%102k ± 0%~(p=0.359 n=7+7)
RuntimeFungibleTokenTransfer-24.62k ± 0%4.62k ± 0%~(p=0.755 n=7+7)
QualifiedIdentifierCreation/One_level-20.00 0.00 ~(all equal)
QualifiedIdentifierCreation/Three_levels-22.00 ± 0%2.00 ± 0%~(all equal)
CheckContractInterfaceFungibleTokenConformance-21.07k ± 0%1.07k ± 0%~(all equal)
ContractInterfaceFungibleToken-2458 ± 0%458 ± 0%~(all equal)
NewInterpreter/new_interpreter-212.0 ± 0%12.0 ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-238.0 ± 0%38.0 ± 0%~(all equal)
InterpretRecursionFib-225.0k ± 0%25.0k ± 0%~(all equal)
 

@turbolent turbolent merged commit d74eaa3 into master Feb 7, 2022
@turbolent turbolent deleted the add-example-of-adding-additional-public-key-to-account branch February 7, 2022 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants