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: Add "replay sync" command #1624

Merged
merged 4 commits into from
Oct 13, 2023
Merged

Conversation

talekhinezh
Copy link
Member

Summary

Add replay sync <state_manager_db> <destination_db> which will sync and execute the transactions from the state_manager_db. Part of this process will be checking that the state hashes match.

@talekhinezh talekhinezh marked this pull request as ready for review October 12, 2023 22:59
@github-actions
Copy link

Benchmark for 61900a1

Click to view benchmark
Test Base PR %
costing::bench_prepare_wasm 77.5±0.36ms 78.3±0.32ms +1.03%
costing::decode_sbor 16.4±0.07µs 16.3±0.05µs -0.61%
costing::decode_sbor_bytes 51.1±0.09µs 51.1±0.10µs 0.00%
costing::deserialize_wasm 1401.1±3.79µs 1393.0±7.01µs -0.58%
costing::instantiate_flash_loan 4.3±0.52ms 4.1±0.22ms -4.65%
costing::instantiate_radiswap 5.9±0.04ms 5.9±0.04ms 0.00%
costing::spin_loop 26.0±0.06ms 26.0±0.09ms 0.00%
costing::validate_sbor_payload 30.6±0.29µs 31.0±0.31µs +1.31%
costing::validate_sbor_payload_bytes 390.2±0.63ns 367.5±0.68ns -5.82%
costing::validate_secp256k1 87.5±0.24µs 87.6±0.09µs +0.11%
costing::validate_wasm 43.7±0.10ms 43.9±0.13ms +0.46%
decimal::add/0 9.3±0.01ns 9.3±0.03ns 0.00%
decimal::add/rust-native 10.9±0.02ns 10.9±0.02ns 0.00%
decimal::add/wasmer 128.1±0.10ns 147.8±0.28ns +15.38%
decimal::add/wasmer-call-native 552.5±0.45ns 567.6±3.39ns +2.73%
decimal::add/wasmi 792.4±2.59ns 803.1±2.08ns +1.35%
decimal::add/wasmi-call-native 8.4±0.04µs 8.2±0.01µs -2.38%
decimal::div/0 199.9±0.72ns 200.2±0.47ns +0.15%
decimal::from_string/0 161.9±2.41ns 164.2±0.18ns +1.42%
decimal::mul/0 157.1±0.38ns 155.9±0.58ns -0.76%
decimal::mul/rust-native 154.3±0.56ns 154.3±0.13ns 0.00%
decimal::mul/wasmer 1668.0±2.88ns 1705.2±7.34ns +2.23%
decimal::mul/wasmer-call-native 715.2±0.67ns 718.6±3.62ns +0.48%
decimal::mul/wasmi 60.6±0.05µs 60.3±0.09µs -0.50%
decimal::mul/wasmi-call-native 8.5±0.01µs 8.4±0.01µs -1.18%
decimal::pow/0 725.2±0.64ns 724.2±1.74ns -0.14%
decimal::pow/rust-native 695.2±0.87ns 722.9±73.68ns +3.98%
decimal::pow/wasmer 7.3±0.01µs 7.4±0.01µs +1.37%
decimal::pow/wasmer-call-native 1169.8±0.98ns 1166.0±0.86ns -0.32%
decimal::pow/wasmi 284.8±1.50µs 280.7±0.46µs -1.44%
decimal::pow/wasmi-call-native 7.4±0.02µs 7.3±0.01µs -1.35%
decimal::root/0 9.3±0.17µs 9.1±0.09µs -2.15%
decimal::sub/0 9.4±0.02ns 9.4±0.01ns 0.00%
decimal::to_string/0 482.9±1.44ns 487.1±1.21ns +0.87%
precise_decimal::add/0 10.3±0.13ns 10.5±0.03ns +1.94%
precise_decimal::add/rust-native 12.7±0.02ns 12.7±0.00ns 0.00%
precise_decimal::add/wasmer 130.9±0.42ns 133.3±0.58ns +1.83%
precise_decimal::add/wasmer-call-native 574.0±0.75ns 575.1±1.37ns +0.19%
precise_decimal::add/wasmi 1015.2±3.95ns 1019.4±4.25ns +0.41%
precise_decimal::add/wasmi-call-native 8.9±0.01µs 8.8±0.02µs -1.12%
precise_decimal::div/0 349.7±3.24ns 324.0±1.76ns -7.35%
precise_decimal::from_string/0 224.7±0.76ns 225.1±0.15ns +0.18%
precise_decimal::mul/0 352.7±2.69ns 350.9±1.92ns -0.51%
precise_decimal::mul/rust-native 327.5±2.97ns 326.3±0.40ns -0.37%
precise_decimal::mul/wasmer 3.8±0.00µs 3.9±0.04µs +2.63%
precise_decimal::mul/wasmer-call-native 964.8±2.59ns 950.6±7.04ns -1.47%
precise_decimal::mul/wasmi 151.8±0.06µs 151.6±0.12µs -0.13%
precise_decimal::mul/wasmi-call-native 9.3±0.01µs 9.4±0.05µs +1.08%
precise_decimal::pow/0 1962.5±4.64ns 1967.9±4.61ns +0.28%
precise_decimal::pow/rust-native 1584.9±4.28ns 1596.1±8.44ns +0.71%
precise_decimal::pow/wasmer 18.2±0.05µs 18.2±0.04µs 0.00%
precise_decimal::pow/wasmer-call-native 2.3±0.01µs 2.3±0.01µs 0.00%
precise_decimal::pow/wasmi 731.1±1.48µs 730.0±3.03µs -0.15%
precise_decimal::pow/wasmi-call-native 16.6±0.06µs 16.5±0.05µs -0.60%
precise_decimal::root/0 64.0±0.04µs 65.0±0.02µs +1.56%
precise_decimal::sub/0 10.5±0.04ns 10.5±0.02ns 0.00%
precise_decimal::to_string/0 786.7±2.72ns 790.6±2.55ns +0.50%
schema::validate_payload 353.7±1.20µs 353.6±11.96µs -0.03%
transaction::radiswap 7.6±0.10ms 7.6±0.04ms 0.00%
transaction::transfer 2.6±0.03ms 2.6±0.01ms 0.00%
transaction_processing::prepare 3.0±0.01ms 3.0±0.00ms 0.00%
transaction_processing::prepare_and_decompile 7.3±0.04ms 7.3±0.01ms 0.00%
transaction_processing::prepare_and_decompile_and_recompile 26.6±0.29ms 26.6±0.14ms 0.00%
transaction_validation::validate_manifest 48.8±0.30µs 48.8±0.61µs 0.00%
transaction_validation::verify_ecdsa 85.1±0.30µs 85.0±0.45µs -0.12%
transaction_validation::verify_ed25519 60.8±0.10µs 60.9±0.11µs +0.16%

Copy link
Member

@iamyulong iamyulong left a comment

Choose a reason for hiding this comment

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

Very cool producer-consumer mulit-threading!

@iamyulong iamyulong merged commit 354c61f into develop Oct 13, 2023
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants