diff --git a/Cargo.lock b/Cargo.lock index b148e897d0..ee465188e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,7 +14,7 @@ dependencies = [ [[package]] name = "acala" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-cli", "acala-service", @@ -24,7 +24,7 @@ dependencies = [ [[package]] name = "acala-cli" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-inspect", "acala-service", @@ -51,7 +51,7 @@ dependencies = [ [[package]] name = "acala-inspect" -version = "2.0.2" +version = "2.0.3" dependencies = [ "derive_more", "log", @@ -67,7 +67,7 @@ dependencies = [ [[package]] name = "acala-primitives" -version = "2.0.2" +version = "2.0.3" dependencies = [ "bstringify", "frame-support", @@ -90,7 +90,7 @@ dependencies = [ [[package]] name = "acala-rpc" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "evm-rpc", @@ -112,7 +112,7 @@ dependencies = [ [[package]] name = "acala-runtime" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "cumulus-pallet-aura-ext", @@ -219,7 +219,7 @@ dependencies = [ [[package]] name = "acala-service" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "acala-rpc", @@ -2240,7 +2240,7 @@ checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" [[package]] name = "e2e-tests" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-cli", "acala-primitives", @@ -2285,7 +2285,7 @@ dependencies = [ [[package]] name = "ecosystem-compound-cash" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "frame-support", @@ -2302,7 +2302,7 @@ dependencies = [ [[package]] name = "ecosystem-renvm-bridge" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "frame-support", @@ -2324,7 +2324,7 @@ dependencies = [ [[package]] name = "ecosystem-starport" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "frame-support", @@ -2582,7 +2582,7 @@ dependencies = [ [[package]] name = "evm-rpc" -version = "2.0.2" +version = "2.0.3" dependencies = [ "ethereum-types", "frame-support", @@ -3861,7 +3861,7 @@ dependencies = [ [[package]] name = "karura-runtime" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "cumulus-pallet-aura-ext", @@ -4843,7 +4843,7 @@ dependencies = [ [[package]] name = "mandala-runtime" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "acala-service", @@ -5185,7 +5185,7 @@ dependencies = [ [[package]] name = "module-asset-registry" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "frame-support", @@ -5211,7 +5211,7 @@ dependencies = [ [[package]] name = "module-auction-manager" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "frame-support", @@ -5235,7 +5235,7 @@ dependencies = [ [[package]] name = "module-cdp-engine" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "frame-support", @@ -5263,7 +5263,7 @@ dependencies = [ [[package]] name = "module-cdp-treasury" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "frame-support", @@ -5286,7 +5286,7 @@ dependencies = [ [[package]] name = "module-collator-selection" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "frame-benchmarking", @@ -5312,7 +5312,7 @@ dependencies = [ [[package]] name = "module-currencies" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "frame-support", @@ -5336,7 +5336,7 @@ dependencies = [ [[package]] name = "module-dex" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "frame-benchmarking", @@ -5357,7 +5357,7 @@ dependencies = [ [[package]] name = "module-emergency-shutdown" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "frame-support", @@ -5380,7 +5380,7 @@ dependencies = [ [[package]] name = "module-evm" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "env_logger 0.9.0", @@ -5412,7 +5412,7 @@ dependencies = [ [[package]] name = "module-evm-accounts" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "frame-support", @@ -5434,7 +5434,7 @@ dependencies = [ [[package]] name = "module-evm-bridge" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "ethereum-types", @@ -5459,7 +5459,7 @@ dependencies = [ [[package]] name = "module-evm-rpc-runtime-api" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "ethereum-types", @@ -5471,7 +5471,7 @@ dependencies = [ [[package]] name = "module-evm-utiltity" -version = "2.0.2" +version = "2.0.3" dependencies = [ "ethereum", "evm", @@ -5483,7 +5483,7 @@ dependencies = [ [[package]] name = "module-evm-utiltity-macro" -version = "2.0.2" +version = "2.0.3" dependencies = [ "module-evm-utiltity", "proc-macro2", @@ -5493,7 +5493,7 @@ dependencies = [ [[package]] name = "module-example" -version = "2.0.2" +version = "2.0.3" dependencies = [ "frame-support", "frame-system", @@ -5507,7 +5507,7 @@ dependencies = [ [[package]] name = "module-homa" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "frame-support", @@ -5522,7 +5522,7 @@ dependencies = [ [[package]] name = "module-homa-lite" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "cumulus-primitives-core", @@ -5549,7 +5549,7 @@ dependencies = [ [[package]] name = "module-homa-validator-list" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "frame-support", @@ -5571,7 +5571,7 @@ dependencies = [ [[package]] name = "module-honzon" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "frame-support", @@ -5596,7 +5596,7 @@ dependencies = [ [[package]] name = "module-idle-scheduler" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "frame-support", @@ -5613,7 +5613,7 @@ dependencies = [ [[package]] name = "module-incentives" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "frame-support", @@ -5634,7 +5634,7 @@ dependencies = [ [[package]] name = "module-loans" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "frame-support", @@ -5656,7 +5656,7 @@ dependencies = [ [[package]] name = "module-nft" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "enumflags2", @@ -5682,7 +5682,7 @@ dependencies = [ [[package]] name = "module-nominees-election" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "frame-support", @@ -5703,7 +5703,7 @@ dependencies = [ [[package]] name = "module-polkadot-bridge" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "frame-support", @@ -5721,7 +5721,7 @@ dependencies = [ [[package]] name = "module-prices" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "frame-support", @@ -5740,7 +5740,7 @@ dependencies = [ [[package]] name = "module-relaychain" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "cumulus-primitives-core", @@ -5758,7 +5758,7 @@ dependencies = [ [[package]] name = "module-session-manager" -version = "2.0.2" +version = "2.0.3" dependencies = [ "frame-support", "frame-system", @@ -5775,7 +5775,7 @@ dependencies = [ [[package]] name = "module-staking-pool" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "frame-support", @@ -5796,7 +5796,7 @@ dependencies = [ [[package]] name = "module-staking-pool-rpc-runtime-api" -version = "2.0.2" +version = "2.0.3" dependencies = [ "module-support", "parity-scale-codec", @@ -5808,7 +5808,7 @@ dependencies = [ [[package]] name = "module-support" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "frame-support", @@ -5823,7 +5823,7 @@ dependencies = [ [[package]] name = "module-transaction-pause" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "frame-support", @@ -5842,7 +5842,7 @@ dependencies = [ [[package]] name = "module-transaction-payment" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "frame-support", @@ -9763,7 +9763,7 @@ dependencies = [ [[package]] name = "runtime-common" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "acala-service", @@ -9809,7 +9809,7 @@ dependencies = [ [[package]] name = "runtime-integration-tests" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-primitives", "acala-runtime", @@ -12564,7 +12564,7 @@ dependencies = [ [[package]] name = "test-runner" -version = "2.0.2" +version = "2.0.3" dependencies = [ "acala-cli", "acala-primitives", diff --git a/ecosystem-modules/compound-cash/Cargo.toml b/ecosystem-modules/compound-cash/Cargo.toml index a91a1c69b1..12723664a6 100644 --- a/ecosystem-modules/compound-cash/Cargo.toml +++ b/ecosystem-modules/compound-cash/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ecosystem-compound-cash" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/ecosystem-modules/ren/renvm-bridge/Cargo.toml b/ecosystem-modules/ren/renvm-bridge/Cargo.toml index fef623721c..a9987dcab2 100644 --- a/ecosystem-modules/ren/renvm-bridge/Cargo.toml +++ b/ecosystem-modules/ren/renvm-bridge/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ecosystem-renvm-bridge" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/ecosystem-modules/starport/Cargo.toml b/ecosystem-modules/starport/Cargo.toml index 24274f95af..db36b7f0bf 100644 --- a/ecosystem-modules/starport/Cargo.toml +++ b/ecosystem-modules/starport/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ecosystem-starport" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/inspect/Cargo.toml b/inspect/Cargo.toml index f613cc6161..9993a06092 100644 --- a/inspect/Cargo.toml +++ b/inspect/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "acala-inspect" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/asset-registry/Cargo.toml b/modules/asset-registry/Cargo.toml index 371cd29e37..40167c489e 100644 --- a/modules/asset-registry/Cargo.toml +++ b/modules/asset-registry/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-asset-registry" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/auction-manager/Cargo.toml b/modules/auction-manager/Cargo.toml index b27750e770..889011af73 100644 --- a/modules/auction-manager/Cargo.toml +++ b/modules/auction-manager/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-auction-manager" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/cdp-engine/Cargo.toml b/modules/cdp-engine/Cargo.toml index 6837ef51c9..f92bf91c33 100644 --- a/modules/cdp-engine/Cargo.toml +++ b/modules/cdp-engine/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-cdp-engine" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/cdp-treasury/Cargo.toml b/modules/cdp-treasury/Cargo.toml index d323b1bc86..ef8b798c1d 100644 --- a/modules/cdp-treasury/Cargo.toml +++ b/modules/cdp-treasury/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-cdp-treasury" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/collator-selection/Cargo.toml b/modules/collator-selection/Cargo.toml index b4be3eb73c..c0a176f3b2 100644 --- a/modules/collator-selection/Cargo.toml +++ b/modules/collator-selection/Cargo.toml @@ -1,6 +1,6 @@ [package] name = 'module-collator-selection' -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/currencies/Cargo.toml b/modules/currencies/Cargo.toml index 21bf6372d2..64e23dc13f 100644 --- a/modules/currencies/Cargo.toml +++ b/modules/currencies/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-currencies" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/dex/Cargo.toml b/modules/dex/Cargo.toml index 18ad711688..593dc387d7 100644 --- a/modules/dex/Cargo.toml +++ b/modules/dex/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-dex" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/emergency-shutdown/Cargo.toml b/modules/emergency-shutdown/Cargo.toml index 5d0319e597..a2a7829f77 100644 --- a/modules/emergency-shutdown/Cargo.toml +++ b/modules/emergency-shutdown/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-emergency-shutdown" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/evm-accounts/Cargo.toml b/modules/evm-accounts/Cargo.toml index 0012e75f5e..3874c93e74 100644 --- a/modules/evm-accounts/Cargo.toml +++ b/modules/evm-accounts/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-evm-accounts" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/evm-bridge/Cargo.toml b/modules/evm-bridge/Cargo.toml index 575daed5c9..850c47b956 100644 --- a/modules/evm-bridge/Cargo.toml +++ b/modules/evm-bridge/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-evm-bridge" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/evm-utiltity/Cargo.toml b/modules/evm-utiltity/Cargo.toml index 0f2a22cf20..94372a4b6e 100644 --- a/modules/evm-utiltity/Cargo.toml +++ b/modules/evm-utiltity/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-evm-utiltity" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/evm-utiltity/macro/Cargo.toml b/modules/evm-utiltity/macro/Cargo.toml index e2e26260c3..6967a11592 100644 --- a/modules/evm-utiltity/macro/Cargo.toml +++ b/modules/evm-utiltity/macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-evm-utiltity-macro" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/evm/Cargo.toml b/modules/evm/Cargo.toml index 7251e0a2f8..fd39f6486b 100644 --- a/modules/evm/Cargo.toml +++ b/modules/evm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-evm" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/evm/rpc/Cargo.toml b/modules/evm/rpc/Cargo.toml index 92268c654d..c36dc38401 100644 --- a/modules/evm/rpc/Cargo.toml +++ b/modules/evm/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "evm-rpc" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/evm/rpc/runtime_api/Cargo.toml b/modules/evm/rpc/runtime_api/Cargo.toml index 95ae3b941b..b88e90a467 100644 --- a/modules/evm/rpc/runtime_api/Cargo.toml +++ b/modules/evm/rpc/runtime_api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-evm-rpc-runtime-api" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/evm/rpc/src/lib.rs b/modules/evm/rpc/src/lib.rs index d54b1436aa..80c5d50c86 100644 --- a/modules/evm/rpc/src/lib.rs +++ b/modules/evm/rpc/src/lib.rs @@ -108,15 +108,15 @@ fn decode_revert_message(data: &[u8]) -> Option { pub struct EVMApi { client: Arc, - deny_unsafe: DenyUnsafe, + _deny_unsafe: DenyUnsafe, _marker: PhantomData<(B, Balance)>, } impl EVMApi { - pub fn new(client: Arc, deny_unsafe: DenyUnsafe) -> Self { + pub fn new(client: Arc, _deny_unsafe: DenyUnsafe) -> Self { Self { client, - deny_unsafe, + _deny_unsafe, _marker: Default::default(), } } @@ -126,6 +126,11 @@ fn to_u128(val: NumberOrHex) -> std::result::Result { val.into_u256().try_into().map_err(|_| ()) } +// 20M. TODO: use value from runtime +const MAX_GAS_LIMIT: u64 = 20_000_000; +// 4M. TODO: use value from runtime +const MAX_STROAGE_LIMIT: u32 = 4 * 1024 * 1024; + impl EVMApiT<::Hash> for EVMApi where B: BlockT, @@ -135,8 +140,6 @@ where Balance: Codec + MaybeDisplay + MaybeFromStr + Default + Send + Sync + 'static + TryFrom + Into, { fn call(&self, request: CallRequest, at: Option<::Hash>) -> Result { - self.deny_unsafe.check_if_safe()?; - let hash = at.unwrap_or_else(|| self.client.info().best_hash); let CallRequest { @@ -148,8 +151,8 @@ where data, } = request; - let gas_limit = gas_limit.unwrap_or_else(u64::max_value); // TODO: set a limit - let storage_limit = storage_limit.unwrap_or_else(u32::max_value); // TODO: set a limit + let gas_limit = gas_limit.unwrap_or(MAX_GAS_LIMIT); + let storage_limit = storage_limit.unwrap_or(MAX_STROAGE_LIMIT); let data = data.map(|d| d.0).unwrap_or_default(); let api = self.client.runtime_api(); @@ -205,8 +208,6 @@ where unsigned_extrinsic: Bytes, at: Option<::Hash>, ) -> Result { - self.deny_unsafe.check_if_safe()?; - let hash = at.unwrap_or_else(|| self.client.info().best_hash); let request = self .client @@ -216,7 +217,7 @@ where .map_err(|err| internal_err(format!("execution fatal: {:?}", err)))?; // Determine the highest possible gas limits - let max_gas_limit = u64::max_value(); // TODO: set a limit + let max_gas_limit = MAX_GAS_LIMIT; let mut highest = U256::from(request.gas_limit.unwrap_or(max_gas_limit)); let request = CallRequest { diff --git a/modules/example/Cargo.toml b/modules/example/Cargo.toml index 24b3744a85..9c390fcc2f 100644 --- a/modules/example/Cargo.toml +++ b/modules/example/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-example" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/homa-lite/Cargo.toml b/modules/homa-lite/Cargo.toml index 2c7c8cdcbd..2663bed332 100644 --- a/modules/homa-lite/Cargo.toml +++ b/modules/homa-lite/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-homa-lite" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/homa-validator-list/Cargo.toml b/modules/homa-validator-list/Cargo.toml index cce3939907..42b268dd6b 100644 --- a/modules/homa-validator-list/Cargo.toml +++ b/modules/homa-validator-list/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-homa-validator-list" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/homa/Cargo.toml b/modules/homa/Cargo.toml index f6925ce562..0c9f4d5e37 100644 --- a/modules/homa/Cargo.toml +++ b/modules/homa/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-homa" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/honzon/Cargo.toml b/modules/honzon/Cargo.toml index 82d4de9f81..2821e15657 100644 --- a/modules/honzon/Cargo.toml +++ b/modules/honzon/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-honzon" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/idle-scheduler/Cargo.toml b/modules/idle-scheduler/Cargo.toml index 6dd88fa6a5..0fe6a89c07 100644 --- a/modules/idle-scheduler/Cargo.toml +++ b/modules/idle-scheduler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-idle-scheduler" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/incentives/Cargo.toml b/modules/incentives/Cargo.toml index e64b840517..a4ff71fea7 100644 --- a/modules/incentives/Cargo.toml +++ b/modules/incentives/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-incentives" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/loans/Cargo.toml b/modules/loans/Cargo.toml index 6674bac778..21dc4bc484 100644 --- a/modules/loans/Cargo.toml +++ b/modules/loans/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-loans" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/nft/Cargo.toml b/modules/nft/Cargo.toml index 04349070d0..1b756e9082 100644 --- a/modules/nft/Cargo.toml +++ b/modules/nft/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-nft" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/nominees-election/Cargo.toml b/modules/nominees-election/Cargo.toml index 50bc1b2370..a9180aa262 100644 --- a/modules/nominees-election/Cargo.toml +++ b/modules/nominees-election/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-nominees-election" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/polkadot-bridge/Cargo.toml b/modules/polkadot-bridge/Cargo.toml index 8a05bc5a48..6dead4eb67 100644 --- a/modules/polkadot-bridge/Cargo.toml +++ b/modules/polkadot-bridge/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-polkadot-bridge" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/prices/Cargo.toml b/modules/prices/Cargo.toml index fad8d94352..c74906fc4e 100644 --- a/modules/prices/Cargo.toml +++ b/modules/prices/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-prices" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/relaychain/Cargo.toml b/modules/relaychain/Cargo.toml index dfc081d229..3de75401c4 100644 --- a/modules/relaychain/Cargo.toml +++ b/modules/relaychain/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-relaychain" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/session-manager/Cargo.toml b/modules/session-manager/Cargo.toml index c020594d15..7c26c8cd97 100644 --- a/modules/session-manager/Cargo.toml +++ b/modules/session-manager/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-session-manager" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/staking-pool/Cargo.toml b/modules/staking-pool/Cargo.toml index dd48cc27d5..c5077c1466 100644 --- a/modules/staking-pool/Cargo.toml +++ b/modules/staking-pool/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-staking-pool" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/staking-pool/rpc/Cargo.toml b/modules/staking-pool/rpc/Cargo.toml index 6095224271..b0e793a076 100644 --- a/modules/staking-pool/rpc/Cargo.toml +++ b/modules/staking-pool/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-staking-pool-rpc" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/staking-pool/rpc/runtime-api/Cargo.toml b/modules/staking-pool/rpc/runtime-api/Cargo.toml index b2b1693529..a9f2a68d67 100644 --- a/modules/staking-pool/rpc/runtime-api/Cargo.toml +++ b/modules/staking-pool/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-staking-pool-rpc-runtime-api" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/support/Cargo.toml b/modules/support/Cargo.toml index 9bb4b73c2c..647ae62b9d 100644 --- a/modules/support/Cargo.toml +++ b/modules/support/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-support" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/transaction-pause/Cargo.toml b/modules/transaction-pause/Cargo.toml index fda4766181..bb453076bd 100644 --- a/modules/transaction-pause/Cargo.toml +++ b/modules/transaction-pause/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-transaction-pause" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/modules/transaction-payment/Cargo.toml b/modules/transaction-payment/Cargo.toml index eb958d27a3..0c82355f02 100644 --- a/modules/transaction-payment/Cargo.toml +++ b/modules/transaction-payment/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "module-transaction-payment" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/node/Cargo.toml b/node/Cargo.toml index cf9bb773a1..7b8742be47 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "acala" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" default-run = "acala" diff --git a/node/cli/Cargo.toml b/node/cli/Cargo.toml index 55f050d6bd..bc418aba53 100644 --- a/node/cli/Cargo.toml +++ b/node/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "acala-cli" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/node/e2e-tests/Cargo.toml b/node/e2e-tests/Cargo.toml index da80ca37ab..d86b0aac0d 100644 --- a/node/e2e-tests/Cargo.toml +++ b/node/e2e-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "e2e-tests" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/node/e2e-tests/test-runner/Cargo.toml b/node/e2e-tests/test-runner/Cargo.toml index 9221eb2319..81edf1a98a 100644 --- a/node/e2e-tests/test-runner/Cargo.toml +++ b/node/e2e-tests/test-runner/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "test-runner" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/node/service/Cargo.toml b/node/service/Cargo.toml index 6737cdfd01..1b201a6f90 100644 --- a/node/service/Cargo.toml +++ b/node/service/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "acala-service" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index b8ed669bfa..e2d46dc616 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "acala-primitives" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/resources/mandala-dist.json b/resources/mandala-dist.json index e7178317a7..0032f6160a 100644 --- a/resources/mandala-dist.json +++ b/resources/mandala-dist.json @@ -3,8 +3,9 @@ "id": "mandala-tc7", "chainType": "Live", "bootNodes": [ - "/dns/mandala-tc7-bootnode-1.laminar.codes/tcp/30333/p2p/12D3KooWFT9F1X4bfnAbvMfZLbhqWqGPeYvR6h4qzrYFqmPDsc49", - "/dns/mandala-tc7-bootnode.aca-dev.network/tcp/30334/ws/p2p/12D3KooWFejcBzyJ6z2XqQHaAZwFc5X5a6YAADYVGnLEDMiCGpXH" + "/dns/mandala-tc7-bootnode.aca-dev.network/tcp/30333/p2p/12D3KooWFejcBzyJ6z2XqQHaAZwFc5X5a6YAADYVGnLEDMiCGpXH", + "/dns/mandala-tc7-bootnode.aca-dev.network/tcp/30334/ws/p2p/12D3KooWFejcBzyJ6z2XqQHaAZwFc5X5a6YAADYVGnLEDMiCGpXH", + "/dns4/node-6869788355513958400-0.p2p.onfinality.io/tcp/11667/ws/p2p/12D3KooWHoGCAmPkh7x3o58K6MyzQQepcAwLHbtEQReyYn7isB47" ], "telemetryEndpoints": [ [ diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 8818eaeac9..5ddf680793 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "acala-rpc" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/runtime/acala/Cargo.toml b/runtime/acala/Cargo.toml index a76bed1b7d..d0d7aebe62 100644 --- a/runtime/acala/Cargo.toml +++ b/runtime/acala/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "acala-runtime" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" build = "build.rs" diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 1ebce0480e..fbf9bf7f69 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "runtime-common" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 1491166caf..5c9552df42 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -25,7 +25,7 @@ use frame_support::{ parameter_types, traits::Contains, weights::{ - constants::{BlockExecutionWeight, ExtrinsicBaseWeight, WEIGHT_PER_MILLIS}, + constants::{BlockExecutionWeight, ExtrinsicBaseWeight, WEIGHT_PER_MILLIS, WEIGHT_PER_NANOS}, DispatchClass, Weight, }, RuntimeDebug, @@ -77,12 +77,16 @@ impl PrecompileCallerFilter for SystemContractsFilter { } } +// TODO: estimate this from benchmarks +// total block weight is 500ms, normal tx have 70% of weight = 350ms +// 350ms / 25ns = 14M gas per block +pub const WEIGHT_PER_GAS: u64 = 25 * WEIGHT_PER_NANOS; // 25_000 + /// Convert gas to weight pub struct GasToWeight; impl Convert for GasToWeight { - fn convert(a: u64) -> u64 { - // TODO: estimate this - a as Weight + fn convert(gas: u64) -> Weight { + gas.saturating_mul(WEIGHT_PER_GAS) } } diff --git a/runtime/integration-tests/Cargo.toml b/runtime/integration-tests/Cargo.toml index 3da0bd0da2..1f0c476465 100644 --- a/runtime/integration-tests/Cargo.toml +++ b/runtime/integration-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "runtime-integration-tests" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" diff --git a/runtime/karura/Cargo.toml b/runtime/karura/Cargo.toml index 675dd63f4a..8ba308aae2 100644 --- a/runtime/karura/Cargo.toml +++ b/runtime/karura/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "karura-runtime" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" build = "build.rs" diff --git a/runtime/mandala/Cargo.toml b/runtime/mandala/Cargo.toml index 634307239d..22198c89bf 100644 --- a/runtime/mandala/Cargo.toml +++ b/runtime/mandala/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mandala-runtime" -version = "2.0.2" +version = "2.0.3" authors = ["Acala Developers"] edition = "2018" build = "build.rs" diff --git a/runtime/mandala/src/lib.rs b/runtime/mandala/src/lib.rs index 4f88eed886..579df2c9dc 100644 --- a/runtime/mandala/src/lib.rs +++ b/runtime/mandala/src/lib.rs @@ -138,7 +138,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("mandala"), impl_name: create_runtime_str!("mandala"), authoring_version: 1, - spec_version: 2002, + spec_version: 2004, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, diff --git a/ts-tests/tests/test-bodhi.ts b/ts-tests/tests/test-bodhi.ts index 38c697752b..b49f732ec9 100644 --- a/ts-tests/tests/test-bodhi.ts +++ b/ts-tests/tests/test-bodhi.ts @@ -91,7 +91,7 @@ describeWithAcala("Acala RPC (bodhi.js)", (context) => { )).to.deep.include({ gas: BigNumber.from("22409"), storage: BigNumber.from(0), - weightFee: BigNumber.from("3999950190673"), + weightFee: BigNumber.from("3999950909853"), }); }); }); diff --git a/ts-tests/tests/test-gas.ts b/ts-tests/tests/test-gas.ts index 3bde0048d4..e05785bf72 100644 --- a/ts-tests/tests/test-gas.ts +++ b/ts-tests/tests/test-gas.ts @@ -47,7 +47,7 @@ describeWithAcala("Acala RPC (Gas)", (context) => { )).to.deep.include({ gas: BigNumber.from("22409"), storage: BigNumber.from("0"), - weightFee: BigNumber.from("3999940205124") + weightFee: BigNumber.from("3999941643480") }); }); }); diff --git a/ts-tests/tests/test-precompiles.ts b/ts-tests/tests/test-precompiles.ts index 73c539964e..da90dcec48 100644 --- a/ts-tests/tests/test-precompiles.ts +++ b/ts-tests/tests/test-precompiles.ts @@ -33,7 +33,7 @@ describeWithAcala("Acala RPC (Precompile)", (context) => { from: await alice.getAddress(), confirmations: 0, nonce: 1, - gasLimit: BigNumber.from("30216"), + gasLimit: BigNumber.from("30788"), gasPrice: BigNumber.from("1"), //data: "", value: BigNumber.from(0),