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

[cli] compile command support dir and deploy command support package. #2619

Merged
merged 4 commits into from
Jun 23, 2021

Conversation

jolestar
Copy link
Member

@jolestar jolestar commented Jun 22, 2021

  1. compile 命令支持单个 move 文件以及目录,deploy 命令支持部署 package 和单个 mv 文件
  2. 统一了所有命令中和交易相关的参数,以及 dry run -> execute 流程,简化了命令

@jolestar jolestar linked an issue Jun 22, 2021 that may be closed by this pull request
Copy link
Contributor

@welbon welbon left a comment

Choose a reason for hiding this comment

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

accept

@codecov
Copy link

codecov bot commented Jun 22, 2021

Codecov Report

Merging #2619 (8f27ce4) into master (cfc56f4) will decrease coverage by 0.01%.
The diff coverage is 42.43%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2619      +/-   ##
==========================================
- Coverage   32.55%   32.54%   -0.00%     
==========================================
  Files         502      501       -1     
  Lines       43201    43123      -78     
  Branches    19303    19257      -46     
==========================================
- Hits        14058    14031      -27     
- Misses      15314    15389      +75     
+ Partials    13829    13703     -126     
Flag Coverage Δ
unittests 32.54% <42.43%> (-<0.01%) ⬇️

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

Impacted Files Coverage Δ
cmd/starcoin/src/cli_state.rs 47.37% <ø> (-5.26%) ⬇️
commons/logger/src/lib.rs 25.84% <ø> (ø)
executor/benchmark/src/lib.rs 45.63% <0.00%> (-0.38%) ⬇️
executor/src/error_code_test.rs 12.98% <ø> (-0.65%) ⬇️
executor/src/lib.rs 100.00% <ø> (ø)
network-p2p/src/lib.rs 100.00% <ø> (ø)
txpool/src/test.rs 21.13% <0.00%> (-0.40%) ⬇️
vm/compiler/src/lib.rs 35.30% <0.00%> (-2.20%) ⬇️
vm/stdlib/src/lib.rs 16.59% <0.00%> (+1.58%) ⬆️
vm/types/src/transaction/mod.rs 56.78% <0.00%> (-0.66%) ⬇️
... and 50 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 cfc56f4...8f27ce4. Read the comment docs.

@github-actions
Copy link

Benchmark for 235074b

Click to view benchmark
Test PR Benchmark Master Benchmark %
accumulator_append 2.3±0.13ms 2.4±0.16ms -4.17%
block_apply/block_apply_10 447.6±11.13ms 435.6±6.95ms +2.75%
block_apply/block_apply_1000 44.7±0.19s 46.1±1.73s -3.04%
get_with_proof/db_store 39.0±0.35µs 38.3±0.34µs +1.83%
get_with_proof/mem_store 31.8±0.25µs 31.6±0.27µs +0.63%
put_and_commit/db_store/1 1354.9±57.66µs 1464.3±65.16µs -7.47%
put_and_commit/db_store/10 2.5±0.60ms 2.6±0.47ms -3.85%
put_and_commit/db_store/100 9.7±1.42ms 9.7±1.35ms 0.00%
put_and_commit/db_store/5 1987.1±203.34µs 2.1±0.19ms -5.38%
put_and_commit/db_store/50 5.9±0.63ms 8.0±6.05ms -26.25%
put_and_commit/mem_store/1 63.5±5.53µs 62.9±5.58µs +0.95%
put_and_commit/mem_store/10 591.7±48.82µs 586.6±46.82µs +0.87%
put_and_commit/mem_store/100 5.7±0.81ms 5.7±0.81ms 0.00%
put_and_commit/mem_store/5 297.6±24.50µs 297.1±24.91µs +0.17%
put_and_commit/mem_store/50 2.9±0.18ms 2.9±0.19ms 0.00%
query_block/query_block_in(10)_times(100) 2.9±0.05ms 3.0±0.03ms -3.33%
query_block/query_block_in(10)_times(1000) 29.4±0.72ms 29.6±0.39ms -0.68%
query_block/query_block_in(10)_times(10000) 294.1±3.32ms 292.9±5.17ms +0.41%
query_block/query_block_in(1000)_times(100) 927.6±4.63µs 919.6±6.04µs +0.87%
query_block/query_block_in(1000)_times(1000) 9.3±0.04ms 9.2±0.04ms +1.09%
query_block/query_block_in(1000)_times(10000) 92.7±0.64ms 92.0±0.51ms +0.76%
storage_transaction 50.7±3.52ms 55.7±4.79ms -8.98%
vm/transaction_execution/1 327.1±1.96ms 327.9±0.70ms -0.24%
vm/transaction_execution/10 106.5±0.37ms 106.6±0.17ms -0.09%
vm/transaction_execution/20 100.8±3.13ms 100.3±0.88ms +0.50%
vm/transaction_execution/5 128.9±0.60ms 129.5±1.04ms -0.46%
vm/transaction_execution/50 114.1±0.87ms 114.0±0.39ms +0.09%

@github-actions
Copy link

Benchmark for e1ed839

Click to view benchmark
Test PR Benchmark Master Benchmark %
accumulator_append 2.7±0.22ms 2.5±0.08ms +8.00%
block_apply/block_apply_10 473.8±5.16ms 486.5±8.78ms -2.61%
block_apply/block_apply_1000 47.8±0.63s 48.0±0.66s -0.42%
get_with_proof/db_store 38.4±0.36µs 38.4±0.61µs 0.00%
get_with_proof/mem_store 31.5±0.36µs 31.5±0.23µs 0.00%
put_and_commit/db_store/1 1674.6±165.45µs 1516.8±71.82µs +10.40%
put_and_commit/db_store/10 2.7±0.35ms 2.7±0.34ms 0.00%
put_and_commit/db_store/100 9.9±0.97ms 9.8±0.82ms +1.02%
put_and_commit/db_store/5 2.1±0.17ms 2.1±0.25ms 0.00%
put_and_commit/db_store/50 6.1±0.69ms 6.0±0.64ms +1.67%
put_and_commit/mem_store/1 63.8±6.93µs 62.9±5.53µs +1.43%
put_and_commit/mem_store/10 586.2±46.65µs 585.8±45.86µs +0.07%
put_and_commit/mem_store/100 5.7±0.82ms 5.7±0.81ms 0.00%
put_and_commit/mem_store/5 297.1±24.06µs 295.7±24.22µs +0.47%
put_and_commit/mem_store/50 2.9±0.19ms 2.9±0.19ms 0.00%
query_block/query_block_in(10)_times(100) 2.9±0.07ms 3.0±0.05ms -3.33%
query_block/query_block_in(10)_times(1000) 29.6±0.52ms 29.4±1.18ms +0.68%
query_block/query_block_in(10)_times(10000) 295.2±5.68ms 295.4±4.79ms -0.07%
query_block/query_block_in(1000)_times(100) 920.7±14.56µs 924.1±6.95µs -0.37%
query_block/query_block_in(1000)_times(1000) 9.3±0.04ms 9.4±0.05ms -1.06%
query_block/query_block_in(1000)_times(10000) 91.7±0.77ms 92.5±0.65ms -0.86%
storage_transaction 63.6±3.43ms 58.5±2.90ms +8.72%
vm/transaction_execution/1 328.4±1.33ms 326.9±1.33ms +0.46%
vm/transaction_execution/10 107.3±0.90ms 106.6±0.58ms +0.66%
vm/transaction_execution/20 100.1±0.39ms 100.0±1.45ms +0.10%
vm/transaction_execution/5 129.8±0.82ms 128.9±0.62ms +0.70%
vm/transaction_execution/50 115.1±0.76ms 113.7±0.56ms +1.23%

jolestar added 2 commits June 22, 2021 20:53
1. Unify the transaction options.
2. Refactor transaction dry run and execute logic, omit repeat code.
@github-actions
Copy link

Benchmark for 27ef9f7

Click to view benchmark
Test PR Benchmark Master Benchmark %
accumulator_append 2.4±0.50ms 2.3±0.14ms +4.35%
block_apply/block_apply_10 436.8±5.05ms 450.7±15.47ms -3.08%
block_apply/block_apply_1000 44.8±0.54s 45.8±0.63s -2.18%
get_with_proof/db_store 37.9±0.27µs 38.3±0.41µs -1.04%
get_with_proof/mem_store 31.5±0.30µs 31.5±0.28µs 0.00%
put_and_commit/db_store/1 1450.1±143.36µs 1337.2±67.51µs +8.44%
put_and_commit/db_store/10 2.5±0.52ms 2.4±0.52ms +4.17%
put_and_commit/db_store/100 9.5±0.89ms 9.6±1.04ms -1.04%
put_and_commit/db_store/5 2.1±0.21ms 2.0±0.20ms +5.00%
put_and_commit/db_store/50 5.7±1.01ms 5.7±0.94ms 0.00%
put_and_commit/mem_store/1 62.9±5.55µs 63.1±5.70µs -0.32%
put_and_commit/mem_store/10 584.6±47.31µs 585.8±46.48µs -0.20%
put_and_commit/mem_store/100 5.7±0.80ms 5.7±0.81ms 0.00%
put_and_commit/mem_store/5 297.1±24.01µs 297.3±24.71µs -0.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.07ms 3.0±0.05ms 0.00%
query_block/query_block_in(10)_times(1000) 29.5±0.65ms 29.3±1.12ms +0.68%
query_block/query_block_in(10)_times(10000) 298.0±6.78ms 292.3±4.18ms +1.95%
query_block/query_block_in(1000)_times(100) 931.9±5.43µs 913.1±6.24µs +2.06%
query_block/query_block_in(1000)_times(1000) 9.3±0.04ms 9.1±0.03ms +2.20%
query_block/query_block_in(1000)_times(10000) 93.2±0.64ms 91.1±0.48ms +2.31%
storage_transaction 48.6±3.34ms 49.6±3.98ms -2.02%
vm/transaction_execution/1 325.8±0.36ms 327.0±1.01ms -0.37%
vm/transaction_execution/10 106.1±0.55ms 106.8±0.78ms -0.66%
vm/transaction_execution/20 99.2±0.30ms 100.1±2.29ms -0.90%
vm/transaction_execution/5 128.0±0.14ms 129.7±2.65ms -1.31%
vm/transaction_execution/50 113.2±0.29ms 113.9±0.53ms -0.61%

@welbon welbon self-requested a review June 22, 2021 14:05
@nanne007 nanne007 merged commit e48ca93 into master Jun 23, 2021
@nanne007 nanne007 deleted the dev_cli_dir branch June 23, 2021 08:52
naughtyvenom pushed a commit to naughtyvenom/starcoin that referenced this pull request Jul 19, 2021
…starcoinorg#2619)

* [compiler] move some utils function from stdlib to compiler.

* [txn-builder] Remove stdlib version argument from encode_transfer_script_function.

* [cli] compile command support dir and deploy command support package.

1. Unify the transaction options.
2. Refactor transaction dry run and execute logic, omit repeat code.

* [log] Change sync log level in test and dev chain.
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.

Move support compile directory and deploy package
3 participants