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

feature: abi resolve #2659

Merged
merged 7 commits into from
Jul 5, 2021
Merged

feature: abi resolve #2659

merged 7 commits into from
Jul 5, 2021

Conversation

nanne007
Copy link
Member

@nanne007 nanne007 commented Jul 4, 2021

No description provided.

@github-actions
Copy link

github-actions bot commented Jul 4, 2021

Benchmark for b9e01d5

Click to view benchmark
Test PR Benchmark Master Benchmark %
accumulator_append 2.2±0.11ms 2.1±0.10ms +4.76%
block_apply/block_apply_10 407.2±4.70ms 411.4±4.53ms -1.02%
block_apply/block_apply_1000 41.5±0.15s 42.9±0.97s -3.26%
get_with_proof/db_store 38.9±0.77µs 38.3±0.37µs +1.57%
get_with_proof/mem_store 32.1±0.34µs 31.6±0.77µs +1.58%
put_and_commit/db_store/1 1213.1±50.91µs 1200.0±60.31µs +1.09%
put_and_commit/db_store/10 2.2±0.31ms 2.2±0.33ms 0.00%
put_and_commit/db_store/100 9.3±0.78ms 9.2±0.61ms +1.09%
put_and_commit/db_store/5 1952.8±203.89µs 1849.7±152.37µs +5.57%
put_and_commit/db_store/50 5.5±0.44ms 5.5±0.57ms 0.00%
put_and_commit/mem_store/1 62.9±5.57µs 63.2±5.66µs -0.47%
put_and_commit/mem_store/10 585.7±46.60µs 587.2±48.32µs -0.26%
put_and_commit/mem_store/100 5.7±0.81ms 5.7±0.81ms 0.00%
put_and_commit/mem_store/5 295.0±24.20µs 298.2±25.74µs -1.07%
put_and_commit/mem_store/50 2.9±0.18ms 2.9±0.18ms 0.00%
query_block/query_block_in(10)_times(100) 3.0±0.10ms 2.9±0.06ms +3.45%
query_block/query_block_in(10)_times(1000) 29.2±0.49ms 29.7±0.51ms -1.68%
query_block/query_block_in(10)_times(10000) 290.1±3.49ms 293.3±5.22ms -1.09%
query_block/query_block_in(1000)_times(100) 906.9±6.97µs 928.5±6.24µs -2.33%
query_block/query_block_in(1000)_times(1000) 9.0±0.04ms 9.2±0.04ms -2.17%
query_block/query_block_in(1000)_times(10000) 91.7±0.53ms 92.5±0.45ms -0.86%
storage_transaction 46.6±2.95ms 43.1±2.54ms +8.12%
vm/transaction_execution/1 328.4±1.15ms 328.4±0.76ms 0.00%
vm/transaction_execution/10 107.1±0.60ms 106.7±0.36ms +0.37%
vm/transaction_execution/20 100.2±0.30ms 100.4±1.81ms -0.20%
vm/transaction_execution/5 129.4±0.29ms 129.2±0.97ms +0.15%
vm/transaction_execution/50 114.9±0.64ms 114.9±1.05ms 0.00%

@codecov
Copy link

codecov bot commented Jul 4, 2021

Codecov Report

Merging #2659 (015294b) into master (e8fa28d) will increase coverage by 0.04%.
The diff coverage is 27.72%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2659      +/-   ##
==========================================
+ Coverage   32.29%   32.33%   +0.04%     
==========================================
  Files         503      505       +2     
  Lines       43391    43857     +466     
  Branches    19394    19545     +151     
==========================================
+ Hits        14009    14176     +167     
- Misses      15585    15775     +190     
- Partials    13797    13906     +109     
Flag Coverage Δ
unittests 32.33% <27.72%> (+0.04%) ⬆️

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

Impacted Files Coverage Δ
node/src/rpc_service_factory.rs 35.83% <0.00%> (+0.98%) ⬆️
rpc/api/src/contract_api.rs 9.10% <0.00%> (-3.40%) ⬇️
rpc/server/src/module/contract_rpc.rs 11.20% <0.00%> (-3.23%) ⬇️
vm/resource-viewer/src/fat_type.rs 4.17% <ø> (+0.09%) ⬆️
vm/resource-viewer/src/lib.rs 8.06% <ø> (ø)
vm/resource-viewer/src/module_cache.rs 41.18% <ø> (+17.65%) ⬆️
vm/resource-viewer/src/resolver.rs 12.30% <ø> (+3.28%) ⬆️
vm/types/src/lib.rs 33.34% <ø> (ø)
vm/vm-runtime/src/data_cache.rs 66.67% <ø> (ø)
vm/vm-runtime/src/lib.rs 100.00% <ø> (ø)
... and 30 more

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 e8fa28d...015294b. Read the comment docs.

@github-actions
Copy link

github-actions bot commented Jul 4, 2021

Benchmark for cc61eaf

Click to view benchmark
Test PR Benchmark Master Benchmark %
accumulator_append 2.5±0.16ms 2.4±0.11ms +4.17%
block_apply/block_apply_10 469.2±13.11ms 462.9±18.63ms +1.36%
block_apply/block_apply_1000 47.3±0.39s 46.3±0.35s +2.16%
get_with_proof/db_store 39.0±0.44µs 38.4±0.52µs +1.56%
get_with_proof/mem_store 31.8±0.26µs 31.6±0.21µs +0.63%
put_and_commit/db_store/1 1454.0±50.87µs 1473.1±84.47µs -1.30%
put_and_commit/db_store/10 2.6±0.49ms 2.6±0.44ms 0.00%
put_and_commit/db_store/100 9.7±1.49ms 9.8±1.23ms -1.02%
put_and_commit/db_store/5 2.1±0.20ms 2.1±0.35ms 0.00%
put_and_commit/db_store/50 5.9±0.92ms 5.8±0.72ms +1.72%
put_and_commit/mem_store/1 63.1±5.58µs 63.3±5.61µs -0.32%
put_and_commit/mem_store/10 583.2±46.22µs 590.2±45.89µs -1.19%
put_and_commit/mem_store/100 5.7±0.82ms 5.7±0.83ms 0.00%
put_and_commit/mem_store/5 296.6±24.02µs 298.9±24.09µs -0.77%
put_and_commit/mem_store/50 2.9±0.18ms 2.9±0.18ms 0.00%
query_block/query_block_in(10)_times(100) 3.0±0.06ms 3.0±0.07ms 0.00%
query_block/query_block_in(10)_times(1000) 29.8±1.07ms 29.6±0.51ms +0.68%
query_block/query_block_in(10)_times(10000) 296.2±4.67ms 292.2±5.33ms +1.37%
query_block/query_block_in(1000)_times(100) 925.0±4.42µs 915.7±5.76µs +1.02%
query_block/query_block_in(1000)_times(1000) 9.3±0.04ms 9.2±0.05ms +1.09%
query_block/query_block_in(1000)_times(10000) 91.4±0.43ms 91.2±0.66ms +0.22%
storage_transaction 56.7±4.46ms 55.5±5.87ms +2.16%
vm/transaction_execution/1 326.5±0.78ms 326.8±1.08ms -0.09%
vm/transaction_execution/10 106.6±0.38ms 106.8±0.56ms -0.19%
vm/transaction_execution/20 100.0±0.39ms 100.3±1.08ms -0.30%
vm/transaction_execution/5 129.4±0.97ms 129.1±0.44ms +0.23%
vm/transaction_execution/50 114.2±0.32ms 114.4±0.22ms -0.17%

Copy link
Member

@jolestar jolestar left a comment

Choose a reason for hiding this comment

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

LGTM,以后可以考虑加一个 ABI 缓存,StructABI 和 FunctionABI 不会变,比较好弄,但 ModuleABI 可能会变,如何更新是个问题。

vm/types/src/abi.rs Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Jul 5, 2021

Benchmark for 7b14aee

Click to view benchmark
Test PR Benchmark Master Benchmark %
accumulator_append 3.0±0.14ms 3.0±0.13ms 0.00%
block_apply/block_apply_10 545.5±10.99ms 544.7±12.05ms +0.15%
block_apply/block_apply_1000 55.6±0.65s 55.3±0.84s +0.54%
get_with_proof/db_store 38.3±0.34µs 38.3±0.59µs 0.00%
get_with_proof/mem_store 31.4±0.23µs 31.6±0.26µs -0.63%
put_and_commit/db_store/1 1994.6±150.22µs 2.0±0.08ms -0.27%
put_and_commit/db_store/10 3.1±0.31ms 3.1±0.30ms 0.00%
put_and_commit/db_store/100 10.5±1.89ms 10.3±1.88ms +1.94%
put_and_commit/db_store/5 2.7±0.36ms 2.6±0.24ms +3.85%
put_and_commit/db_store/50 6.3±1.43ms 6.4±1.37ms -1.56%
put_and_commit/mem_store/1 63.5±5.62µs 63.3±5.53µs +0.32%
put_and_commit/mem_store/10 588.0±47.96µs 586.9±47.86µs +0.19%
put_and_commit/mem_store/100 5.7±0.80ms 5.7±0.81ms 0.00%
put_and_commit/mem_store/5 298.2±24.29µs 294.9±24.05µs +1.12%
put_and_commit/mem_store/50 2.9±0.18ms 2.9±0.18ms 0.00%
query_block/query_block_in(10)_times(100) 2.9±0.06ms 2.9±0.06ms 0.00%
query_block/query_block_in(10)_times(1000) 29.8±0.75ms 29.6±0.58ms +0.68%
query_block/query_block_in(10)_times(10000) 294.5±4.54ms 294.1±7.51ms +0.14%
query_block/query_block_in(1000)_times(100) 915.0±5.66µs 937.4±4.85µs -2.39%
query_block/query_block_in(1000)_times(1000) 9.0±0.06ms 9.2±0.04ms -2.17%
query_block/query_block_in(1000)_times(10000) 91.3±0.77ms 93.7±0.50ms -2.56%
storage_transaction 77.6±4.22ms 77.4±3.93ms +0.26%
vm/transaction_execution/1 330.1±2.21ms 327.2±1.55ms +0.89%
vm/transaction_execution/10 107.5±0.33ms 106.8±0.36ms +0.66%
vm/transaction_execution/20 101.2±2.54ms 100.8±2.47ms +0.40%
vm/transaction_execution/5 130.2±1.41ms 129.8±2.54ms +0.31%
vm/transaction_execution/50 115.0±0.23ms 114.8±1.52ms +0.17%

@nanne007 nanne007 merged commit 8668c40 into master Jul 5, 2021
@nanne007 nanne007 deleted the feature/resolve-to-abi branch July 5, 2021 03:44
naughtyvenom pushed a commit to naughtyvenom/starcoin that referenced this pull request Jul 19, 2021
* new abi

* type abi

* make all abi resolve work

* enhance abi resolver

* rpc: add abi resolve functions

* remove tmp

* boxing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants