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

Fixes after switching to rust 1.77.0 #1745

Merged
merged 2 commits into from
Mar 22, 2024

Conversation

lrubasze
Copy link
Contributor

@lrubasze lrubasze commented Mar 22, 2024

Summary

Fix issues caused by rust stable update from 1.76.0 to 1.77.0

  • Relax the RuntimeError size requirement in order to let the test_error_enum_sizes test pass and unblock failing CI.
    It started to fail after rust update to 1.77.0 (see changelog), which includes the change:
  • Use rust 1.76.0 by default in docker images
    With rust 1.77.0 WASM size is increased slightly causing job build-scrypto Check WASM size step to fail

@lrubasze lrubasze changed the title Fix - relax runtime error size requirement Relax RuntimeError size requirement Mar 22, 2024
Copy link

github-actions bot commented Mar 22, 2024

Docker tags
docker.io/radixdlt/private-scrypto-builder:352ce685d7

Copy link

github-actions bot commented Mar 22, 2024

Benchmark for 352ce68

Click to view benchmark
Test Base PR %
costing::bench_prepare_wasm 65.6±0.12ms 65.7±0.16ms +0.15%
costing::decode_sbor 11.0±0.01µs 10.9±0.05µs -0.91%
costing::decode_sbor_bytes 29.2±0.16µs 29.2±0.14µs 0.00%
costing::deserialize_wasm 1280.1±1.78µs 1272.4±5.14µs -0.60%
costing::instantiate_flash_loan 4.1±0.73ms 3.9±0.50ms -4.88%
costing::instantiate_radiswap 5.8±0.08ms 5.9±0.08ms +1.72%
costing::spin_loop 21.6±0.06ms 21.9±0.15ms +1.39%
costing::validate_sbor_payload 27.8±0.05µs 27.6±0.18µs -0.72%
costing::validate_sbor_payload_bytes 238.3±0.75ns 243.7±0.51ns +2.27%
costing::validate_secp256k1 76.4±0.23µs 76.4±0.08µs 0.00%
costing::validate_wasm 36.5±0.06ms 37.1±0.05ms +1.64%
decimal::add/0 8.4±0.09ns 8.5±0.04ns +1.19%
decimal::add/rust-native 9.8±0.00ns 9.8±0.01ns 0.00%
decimal::add/wasmer 111.7±0.07ns 110.2±0.04ns -1.34%
decimal::add/wasmer-call-native 420.9±0.16ns 419.9±0.23ns -0.24%
decimal::add/wasmi 609.9±1.03ns 610.2±1.34ns +0.05%
decimal::add/wasmi-call-native 4.7±0.00µs 4.7±0.01µs 0.00%
decimal::div/0 179.5±0.47ns 180.1±0.30ns +0.33%
decimal::from_string/0 151.1±0.12ns 150.8±0.19ns -0.20%
decimal::mul/0 139.6±0.21ns 139.7±0.29ns +0.07%
decimal::mul/rust-native 136.8±0.07ns 136.7±0.05ns -0.07%
decimal::mul/wasmer 1518.7±0.74ns 1484.6±1.02ns -2.25%
decimal::mul/wasmer-call-native 551.9±0.76ns 550.4±0.60ns -0.27%
decimal::mul/wasmi 41.8±0.06µs 41.5±0.16µs -0.72%
decimal::mul/wasmi-call-native 5.3±0.01µs 4.9±0.01µs -7.55%
decimal::pow/0 660.0±1.14ns 659.8±0.63ns -0.03%
decimal::pow/rust-native 630.0±0.99ns 630.2±0.45ns +0.03%
decimal::pow/wasmer 6.8±0.00µs 6.6±0.01µs -2.94%
decimal::pow/wasmer-call-native 986.6±0.63ns 987.1±0.25ns +0.05%
decimal::pow/wasmi 194.5±0.44µs 192.9±1.22µs -0.82%
decimal::pow/wasmi-call-native 4.6±0.00µs 4.6±0.01µs 0.00%
decimal::root/0 8.0±0.02µs 8.2±0.01µs +2.50%
decimal::sub/0 8.5±0.01ns 8.5±0.01ns 0.00%
decimal::to_string/0 442.7±1.94ns 453.1±1.23ns +2.35%
precise_decimal::add/0 9.4±0.01ns 9.4±0.01ns 0.00%
precise_decimal::add/rust-native 11.6±0.01ns 11.6±0.03ns 0.00%
precise_decimal::add/wasmer 115.1±0.09ns 114.0±0.07ns -0.96%
precise_decimal::add/wasmer-call-native 435.1±0.29ns 432.5±0.43ns -0.60%
precise_decimal::add/wasmi 789.9±1.77ns 793.5±3.80ns +0.46%
precise_decimal::add/wasmi-call-native 5.1±0.00µs 5.1±0.02µs 0.00%
precise_decimal::div/0 295.5±0.29ns 295.5±0.26ns 0.00%
precise_decimal::from_string/0 194.0±0.26ns 198.5±0.19ns +2.32%
precise_decimal::mul/0 325.2±3.10ns 326.2±1.34ns +0.31%
precise_decimal::mul/rust-native 292.4±0.22ns 292.3±0.60ns -0.03%
precise_decimal::mul/wasmer 3.5±0.00µs 3.5±0.00µs 0.00%
precise_decimal::mul/wasmer-call-native 740.3±0.94ns 738.5±1.58ns -0.24%
precise_decimal::mul/wasmi 105.9±0.18µs 104.8±0.48µs -1.04%
precise_decimal::mul/wasmi-call-native 5.5±0.01µs 5.5±0.03µs 0.00%
precise_decimal::pow/0 1753.9±2.91ns 1758.0±6.40ns +0.23%
precise_decimal::pow/rust-native 1412.0±1.57ns 1404.6±1.78ns -0.52%
precise_decimal::pow/wasmer 16.4±0.02µs 16.4±0.00µs 0.00%
precise_decimal::pow/wasmer-call-native 1957.9±1.80ns 1969.6±1.27ns +0.60%
precise_decimal::pow/wasmi 509.0±0.59µs 508.2±1.05µs -0.16%
precise_decimal::pow/wasmi-call-native 10.9±0.02µs 10.9±0.07µs 0.00%
precise_decimal::root/0 57.2±0.02µs 56.2±0.03µs -1.75%
precise_decimal::sub/0 9.4±0.02ns 9.4±0.03ns 0.00%
precise_decimal::to_string/0 709.8±1.66ns 710.1±1.06ns +0.04%
schema::validate_payload 340.6±0.43µs 340.5±0.49µs -0.03%
transaction::radiswap 5.3±0.02ms 5.3±0.03ms 0.00%
transaction::transfer 1756.1±7.76µs 1762.2±17.83µs +0.35%
transaction_processing::prepare 2.2±0.00ms 2.2±0.00ms 0.00%
transaction_processing::prepare_and_decompile 5.9±0.01ms 5.9±0.02ms 0.00%
transaction_processing::prepare_and_decompile_and_recompile 22.0±0.05ms 22.6±0.03ms +2.73%
transaction_validation::validate_manifest 42.2±0.02µs 42.3±0.04µs +0.24%
transaction_validation::verify_bls_2KB 1055.2±110.48µs 1051.3±90.65µs -0.37%
transaction_validation::verify_bls_32B 1060.1±87.68µs 1054.2±82.19µs -0.56%
transaction_validation::verify_ecdsa 74.2±0.07µs 74.2±0.33µs 0.00%
transaction_validation::verify_ed25519 55.4±0.04µs 55.1±0.59µs -0.54%

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.

Please verify if the size increase is material. If not, feel free to merge.

@lrubasze
Copy link
Contributor Author

Please verify if the size increase is material. If not, feel free to merge.

It increased.
Used to be 153482 bytes, now it is 155046 bytes.
Root cause: slim-bullseye image tag indicates now the image with rust 1.77.0 and not 1.76.0 as so far.

@lrubasze lrubasze changed the title Relax RuntimeError size requirement Fixes after switching to rust 1.77.0 Mar 22, 2024
@lrubasze lrubasze merged commit d81bcfd into develop Mar 22, 2024
28 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