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

Dry run api #2648

Merged
merged 3 commits into from
Jun 29, 2021
Merged

Dry run api #2648

merged 3 commits into from
Jun 29, 2021

Conversation

jolestar
Copy link
Member

  1. 提供 dry_run RawUserTransaction rpc api。
  2. 提供 dev call-api 命令,可调用任意的 json rpc api 。

resolve #2480 #2620

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

codecov bot commented Jun 28, 2021

Codecov Report

Merging #2648 (5af08d1) into master (2fd020b) will decrease coverage by 0.12%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2648      +/-   ##
==========================================
- Coverage   32.45%   32.34%   -0.11%     
==========================================
  Files         503      503              
  Lines       43363    43378      +15     
  Branches    19384    19387       +3     
==========================================
- Hits        14071    14026      -45     
- Misses      15469    15579     +110     
+ Partials    13823    13773      -50     
Flag Coverage Δ
unittests 32.34% <0.00%> (-0.11%) ⬇️

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

Impacted Files Coverage Δ
cmd/starcoin/src/lib.rs 100.00% <ø> (ø)
node/src/rpc_service_factory.rs 34.85% <ø> (-0.97%) ⬇️
rpc/api/src/contract_api.rs 12.50% <0.00%> (-4.16%) ⬇️
rpc/api/src/types.rs 16.55% <0.00%> (ø)
rpc/server/src/module/account_rpc.rs 15.59% <0.00%> (+0.11%) ⬆️
rpc/server/src/module/contract_rpc.rs 14.44% <0.00%> (-1.35%) ⬇️
rpc/server/src/module/helpers.rs 0.00% <0.00%> (ø)
vm/types/src/transaction/mod.rs 54.27% <0.00%> (-2.50%) ⬇️
sync/src/block_connector/write_block_chain.rs 27.61% <0.00%> (-6.77%) ⬇️
network-rpc/core/src/lib.rs 23.53% <0.00%> (-5.88%) ⬇️
... 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 2fd020b...5af08d1. Read the comment docs.

@github-actions
Copy link

Benchmark for 21a163b

Click to view benchmark
Test PR Benchmark Master Benchmark %
accumulator_append 2.6±0.12ms 2.6±0.32ms 0.00%
block_apply/block_apply_10 481.3±6.31ms 489.8±11.54ms -1.74%
block_apply/block_apply_1000 48.7±0.30s 49.2±0.45s -1.02%
get_with_proof/db_store 38.8±0.38µs 38.4±0.46µs +1.04%
get_with_proof/mem_store 31.6±0.26µs 31.9±0.47µs -0.94%
put_and_commit/db_store/1 1578.4±84.32µs 1598.6±90.27µs -1.26%
put_and_commit/db_store/10 2.8±0.53ms 2.8±0.51ms 0.00%
put_and_commit/db_store/100 9.7±1.03ms 9.8±1.64ms -1.02%
put_and_commit/db_store/5 2.2±0.20ms 2.2±0.13ms 0.00%
put_and_commit/db_store/50 6.0±1.06ms 6.0±0.91ms 0.00%
put_and_commit/mem_store/1 62.8±5.54µs 63.1±5.56µs -0.48%
put_and_commit/mem_store/10 583.6±45.79µs 584.2±45.87µs -0.10%
put_and_commit/mem_store/100 5.7±0.34ms 5.7±0.81ms 0.00%
put_and_commit/mem_store/5 294.6±23.90µs 296.7±24.23µs -0.71%
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 2.9±0.06ms +3.45%
query_block/query_block_in(10)_times(1000) 29.6±0.92ms 29.4±0.85ms +0.68%
query_block/query_block_in(10)_times(10000) 295.2±4.61ms 294.2±4.82ms +0.34%
query_block/query_block_in(1000)_times(100) 938.1±6.18µs 923.8±5.63µs +1.55%
query_block/query_block_in(1000)_times(1000) 9.2±0.04ms 9.2±0.05ms 0.00%
query_block/query_block_in(1000)_times(10000) 91.9±0.57ms 92.5±0.92ms -0.65%
storage_transaction 62.3±4.36ms 61.6±3.97ms +1.14%
vm/transaction_execution/1 325.8±0.79ms 328.1±5.53ms -0.70%
vm/transaction_execution/10 106.5±0.48ms 107.4±0.86ms -0.84%
vm/transaction_execution/20 100.2±1.75ms 100.3±1.38ms -0.10%
vm/transaction_execution/5 129.1±1.96ms 129.1±0.85ms 0.00%
vm/transaction_execution/50 114.5±1.93ms 115.0±1.94ms -0.43%

@nanne007 nanne007 merged commit 9ab82d8 into master Jun 29, 2021
@nanne007 nanne007 deleted the dry_run_api branch June 29, 2021 00:23
naughtyvenom pushed a commit to naughtyvenom/starcoin that referenced this pull request Jul 19, 2021
* [rpc] dry run api require sender's public_key resolve starcoinorg#2480

* [rpc] Add contract.dry_run_raw api and

* [cmd] Add dev call-api method for call any json rpc api.
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.

[rpc]Supported dry_run RawUserTransaction [rpc] contract.dry_run rpc api should not use local account
2 participants