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

Revert wasmi to radix fork #2001

Merged
merged 1 commit into from
Nov 15, 2024
Merged

Conversation

iamyulong
Copy link
Member

@iamyulong iamyulong commented Nov 14, 2024

Summary

wasmi @ 0.35 had a critical bug causing an infinite loop due to incorrectly setting state. Same for wasmi @ 0.36.x, but latest wasmi @ 0.39.1 ran correctly

We've decided to revert to the radix fork, for cuttlefish release.

We will consider upgrading to a newer version of wasmi in a future release.

Copy link

github-actions bot commented Nov 14, 2024

Docker tags
docker.io/radixdlt/private-scrypto-builder:12c0d94490

@iamyulong iamyulong marked this pull request as ready for review November 14, 2024 18:26
Copy link

Benchmark for 12c0d94

Click to view benchmark
Test Base PR %
costing::bench_prepare_wasm 44.6±0.09ms 47.8±0.16ms +7.17%
costing::decode_encoded_i8_array_to_manifest_raw_value 19.3±0.00ms 19.3±0.02ms 0.00%
costing::decode_encoded_i8_array_to_manifest_value 42.0±0.04ms 42.4±0.08ms +0.95%
costing::decode_encoded_tuple_array_to_manifest_raw_value 72.0±0.09ms 72.0±0.10ms 0.00%
costing::decode_encoded_tuple_array_to_manifest_value 121.2±1.04ms 120.5±1.12ms -0.58%
costing::decode_encoded_u8_array_to_manifest_raw_value 32.4±0.11µs 32.2±0.11µs -0.62%
costing::decode_encoded_u8_array_to_manifest_value 42.2±0.08ms 42.1±0.07ms -0.24%
costing::decode_rpd_to_manifest_raw_value 14.6±0.05µs 14.5±0.04µs -0.68%
costing::decode_rpd_to_manifest_value 10.5±0.01µs 10.9±0.02µs +3.81%
costing::deserialize_wasm 1246.1±5.40µs 1232.2±4.12µs -1.12%
costing::execute_transaction_creating_big_vec_substates 696.1±7.22ms 698.9±8.73ms +0.40%
costing::execute_transaction_reading_big_vec_substates 561.2±0.38ms 575.5±0.61ms +2.55%
costing::instantiate_flash_loan 895.4±499.16µs 3.5±0.06ms +290.89%
costing::instantiate_radiswap 1028.8±1145.62µs 3.5±0.08ms +240.20%
costing::scrypto_malloc 508.1±1.05ms 909.3±2.49ms +78.96%
costing::scrypto_sbor_decode 530.6±1.09ms 1037.5±3.22ms +95.53%
costing::scrypto_sha256 445.6±0.81ms 983.7±2.08ms +120.76%
costing::spin_loop_v1 434.4±0.73ms 655.2±0.93ms +50.83%
costing::spin_loop_v2 544.1±0.64ms 694.0±1.04ms +27.55%
costing::validate_sbor_payload 30.5±0.04µs 29.9±0.18µs -1.97%
costing::validate_sbor_payload_bytes 249.6±0.72ns 253.2±1.01ns +1.44%
costing::validate_secp256k1 76.7±0.04µs 76.7±0.59µs 0.00%
costing::validate_wasm 33.6±0.04ms 36.5±0.03ms +8.63%
decimal::add/0 8.4±0.00ns 8.4±0.00ns 0.00%
decimal::add/rust-native 9.8±0.00ns 9.8±0.01ns 0.00%
decimal::add/wasmi 223.4±0.34ns 702.3±2.60ns +214.37%
decimal::add/wasmi-call-native 2.2±0.01µs 6.1±0.02µs +177.27%
decimal::div/0 168.8±0.08ns 168.3±0.10ns -0.30%
decimal::from_string/0 156.4±0.11ns 155.5±0.30ns -0.58%
decimal::mul/0 129.3±0.08ns 129.3±0.06ns 0.00%
decimal::mul/rust-native 125.0±0.07ns 127.1±0.10ns +1.68%
decimal::mul/wasmi 11.3±0.17µs 50.1±0.14µs +343.36%
decimal::mul/wasmi-call-native 2.2±0.01µs 6.2±0.02µs +181.82%
decimal::pow/0 595.9±0.49ns 598.6±0.30ns +0.45%
decimal::pow/rust-native 593.4±0.39ns 586.4±0.54ns -1.18%
decimal::pow/wasmi 60.7±0.25µs 233.6±0.29µs +284.84%
decimal::pow/wasmi-call-native 3.3±0.01µs 10.2±0.04µs +209.09%
decimal::root/0 8.4±0.01µs 8.1±0.01µs -3.57%
decimal::sub/0 8.2±0.00ns 8.1±0.00ns -1.22%
decimal::to_string/0 439.7±1.19ns 442.9±1.02ns +0.73%
large_transaction_processing::prepare 2.5±0.00ms 2.6±0.00ms +4.00%
large_transaction_processing::prepare_and_decompile 7.1±0.02ms 6.4±0.04ms -9.86%
large_transaction_processing::prepare_and_decompile_and_recompile 31.3±1.13ms 31.1±1.37ms -0.64%
metadata_validation::validate_urls 4.7±0.07µs 4.8±0.01µs +2.13%
precise_decimal::add/0 8.7±0.04ns 9.0±0.15ns +3.45%
precise_decimal::add/rust-native 10.7±0.01ns 10.8±0.01ns +0.93%
precise_decimal::add/wasmi 278.7±1.44ns 897.8±2.44ns +222.14%
precise_decimal::add/wasmi-call-native 2.8±0.00µs 7.8±0.02µs +178.57%
precise_decimal::div/0 311.2±2.36ns 290.3±0.20ns -6.72%
precise_decimal::from_string/0 204.3±1.47ns 201.5±0.14ns -1.37%
precise_decimal::mul/0 334.2±0.89ns 338.3±0.57ns +1.23%
precise_decimal::mul/rust-native 283.2±0.44ns 284.1±0.43ns +0.32%
precise_decimal::mul/wasmi 33.4±0.17µs 122.6±0.28µs +267.07%
precise_decimal::mul/wasmi-call-native 3.2±0.00µs 8.2±0.02µs +156.25%
precise_decimal::pow/0 1718.1±0.73ns 1737.0±2.56ns +1.10%
precise_decimal::pow/rust-native 1364.2±0.84ns 1356.5±1.12ns -0.56%
precise_decimal::pow/wasmi 162.0±0.29µs 586.8±0.57µs +262.22%
precise_decimal::pow/wasmi-call-native 5.3±0.01µs 15.4±0.07µs +190.57%
precise_decimal::root/0 57.7±0.01µs 58.8±0.07µs +1.91%
precise_decimal::sub/0 9.0±0.15ns 9.1±0.06ns +1.11%
precise_decimal::to_string/0 697.0±0.29ns 694.3±0.46ns -0.39%
schema::validate_payload 381.4±0.45µs 390.7±0.93µs +2.44%
transaction::radiswap 4.8±0.02ms 5.4±0.02ms +12.50%
transaction::transfer 1826.8±3.44µs 1803.5±12.54µs -1.28%
transaction_validation::validate_manifest 43.1±0.03µs 43.7±0.19µs +1.39%
transaction_validation::verify_bls_2KB 1009.3±20.88µs 1068.0±13.72µs +5.82%
transaction_validation::verify_bls_32B 1006.0±12.98µs 1006.6±14.40µs +0.06%
transaction_validation::verify_ecdsa 74.6±0.04µs 74.6±0.06µs 0.00%
transaction_validation::verify_ed25519 42.4±0.08µs 50.2±0.25µs +18.40%

@iamyulong iamyulong merged commit dc0237d into release/cuttlefish Nov 15, 2024
31 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