flow-go icon indicating copy to clipboard operation
flow-go copied to clipboard

"Charge" users for contract updates.

Open pattyshack opened this issue 2 years ago • 2 comments

In reality, this is a no-op change since flushing pending contracts does not modify computation/memory usage (it only changes interaction count).

This moves all metered execution into a single continuous section in the normal execution path, and simplifies fees deduction a bit since we no longer need to worry that metered usage may change afterward.

pattyshack avatar Oct 14 '22 18:10 pattyshack

FVM Benchstat comparison

This branch with compared with the base branch onflow:master commit 2440283d103da982734080064a9f738adf5bec48

The command (for i in {1..10}; do go test ./fvm ./engine/execution/computation --bench . --tags relic -shuffle=on --benchmem --run ^$; done) was used.

Collapsed results for better readability

old.txtnew.txt
time/opdelta
ComputeBlock/16/cols/128/txes-26.47s ± 0%6.24s ± 0%~(p=1.000 n=1+1)
 
us/txdelta
ComputeBlock/16/cols/128/txes-23.16k ± 0%3.05k ± 0%~(p=1.000 n=1+1)
 
alloc/opdelta
ComputeBlock/16/cols/128/txes-21.27GB ± 0%1.28GB ± 0%~(p=1.000 n=1+1)
 
allocs/opdelta
ComputeBlock/16/cols/128/txes-219.9M ± 0%19.9M ± 0%~(p=1.000 n=1+1)
 

github-actions[bot] avatar Oct 14 '22 18:10 github-actions[bot]

Codecov Report

Merging #3396 (1bb1cc2) into master (2440283) will decrease coverage by 5.02%. The diff coverage is 76.92%.

@@            Coverage Diff             @@
##           master    #3396      +/-   ##
==========================================
- Coverage   55.47%   50.44%   -5.03%     
==========================================
  Files         752      435     -317     
  Lines       68494    39415   -29079     
==========================================
- Hits        37997    19884   -18113     
+ Misses      27424    17794    -9630     
+ Partials     3073     1737    -1336     
Flag Coverage Δ
unittests 50.44% <76.92%> (-5.03%) :arrow_down:

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

Impacted Files Coverage Δ
fvm/transactionInvoker.go 55.44% <76.92%> (-1.08%) :arrow_down:
module/mempool/stdmap/blocks.go
module/epochs/qc_client.go
...ule/mempool/consensus/incorporated_result_seals.go
engine/access/rest/server.go
engine/access/rest/router.go
module/mempool/stdmap/incorporated_result_seals.go
engine/access/rest/error.go
engine/access/rpc/engine_builder.go
engine/execution/state/bootstrap/bootstrap.go
... and 309 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov-commenter avatar Oct 14 '22 18:10 codecov-commenter

bors merge

pattyshack avatar Oct 17 '22 21:10 pattyshack