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

Fix resim buckets parsing #1653

Merged
merged 3 commits into from
Nov 23, 2023
Merged

Fix resim buckets parsing #1653

merged 3 commits into from
Nov 23, 2023

Conversation

lrubasze
Copy link
Contributor

@lrubasze lrubasze commented Nov 22, 2023

Summary

Add support for missing types: FungibleBucket and NonFungibleBucket

Testing

Respective tests added

Copy link
Contributor

@dhedey dhedey left a comment

Choose a reason for hiding this comment

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

Nice! Thanks

)) if package_address == Some(RESOURCE_PACKAGE)
&& bp_name == FUNGIBLE_BUCKET_BLUEPRINT =>
{
"FungibleBucket".to_owned()
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice! :). How did you spot this out of interest?

We should probably also handle FungibleProof/NonFungibleProof/FungibleVault/NonFungibleVault/FungibleResourceManager/NonFungibleResourceManager too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks :)
I was checking where else OwnValidation::IsBucket enum variant is used and found this one.

I will add those missing ones in separate PR if that's ok.

Copy link

Benchmark for 662b660

Click to view benchmark
Test Base PR %
costing::bench_prepare_wasm 75.1±0.99ms 75.7±0.38ms +0.80%
costing::decode_sbor 16.5±0.02µs 16.6±0.04µs +0.61%
costing::decode_sbor_bytes 51.6±0.55µs 52.0±0.15µs +0.78%
costing::deserialize_wasm 1414.4±8.04µs 1412.8±21.97µs -0.11%
costing::instantiate_flash_loan 4.5±0.70ms 4.4±0.53ms -2.22%
costing::instantiate_radiswap 6.8±0.07ms 6.9±0.05ms +1.47%
costing::spin_loop 27.6±0.25ms 28.6±0.29ms +3.62%
costing::validate_sbor_payload 31.4±0.04µs 32.3±0.60µs +2.87%
costing::validate_sbor_payload_bytes 411.4±8.85ns 394.2±3.48ns -4.18%
costing::validate_secp256k1 87.4±0.07µs 87.4±0.10µs 0.00%
costing::validate_wasm 44.2±0.37ms 44.3±0.10ms +0.23%
decimal::add/0 9.3±0.02ns 9.3±0.00ns 0.00%
decimal::add/rust-native 10.8±0.00ns 10.8±0.01ns 0.00%
decimal::add/wasmer 138.3±0.40ns 133.5±0.73ns -3.47%
decimal::add/wasmer-call-native 550.8±0.69ns 556.4±4.34ns +1.02%
decimal::add/wasmi 987.8±12.78ns 978.0±6.60ns -0.99%
decimal::add/wasmi-call-native 10.6±0.07µs 10.7±0.08µs +0.94%
decimal::div/0 198.0±2.22ns 199.1±0.21ns +0.56%
decimal::from_string/0 169.4±0.32ns 169.8±0.14ns +0.24%
decimal::mul/0 156.4±0.34ns 156.5±0.27ns +0.06%
decimal::mul/rust-native 152.1±0.47ns 155.0±0.12ns +1.91%
decimal::mul/wasmer 1687.6±0.45ns 1687.3±0.99ns -0.02%
decimal::mul/wasmer-call-native 710.0±1.25ns 713.1±1.55ns +0.44%
decimal::mul/wasmi 75.3±0.06µs 76.4±0.30µs +1.46%
decimal::mul/wasmi-call-native 10.7±0.02µs 10.8±0.04µs +0.93%
decimal::pow/0 722.0±7.52ns 727.5±0.53ns +0.76%
decimal::pow/rust-native 701.1±0.88ns 699.8±0.60ns -0.19%
decimal::pow/wasmer 7.3±0.01µs 7.3±0.00µs 0.00%
decimal::pow/wasmer-call-native 1164.5±1.52ns 1192.6±1.46ns +2.41%
decimal::pow/wasmi 350.8±0.24µs 350.4±0.62µs -0.11%
decimal::pow/wasmi-call-native 9.3±0.02µs 9.2±0.04µs -1.08%
decimal::root/0 9.5±0.03µs 9.6±0.01µs +1.05%
decimal::sub/0 9.4±0.01ns 9.4±0.02ns 0.00%
decimal::to_string/0 487.0±0.54ns 485.0±0.48ns -0.41%
precise_decimal::add/0 10.4±0.04ns 10.5±0.08ns +0.96%
precise_decimal::add/rust-native 12.4±0.00ns 12.4±0.00ns 0.00%
precise_decimal::add/wasmer 134.1±0.24ns 134.7±0.19ns +0.45%
precise_decimal::add/wasmer-call-native 600.3±2.34ns 575.3±0.52ns -4.16%
precise_decimal::add/wasmi 1238.0±5.70ns 1230.8±3.01ns -0.58%
precise_decimal::add/wasmi-call-native 11.3±0.02µs 11.3±0.11µs 0.00%
precise_decimal::div/0 325.2±0.54ns 325.2±0.67ns 0.00%
precise_decimal::from_string/0 215.5±0.25ns 215.3±0.22ns -0.09%
precise_decimal::mul/0 354.4±1.86ns 352.4±2.95ns -0.56%
precise_decimal::mul/rust-native 333.2±3.84ns 339.7±3.39ns +1.95%
precise_decimal::mul/wasmer 3.8±0.00µs 3.8±0.00µs 0.00%
precise_decimal::mul/wasmer-call-native 948.0±1.33ns 959.6±1.02ns +1.22%
precise_decimal::mul/wasmi 184.3±0.95µs 185.5±0.11µs +0.65%
precise_decimal::mul/wasmi-call-native 11.9±0.13µs 11.7±0.04µs -1.68%
precise_decimal::pow/0 1935.8±6.35ns 1934.6±8.99ns -0.06%
precise_decimal::pow/rust-native 1586.8±3.55ns 1581.5±2.00ns -0.33%
precise_decimal::pow/wasmer 17.9±0.05µs 18.0±0.06µs +0.56%
precise_decimal::pow/wasmer-call-native 2.3±0.02µs 2.4±0.02µs +4.35%
precise_decimal::pow/wasmi 893.1±3.61µs 910.4±0.43µs +1.94%
precise_decimal::pow/wasmi-call-native 20.2±0.04µs 20.4±0.10µs +0.99%
precise_decimal::root/0 66.3±0.09µs 66.4±0.07µs +0.15%
precise_decimal::sub/0 10.4±0.04ns 10.4±0.02ns 0.00%
precise_decimal::to_string/0 787.4±1.29ns 788.2±3.54ns +0.10%
schema::validate_payload 353.6±0.77µs 347.0±0.47µs -1.87%
transaction::radiswap 6.3±0.08ms 6.3±0.07ms 0.00%
transaction::transfer 2.0±0.01ms 2.0±0.00ms 0.00%
transaction_processing::prepare 3.1±0.01ms 3.1±0.01ms 0.00%
transaction_processing::prepare_and_decompile 7.2±0.02ms 7.4±0.03ms +2.78%
transaction_processing::prepare_and_decompile_and_recompile 26.7±0.14ms 27.8±0.12ms +4.12%
transaction_validation::validate_manifest 48.8±0.04µs 48.9±0.04µs +0.20%
transaction_validation::verify_ecdsa 85.1±0.10µs 85.2±0.11µs +0.12%
transaction_validation::verify_ed25519 60.7±0.47µs 60.7±0.11µs 0.00%

@lrubasze lrubasze merged commit bce6a7b into develop Nov 23, 2023
25 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