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

impl multisig in cli #2505

Merged
merged 3 commits into from
May 14, 2021
Merged

impl multisig in cli #2505

merged 3 commits into from
May 14, 2021

Conversation

nanne007
Copy link
Member

@nanne007 nanne007 commented May 13, 2021

  • types: remove index filed from MultiEd25519KeyShard .
  • cli: add account import-multisig, account sign-multisig-txn, account sumbit-multisig-txn
  • old multisig flow is removed.

notice:

  • to generate same address for the same public key set, cli sort the public keys by its bytes.
  • change in MultiEd25519KeyShard may affect the encoded multisig private keys.

@nanne007 nanne007 requested a review from jolestar May 13, 2021 23:41
@codecov
Copy link

codecov bot commented May 14, 2021

Codecov Report

Merging #2505 (afd01e4) into master (8e78969) will decrease coverage by 0.17%.
The diff coverage is 13.64%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2505      +/-   ##
==========================================
- Coverage   33.31%   33.14%   -0.16%     
==========================================
  Files         498      498              
  Lines       43204    43195       -9     
  Branches    19574    19566       -8     
==========================================
- Hits        14387    14313      -74     
- Misses      14041    14160     +119     
+ Partials    14776    14722      -54     
Flag Coverage Δ
unittests 33.14% <13.64%> (-0.16%) ⬇️

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% <ø> (ø)
vm/types/src/transaction/authenticator.rs 48.68% <0.00%> (+1.65%) ⬆️
commons/crypto/src/multi_ed25519/multi_shard.rs 43.92% <14.29%> (+0.40%) ⬆️
vm/types/src/on_chain_resource/epoch.rs 19.38% <0.00%> (-18.60%) ⬇️
txpool/src/lib.rs 42.86% <0.00%> (-4.46%) ⬇️
chain/src/chain.rs 34.48% <0.00%> (-3.77%) ⬇️
network-p2p/src/peer_info.rs 44.45% <0.00%> (-2.77%) ⬇️
chain/src/verifier/mod.rs 29.32% <0.00%> (-2.58%) ⬇️
vm/types/src/event.rs 45.75% <0.00%> (-2.12%) ⬇️
network-p2p/src/request_responses.rs 30.96% <0.00%> (-1.91%) ⬇️
... and 18 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 8e78969...afd01e4. Read the comment docs.

@github-actions
Copy link

Benchmark for aaa90dd

Click to view benchmark
Test PR Benchmark Master Benchmark %
accumulator_append 3.0±0.26ms 2.9±0.11ms +3.45%
block_apply/block_apply_10 571.2±5.95ms 564.3±9.07ms +1.22%
block_apply/block_apply_1000 57.2±0.48s 56.9±0.82s +0.53%
get_with_proof/db_store 39.2±0.39µs 38.7±0.41µs +1.29%
get_with_proof/mem_store 32.4±0.23µs 31.9±0.44µs +1.57%
put_and_commit/db_store/1 2.1±0.10ms 2.1±0.08ms 0.00%
put_and_commit/db_store/10 3.0±0.18ms 3.1±0.20ms -3.23%
put_and_commit/db_store/100 10.1±0.77ms 10.0±0.78ms +1.00%
put_and_commit/db_store/5 2.7±0.18ms 2.6±0.15ms +3.85%
put_and_commit/db_store/50 6.3±0.78ms 6.3±0.73ms 0.00%
put_and_commit/mem_store/1 64.5±5.87µs 63.3±5.77µs +1.90%
put_and_commit/mem_store/10 585.9±47.85µs 584.5±48.09µs +0.24%
put_and_commit/mem_store/100 5.8±0.83ms 5.7±0.84ms +1.75%
put_and_commit/mem_store/5 297.1±24.72µs 294.9±24.78µs +0.75%
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.05ms 2.9±0.06ms 0.00%
query_block/query_block_in(10)_times(1000) 29.6±0.61ms 28.9±0.60ms +2.42%
query_block/query_block_in(10)_times(10000) 293.8±6.61ms 292.6±5.08ms +0.41%
query_block/query_block_in(1000)_times(100) 937.2±10.54µs 916.3±4.60µs +2.28%
query_block/query_block_in(1000)_times(1000) 9.3±0.03ms 9.1±0.03ms +2.20%
query_block/query_block_in(1000)_times(10000) 94.1±0.86ms 90.9±0.43ms +3.52%
storage_transaction 77.4±3.25ms 75.4±3.75ms +2.65%
vm/transaction_execution/1 332.1±0.53ms 333.4±1.88ms -0.39%
vm/transaction_execution/10 111.5±0.37ms 111.7±0.62ms -0.18%
vm/transaction_execution/20 105.1±0.68ms 105.5±1.02ms -0.38%
vm/transaction_execution/5 133.7±0.32ms 133.8±0.53ms -0.07%
vm/transaction_execution/50 120.7±0.91ms 121.1±1.25ms -0.33%

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.

文档也需要更新下

@nanne007
Copy link
Member Author

doc on multisig is added.

@github-actions
Copy link

Benchmark for 7586dce

Click to view benchmark
Test PR Benchmark Master Benchmark %
accumulator_append 2.7±0.33ms 2.5±0.13ms +8.00%
block_apply/block_apply_10 500.0±12.02ms 490.9±13.10ms +1.85%
block_apply/block_apply_1000 50.5±1.10s 49.4±1.24s +2.23%
get_with_proof/db_store 38.8±0.35µs 39.0±0.37µs -0.51%
get_with_proof/mem_store 31.8±0.33µs 31.8±0.24µs 0.00%
put_and_commit/db_store/1 1575.9±69.37µs 1628.6±113.51µs -3.24%
put_and_commit/db_store/10 2.7±0.39ms 2.7±0.34ms 0.00%
put_and_commit/db_store/100 9.6±0.92ms 9.5±0.96ms +1.05%
put_and_commit/db_store/5 2.1±0.16ms 2.3±0.20ms -8.70%
put_and_commit/db_store/50 5.9±0.63ms 5.8±0.61ms +1.72%
put_and_commit/mem_store/1 63.2±5.60µs 63.1±5.52µs +0.16%
put_and_commit/mem_store/10 581.7±47.56µs 588.1±47.81µs -1.09%
put_and_commit/mem_store/100 5.7±0.83ms 5.7±0.80ms 0.00%
put_and_commit/mem_store/5 295.7±24.55µs 297.0±23.63µs -0.44%
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.07ms 2.9±0.09ms 0.00%
query_block/query_block_in(10)_times(1000) 29.1±0.31ms 29.2±0.70ms -0.34%
query_block/query_block_in(10)_times(10000) 291.7±6.67ms 292.8±5.01ms -0.38%
query_block/query_block_in(1000)_times(100) 909.2±3.43µs 914.0±7.90µs -0.53%
query_block/query_block_in(1000)_times(1000) 9.0±0.04ms 9.2±0.06ms -2.17%
query_block/query_block_in(1000)_times(10000) 90.3±0.46ms 91.6±0.41ms -1.42%
storage_transaction 64.5±5.53ms 62.2±4.01ms +3.70%
vm/transaction_execution/1 335.0±3.98ms 332.1±0.86ms +0.87%
vm/transaction_execution/10 112.3±0.29ms 112.2±1.05ms +0.09%
vm/transaction_execution/20 106.1±0.63ms 107.5±6.12ms -1.30%
vm/transaction_execution/5 134.6±0.94ms 133.8±1.01ms +0.60%
vm/transaction_execution/50 121.5±0.64ms 121.8±3.49ms -0.25%

@nanne007 nanne007 merged commit 5d65470 into master May 14, 2021
@nanne007 nanne007 deleted the multisig branch May 14, 2021 05:08
naughtyvenom pushed a commit to naughtyvenom/starcoin that referenced this pull request Jul 19, 2021
* impl multisig in cli

* improve

* fix and update doc on multisig
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