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

Added stake reconciliation test #1652

Merged
merged 5 commits into from
Nov 28, 2023
Merged

Conversation

mstrug-rdx
Copy link
Contributor

Summary

Added test which creates a validator and then stakes on it some XRD. Before stake transaction all substate values (hashes) are stored in temporary hash map for value change verification after stake transaction. Also event order and names are validated.

Copy link

Benchmark for ec6f156

Click to view benchmark
Test Base PR %
costing::bench_prepare_wasm 76.6±0.45ms 76.4±0.29ms -0.26%
costing::decode_sbor 16.6±0.02µs 16.4±0.04µs -1.20%
costing::decode_sbor_bytes 52.0±0.20µs 52.2±0.19µs +0.38%
costing::deserialize_wasm 1423.9±3.37µs 1421.1±18.63µs -0.20%
costing::instantiate_flash_loan 4.4±0.86ms 4.7±0.84ms +6.82%
costing::instantiate_radiswap 6.9±0.20ms 7.0±0.10ms +1.45%
costing::spin_loop 30.5±0.31ms 28.5±0.32ms -6.56%
costing::validate_sbor_payload 31.1±0.09µs 31.4±0.04µs +0.96%
costing::validate_sbor_payload_bytes 381.5±2.80ns 377.9±0.55ns -0.94%
costing::validate_secp256k1 87.6±0.90µs 87.4±0.13µs -0.23%
costing::validate_wasm 44.1±0.10ms 44.3±0.09ms +0.45%
decimal::add/0 9.3±0.00ns 9.3±0.00ns 0.00%
decimal::add/rust-native 10.8±0.00ns 10.8±0.01ns 0.00%
decimal::add/wasmer 127.0±0.16ns 126.9±0.11ns -0.08%
decimal::add/wasmer-call-native 549.6±0.67ns 549.1±0.40ns -0.09%
decimal::add/wasmi 878.3±8.07ns 857.8±5.54ns -2.33%
decimal::add/wasmi-call-native 8.5±0.01µs 8.5±0.01µs 0.00%
decimal::div/0 199.3±0.13ns 201.3±0.37ns +1.00%
decimal::from_string/0 169.7±0.16ns 200.5±0.16ns +18.15%
decimal::mul/0 158.4±0.25ns 156.1±0.79ns -1.45%
decimal::mul/rust-native 153.8±0.15ns 154.1±0.17ns +0.20%
decimal::mul/wasmer 1683.2±0.49ns 1689.1±1.70ns +0.35%
decimal::mul/wasmer-call-native 712.9±0.76ns 708.7±0.58ns -0.59%
decimal::mul/wasmi 71.8±0.07µs 72.1±0.08µs +0.42%
decimal::mul/wasmi-call-native 8.7±0.02µs 8.7±0.02µs 0.00%
decimal::pow/0 720.8±0.90ns 724.1±1.02ns +0.46%
decimal::pow/rust-native 698.5±0.73ns 699.0±1.19ns +0.07%
decimal::pow/wasmer 7.3±0.00µs 7.3±0.01µs 0.00%
decimal::pow/wasmer-call-native 1168.3±0.75ns 1178.9±1.55ns +0.91%
decimal::pow/wasmi 334.6±1.93µs 335.3±0.49µs +0.21%
decimal::pow/wasmi-call-native 7.7±0.02µs 7.8±0.01µs +1.30%
decimal::root/0 9.6±0.01µs 8.7±0.01µs -9.38%
decimal::sub/0 9.4±0.01ns 9.4±0.01ns 0.00%
decimal::to_string/0 496.4±0.86ns 486.1±1.31ns -2.07%
precise_decimal::add/0 10.4±0.01ns 10.5±0.01ns +0.96%
precise_decimal::add/rust-native 22.1±0.09ns 12.5±0.22ns -43.44%
precise_decimal::add/wasmer 134.7±0.12ns 134.9±0.13ns +0.15%
precise_decimal::add/wasmer-call-native 574.1±0.41ns 573.5±0.67ns -0.10%
precise_decimal::add/wasmi 1091.1±5.27ns 1096.4±5.61ns +0.49%
precise_decimal::add/wasmi-call-native 9.1±0.02µs 9.1±0.03µs 0.00%
precise_decimal::div/0 327.4±0.47ns 326.1±0.49ns -0.40%
precise_decimal::from_string/0 215.5±0.21ns 215.3±0.57ns -0.09%
precise_decimal::mul/0 351.0±1.99ns 350.3±2.07ns -0.20%
precise_decimal::mul/rust-native 325.8±0.96ns 326.4±2.27ns +0.18%
precise_decimal::mul/wasmer 3.8±0.00µs 3.8±0.00µs 0.00%
precise_decimal::mul/wasmer-call-native 936.3±3.25ns 932.9±2.27ns -0.36%
precise_decimal::mul/wasmi 177.6±0.15µs 179.0±0.22µs +0.79%
precise_decimal::mul/wasmi-call-native 9.6±0.01µs 9.6±0.02µs 0.00%
precise_decimal::pow/0 1934.7±3.99ns 1970.8±4.96ns +1.87%
precise_decimal::pow/rust-native 1570.8±4.12ns 1583.5±3.76ns +0.81%
precise_decimal::pow/wasmer 18.0±0.01µs 18.0±0.06µs 0.00%
precise_decimal::pow/wasmer-call-native 2.3±0.00µs 2.3±0.00µs 0.00%
precise_decimal::pow/wasmi 861.6±0.57µs 859.3±0.67µs -0.27%
precise_decimal::pow/wasmi-call-native 18.9±0.04µs 18.5±0.11µs -2.12%
precise_decimal::root/0 66.7±0.27µs 66.9±0.03µs +0.30%
precise_decimal::sub/0 10.4±0.04ns 10.6±0.15ns +1.92%
precise_decimal::to_string/0 783.4±0.51ns 787.4±1.57ns +0.51%
schema::validate_payload 346.1±0.48µs 383.9±2.67µs +10.92%
transaction::radiswap 6.4±0.07ms 6.4±0.09ms 0.00%
transaction::transfer 2.0±0.00ms 2.0±0.00ms 0.00%
transaction_processing::prepare 3.0±0.00ms 3.1±0.01ms +3.33%
transaction_processing::prepare_and_decompile 7.3±0.02ms 7.2±0.04ms -1.37%
transaction_processing::prepare_and_decompile_and_recompile 26.8±0.20ms 26.8±0.12ms 0.00%
transaction_validation::validate_manifest 48.9±0.04µs 48.9±0.18µs 0.00%
transaction_validation::verify_ecdsa 85.0±0.05µs 85.1±0.06µs +0.12%
transaction_validation::verify_ed25519 60.8±0.15µs 60.8±0.09µs 0.00%

@mstrug-rdx mstrug-rdx merged commit 86ae236 into develop Nov 28, 2023
25 checks passed
@mstrug-rdx mstrug-rdx deleted the test/stake-reconcilation branch November 28, 2023 09:41
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