mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 21:37:56 +00:00
51c67fe881
* pallet_contracts: Inline benchmark helper that is only used once * Move all max_* Schedule items into a new struct * Limit the number of globals a module can declare * The current limits are too high for wasmi to even execute * Limit the amount of parameters any wasm function is allowed to have * Limit the size the BrTable's immediate value * Add instruction benchmarks * Add new benchmarks to the schedule and make use of it * Add Benchmark Results generated by the bench bot * Add proc macro that implements `Debug` for `Schedule` * Add missing imports necessary for no_std build * Make the WeightDebug macro available for no_std In this case a dummy implementation is derived in order to not blow up the code size akin to the RuntimeDebug macro. * Rework instr_memory_grow benchmark to use only the maximum amount of pages allowed * Add maximum amount of memory when benching (seal_)call/instantiate * cargo run --release --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark --chain dev --steps 50 --repeat 20 --extrinsic * --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output ./bin/node/runtime/src/weights --header ./HEADER --pallet pallet_contracts * Added utility benchmark that allows pretty printing of the real schedule * review: Add missing header to the proc-macro lib.rs * review: Clarify why #[allow(dead_code)] attribute is there * review: Fix pwasm-utils line * review: Fixup rand usage * review: Fix typo * review: Imported -> Exported * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs * contracts: Adapt to new weight structure * contracts: Fixup runtime WeightInfo * contracts: Remove unneeded fullpath of WeightInfo type * Apply suggestions from code review Co-authored-by: Andrew Jones <ascjones@gmail.com> * Fix typo in schedule.rs Co-authored-by: Andrew Jones <ascjones@gmail.com> * Fix docs in schedule.rs * Apply suggestions from code review Co-authored-by: Nikolay Volf <nikvolf@gmail.com> * Don't publish proc-macro crate until 3.0.0 is ready * Optimize imports for less repetition * Break overlong line Co-authored-by: Parity Benchmarking Bot <admin@parity.io> Co-authored-by: Andrew Jones <ascjones@gmail.com> Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
72 lines
2.6 KiB
TOML
72 lines
2.6 KiB
TOML
[package]
|
|
name = "pallet-contracts"
|
|
version = "2.0.0"
|
|
authors = ["Parity Technologies <admin@parity.io>"]
|
|
edition = "2018"
|
|
license = "Apache-2.0"
|
|
homepage = "https://substrate.dev"
|
|
repository = "https://github.com/paritytech/substrate/"
|
|
description = "FRAME pallet for WASM contracts"
|
|
readme = "README.md"
|
|
|
|
# Prevent publish until we are ready to release 3.0.0
|
|
publish = false
|
|
|
|
[package.metadata.docs.rs]
|
|
targets = ["x86_64-unknown-linux-gnu"]
|
|
|
|
[dependencies]
|
|
codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false, features = ["derive"] }
|
|
frame-benchmarking = { version = "2.0.0", default-features = false, path = "../benchmarking", optional = true }
|
|
frame-support = { version = "2.0.0", default-features = false, path = "../support" }
|
|
frame-system = { version = "2.0.0", default-features = false, path = "../system" }
|
|
pallet-contracts-primitives = { version = "2.0.0", default-features = false, path = "common" }
|
|
pallet-contracts-proc-macro = { version = "0.1.0", path = "proc-macro" }
|
|
parity-wasm = { version = "0.41.0", default-features = false }
|
|
pwasm-utils = { version = "0.16", default-features = false }
|
|
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
|
sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" }
|
|
sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" }
|
|
sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" }
|
|
sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" }
|
|
sp-sandbox = { version = "0.8.0", default-features = false, path = "../../primitives/sandbox" }
|
|
wasmi-validation = { version = "0.3.0", default-features = false }
|
|
|
|
# Only used in benchmarking to generate random contract code
|
|
rand = { version = "0.7.0", optional = true, default-features = false }
|
|
rand_pcg = { version = "0.2.1", optional = true }
|
|
|
|
[dev-dependencies]
|
|
assert_matches = "1.3.0"
|
|
hex-literal = "0.3.1"
|
|
pallet-balances = { version = "2.0.0", path = "../balances" }
|
|
pallet-timestamp = { version = "2.0.0", path = "../timestamp" }
|
|
pallet-randomness-collective-flip = { version = "2.0.0", path = "../randomness-collective-flip" }
|
|
paste = "1.0"
|
|
pretty_assertions = "0.6.1"
|
|
wat = "1.0"
|
|
|
|
[features]
|
|
default = ["std"]
|
|
std = [
|
|
"serde",
|
|
"codec/std",
|
|
"sp-core/std",
|
|
"sp-runtime/std",
|
|
"sp-io/std",
|
|
"sp-std/std",
|
|
"sp-sandbox/std",
|
|
"frame-support/std",
|
|
"frame-system/std",
|
|
"parity-wasm/std",
|
|
"pwasm-utils/std",
|
|
"wasmi-validation/std",
|
|
"pallet-contracts-primitives/std",
|
|
"pallet-contracts-proc-macro/full",
|
|
]
|
|
runtime-benchmarks = [
|
|
"frame-benchmarking",
|
|
"rand",
|
|
"rand_pcg",
|
|
]
|