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

Add register_erc20_asset and update_erc20_asset #1731

Merged
merged 4 commits into from
Dec 25, 2021

Conversation

zjb0807
Copy link
Member

@zjb0807 zjb0807 commented Dec 24, 2021

Closes: #1728
Closes: #1361

@zjb0807 zjb0807 requested a review from xlc December 24, 2021 09:05
@zjb0807
Copy link
Member Author

zjb0807 commented Dec 24, 2021

/bench runtime karura module_asset_registry

@ghost
Copy link

ghost commented Dec 24, 2021

Finished benchmark for branch: asset-registry-add-erc20

Benchmark: Benchmark Runtime Karura Module

cargo run --release --color=never --bin=acala --features=runtime-benchmarks --features=with-karura-runtime -- benchmark --chain=karura-dev --steps=50 --repeat=20 --pallet=module_asset_registry --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/karura/src/weights/

Results

Pallet: "module_asset_registry", Extrinsic: "register_foreign_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: AssetRegistry NextForeignAssetId (r:1 w:1)
Storage: AssetRegistry LocationToCurrencyIds (r:1 w:1)
Storage: AssetRegistry ForeignAssetLocations (r:1 w:1)
Storage: AssetRegistry AssetMetadatas (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 40.58
µs

Reads = 4
Writes = 4

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 40.58
µs

Reads = 4
Writes = 4

Pallet: "module_asset_registry", Extrinsic: "update_foreign_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: AssetRegistry ForeignAssetLocations (r:1 w:1)
Storage: AssetRegistry AssetMetadatas (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 35.72
µs

Reads = 2
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 35.72
µs

Reads = 2
Writes = 2

Pallet: "module_asset_registry", Extrinsic: "register_stable_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: AssetRegistry NextStableAssetId (r:1 w:1)
Storage: AssetRegistry AssetMetadatas (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 28.13
µs

Reads = 2
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 28.13
µs

Reads = 2
Writes = 2

Pallet: "module_asset_registry", Extrinsic: "update_stable_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: AssetRegistry AssetMetadatas (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 25.97
µs

Reads = 1
Writes = 1

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 25.97
µs

Reads = 1
Writes = 1

@zjb0807
Copy link
Member Author

zjb0807 commented Dec 24, 2021

/bench runtime acala module_asset_registry

@ghost
Copy link

ghost commented Dec 24, 2021

Finished benchmark for branch: asset-registry-add-erc20

Benchmark: Benchmark Runtime Acala Module

cargo run --release --color=never --bin=acala --features=runtime-benchmarks --features=with-acala-runtime -- benchmark --chain=acala-latest --steps=50 --repeat=20 --pallet=module_asset_registry --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/acala/src/weights/

Results

Compiling karura-runtime v2.1.1 (/app/git/Acala/runtime/karura)
error: failed to run custom build command for karura-runtime v2.1.1 (/app/git/Acala/runtime/karura)

Caused by:
process didn't exit successfully: /app/git/Acala/target/release/build/karura-runtime-20375bca2d25b1f6/build-script-build (exit status: 1)
--- stdout
�[1;33mInformation that should be included in a bug report.�[0m
�[1;33mExecuting build command:�[0m "/root/.rustup/toolchains/nightly-2021-11-07-x86_64-unknown-linux-gnu/bin/cargo" "rustc" "--target=wasm32-unknown-unknown" "--manifest-path=/app/git/Acala/target/release/wbuild/karura-runtime/Cargo.toml" "--color=always" "--release"
�[1;33mUsing rustc version:�[0m rustc 1.58.0-nightly (072799443 2021-11-06)

--- stderr
�[0m�[0m�[1m�[33mwarning�[0m�[1m:�[0m Patch frame-benchmarking-cli v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch frame-system-benchmarking v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch frame-try-runtime v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch pallet-authority-discovery v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch pallet-babe v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch pallet-election-provider-multi-phase v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch pallet-elections-phragmen v5.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch pallet-gilt v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch pallet-grandpa v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch pallet-identity v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch pallet-im-online v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch pallet-indices v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch pallet-mmr v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch pallet-mmr-primitives v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch pallet-mmr-rpc v3.0.0 (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch pallet-nicks v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch pallet-offences v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch pallet-offences-benchmarking v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch pallet-recovery v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch pallet-session-benchmarking v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch pallet-society v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch pallet-staking-reward-fn v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch pallet-transaction-payment-rpc v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch pallet-vesting v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch remote-externalities v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-authority-discovery v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-basic-authorship v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-block-builder v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-chain-spec v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-cli v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-client-api v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-client-db v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-consensus v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-consensus-aura v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-consensus-babe v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-consensus-babe-rpc v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-consensus-epochs v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-consensus-manual-seal v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-consensus-slots v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-consensus-uncles v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-executor v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-executor-common v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-executor-wasmtime v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-finality-grandpa v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-finality-grandpa-rpc v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-informant v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-keystore v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-network v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-network-gossip v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-network-test v0.8.0 (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-offchain v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-rpc v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-rpc-api v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-rpc-server v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-service v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-sync-state-rpc v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-telemetry v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-tracing v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-transaction-pool v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-transaction-pool-api v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sc-utils v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sp-blockchain v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sp-consensus v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sp-consensus-babe v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sp-consensus-vrf v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sp-finality-grandpa v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sp-keyring v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sp-keystore v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sp-rpc v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch sp-serializer v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch substrate-build-script-utils v3.0.0 (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch substrate-frame-rpc-system v4.0.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch substrate-prometheus-endpoint v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch substrate-test-runtime v2.0.0 (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch substrate-test-runtime-client v2.0.0 (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch try-runtime-cli v0.10.0-dev (https://github.com/paritytech//substrate?rev=fcc54a72973d03afe7bf9e3ef2736050b3f33465#fcc54a72) was not used in the crate graph.
Patch cumulus-client-cli v0.1.0 (https://github.com/paritytech//cumulus?rev=0be8e8fc214641e306e4f913dd64ff1913e46e95#0be8e8fc) was not used in the crate graph.
Patch cumulus-client-consensus-aura v0.1.0 (https://github.com/paritytech//cumulus?rev=0be8e8fc214641e306e4f913dd64ff1913e46e95#0be8e8fc) was not used in the crate graph.
Patch cumulus-client-consensus-common v0.1.0 (https://github.com/paritytech//cumulus?rev=0be8e8fc214641e306e4f913dd64ff1913e46e95#0be8e8fc) was not used in the crate graph.
Patch cumulus-client-consensus-relay-chain v0.1.0 (https://github.com/paritytech//cumulus?rev=0be8e8fc214641e306e4f913dd64ff1913e46e95#0be8e8fc) was not used in the crate graph.
Patch cumulus-client-network v0.1.0 (https://github.com/paritytech//cumulus?rev=0be8e8fc214641e306e4f913dd64ff1913e46e95#0be8e8fc) was not used in the crate graph.
Patch cumulus-client-service v0.1.0 (https://github.com/paritytech//cumulus?rev=0be8e8fc214641e306e4f913dd64ff1913e46e95#0be8e8fc) was not used in the crate graph.
Patch cumulus-test-relay-sproof-builder v0.1.0 (https://github.com/paritytech//cumulus?rev=0be8e8fc214641e306e4f913dd64ff1913e46e95#0be8e8fc) was not used in the crate graph.
Patch kusama-runtime v0.9.13 (https://github.com/paritytech//polkadot?rev=7d8f00b90cd6d87780123b3e08ca120cfb0c6e50#7d8f00b9) was not used in the crate graph.
Patch polkadot-cli v0.9.13 (https://github.com/paritytech//polkadot?rev=7d8f00b90cd6d87780123b3e08ca120cfb0c6e50#7d8f00b9) was not used in the crate graph.
Patch polkadot-client v0.9.13 (https://github.com/paritytech//polkadot?rev=7d8f00b90cd6d87780123b3e08ca120cfb0c6e50#7d8f00b9) was not used in the crate graph.
Patch polkadot-node-core-pvf v0.9.13 (https://github.com/paritytech//polkadot?rev=7d8f00b90cd6d87780123b3e08ca120cfb0c6e50#7d8f00b9) was not used in the crate graph.
Patch polkadot-node-network-protocol v0.9.13 (https://github.com/paritytech//polkadot?rev=7d8f00b90cd6d87780123b3e08ca120cfb0c6e50#7d8f00b9) was not used in the crate graph.
Patch polkadot-node-primitives v0.9.13 (https://github.com/paritytech//polkadot?rev=7d8f00b90cd6d87780123b3e08ca120cfb0c6e50#7d8f00b9) was not used in the crate graph.
Patch polkadot-node-subsystem v0.9.13 (https://github.com/paritytech//polkadot?rev=7d8f00b90cd6d87780123b3e08ca120cfb0c6e50#7d8f00b9) was not used in the crate graph.
Patch polkadot-overseer v0.9.13 (https://github.com/paritytech//polkadot?rev=7d8f00b90cd6d87780123b3e08ca120cfb0c6e50#7d8f00b9) was not used in the crate graph.
Patch polkadot-runtime v0.9.13 (https://github.com/paritytech//polkadot?rev=7d8f00b90cd6d87780123b3e08ca120cfb0c6e50#7d8f00b9) was not used in the crate graph.
Patch polkadot-runtime-common v0.9.13 (https://github.com/paritytech//polkadot?rev=7d8f00b90cd6d87780123b3e08ca120cfb0c6e50#7d8f00b9) was not used in the crate graph.
Patch polkadot-runtime-parachains v0.9.13 (https://github.com/paritytech//polkadot?rev=7d8f00b90cd6d87780123b3e08ca120cfb0c6e50#7d8f00b9) was not used in the crate graph.
Patch polkadot-service v0.9.13 (https://github.com/paritytech//polkadot?rev=7d8f00b90cd6d87780123b3e08ca120cfb0c6e50#7d8f00b9) was not used in the crate graph.
Patch polkadot-statement-table v0.9.13 (https://github.com/paritytech//polkadot?rev=7d8f00b90cd6d87780123b3e08ca120cfb0c6e50#7d8f00b9) was not used in the crate graph.
Patch rococo-runtime v0.9.13 (https://github.com/paritytech//polkadot?rev=7d8f00b90cd6d87780123b3e08ca120cfb0c6e50#7d8f00b9) was not used in the crate graph.
Patch westend-runtime v0.9.13 (https://github.com/paritytech//polkadot?rev=7d8f00b90cd6d87780123b3e08ca120cfb0c6e50#7d8f00b9) was not used in the crate graph.
Patch xcm-simulator v0.9.13 (https://github.com/paritytech//polkadot?rev=7d8f00b90cd6d87780123b3e08ca120cfb0c6e50#7d8f00b9) was not used in the crate graph.
Check that the patched package version and available features are compatible
with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run cargo update to use the new
version. This may also occur with an optional dependency that is not enabled.
�[0m�[0m�[1m�[32m Compiling�[0m karura-runtime v2.1.1 (/app/git/Acala/runtime/karura)
�[0m�[1m�[38;5;9merror[E0046]�[0m�[0m�[1m: not all trait items implemented, missing: register_erc20_asset, update_erc20_asset�[0m
�[0m �[0m�[0m�[1m�[38;5;12m--> �[0m�[0m/app/git/Acala/runtime/karura/src/weights/module_asset_registry.rs:48:1�[0m
�[0m �[0m�[0m�[1m�[38;5;12m|�[0m
�[0m�[1m�[38;5;12m48�[0m�[0m �[0m�[0m�[1m�[38;5;12m| �[0m�[0mimpl<T: frame_system::Config> module_asset_registry::WeightInfo for WeightInfo {�[0m
�[0m �[0m�[0m�[1m�[38;5;12m| �[0m�[0m�[1m�[38;5;9m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^�[0m�[0m �[0m�[0m�[1m�[38;5;9mmissing register_erc20_asset, update_erc20_asset in implementation�[0m
�[0m �[0m�[0m�[1m�[38;5;12m|�[0m
�[0m �[0m�[0m�[1m�[38;5;12m= �[0m�[0m�[1mhelp�[0m�[0m: �[0m�[0mimplement the missing item: fn register_erc20_asset() -> u64 { todo!() }�[0m
�[0m �[0m�[0m�[1m�[38;5;12m= �[0m�[0m�[1mhelp�[0m�[0m: �[0m�[0mimplement the missing item: fn update_erc20_asset() -> u64 { todo!() }�[0m

�[0m�[1mFor more information about this error, try rustc --explain E0046.�[0m
�[0m�[0m�[1m�[31merror�[0m�[1m:�[0m could not compile karura-runtime due to previous error

xlc
xlc previously approved these changes Dec 24, 2021
@zjb0807
Copy link
Member Author

zjb0807 commented Dec 24, 2021

/bench runtime karura module_asset_registry

@ghost
Copy link

ghost commented Dec 24, 2021

Finished benchmark for branch: asset-registry-add-erc20

Benchmark: Benchmark Runtime Karura Module

cargo run --release --color=never --bin=acala --features=runtime-benchmarks --features=with-karura-runtime -- benchmark --chain=karura-dev --steps=50 --repeat=20 --pallet=module_asset_registry --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/karura/src/weights/

Results

Pallet: "module_asset_registry", Extrinsic: "register_foreign_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: AssetRegistry NextForeignAssetId (r:1 w:1)
Storage: AssetRegistry LocationToCurrencyIds (r:1 w:1)
Storage: AssetRegistry ForeignAssetLocations (r:1 w:1)
Storage: AssetRegistry AssetMetadatas (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 39.65
µs

Reads = 4
Writes = 4

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 39.65
µs

Reads = 4
Writes = 4

Pallet: "module_asset_registry", Extrinsic: "update_foreign_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: AssetRegistry ForeignAssetLocations (r:1 w:1)
Storage: AssetRegistry AssetMetadatas (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 35.1
µs

Reads = 2
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 35.1
µs

Reads = 2
Writes = 2

Pallet: "module_asset_registry", Extrinsic: "register_stable_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: AssetRegistry NextStableAssetId (r:1 w:1)
Storage: AssetRegistry AssetMetadatas (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 27.7
µs

Reads = 2
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 27.7
µs

Reads = 2
Writes = 2

Pallet: "module_asset_registry", Extrinsic: "update_stable_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: AssetRegistry AssetMetadatas (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 25.82
µs

Reads = 1
Writes = 1

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 25.82
µs

Reads = 1
Writes = 1

Pallet: "module_asset_registry", Extrinsic: "register_erc20_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: EVM Accounts (r:2 w:0)
Storage: EVM Codes (r:1 w:0)
Storage: EVM AccountStorages (r:6 w:0)
Storage: AssetRegistry AssetMetadatas (r:1 w:1)
Storage: AssetRegistry Erc20IdToAddress (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 282.1
µs

Reads = 11
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 282.1
µs

Reads = 11
Writes = 2

Pallet: "module_asset_registry", Extrinsic: "update_erc20_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: AssetRegistry AssetMetadatas (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 31.65
µs

Reads = 1
Writes = 1

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 31.65
µs

Reads = 1
Writes = 1

@zjb0807
Copy link
Member Author

zjb0807 commented Dec 24, 2021

/bench runtime acala module_asset_registry

@ghost
Copy link

ghost commented Dec 24, 2021

Finished benchmark for branch: asset-registry-add-erc20

Benchmark: Benchmark Runtime Acala Module

cargo run --release --color=never --bin=acala --features=runtime-benchmarks --features=with-acala-runtime -- benchmark --chain=acala-latest --steps=50 --repeat=20 --pallet=module_asset_registry --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/acala/src/weights/

Results

Pallet: "module_asset_registry", Extrinsic: "register_foreign_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: AssetRegistry NextForeignAssetId (r:1 w:1)
Storage: AssetRegistry LocationToCurrencyIds (r:1 w:1)
Storage: AssetRegistry ForeignAssetLocations (r:1 w:1)
Storage: AssetRegistry AssetMetadatas (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 40.49
µs

Reads = 4
Writes = 4

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 40.49
µs

Reads = 4
Writes = 4

Pallet: "module_asset_registry", Extrinsic: "update_foreign_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: AssetRegistry ForeignAssetLocations (r:1 w:1)
Storage: AssetRegistry AssetMetadatas (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 37.14
µs

Reads = 2
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 37.14
µs

Reads = 2
Writes = 2

Pallet: "module_asset_registry", Extrinsic: "register_stable_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: AssetRegistry NextStableAssetId (r:1 w:1)
Storage: AssetRegistry AssetMetadatas (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 28.47
µs

Reads = 2
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 28.47
µs

Reads = 2
Writes = 2

Pallet: "module_asset_registry", Extrinsic: "update_stable_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: AssetRegistry AssetMetadatas (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 26.96
µs

Reads = 1
Writes = 1

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 26.96
µs

Reads = 1
Writes = 1

@zjb0807
Copy link
Member Author

zjb0807 commented Dec 24, 2021

/bench runtime acala module_asset_registry

@ghost
Copy link

ghost commented Dec 24, 2021

Finished benchmark for branch: asset-registry-add-erc20

Benchmark: Benchmark Runtime Acala Module

cargo run --release --color=never --bin=acala --features=runtime-benchmarks --features=with-acala-runtime -- benchmark --chain=acala-latest --steps=50 --repeat=20 --pallet=module_asset_registry --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/acala/src/weights/

Results

Pallet: "module_asset_registry", Extrinsic: "register_foreign_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: AssetRegistry NextForeignAssetId (r:1 w:1)
Storage: AssetRegistry LocationToCurrencyIds (r:1 w:1)
Storage: AssetRegistry ForeignAssetLocations (r:1 w:1)
Storage: AssetRegistry AssetMetadatas (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 42.27
µs

Reads = 4
Writes = 4

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 42.27
µs

Reads = 4
Writes = 4

Pallet: "module_asset_registry", Extrinsic: "update_foreign_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: AssetRegistry ForeignAssetLocations (r:1 w:1)
Storage: AssetRegistry AssetMetadatas (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 37.29
µs

Reads = 2
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 37.29
µs

Reads = 2
Writes = 2

Pallet: "module_asset_registry", Extrinsic: "register_stable_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: AssetRegistry NextStableAssetId (r:1 w:1)
Storage: AssetRegistry AssetMetadatas (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 30.19
µs

Reads = 2
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 30.19
µs

Reads = 2
Writes = 2

Pallet: "module_asset_registry", Extrinsic: "update_stable_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: AssetRegistry AssetMetadatas (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 27.31
µs

Reads = 1
Writes = 1

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 27.31
µs

Reads = 1
Writes = 1

Pallet: "module_asset_registry", Extrinsic: "register_erc20_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: EVM Accounts (r:2 w:0)
Storage: EVM Codes (r:1 w:0)
Storage: EVM AccountStorages (r:6 w:0)
Storage: AssetRegistry AssetMetadatas (r:1 w:1)
Storage: AssetRegistry Erc20IdToAddress (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 295.1
µs

Reads = 11
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 295.1
µs

Reads = 11
Writes = 2

Pallet: "module_asset_registry", Extrinsic: "update_erc20_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: AssetRegistry AssetMetadatas (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 33.52
µs

Reads = 1
Writes = 1

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 33.52
µs

Reads = 1
Writes = 1

…hmarks --features=with-acala-runtime -- benchmark --chain=acala-latest --steps=50 --repeat=20 --pallet=module_asset_registry --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/acala/src/weights/
@zjb0807
Copy link
Member Author

zjb0807 commented Dec 24, 2021

/bench runtime karura module_asset_registry

@ghost
Copy link

ghost commented Dec 24, 2021

Finished benchmark for branch: asset-registry-add-erc20

Benchmark: Benchmark Runtime Karura Module

cargo run --release --color=never --bin=acala --features=runtime-benchmarks --features=with-karura-runtime -- benchmark --chain=karura-dev --steps=50 --repeat=20 --pallet=module_asset_registry --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/karura/src/weights/

Results

Pallet: "module_asset_registry", Extrinsic: "register_foreign_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: AssetRegistry NextForeignAssetId (r:1 w:1)
Storage: AssetRegistry LocationToCurrencyIds (r:1 w:1)
Storage: AssetRegistry ForeignAssetLocations (r:1 w:1)
Storage: AssetRegistry AssetMetadatas (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 41.56
µs

Reads = 4
Writes = 4

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 41.56
µs

Reads = 4
Writes = 4

Pallet: "module_asset_registry", Extrinsic: "update_foreign_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: AssetRegistry ForeignAssetLocations (r:1 w:1)
Storage: AssetRegistry AssetMetadatas (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 36.82
µs

Reads = 2
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 36.82
µs

Reads = 2
Writes = 2

Pallet: "module_asset_registry", Extrinsic: "register_stable_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: AssetRegistry NextStableAssetId (r:1 w:1)
Storage: AssetRegistry AssetMetadatas (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 29.21
µs

Reads = 2
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 29.21
µs

Reads = 2
Writes = 2

Pallet: "module_asset_registry", Extrinsic: "update_stable_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: AssetRegistry AssetMetadatas (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 26.71
µs

Reads = 1
Writes = 1

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 26.71
µs

Reads = 1
Writes = 1

Pallet: "module_asset_registry", Extrinsic: "register_erc20_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: EVM Accounts (r:2 w:0)
Storage: EVM Codes (r:1 w:0)
Storage: EVM AccountStorages (r:6 w:0)
Storage: AssetRegistry AssetMetadatas (r:1 w:1)
Storage: AssetRegistry Erc20IdToAddress (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 289.1
µs

Reads = 11
Writes = 2

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 289.1
µs

Reads = 11
Writes = 2

Pallet: "module_asset_registry", Extrinsic: "update_erc20_asset", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info

Storage: AssetRegistry AssetMetadatas (r:1 w:1)

Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 32.74
µs

Reads = 1
Writes = 1

Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 32.74
µs

Reads = 1
Writes = 1

…hmarks --features=with-karura-runtime -- benchmark --chain=karura-dev --steps=50 --repeat=20 --pallet=module_asset_registry --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/karura/src/weights/
@zjb0807 zjb0807 merged commit 11c50b9 into master Dec 25, 2021
@zjb0807 zjb0807 deleted the asset-registry-add-erc20 branch December 25, 2021 12:37
syan095 pushed a commit that referenced this pull request Jan 7, 2022
* origin/master: (102 commits)
  Fix collect_fee (#1754)
  Update HEADER-GPL3
  Update extrinsic-ordering-check-from-bin.yml (#1752)
  Update HEADER-GPL3
  bump version (#1751)
  Remove homa-lite from karura runtime (#1744)
  off-by-one (#1747)
  Revert "simulate exchange rate (#1742)" (#1746)
  simulate exchange rate (#1742)
  bump version (#1743)
  refactor homa (#1648)
  Update stable asset (#1741)
  add more info to events (#1740)
  Fix mandala swap path error (#1736)
  update stable asset (#1738)
  remove unnecessary code (#1735)
  fix currency id testing (#1733)
  rework fee payment (#1687)
  Add Deposit for Setting Alternative Fee Swap Path (#1730)
  Add register_erc20_asset and update_erc20_asset (#1731)
  ...

# Conflicts:
#	.github/workflows/coverage.yml.disabled
#	Cargo.lock
#	Cargo.toml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add register_erc20_asset for asset-registry Allow governance to set ED to LP token with ERC20 involved
2 participants