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

Fix issue with programs cache on contract update #1644

Merged
merged 6 commits into from
May 11, 2022

Conversation

janezpodhostnik
Copy link
Contributor

@janezpodhostnik janezpodhostnik commented May 11, 2022

Description

Port of [0.23] Fix issue with programs cache on contract update to master.


  • 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

@codecov
Copy link

codecov bot commented May 11, 2022

Codecov Report

Merging #1644 (d6e7864) into master (e5859a1) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1644   +/-   ##
=======================================
  Coverage   74.76%   74.76%           
=======================================
  Files         288      288           
  Lines       55386    55382    -4     
=======================================
- Hits        41408    41407    -1     
+ Misses      12483    12482    -1     
+ Partials     1495     1493    -2     
Flag Coverage Δ
unittests 74.76% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
runtime/runtime.go 86.98% <100.00%> (+0.10%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e5859a1...d6e7864. Read the comment docs.

@github-actions
Copy link

Cadence Benchstat comparison

This branch with compared with the base branch onflow:master commit e5859a1
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
RuntimeFungibleTokenTransfer-21.90ms ±20%1.73ms ±27%~(p=0.209 n=7+7)
RuntimeResourceDictionaryValues-29.58ms ± 6%9.80ms ± 7%~(p=0.710 n=7+7)
Transfer-2119ns ± 3%120ns ± 7%~(p=0.902 n=7+7)
ParseFungibleToken-2268µs ± 4%267µs ± 4%~(p=1.000 n=7+6)
ParseArray-218.2ms ± 9%17.6ms ± 4%~(p=0.318 n=7+7)
ParseInfix-211.6µs ± 3%11.6µs ± 4%~(p=1.000 n=7+7)
ParseDeploy/byte_array-227.3ms ± 3%27.2ms ± 5%~(p=0.937 n=6+6)
QualifiedIdentifierCreation/One_level-23.73ns ± 1%3.74ns ± 3%~(p=0.972 n=5+7)
QualifiedIdentifierCreation/Three_levels-2199ns ± 1%198ns ± 3%~(p=0.558 n=6+7)
CheckContractInterfaceFungibleTokenConformance-2202µs ± 3%199µs ± 4%~(p=0.165 n=7+7)
ContractInterfaceFungibleToken-256.8µs ± 3%56.8µs ± 4%~(p=0.902 n=7+7)
NewInterpreter/new_interpreter-21.56µs ± 2%1.58µs ± 6%~(p=0.902 n=7+7)
NewInterpreter/new_sub-interpreter-23.07µs ± 2%3.09µs ± 2%~(p=0.456 n=7+7)
InterpretRecursionFib-23.61ms ± 4%3.69ms ± 5%~(p=0.165 n=7+7)
ParseDeploy/decode_hex-21.63ms ± 1%1.60ms ± 2%−1.50%(p=0.035 n=6+7)
 
alloc/opdelta
RuntimeFungibleTokenTransfer-2273kB ± 0%273kB ± 0%~(p=0.927 n=7+7)
RuntimeResourceDictionaryValues-22.25MB ± 0%2.25MB ± 0%~(p=0.620 n=7+7)
Transfer-248.0B ± 0%48.0B ± 0%~(all equal)
QualifiedIdentifierCreation/One_level-20.00B 0.00B ~(all equal)
QualifiedIdentifierCreation/Three_levels-264.0B ± 0%64.0B ± 0%~(all equal)
CheckContractInterfaceFungibleTokenConformance-266.3kB ± 0%66.3kB ± 0%~(all equal)
ContractInterfaceFungibleToken-226.7kB ± 0%26.7kB ± 0%~(p=0.245 n=6+7)
NewInterpreter/new_interpreter-2848B ± 0%848B ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-21.34kB ± 0%1.34kB ± 0%~(all equal)
InterpretRecursionFib-21.14MB ± 0%1.14MB ± 0%~(p=0.478 n=7+7)
 
allocs/opdelta
RuntimeFungibleTokenTransfer-24.58k ± 0%4.58k ± 0%~(p=0.653 n=7+7)
RuntimeResourceDictionaryValues-237.6k ± 0%37.6k ± 0%~(p=0.605 n=6+7)
Transfer-21.00 ± 0%1.00 ± 0%~(all equal)
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-2460 ± 0%460 ± 0%~(all equal)
NewInterpreter/new_interpreter-213.0 ± 0%13.0 ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-240.0 ± 0%40.0 ± 0%~(all equal)
InterpretRecursionFib-223.8k ± 0%23.8k ± 0%~(all equal)
 

@turbolent turbolent merged commit fe5ecb4 into master May 11, 2022
@turbolent turbolent deleted the janez/contract-update-programs-cache-fix-master branch May 11, 2022 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants