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

tests: Add further subintent and verify parent auth tests #2010

Merged

Conversation

dhedey
Copy link
Contributor

@dhedey dhedey commented Nov 21, 2024

Summary

Adds tests:

  • subintent_processor_uses_transaction_processor_global_caller()
  • subintent_should_not_be_able_to_use_proofs_from_other_subintents()
  • verify_parent_should_only_work_against_proofs_in_parent_intent()

Also adds a crate::prelude::* for the radix-engine-tests, and a few new methods on transaction builder to reduce the boilerplate of making empty test subintents.

Copy link

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

Copy link

Benchmark for efa5dc1

Click to view benchmark
Test Base PR %
costing::bench_prepare_wasm 45.4±0.11ms 45.2±0.24ms -0.44%
costing::decode_encoded_i8_array_to_manifest_raw_value 19.5±0.23ms 19.6±0.02ms +0.51%
costing::decode_encoded_i8_array_to_manifest_value 41.4±0.05ms 42.2±0.07ms +1.93%
costing::decode_encoded_tuple_array_to_manifest_raw_value 61.0±0.22ms 63.3±0.08ms +3.77%
costing::decode_encoded_tuple_array_to_manifest_value 98.3±0.15ms 97.7±0.20ms -0.61%
costing::decode_encoded_u8_array_to_manifest_raw_value 25.9±0.08µs 25.6±0.11µs -1.16%
costing::decode_encoded_u8_array_to_manifest_value 41.4±0.14ms 42.0±0.04ms +1.45%
costing::decode_rpd_to_manifest_raw_value 12.8±0.05µs 12.5±0.04µs -2.34%
costing::decode_rpd_to_manifest_value 11.0±0.02µs 11.1±0.05µs +0.91%
costing::deserialize_wasm 1233.0±3.70µs 1240.8±3.51µs +0.63%
costing::execute_transaction_creating_big_vec_substates 688.8±7.58ms 696.2±9.15ms +1.07%
costing::execute_transaction_reading_big_vec_substates 584.9±1.23ms 596.1±2.44ms +1.91%
costing::instantiate_flash_loan 847.1±254.38µs 818.9±215.19µs -3.33%
costing::instantiate_radiswap 1070.7±1797.31µs 901.0±487.74µs -15.85%
costing::scrypto_malloc 672.4±1.98ms 713.1±3.08ms +6.05%
costing::scrypto_sbor_decode 665.0±1.25ms 681.3±2.56ms +2.45%
costing::scrypto_sha256 598.9±1.16ms 604.6±0.84ms +0.95%
costing::spin_loop_v1 509.5±3.65ms 556.6±0.63ms +9.24%
costing::spin_loop_v2 600.3±5.80ms 635.2±0.87ms +5.81%
costing::validate_sbor_payload 30.0±0.10µs 29.4±0.05µs -2.00%
costing::validate_sbor_payload_bytes 246.7±2.62ns 246.7±2.41ns 0.00%
costing::validate_secp256k1 76.5±0.07µs 76.5±0.05µs 0.00%
costing::validate_wasm 33.9±0.04ms 34.0±0.05ms +0.29%
decimal::add/0 8.4±0.00ns 8.4±0.00ns 0.00%
decimal::add/rust-native 9.8±0.00ns 9.8±0.00ns 0.00%
decimal::add/wasmi 311.7±1.27ns 328.6±1.81ns +5.42%
decimal::add/wasmi-call-native 2.9±0.01µs 2.9±0.01µs 0.00%
decimal::div/0 168.3±0.13ns 168.7±0.15ns +0.24%
decimal::from_string/0 156.6±0.11ns 156.0±0.07ns -0.38%
decimal::mul/0 128.2±0.06ns 129.2±0.06ns +0.78%
decimal::mul/rust-native 125.1±0.06ns 127.0±0.12ns +1.52%
decimal::mul/wasmi 18.9±0.18µs 18.9±0.03µs 0.00%
decimal::mul/wasmi-call-native 3.1±0.00µs 3.0±0.00µs -3.23%
decimal::pow/0 594.7±0.46ns 596.5±0.73ns +0.30%
decimal::pow/rust-native 594.0±0.56ns 592.7±0.19ns -0.22%
decimal::pow/wasmi 91.1±0.19µs 90.8±0.13µs -0.33%
decimal::pow/wasmi-call-native 4.9±0.02µs 4.7±0.02µs -4.08%
decimal::root/0 8.1±0.01µs 8.0±0.01µs -1.23%
decimal::sub/0 8.2±0.00ns 8.2±0.00ns 0.00%
decimal::to_string/0 437.5±0.66ns 442.1±0.62ns +1.05%
large_transaction_processing::prepare 2.6±0.00ms 2.6±0.00ms 0.00%
large_transaction_processing::prepare_and_decompile 6.2±0.04ms 6.2±0.02ms 0.00%
large_transaction_processing::prepare_and_decompile_and_recompile 31.7±0.47ms 26.9±2.05ms -15.14%
metadata_validation::validate_urls 4.9±0.05µs 4.8±0.03µs -2.04%
precise_decimal::add/0 8.9±0.01ns 8.7±0.06ns -2.25%
precise_decimal::add/rust-native 10.6±0.01ns 10.7±0.08ns +0.94%
precise_decimal::add/wasmi 421.6±2.84ns 420.6±1.41ns -0.24%
precise_decimal::add/wasmi-call-native 3.8±0.01µs 3.8±0.00µs 0.00%
precise_decimal::div/0 312.4±2.64ns 292.1±1.61ns -6.50%
precise_decimal::from_string/0 202.5±0.17ns 203.6±0.53ns +0.54%
precise_decimal::mul/0 335.1±1.45ns 331.3±0.69ns -1.13%
precise_decimal::mul/rust-native 283.4±0.27ns 287.4±0.36ns +1.41%
precise_decimal::mul/wasmi 47.7±0.27µs 47.6±0.11µs -0.21%
precise_decimal::mul/wasmi-call-native 4.2±0.00µs 4.2±0.02µs 0.00%
precise_decimal::pow/0 1719.8±1.64ns 1736.4±3.93ns +0.97%
precise_decimal::pow/rust-native 1355.8±1.96ns 1354.2±0.82ns -0.12%
precise_decimal::pow/wasmi 229.6±0.39µs 230.1±0.95µs +0.22%
precise_decimal::pow/wasmi-call-native 7.7±0.01µs 7.4±0.01µs -3.90%
precise_decimal::root/0 58.1±0.03µs 57.5±0.03µs -1.03%
precise_decimal::sub/0 9.2±0.19ns 8.9±0.04ns -3.26%
precise_decimal::to_string/0 699.2±0.26ns 698.0±0.44ns -0.17%
schema::validate_payload 380.8±0.77µs 381.2±0.64µs +0.11%
transaction::radiswap 4.9±0.02ms 4.9±0.02ms 0.00%
transaction::transfer 1788.4±2.16µs 1806.5±3.57µs +1.01%
transaction_validation::validate_manifest 43.0±0.15µs 42.9±0.04µs -0.23%
transaction_validation::verify_bls_2KB 950.8±6.80µs 964.3±6.06µs +1.42%
transaction_validation::verify_bls_32B 956.5±62.86µs 966.2±14.76µs +1.01%
transaction_validation::verify_ecdsa 74.5±0.05µs 74.4±0.08µs -0.13%
transaction_validation::verify_ed25519 42.3±0.08µs 42.4±0.08µs +0.24%

@dhedey dhedey merged commit 4733ad7 into release/cuttlefish Nov 22, 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