aptos-core icon indicating copy to clipboard operation
aptos-core copied to clipboard

[aptos-cli] Add a command to generate writeset for fire events

Open runtian-zhou opened this issue 3 years ago • 4 comments

Description

Resurrect the writeset generator tool to generate the genesis writeset need to apply to nodes manually in case of network outages.

Test Plan

Haven't yet tested this tool with the db. Would appreciate any suggestions on how to test this manual procedure.


This change is Reviewable

runtian-zhou avatar Sep 09 '22 18:09 runtian-zhou

Have you tried running this against a local testnet node?

gregnazario avatar Sep 11 '22 07:09 gregnazario

A question for @gregnazario is I feel like the functionality of this command feels a lot similar to cargo run -p aptos -- governance propose. Will it be better to just make the functionality as an option there?

runtian-zhou avatar Sep 12 '22 17:09 runtian-zhou

if it's similar to governance proposal flow, maybe we just need an option to indicate whether it's a normal txn or writeset?

zekun000 avatar Sep 12 '22 17:09 zekun000

if it's similar to governance proposal flow, maybe we just need an option to indicate whether it's a normal txn or writeset?

I think the script generation part is a bit different as you don't need the options to submit the script to a node. However, the part to generate the upgrade proposal will look very similar, so I'll just add it as a flag.

runtian-zhou avatar Sep 12 '22 18:09 runtian-zhou

Forge is running suite compat on 843b204dce971d98449b82624f4f684c7a18b991 ==> b23ed58e41a5655f789e55692660e8d37bcda11b

github-actions[bot] avatar Sep 21 '22 21:09 github-actions[bot]

:white_check_mark: Forge suite compat success on 843b204dce971d98449b82624f4f684c7a18b991 ==> b23ed58e41a5655f789e55692660e8d37bcda11b

Compatibility test results for 843b204dce971d98449b82624f4f684c7a18b991 ==> b23ed58e41a5655f789e55692660e8d37bcda11b (PR)
1. Check liveness of validators at old version: 843b204dce971d98449b82624f4f684c7a18b991
compatibility::simple-validator-upgrade::liveness-check : 7809 TPS, 4799 ms latency, 7000 ms p99 latency,no expired txns
2. Upgrading first Validator to new version: b23ed58e41a5655f789e55692660e8d37bcda11b
compatibility::simple-validator-upgrade::single-validator-upgrade : 5404 TPS, 7066 ms latency, 9000 ms p99 latency,no expired txns
3. Upgrading rest of first batch to new version: b23ed58e41a5655f789e55692660e8d37bcda11b
compatibility::simple-validator-upgrade::half-validator-upgrade : 4922 TPS, 7665 ms latency, 10900 ms p99 latency,no expired txns
4. upgrading second batch to new version: b23ed58e41a5655f789e55692660e8d37bcda11b
compatibility::simple-validator-upgrade::rest-validator-upgrade : 7378 TPS, 4906 ms latency, 8500 ms p99 latency,no expired txns
5. check swarm health
Compatibility test for 843b204dce971d98449b82624f4f684c7a18b991 ==> b23ed58e41a5655f789e55692660e8d37bcda11b passed
Test Ok

github-actions[bot] avatar Sep 21 '22 21:09 github-actions[bot]

Forge is running suite compat on 843b204dce971d98449b82624f4f684c7a18b991 ==> c352e61e9dc3942735dabf501bcc2873873afc97

github-actions[bot] avatar Sep 21 '22 21:09 github-actions[bot]

Forge is running suite land_blocking on c352e61e9dc3942735dabf501bcc2873873afc97

github-actions[bot] avatar Sep 21 '22 21:09 github-actions[bot]

:white_check_mark: Forge suite compat success on 843b204dce971d98449b82624f4f684c7a18b991 ==> c352e61e9dc3942735dabf501bcc2873873afc97

Compatibility test results for 843b204dce971d98449b82624f4f684c7a18b991 ==> c352e61e9dc3942735dabf501bcc2873873afc97 (PR)
1. Check liveness of validators at old version: 843b204dce971d98449b82624f4f684c7a18b991
compatibility::simple-validator-upgrade::liveness-check : 7810 TPS, 4694 ms latency, 6900 ms p99 latency,no expired txns
2. Upgrading first Validator to new version: c352e61e9dc3942735dabf501bcc2873873afc97
compatibility::simple-validator-upgrade::single-validator-upgrade : 5296 TPS, 6991 ms latency, 10000 ms p99 latency,no expired txns
3. Upgrading rest of first batch to new version: c352e61e9dc3942735dabf501bcc2873873afc97
compatibility::simple-validator-upgrade::half-validator-upgrade : 5361 TPS, 7166 ms latency, 9900 ms p99 latency,no expired txns
4. upgrading second batch to new version: c352e61e9dc3942735dabf501bcc2873873afc97
compatibility::simple-validator-upgrade::rest-validator-upgrade : 7236 TPS, 4977 ms latency, 9200 ms p99 latency,no expired txns
5. check swarm health
Compatibility test for 843b204dce971d98449b82624f4f684c7a18b991 ==> c352e61e9dc3942735dabf501bcc2873873afc97 passed
Test Ok

github-actions[bot] avatar Sep 21 '22 22:09 github-actions[bot]

:white_check_mark: Forge suite land_blocking success on c352e61e9dc3942735dabf501bcc2873873afc97

performance benchmark with full nodes : 7749 TPS, 5125 ms latency, 6900 ms p99 latency,no expired txns
Test Ok

github-actions[bot] avatar Sep 21 '22 22:09 github-actions[bot]

Forge is running suite compat on 843b204dce971d98449b82624f4f684c7a18b991 ==> c8bd19deb5bbf2c2e2cb6943ef4202b27ad913bd

github-actions[bot] avatar Sep 22 '22 00:09 github-actions[bot]

Forge is running suite land_blocking on c8bd19deb5bbf2c2e2cb6943ef4202b27ad913bd

github-actions[bot] avatar Sep 22 '22 00:09 github-actions[bot]

:white_check_mark: Forge suite compat success on 843b204dce971d98449b82624f4f684c7a18b991 ==> c8bd19deb5bbf2c2e2cb6943ef4202b27ad913bd

Compatibility test results for 843b204dce971d98449b82624f4f684c7a18b991 ==> c8bd19deb5bbf2c2e2cb6943ef4202b27ad913bd (PR)
1. Check liveness of validators at old version: 843b204dce971d98449b82624f4f684c7a18b991
compatibility::simple-validator-upgrade::liveness-check : 8081 TPS, 4652 ms latency, 6700 ms p99 latency,no expired txns
2. Upgrading first Validator to new version: c8bd19deb5bbf2c2e2cb6943ef4202b27ad913bd
compatibility::simple-validator-upgrade::single-validator-upgrade : 6044 TPS, 6017 ms latency, 7700 ms p99 latency,no expired txns
3. Upgrading rest of first batch to new version: c8bd19deb5bbf2c2e2cb6943ef4202b27ad913bd
compatibility::simple-validator-upgrade::half-validator-upgrade : 5658 TPS, 6495 ms latency, 8600 ms p99 latency,no expired txns
4. upgrading second batch to new version: c8bd19deb5bbf2c2e2cb6943ef4202b27ad913bd
compatibility::simple-validator-upgrade::rest-validator-upgrade : 8136 TPS, 4530 ms latency, 7400 ms p99 latency,no expired txns
5. check swarm health
Compatibility test for 843b204dce971d98449b82624f4f684c7a18b991 ==> c8bd19deb5bbf2c2e2cb6943ef4202b27ad913bd passed
Test Ok

github-actions[bot] avatar Sep 22 '22 00:09 github-actions[bot]

:white_check_mark: Forge suite land_blocking success on c8bd19deb5bbf2c2e2cb6943ef4202b27ad913bd

performance benchmark with full nodes : 7765 TPS, 5105 ms latency, 9700 ms p99 latency,no expired txns
Test Ok

github-actions[bot] avatar Sep 22 '22 00:09 github-actions[bot]

Forge is running suite land_blocking on 192b444a1fe452bbfd5b1ccf1b5211ce0f88cef4

github-actions[bot] avatar Sep 23 '22 03:09 github-actions[bot]

Forge is running suite compat on 843b204dce971d98449b82624f4f684c7a18b991 ==> 192b444a1fe452bbfd5b1ccf1b5211ce0f88cef4

github-actions[bot] avatar Sep 23 '22 03:09 github-actions[bot]

:white_check_mark: Forge suite compat success on 843b204dce971d98449b82624f4f684c7a18b991 ==> 192b444a1fe452bbfd5b1ccf1b5211ce0f88cef4

Compatibility test results for 843b204dce971d98449b82624f4f684c7a18b991 ==> 192b444a1fe452bbfd5b1ccf1b5211ce0f88cef4 (PR)
1. Check liveness of validators at old version: 843b204dce971d98449b82624f4f684c7a18b991
compatibility::simple-validator-upgrade::liveness-check : 7626 TPS, 4887 ms latency, 7200 ms p99 latency,no expired txns
2. Upgrading first Validator to new version: 192b444a1fe452bbfd5b1ccf1b5211ce0f88cef4
compatibility::simple-validator-upgrade::single-validator-upgrade : 5412 TPS, 7052 ms latency, 9800 ms p99 latency,no expired txns
3. Upgrading rest of first batch to new version: 192b444a1fe452bbfd5b1ccf1b5211ce0f88cef4
compatibility::simple-validator-upgrade::half-validator-upgrade : 5691 TPS, 6682 ms latency, 8600 ms p99 latency,no expired txns
4. upgrading second batch to new version: 192b444a1fe452bbfd5b1ccf1b5211ce0f88cef4
compatibility::simple-validator-upgrade::rest-validator-upgrade : 7527 TPS, 4872 ms latency, 8500 ms p99 latency,no expired txns
5. check swarm health
Compatibility test for 843b204dce971d98449b82624f4f684c7a18b991 ==> 192b444a1fe452bbfd5b1ccf1b5211ce0f88cef4 passed
Test Ok

github-actions[bot] avatar Sep 23 '22 03:09 github-actions[bot]

:white_check_mark: Forge suite land_blocking success on 192b444a1fe452bbfd5b1ccf1b5211ce0f88cef4

performance benchmark with full nodes : 7572 TPS, 5233 ms latency, 7800 ms p99 latency,(!) expired 60 out of 3271280 txns
Test Ok

github-actions[bot] avatar Sep 23 '22 03:09 github-actions[bot]