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

Add generate_validator_fee_fix_state_updates #1680

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

talekhinezh
Copy link
Member

Add state updates for the validator fee fix

Copy link

Benchmark for 63707bb

Click to view benchmark
Test Base PR %
costing::bench_prepare_wasm 64.3±0.53ms 64.8±0.33ms +0.78%
costing::decode_sbor 13.1±0.14µs 13.0±0.02µs -0.76%
costing::decode_sbor_bytes 36.6±0.04µs 38.1±0.03µs +4.10%
costing::deserialize_wasm 1239.6±2.04µs 1239.5±1.70µs -0.01%
costing::instantiate_flash_loan 4.0±0.54ms 4.0±0.63ms 0.00%
costing::instantiate_radiswap 5.1±0.07ms 5.1±0.06ms 0.00%
costing::spin_loop 22.2±0.09ms 21.7±0.08ms -2.25%
costing::validate_sbor_payload 24.4±0.02µs 25.8±0.02µs +5.74%
costing::validate_sbor_payload_bytes 355.6±0.30ns 353.3±0.29ns -0.65%
costing::validate_secp256k1 80.2±0.06µs 80.4±0.05µs +0.25%
costing::validate_wasm 34.6±0.04ms 34.6±0.07ms 0.00%
decimal::add/0 7.2±0.00ns 7.2±0.00ns 0.00%
decimal::add/rust-native 9.2±0.05ns 9.3±0.03ns +1.09%
decimal::add/wasmer 137.0±0.04ns 132.2±0.14ns -3.50%
decimal::add/wasmer-call-native 519.3±0.20ns 520.9±0.36ns +0.31%
decimal::add/wasmi 456.5±7.46ns 441.9±0.46ns -3.20%
decimal::add/wasmi-call-native 3.3±0.01µs 3.4±0.02µs +3.03%
decimal::div/0 166.3±0.09ns 164.5±0.06ns -1.08%
decimal::from_string/0 153.4±0.14ns 153.6±0.07ns +0.13%
decimal::mul/0 128.7±0.22ns 127.8±0.04ns -0.70%
decimal::mul/rust-native 131.3±0.03ns 132.9±0.17ns +1.22%
decimal::mul/wasmer 1718.2±0.51ns 1728.9±0.52ns +0.62%
decimal::mul/wasmer-call-native 653.5±2.04ns 653.0±0.18ns -0.08%
decimal::mul/wasmi 26.8±0.04µs 26.8±0.04µs 0.00%
decimal::mul/wasmi-call-native 3.4±0.01µs 3.5±0.02µs +2.94%
decimal::pow/0 619.4±0.22ns 621.6±0.21ns +0.36%
decimal::pow/rust-native 607.7±0.46ns 609.0±0.42ns +0.21%
decimal::pow/wasmer 7.5±0.00µs 7.6±0.00µs +1.33%
decimal::pow/wasmer-call-native 1089.6±0.32ns 1073.7±0.55ns -1.46%
decimal::pow/wasmi 126.7±0.10µs 127.2±0.08µs +0.39%
decimal::pow/wasmi-call-native 3.4±0.01µs 3.4±0.01µs 0.00%
decimal::root/0 9.5±0.00µs 9.1±0.00µs -4.21%
decimal::sub/0 7.2±0.00ns 7.2±0.00ns 0.00%
decimal::to_string/0 489.8±0.30ns 488.4±0.31ns -0.29%
precise_decimal::add/0 8.6±0.00ns 8.0±0.00ns -6.98%
precise_decimal::add/rust-native 10.3±0.03ns 10.3±0.03ns 0.00%
precise_decimal::add/wasmer 177.8±0.05ns 139.7±0.23ns -21.43%
precise_decimal::add/wasmer-call-native 655.1±0.17ns 542.5±0.88ns -17.19%
precise_decimal::add/wasmi 533.1±2.17ns 531.9±0.07ns -0.23%
precise_decimal::add/wasmi-call-native 3.6±0.02µs 3.6±0.01µs 0.00%
precise_decimal::div/0 262.8±0.13ns 261.7±0.06ns -0.42%
precise_decimal::from_string/0 195.8±0.18ns 194.9±0.12ns -0.46%
precise_decimal::mul/0 282.5±0.05ns 281.2±0.07ns -0.46%
precise_decimal::mul/rust-native 263.9±0.09ns 262.4±0.24ns -0.57%
precise_decimal::mul/wasmer 4.0±0.00µs 4.1±0.00µs +2.50%
precise_decimal::mul/wasmer-call-native 822.6±0.32ns 823.2±0.26ns +0.07%
precise_decimal::mul/wasmi 74.6±0.03µs 74.3±0.03µs -0.40%
precise_decimal::mul/wasmi-call-native 3.9±0.02µs 3.8±0.01µs -2.56%
precise_decimal::pow/0 1571.1±0.30ns 1572.4±0.72ns +0.08%
precise_decimal::pow/rust-native 1291.3±0.48ns 1280.9±0.35ns -0.81%
precise_decimal::pow/wasmer 19.1±0.00µs 19.7±0.02µs +3.14%
precise_decimal::pow/wasmer-call-native 2.0±0.00µs 2.0±0.00µs 0.00%
precise_decimal::pow/wasmi 358.3±0.25µs 360.6±0.16µs +0.64%
precise_decimal::pow/wasmi-call-native 7.4±0.02µs 7.4±0.01µs 0.00%
precise_decimal::root/0 61.6±0.02µs 61.3±0.01µs -0.49%
precise_decimal::sub/0 8.9±0.00ns 8.3±0.00ns -6.74%
precise_decimal::to_string/0 740.8±0.39ns 741.2±0.11ns +0.05%
schema::validate_payload 323.7±0.42µs 332.5±0.39µs +2.72%
transaction::radiswap 5.2±0.04ms 5.3±0.05ms +1.92%
transaction::transfer 1683.0±2.98µs 1693.3±3.16µs +0.61%
transaction_processing::prepare 2.4±0.00ms 2.4±0.00ms 0.00%
transaction_processing::prepare_and_decompile 6.3±0.01ms 6.2±0.01ms -1.59%
transaction_processing::prepare_and_decompile_and_recompile 22.9±0.19ms 23.2±0.17ms +1.31%
transaction_validation::validate_manifest 43.9±0.03µs 43.8±0.03µs -0.23%
transaction_validation::verify_bls_2KB 1000.6±1.80µs 1001.2±1.76µs +0.06%
transaction_validation::verify_bls_32B 999.8±1.56µs 1017.6±20.33µs +1.78%
transaction_validation::verify_ecdsa 78.2±0.07µs 78.0±0.06µs -0.26%
transaction_validation::verify_ed25519 51.5±0.04µs 51.4±0.04µs -0.19%

@talekhinezh talekhinezh merged commit 809bb7d into develop Jan 16, 2024
25 checks passed
@@ -224,3 +231,37 @@ pub fn generate_seconds_precision_state_updates<S: SubstateDatabase>(db: &S) ->
),
}
}

pub fn generate_validator_fee_fix_state_updates<S: SubstateDatabase>(db: &S) -> StateUpdates {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a specific change for a specific mainnet protocol update, doesn't seem quite right to keep it in utils. Looks like we'll need some notion of the actual protocol updates here

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.

3 participants