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

[ON HOLD] declare_native_blueprint_state extensions #1744

Draft
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

dhedey
Copy link
Contributor

@dhedey dhedey commented Mar 22, 2024

Summary

DRAFT PR.

Replaces / rebases the key parts of #1318 - some of this still needs to go.

Still to come:

  • Remove the partition-related stuff and flashing-related stuff.
  • Implement Typed API, MutableTypedField etc
  • Trial XStateInit, and the typed API in new native blueprints
  • ... and when we next create a V2 of a native blueprint, consider moving it across to the nicer APIs.

Details

INSTRUCTIONS:
Provide further details about the changes, or how they fit into the roadmap.
You can delete this section if it's not useful.

Testing

INSTRUCTIONS:
Further details about the tests you've added or manually performed.
You can delete this section if it's not useful.

Update Recommendations

INSTRUCTIONS:
This section is to provide recommendations to consumers of this repo about how they
should handle breaking changes, or integrate new features. The two key stakeholder
groups are dApp Developers and Internal Integrators, and there are separate sections
for each.

In order to allow us to compile aggregated update instructions across PRs, please tag the PR
with 0+ of the relevant labels:
* scrypto-lib - Any change to the scrypto library
* sbor - Any breaking change to SBOR encoding/decoding
* manifest - Any change to manifest display, compilation/decompilation
* transaction - Any change which affects the compiled manifest, or transaction semantics
* substate - Any change to substates, the state model, or what's stored in the DB
* native-blueprint-interface - Any change to the interface of native blueprints
* files-moved - Any change to where engine types have moved, which will require
  internal integrators to update their imports

If you have a breaking change which doesn't fix into a category above, then tag it with
the closest label, and discuss in slack/discord.

If your PR contains no breaking changes or new features or hasn't been tagged, this whole
section can be deleted.

For dApp Developers

INSTRUCTIONS:
Migration recommendations for a dApp developer to update their dApp/integrations
due to to the change/s in this PR.

These will be aggregated by the Developer Ecosystem team and included in the next Scrypto migration guide
(eg https://docs-babylon.radixdlt.com/main/scrypto/release_notes/migrating_from_0.7_to_0.8.html )

For Internal Integrators

INSTRUCTIONS:
Instructions to any internal integrations (eg Node, Toolkit, Gateway, Ledger App) for how the changes may affect
them and recommendations for how they should update to support this change.

Copy link

github-actions bot commented Mar 22, 2024

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

Copy link

github-actions bot commented Mar 22, 2024

Benchmark for bbba81e

Click to view benchmark
Test Base PR %
costing::bench_prepare_wasm 65.6±0.19ms 66.5±0.13ms +1.37%
costing::decode_sbor 10.7±0.06µs 10.9±0.04µs +1.87%
costing::decode_sbor_bytes 29.8±0.25µs 29.9±0.30µs +0.34%
costing::deserialize_wasm 1281.0±4.75µs 1306.7±3.28µs +2.01%
costing::instantiate_flash_loan 3.9±0.69ms 3.9±0.73ms 0.00%
costing::instantiate_radiswap 5.8±0.07ms 5.7±0.07ms -1.72%
costing::spin_loop 21.9±0.15ms 21.6±0.06ms -1.37%
costing::validate_sbor_payload 27.4±0.09µs 27.3±0.05µs -0.36%
costing::validate_sbor_payload_bytes 219.7±2.44ns 234.4±0.97ns +6.69%
costing::validate_secp256k1 76.2±0.34µs 76.2±0.26µs 0.00%
costing::validate_wasm 36.5±0.03ms 36.9±0.03ms +1.10%
decimal::add/0 8.4±0.00ns 8.4±0.01ns 0.00%
decimal::add/rust-native 9.8±0.01ns 9.8±0.02ns 0.00%
decimal::add/wasmer 111.3±0.07ns 117.5±0.17ns +5.57%
decimal::add/wasmer-call-native 429.2±0.49ns 433.0±0.48ns +0.89%
decimal::add/wasmi 628.6±1.54ns 656.9±3.81ns +4.50%
decimal::add/wasmi-call-native 4.6±0.01µs 4.9±0.01µs +6.52%
decimal::div/0 181.0±0.19ns 179.6±0.23ns -0.77%
decimal::from_string/0 151.1±0.21ns 150.2±0.24ns -0.60%
decimal::mul/0 141.6±0.14ns 139.3±0.23ns -1.62%
decimal::mul/rust-native 136.8±0.22ns 142.6±0.03ns +4.24%
decimal::mul/wasmer 1515.3±0.97ns 1510.8±1.06ns -0.30%
decimal::mul/wasmer-call-native 573.8±0.68ns 561.6±0.35ns -2.13%
decimal::mul/wasmi 41.5±0.17µs 43.1±0.08µs +3.86%
decimal::mul/wasmi-call-native 4.8±0.00µs 5.0±0.01µs +4.17%
decimal::pow/0 654.3±0.53ns 657.0±0.59ns +0.41%
decimal::pow/rust-native 628.4±0.30ns 633.3±0.51ns +0.78%
decimal::pow/wasmer 6.6±0.00µs 6.6±0.01µs 0.00%
decimal::pow/wasmer-call-native 996.6±0.66ns 1014.6±1.65ns +1.81%
decimal::pow/wasmi 196.4±0.44µs 204.0±0.38µs +3.87%
decimal::pow/wasmi-call-native 4.7±0.01µs 4.9±0.00µs +4.26%
decimal::root/0 8.0±0.01µs 8.1±0.02µs +1.25%
decimal::sub/0 8.5±0.01ns 8.5±0.01ns 0.00%
decimal::to_string/0 441.7±0.41ns 440.5±0.16ns -0.27%
precise_decimal::add/0 9.5±0.00ns 9.4±0.01ns -1.05%
precise_decimal::add/rust-native 11.4±0.00ns 11.4±0.00ns 0.00%
precise_decimal::add/wasmer 115.7±0.12ns 122.6±0.23ns +5.96%
precise_decimal::add/wasmer-call-native 434.8±0.89ns 442.9±0.85ns +1.86%
precise_decimal::add/wasmi 786.5±1.45ns 828.2±0.78ns +5.30%
precise_decimal::add/wasmi-call-native 5.0±0.01µs 5.3±0.01µs +6.00%
precise_decimal::div/0 295.4±0.38ns 303.2±0.39ns +2.64%
precise_decimal::from_string/0 194.4±0.26ns 201.4±0.94ns +3.60%
precise_decimal::mul/0 313.5±0.84ns 315.8±2.22ns +0.73%
precise_decimal::mul/rust-native 294.0±0.75ns 311.8±2.19ns +6.05%
precise_decimal::mul/wasmer 3.4±0.00µs 3.5±0.00µs +2.94%
precise_decimal::mul/wasmer-call-native 756.0±5.51ns 828.2±1.61ns +9.55%
precise_decimal::mul/wasmi 105.2±0.18µs 110.4±0.20µs +4.94%
precise_decimal::mul/wasmi-call-native 5.4±0.01µs 5.7±0.01µs +5.56%
precise_decimal::pow/0 1760.8±7.68ns 1774.1±4.95ns +0.76%
precise_decimal::pow/rust-native 1424.0±5.08ns 1404.0±3.31ns -1.40%
precise_decimal::pow/wasmer 16.3±0.01µs 16.6±0.01µs +1.84%
precise_decimal::pow/wasmer-call-native 2.0±0.00µs 2.1±0.00µs +5.00%
precise_decimal::pow/wasmi 509.3±3.11µs 529.1±0.89µs +3.89%
precise_decimal::pow/wasmi-call-native 10.6±0.02µs 11.4±0.02µs +7.55%
precise_decimal::root/0 56.4±0.01µs 56.6±0.03µs +0.35%
precise_decimal::sub/0 9.5±0.00ns 9.5±0.01ns 0.00%
precise_decimal::to_string/0 707.7±1.13ns 724.2±1.24ns +2.33%
schema::validate_payload 344.5±0.45µs 377.4±0.79µs +9.55%
transaction::radiswap 5.3±0.02ms 5.3±0.02ms 0.00%
transaction::transfer 1736.9±8.08µs 1742.6±12.52µs +0.33%
transaction_processing::prepare 2.2±0.00ms 2.2±0.01ms 0.00%
transaction_processing::prepare_and_decompile 6.0±0.05ms 6.0±0.04ms 0.00%
transaction_processing::prepare_and_decompile_and_recompile 27.2±2.52ms 29.8±1.93ms +9.56%
transaction_validation::validate_manifest 42.1±0.03µs 42.0±0.20µs -0.24%
transaction_validation::verify_bls_2KB 1024.6±39.37µs 1006.4±27.68µs -1.78%
transaction_validation::verify_bls_32B 1021.2±29.67µs 1027.7±43.42µs +0.64%
transaction_validation::verify_ecdsa 74.3±0.06µs 74.2±0.10µs -0.13%
transaction_validation::verify_ed25519 54.8±0.72µs 54.7±0.06µs -0.18%

@dhedey dhedey changed the title [DRAFT] declare_native_blueprint_state extensions [ON HOLD] declare_native_blueprint_state extensions Sep 3, 2024
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.

1 participant