From 53f6473c9c8c9d18b5ef0ed02a587757495d1dbf Mon Sep 17 00:00:00 2001 From: Cyrill Leutwiler Date: Wed, 18 Dec 2024 16:09:39 +0100 Subject: [PATCH] [pallet-revive] change some getter APIs to return value in register (#6920) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Call data, return data and code sizes can never exceed `u32::MAX`; they are also not generic. Hence we know that they are guaranteed to always fit into a 64bit register and `revive` can just zero extend them into a 256bit integer value. Which is slightly more efficient than passing them on the stack. --------- Signed-off-by: Cyrill Leutwiler Signed-off-by: xermicus Co-authored-by: command-bot <> Co-authored-by: Alexander Theißen --- prdoc/pr_6920.prdoc | 14 + .../fixtures/contracts/call_data_size.rs | 5 +- .../fixtures/contracts/common/src/lib.rs | 2 +- .../revive/fixtures/contracts/extcodesize.rs | 4 +- .../fixtures/contracts/return_data_api.rs | 4 +- .../rpc/examples/js/pvm/ErrorTester.polkavm | Bin 7289 -> 7251 bytes .../rpc/examples/js/pvm/EventExample.polkavm | Bin 2631 -> 2604 bytes .../rpc/examples/js/pvm/Flipper.polkavm | Bin 1754 -> 1727 bytes .../rpc/examples/js/pvm/FlipperCaller.polkavm | Bin 4723 -> 4394 bytes .../rpc/examples/js/pvm/PiggyBank.polkavm | Bin 5269 -> 5012 bytes .../frame/revive/src/benchmarking/mod.rs | 33 +- substrate/frame/revive/src/exec.rs | 4 +- substrate/frame/revive/src/tests.rs | 4 +- substrate/frame/revive/src/wasm/mod.rs | 2 +- substrate/frame/revive/src/wasm/runtime.rs | 46 +- substrate/frame/revive/src/weights.rs | 837 +++++++++--------- substrate/frame/revive/uapi/src/host.rs | 21 +- .../frame/revive/uapi/src/host/riscv64.rs | 20 +- 18 files changed, 508 insertions(+), 488 deletions(-) create mode 100644 prdoc/pr_6920.prdoc diff --git a/prdoc/pr_6920.prdoc b/prdoc/pr_6920.prdoc new file mode 100644 index 000000000000..d80a77e0a71f --- /dev/null +++ b/prdoc/pr_6920.prdoc @@ -0,0 +1,14 @@ +title: '[pallet-revive] change some getter APIs to return value in register' +doc: +- audience: Runtime Dev + description: Call data, return data and code sizes can never exceed `u32::MAX`; + they are also not generic. Hence we know that they are guaranteed to always fit + into a 64bit register and `revive` can just zero extend them into a 256bit integer + value. Which is slightly more efficient than passing them on the stack. +crates: +- name: pallet-revive-fixtures + bump: major +- name: pallet-revive + bump: major +- name: pallet-revive-uapi + bump: major diff --git a/substrate/frame/revive/fixtures/contracts/call_data_size.rs b/substrate/frame/revive/fixtures/contracts/call_data_size.rs index 32205b921d47..7caf18d440b8 100644 --- a/substrate/frame/revive/fixtures/contracts/call_data_size.rs +++ b/substrate/frame/revive/fixtures/contracts/call_data_size.rs @@ -30,8 +30,5 @@ pub extern "C" fn deploy() {} #[no_mangle] #[polkavm_derive::polkavm_export] pub extern "C" fn call() { - let mut buf = [0; 32]; - api::call_data_size(&mut buf); - - api::return_value(ReturnFlags::empty(), &buf); + api::return_value(ReturnFlags::empty(), &api::call_data_size().to_le_bytes()); } diff --git a/substrate/frame/revive/fixtures/contracts/common/src/lib.rs b/substrate/frame/revive/fixtures/contracts/common/src/lib.rs index 1666cdf85ede..302608ccf87c 100644 --- a/substrate/frame/revive/fixtures/contracts/common/src/lib.rs +++ b/substrate/frame/revive/fixtures/contracts/common/src/lib.rs @@ -121,7 +121,7 @@ macro_rules! input { // e.g input!(buffer, 512, var1: u32, var2: [u8], ); ($buffer:ident, $size:expr, $($rest:tt)*) => { let mut $buffer = [0u8; $size]; - let input_size = $crate::u64_output!($crate::api::call_data_size,); + let input_size = $crate::api::call_data_size(); let $buffer = &mut &mut $buffer[..$size.min(input_size as usize)]; $crate::api::call_data_copy($buffer, 0); input!(@inner $buffer, 0, $($rest)*); diff --git a/substrate/frame/revive/fixtures/contracts/extcodesize.rs b/substrate/frame/revive/fixtures/contracts/extcodesize.rs index 0a1171be30e9..3f51b69b46db 100644 --- a/substrate/frame/revive/fixtures/contracts/extcodesize.rs +++ b/substrate/frame/revive/fixtures/contracts/extcodesize.rs @@ -18,7 +18,7 @@ #![no_std] #![no_main] -use common::{input, u64_output}; +use common::input; use uapi::{HostFn, HostFnImpl as api}; #[no_mangle] @@ -30,7 +30,7 @@ pub extern "C" fn deploy() {} pub extern "C" fn call() { input!(address: &[u8; 20], expected: u64,); - let received = u64_output!(api::code_size, address); + let received = api::code_size(address); assert_eq!(expected, received); } diff --git a/substrate/frame/revive/fixtures/contracts/return_data_api.rs b/substrate/frame/revive/fixtures/contracts/return_data_api.rs index 2a390296a419..1d483373cffd 100644 --- a/substrate/frame/revive/fixtures/contracts/return_data_api.rs +++ b/substrate/frame/revive/fixtures/contracts/return_data_api.rs @@ -75,9 +75,7 @@ fn recursion_guard() -> [u8; 20] { /// Assert [api::return_data_size] to match the `expected` value. fn assert_return_data_size_of(expected: u64) { - let mut return_data_size = [0xff; 32]; - api::return_data_size(&mut return_data_size); - assert_eq!(return_data_size, u256_bytes(expected)); + assert_eq!(api::return_data_size(), expected); } /// Assert the return data to be reset after a balance transfer. diff --git a/substrate/frame/revive/rpc/examples/js/pvm/ErrorTester.polkavm b/substrate/frame/revive/rpc/examples/js/pvm/ErrorTester.polkavm index af60be273d74d130967cd91c903ef85de1bf69bd..5c3995bffe35c6595cf3758f7ac98f295c6e69a5 100644 GIT binary patch delta 2114 zcmZ`&4Qv!e6yDj}-Pya|&+hixURzr4mT74#vmN+l3MYY{=gA2h@tBA^MHXbd2hgqUCuLD2|^LaU;0?|O(PPWEPA=Dqj5 z_kC}!cl5E*%H*k&7^ZOmlU@ij2mL8!bE})XZ}x%(oAQMF=Pq8bXoaw)V-&lo^d4pj zvz*z;{KeFuIy4QfM7OeWb{pHnsfg^ZPlm5SUubC-HMy*=KK@@)C%xq>`j39Uhs z{1;-97|T{`LP50V{^ACU(q36M>21}s>xe5H~KQKN_ z7jnMhHX9DTyyM9=4$%{OYX4TcF(-|CTfsnsc5#nO<2VkF=R^Q6C6FZ2YJMo{p|kiB z{>bkbze88?&#@&AdcfhuYAM{X4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YOQSHQGkQ ns{aB>QP=ZyE%U}=3Qrsid}Mq5#Ep}AT@O%3l(tO6fnn}H2O>p| diff --git a/substrate/frame/revive/rpc/examples/js/pvm/EventExample.polkavm b/substrate/frame/revive/rpc/examples/js/pvm/EventExample.polkavm index 67f02042c784cdc354e1b2507ecbe67ab1f59050..7880647f379277d3bcb7f6aea40fc4ba52938b9c 100644 GIT binary patch delta 434 zcmXAhO-NK>6o$WZ?z!K&_hQYxml>5xOPlg1!GzI%HVv~V@1#?Z3Ikh|;HITSE!>4mlSZA%ck}Qro@XWeI_zJ)-mO%Nqy7(A zeU8ugpSm7x)1BMtbQbi`@K}2Ep?-YvFlL=q^-FCi4P&qX1^5a*n8rz*!*95S^~R_X zp=b1ys&s>n>sNY!e=u0K)WV0l%|6%ai}(+Km@Mt$ncYD?tuTe&AfHvpri8FT@9r=! zDOodWq!%y2tSn-!A6EuuQraV)Qf0SdSk^ECS7ZZQq}sT3-YFMiRn)oP_TLtnkCIi& zW0n}mPMIaStcK@{A)YYR{;PZeuN4kk<#I^feG#FCttlhYx|mXcbKlV8c!nJCTFp>%`c zE5k1aNycWz&5S1*Z!=~xwJ=R$TF>-^Nr2gkxt&>;Wf{v47JW8*wg|QZY~}3l*d;j> zC(AMJH8~I^U=by15GAIOA?hF`_&}(Pk%gUwgH3=*_kRMr0Rt10xF3@sqqrEm1p|{i zn*#$gJKN+xjOvVUCaW-IGB!=_W0KQIU|?n{_hS=eVQ*jn>E#Lf$IdRv!XBL=!NTds z3KR#4^4Uzj!lc8>0y1e5bDUswdIe*-i8zY~L|SOhH!j>=mpG5HYdh$upQ` z7{exSWj0|{ocxMeo9XMH$>J;;jHf3%u=p_6P3~n`%6Mb4F>3{5{Ny#PfsDMH|FN1e zYG3=w&K~)Pg?#}-bcO<(fYvb}-}6s&Mn!bGL~1*GMh8$L6DXnc{paL(_B2M<$;a5Y zG4@TasNJyzgfXTxnXi^qXL7<0HsmF>ykCmcEn!OzzB0@@8Dh(={o~E8& LlSC#Laqa>D2Hb-q diff --git a/substrate/frame/revive/rpc/examples/js/pvm/Flipper.polkavm b/substrate/frame/revive/rpc/examples/js/pvm/Flipper.polkavm index ebb06b6949e3856a1e367e99c1c7481fdc32e6ae..1f036fa37948fa66ab9928b41b8658718bfd513b 100644 GIT binary patch delta 414 zcmcb`yPsDmAk3G6VLuxK7%;Lk98{PnG|N(vB{?xCr&WV3CAASMpwpg#%jg_rrAs$%tQxEa6QBAje25a@h!PblWn^Jz;b0SB zTAskp!NBClB$&W1z`(@LIyse5ov~nYFJmSX+yBWw7-cmS7?_#L{a6KA*c%u?T6nJg zV`rCSVUNy`VBz#*0g8h}`3_9BWisXL0?IvPV&UYN+`!by$^|lWG9Pmsn{K}DZ4$1?7n?8;)tSU0(arJ9N9&tyhcXF;$Q6LA(Hh_P~OCx^1GU}E__`9G^% zz0PkIb~XVebs)vaCZHn!n_+2-3a6HeNRWr>QY8}=r%5WRicTDg4J|6FE7d$bg<4gD z+FPVrr$i}EzSPm-;n^YJ#G#jB3L-)ZRq*5=pyD6krKg^}s3_h94+g|-^<5r(zTfwGZ_~SJZ+>BpkX=Uh z2RL~j#@^GJ8N712*<26V)oW|bo447+agVOcI_Z!e*(M%Da0yo75p?Mrx?(&x#&HeD z%+M^wpXW}zt2w7?!^dkQ`NnYQxu3jSfE+F6&}S>$B9vw;)P?K_cL<$jJ~24cRX7Su z`VQQf{rQJ;xmb5-t4(V4QMAymxG5_`D7VtcLt@ZY#dMLk$)5AzhonD-e6cZ_6fxm@ zbm+A%(CML8l6|3QCr>fu=mzbXi5Xh@7hQ&X`l3;Qs%{(Q|Ma7=1Y7zTo`vhWiFfJu zf&PZ)-2Ic2S@iz7bDR2%xlMok)?dxs{mcM4bB-KJ7BENf0om#ZyC5>vQXtjF{DBEq zi7DHSED&N!PRp{&i}UK-r;%Y*4U&N6T!AlYJ%7ws=^#gVoHuMXY`wJW6bCUo7 diff --git a/substrate/frame/revive/rpc/examples/js/pvm/FlipperCaller.polkavm b/substr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p(rNe~--nW|v~M8fJbs6y2!coYy&RRle_o7S@k${V><9dsV?HgxoI zfa%6{-kXDce!GV3!Ogq(c`xZo!NSkhoX34lK=eG`pf~k2&BUZhLhU5Y>C#PMx(HxF zs{!CLMHSxtAW2O(RgfX>QQ)mW7S1RR5?;O1h!@o&HNnwZ+IfB z{|1kK^J7A4Rx9w#Lx@4@!ZQHy%)2exg$L9wJc}#XT7W}Qdl9x+Ml^c|>=%$CT@|G< zuXNFyo!jJWR`3h+D|pzgQaj1ZJx{_e*H)anzWI^omI#?*rY+9x$kSh^_0w~-L74tU zy2|}@c%j3lMd+|;0-qBqt27v*wX&^5wz%I0j_`8wYY^cu=K=R)tm+OScc}Dd(DmtO zPC?;;F)yc7Fx~D8s?dM-`+|+WV91I1>+olb&VGN*NZXPdZ$N_w;^o1{CFXKL6Wg_# zl-^>L&L*pxm2f!RVqDaWuqK|@#%t!}c)XycwggMJy^jP+#rBrba$=&S8AiKdgkLDb zTR2=QX+fix$XB0If)w8<=tP+U?9Bx8OgpJ#JLQz2Fohs;{tNhzG z9{(|xOA`|b$RTAIr3gUqC4*8~HhSZrNnL6)QY8%%KcE?xwB~?u=}`D=@q#-^l*&e? kH1UOBPfumL7V(MMl+dghZCXLbTJsOUApYb2lrAv;0%d)9E&u=k diff --git a/substrate/frame/revive/rpc/examples/js/pvm/PiggyBank.polkavm b/substrate/frame/revive/rpc/examples/js/pvm/PiggyBank.polkavm index 416577ad8f23e9229df7580011424dea4ec4f21f..b29c640a2fee562cca818f8289bcca2cbe285fa9 100644 GIT binary patch delta 2865 zcmZuy4{Q_H8Na)n{odIQKD!Aq!N4WDI8KJZqtJO7tFDpT+@azbCuFDh6e$p_yEtJ> zLq-y^DH+QeC$v)H3nK(&LX{B-RXe6_BG68QtrDTV_?3rqAQfp&gV2(1g%tLlN_bm5iZixGh;}4E)=rDR3?-tsGmxT|6S{HVI#(l$G z?OFDON{^IE>)u?ad*Aoo^;U|CsEU@tJ})g35tDNN*H|9$*eP=7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Rc(x&gFI;*zku$Ippk~6a05Or6sX@8hTXM zhN@F_z^C>F)cv6fr@Mc13FGj`(Az92`Yb87SyBuGq5iD;>}XPbCa$i;An0r$AYA}< z5oUw{6xttXL3&xt%m(1MdOqSNm#*+ytQ5GggWl5z&~IHS1uhJMgX_wIPg?N01)rLK zj^=#EYM72}H&)x|$Tnj&L`QBmRs(dzZ>;+0$ktI~mC}(0<2gce^>mmT%VC=H8p~}o zS7$7TXs*^+4$xeUvFxL{n~Y^jbJfNIVFeXEE$Zkvq=+LNOO#0}M&6uQg2pM@oO}G~# z<@+GSbgKpqll4#a6f5Z|(lgUzV)D*qW<=osK@#qb7!+w7!D`jerMb;Yl1_eFM(3gF zhS6Yv*Wr#!Ld7{~M81ee@lW7|RZGN*pl;Js2!X+WItTonN&#}JWn$n%`{3nD6YC<- zwYhftu8UR=Xm5pqchG3?B6nt77F*?-M65|E9F4mgJ;7kGsj;0jj*ZJrOU;TBY-(vz zl!81py-=8zTbE>IG#Hedl-9!0e5^Au)m>AF-6_8wT6o<#JAHpN+Sxu%+uOOu#^~{} zv9V2zBl-M-d}2ZV+LuqrN+&{v>4iDDX|g7`CpZ<0j+fs}btVdWbQ-*XyI`TP z+1oBFtu0D*Q)6Lax0X`~AHhGqYI}}c7g+R$lP^k_oK|?NdD~*lZe*qHm$L|0D diff --git a/substrate/frame/revive/src/benchmarking/mod.rs b/substrate/frame/revive/src/benchmarking/mod.rs index 28736cd8d5da..6f84ecdd1525 100644 --- a/substrate/frame/revive/src/benchmarking/mod.rs +++ b/substrate/frame/revive/src/benchmarking/mod.rs @@ -596,19 +596,15 @@ mod benchmarks { #[benchmark(pov_mode = Measured)] fn seal_code_size() { let contract = Contract::::with_index(1, WasmModule::dummy(), vec![]).unwrap(); - build_runtime!(runtime, memory: [contract.address.encode(), vec![0u8; 32], ]); + build_runtime!(runtime, memory: [contract.address.encode(),]); let result; #[block] { - result = runtime.bench_code_size(memory.as_mut_slice(), 0, 20); + result = runtime.bench_code_size(memory.as_mut_slice(), 0); } - assert_ok!(result); - assert_eq!( - U256::from_little_endian(&memory[20..]), - U256::from(WasmModule::dummy().code.len()) - ); + assert_eq!(result.unwrap(), WasmModule::dummy().code.len() as u64); } #[benchmark(pov_mode = Measured)] @@ -783,19 +779,34 @@ mod benchmarks { assert_eq!(U256::from_little_endian(&memory[..]), runtime.ext().minimum_balance()); } + #[benchmark(pov_mode = Measured)] + fn seal_return_data_size() { + let mut setup = CallSetup::::default(); + let (mut ext, _) = setup.ext(); + let mut runtime = crate::wasm::Runtime::new(&mut ext, vec![]); + let mut memory = memory!(vec![],); + *runtime.ext().last_frame_output_mut() = + ExecReturnValue { data: vec![42; 256], ..Default::default() }; + let result; + #[block] + { + result = runtime.bench_return_data_size(memory.as_mut_slice()); + } + assert_eq!(result.unwrap(), 256); + } + #[benchmark(pov_mode = Measured)] fn seal_call_data_size() { let mut setup = CallSetup::::default(); let (mut ext, _) = setup.ext(); let mut runtime = crate::wasm::Runtime::new(&mut ext, vec![42u8; 128 as usize]); - let mut memory = memory!(vec![0u8; 32 as usize],); + let mut memory = memory!(vec![0u8; 4],); let result; #[block] { - result = runtime.bench_call_data_size(memory.as_mut_slice(), 0); + result = runtime.bench_call_data_size(memory.as_mut_slice()); } - assert_ok!(result); - assert_eq!(U256::from_little_endian(&memory[..]), U256::from(128)); + assert_eq!(result.unwrap(), 128); } #[benchmark(pov_mode = Measured)] diff --git a/substrate/frame/revive/src/exec.rs b/substrate/frame/revive/src/exec.rs index b6f0e3ae1a81..a6a259149768 100644 --- a/substrate/frame/revive/src/exec.rs +++ b/substrate/frame/revive/src/exec.rs @@ -298,7 +298,7 @@ pub trait Ext: sealing::Sealed { fn code_hash(&self, address: &H160) -> H256; /// Returns the code size of the contract at the given `address` or zero. - fn code_size(&self, address: &H160) -> U256; + fn code_size(&self, address: &H160) -> u64; /// Returns the code hash of the contract being executed. fn own_code_hash(&mut self) -> &H256; @@ -1663,7 +1663,7 @@ where }) } - fn code_size(&self, address: &H160) -> U256 { + fn code_size(&self, address: &H160) -> u64 { >::get(&address) .and_then(|contract| CodeInfoOf::::get(contract.code_hash)) .map(|info| info.code_len()) diff --git a/substrate/frame/revive/src/tests.rs b/substrate/frame/revive/src/tests.rs index b73f50e34bc5..90c032bd0840 100644 --- a/substrate/frame/revive/src/tests.rs +++ b/substrate/frame/revive/src/tests.rs @@ -4377,11 +4377,11 @@ fn call_data_size_api_works() { // Call the contract: It echoes back the value returned by the call data size API. let received = builder::bare_call(addr).build_and_unwrap_result(); assert_eq!(received.flags, ReturnFlags::empty()); - assert_eq!(U256::from_little_endian(&received.data), U256::zero()); + assert_eq!(u64::from_le_bytes(received.data.try_into().unwrap()), 0); let received = builder::bare_call(addr).data(vec![1; 256]).build_and_unwrap_result(); assert_eq!(received.flags, ReturnFlags::empty()); - assert_eq!(U256::from_little_endian(&received.data), U256::from(256)); + assert_eq!(u64::from_le_bytes(received.data.try_into().unwrap()), 256); }); } diff --git a/substrate/frame/revive/src/wasm/mod.rs b/substrate/frame/revive/src/wasm/mod.rs index e963895dafae..b24de61314f9 100644 --- a/substrate/frame/revive/src/wasm/mod.rs +++ b/substrate/frame/revive/src/wasm/mod.rs @@ -242,7 +242,7 @@ impl CodeInfo { } /// Returns the code length. - pub fn code_len(&self) -> U256 { + pub fn code_len(&self) -> u64 { self.code_len.into() } } diff --git a/substrate/frame/revive/src/wasm/runtime.rs b/substrate/frame/revive/src/wasm/runtime.rs index 47fdfa8bab09..d1a14ca1a93a 100644 --- a/substrate/frame/revive/src/wasm/runtime.rs +++ b/substrate/frame/revive/src/wasm/runtime.rs @@ -290,6 +290,8 @@ pub enum RuntimeCosts { Caller, /// Weight of calling `seal_call_data_size`. CallDataSize, + /// Weight of calling `seal_return_data_size`. + ReturnDataSize, /// Weight of calling `seal_origin`. Origin, /// Weight of calling `seal_is_contract`. @@ -453,6 +455,7 @@ impl Token for RuntimeCosts { CopyToContract(len) => T::WeightInfo::seal_copy_to_contract(len), CopyFromContract(len) => T::WeightInfo::seal_return(len), CallDataSize => T::WeightInfo::seal_call_data_size(), + ReturnDataSize => T::WeightInfo::seal_return_data_size(), CallDataLoad => T::WeightInfo::seal_call_data_load(), CallDataCopy(len) => T::WeightInfo::seal_call_data_copy(len), Caller => T::WeightInfo::seal_caller(), @@ -1283,17 +1286,13 @@ pub mod env { /// Returns the total size of the contract call input data. /// See [`pallet_revive_uapi::HostFn::call_data_size `]. #[stable] - fn call_data_size(&mut self, memory: &mut M, out_ptr: u32) -> Result<(), TrapReason> { + fn call_data_size(&mut self, memory: &mut M) -> Result { self.charge_gas(RuntimeCosts::CallDataSize)?; - let value = - U256::from(self.input_data.as_ref().map(|input| input.len()).unwrap_or_default()); - Ok(self.write_fixed_sandbox_output( - memory, - out_ptr, - &value.to_little_endian(), - false, - already_charged, - )?) + Ok(self + .input_data + .as_ref() + .map(|input| input.len().try_into().expect("usize fits into u64; qed")) + .unwrap_or_default()) } /// Stores the input passed by the caller into the supplied buffer. @@ -1420,16 +1419,10 @@ pub mod env { /// Retrieve the code size for a given contract address. /// See [`pallet_revive_uapi::HostFn::code_size`]. #[stable] - fn code_size(&mut self, memory: &mut M, addr_ptr: u32, out_ptr: u32) -> Result<(), TrapReason> { + fn code_size(&mut self, memory: &mut M, addr_ptr: u32) -> Result { self.charge_gas(RuntimeCosts::CodeSize)?; let address = memory.read_h160(addr_ptr)?; - Ok(self.write_fixed_sandbox_output( - memory, - out_ptr, - &self.ext.code_size(&address).to_little_endian(), - false, - already_charged, - )?) + Ok(self.ext.code_size(&address)) } /// Stores the address of the current contract into the supplied buffer. @@ -1667,14 +1660,15 @@ pub mod env { /// Stores the length of the data returned by the last call into the supplied buffer. /// See [`pallet_revive_uapi::HostFn::return_data_size`]. #[stable] - fn return_data_size(&mut self, memory: &mut M, out_ptr: u32) -> Result<(), TrapReason> { - Ok(self.write_fixed_sandbox_output( - memory, - out_ptr, - &U256::from(self.ext.last_frame_output().data.len()).to_little_endian(), - false, - |len| Some(RuntimeCosts::CopyToContract(len)), - )?) + fn return_data_size(&mut self, memory: &mut M) -> Result { + self.charge_gas(RuntimeCosts::ReturnDataSize)?; + Ok(self + .ext + .last_frame_output() + .data + .len() + .try_into() + .expect("usize fits into u64; qed")) } /// Stores data returned by the last call, starting from `offset`, into the supplied buffer. diff --git a/substrate/frame/revive/src/weights.rs b/substrate/frame/revive/src/weights.rs index 03899fb3f20a..db3c34a75878 100644 --- a/substrate/frame/revive/src/weights.rs +++ b/substrate/frame/revive/src/weights.rs @@ -20,7 +20,7 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `4ca2a44ee243`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `28f02a6d927a`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` // Executed Command: @@ -81,6 +81,7 @@ pub trait WeightInfo { fn seal_set_immutable_data(n: u32, ) -> Weight; fn seal_value_transferred() -> Weight; fn seal_minimum_balance() -> Weight; + fn seal_return_data_size() -> Weight; fn seal_call_data_size() -> Weight; fn seal_block_number() -> Weight; fn seal_block_hash() -> Weight; @@ -137,8 +138,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1594` - // Minimum execution time: 2_729_000 picoseconds. - Weight::from_parts(2_919_000, 1594) + // Minimum execution time: 2_752_000 picoseconds. + Weight::from_parts(2_990_000, 1594) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -148,10 +149,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `425 + k * (69 ±0)` // Estimated: `415 + k * (70 ±0)` - // Minimum execution time: 16_062_000 picoseconds. - Weight::from_parts(2_790_037, 415) - // Standard Error: 1_371 - .saturating_add(Weight::from_parts(1_187_192, 0).saturating_mul(k.into())) + // Minimum execution time: 16_130_000 picoseconds. + Weight::from_parts(3_413_527, 415) + // Standard Error: 1_190 + .saturating_add(Weight::from_parts(1_184_912, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(k.into()))) .saturating_add(T::DbWeight::get().writes(2_u64)) @@ -175,8 +176,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1465` // Estimated: `7405` - // Minimum execution time: 94_592_000 picoseconds. - Weight::from_parts(100_095_688, 7405) + // Minimum execution time: 91_977_000 picoseconds. + Weight::from_parts(96_482_355, 7405) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -196,16 +197,14 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Revive::PristineCode` (`max_values`: None, `max_size`: Some(262180), added: 264655, mode: `Measured`) /// The range of component `c` is `[0, 262144]`. /// The range of component `i` is `[0, 262144]`. - fn instantiate_with_code(c: u32, i: u32, ) -> Weight { + fn instantiate_with_code(_c: u32, i: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `416` // Estimated: `6348` - // Minimum execution time: 205_430_000 picoseconds. - Weight::from_parts(190_302_613, 6348) - // Standard Error: 10 - .saturating_add(Weight::from_parts(2, 0).saturating_mul(c.into())) - // Standard Error: 10 - .saturating_add(Weight::from_parts(4_465, 0).saturating_mul(i.into())) + // Minimum execution time: 197_911_000 picoseconds. + Weight::from_parts(185_839_401, 6348) + // Standard Error: 9 + .saturating_add(Weight::from_parts(4_419, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -228,10 +227,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1309` // Estimated: `4760` - // Minimum execution time: 168_842_000 picoseconds. - Weight::from_parts(154_652_310, 4760) + // Minimum execution time: 162_062_000 picoseconds. + Weight::from_parts(146_040_237, 4760) // Standard Error: 15 - .saturating_add(Weight::from_parts(4_407, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(4_410, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -251,8 +250,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1465` // Estimated: `7405` - // Minimum execution time: 144_703_000 picoseconds. - Weight::from_parts(151_937_000, 7405) + // Minimum execution time: 143_737_000 picoseconds. + Weight::from_parts(151_572_000, 7405) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -267,8 +266,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `109` // Estimated: `3574` - // Minimum execution time: 52_912_000 picoseconds. - Weight::from_parts(54_905_094, 3574) + // Minimum execution time: 52_301_000 picoseconds. + Weight::from_parts(54_773_649, 3574) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -282,8 +281,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `285` // Estimated: `3750` - // Minimum execution time: 46_323_000 picoseconds. - Weight::from_parts(47_075_000, 3750) + // Minimum execution time: 45_699_000 picoseconds. + Weight::from_parts(46_961_000, 3750) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -295,8 +294,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `529` // Estimated: `6469` - // Minimum execution time: 27_120_000 picoseconds. - Weight::from_parts(28_635_000, 6469) + // Minimum execution time: 26_501_000 picoseconds. + Weight::from_parts(27_913_000, 6469) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -308,8 +307,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `109` // Estimated: `3574` - // Minimum execution time: 42_489_000 picoseconds. - Weight::from_parts(43_230_000, 3574) + // Minimum execution time: 41_673_000 picoseconds. + Weight::from_parts(42_360_000, 3574) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -321,8 +320,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `56` // Estimated: `3521` - // Minimum execution time: 34_042_000 picoseconds. - Weight::from_parts(34_758_000, 3521) + // Minimum execution time: 32_530_000 picoseconds. + Weight::from_parts(33_997_000, 3521) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -334,8 +333,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `145` // Estimated: `3610` - // Minimum execution time: 14_322_000 picoseconds. - Weight::from_parts(14_761_000, 3610) + // Minimum execution time: 13_327_000 picoseconds. + Weight::from_parts(13_976_000, 3610) .saturating_add(T::DbWeight::get().reads(2_u64)) } /// The range of component `r` is `[0, 1600]`. @@ -343,24 +342,24 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 14_300_000 picoseconds. - Weight::from_parts(14_435_272, 0) - // Standard Error: 357 - .saturating_add(Weight::from_parts(151_410, 0).saturating_mul(r.into())) + // Minimum execution time: 7_317_000 picoseconds. + Weight::from_parts(7_742_783, 0) + // Standard Error: 274 + .saturating_add(Weight::from_parts(166_272, 0).saturating_mul(r.into())) } fn seal_caller() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 315_000 picoseconds. - Weight::from_parts(355_000, 0) + // Minimum execution time: 300_000 picoseconds. + Weight::from_parts(349_000, 0) } fn seal_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 252_000 picoseconds. - Weight::from_parts(300_000, 0) + // Minimum execution time: 248_000 picoseconds. + Weight::from_parts(293_000, 0) } /// Storage: `Revive::ContractInfoOf` (r:1 w:0) /// Proof: `Revive::ContractInfoOf` (`max_values`: None, `max_size`: Some(1779), added: 4254, mode: `Measured`) @@ -368,8 +367,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `306` // Estimated: `3771` - // Minimum execution time: 10_073_000 picoseconds. - Weight::from_parts(10_791_000, 3771) + // Minimum execution time: 10_018_000 picoseconds. + Weight::from_parts(10_399_000, 3771) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Revive::ContractInfoOf` (r:1 w:0) @@ -378,16 +377,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `403` // Estimated: `3868` - // Minimum execution time: 11_216_000 picoseconds. - Weight::from_parts(11_917_000, 3868) + // Minimum execution time: 11_209_000 picoseconds. + Weight::from_parts(11_640_000, 3868) .saturating_add(T::DbWeight::get().reads(1_u64)) } fn seal_own_code_hash() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 269_000 picoseconds. - Weight::from_parts(308_000, 0) + // Minimum execution time: 280_000 picoseconds. + Weight::from_parts(309_000, 0) } /// Storage: `Revive::ContractInfoOf` (r:1 w:0) /// Proof: `Revive::ContractInfoOf` (`max_values`: None, `max_size`: Some(1779), added: 4254, mode: `Measured`) @@ -397,51 +396,51 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `473` // Estimated: `3938` - // Minimum execution time: 15_159_000 picoseconds. - Weight::from_parts(15_933_000, 3938) + // Minimum execution time: 14_718_000 picoseconds. + Weight::from_parts(15_292_000, 3938) .saturating_add(T::DbWeight::get().reads(2_u64)) } fn seal_caller_is_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 367_000 picoseconds. + // Minimum execution time: 336_000 picoseconds. Weight::from_parts(391_000, 0) } fn seal_caller_is_root() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 294_000 picoseconds. - Weight::from_parts(331_000, 0) + // Minimum execution time: 275_000 picoseconds. + Weight::from_parts(296_000, 0) } fn seal_address() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 275_000 picoseconds. - Weight::from_parts(318_000, 0) + // Minimum execution time: 262_000 picoseconds. + Weight::from_parts(304_000, 0) } fn seal_weight_left() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 660_000 picoseconds. - Weight::from_parts(697_000, 0) + // Minimum execution time: 628_000 picoseconds. + Weight::from_parts(714_000, 0) } fn seal_ref_time_left() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 288_000 picoseconds. - Weight::from_parts(306_000, 0) + // Minimum execution time: 246_000 picoseconds. + Weight::from_parts(265_000, 0) } fn seal_balance() -> Weight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `0` - // Minimum execution time: 5_577_000 picoseconds. - Weight::from_parts(5_918_000, 0) + // Minimum execution time: 5_605_000 picoseconds. + Weight::from_parts(5_769_000, 0) } /// Storage: `Revive::AddressSuffix` (r:1 w:0) /// Proof: `Revive::AddressSuffix` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `Measured`) @@ -451,8 +450,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `264` // Estimated: `3729` - // Minimum execution time: 9_264_000 picoseconds. - Weight::from_parts(9_589_000, 3729) + // Minimum execution time: 8_990_000 picoseconds. + Weight::from_parts(9_223_000, 3729) .saturating_add(T::DbWeight::get().reads(2_u64)) } /// Storage: `Revive::ImmutableDataOf` (r:1 w:0) @@ -462,10 +461,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `238 + n * (1 ±0)` // Estimated: `3703 + n * (1 ±0)` - // Minimum execution time: 6_082_000 picoseconds. - Weight::from_parts(6_789_222, 3703) + // Minimum execution time: 6_001_000 picoseconds. + Weight::from_parts(6_630_017, 3703) // Standard Error: 4 - .saturating_add(Weight::from_parts(670, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(622, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -476,39 +475,46 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_950_000 picoseconds. - Weight::from_parts(2_244_232, 0) + // Minimum execution time: 2_026_000 picoseconds. + Weight::from_parts(2_271_985, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(574, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(537, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().writes(1_u64)) } fn seal_value_transferred() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 254_000 picoseconds. - Weight::from_parts(304_000, 0) + // Minimum execution time: 287_000 picoseconds. + Weight::from_parts(323_000, 0) } fn seal_minimum_balance() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 251_000 picoseconds. - Weight::from_parts(292_000, 0) + // Minimum execution time: 230_000 picoseconds. + Weight::from_parts(275_000, 0) + } + fn seal_return_data_size() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 242_000 picoseconds. + Weight::from_parts(268_000, 0) } fn seal_call_data_size() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 262_000 picoseconds. - Weight::from_parts(288_000, 0) + // Minimum execution time: 244_000 picoseconds. + Weight::from_parts(271_000, 0) } fn seal_block_number() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 269_000 picoseconds. - Weight::from_parts(302_000, 0) + // Minimum execution time: 266_000 picoseconds. + Weight::from_parts(304_000, 0) } /// Storage: `System::BlockHash` (r:1 w:0) /// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `Measured`) @@ -516,60 +522,60 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `30` // Estimated: `3495` - // Minimum execution time: 3_690_000 picoseconds. - Weight::from_parts(3_791_000, 3495) + // Minimum execution time: 3_559_000 picoseconds. + Weight::from_parts(3_697_000, 3495) .saturating_add(T::DbWeight::get().reads(1_u64)) } fn seal_now() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 261_000 picoseconds. - Weight::from_parts(307_000, 0) + // Minimum execution time: 242_000 picoseconds. + Weight::from_parts(294_000, 0) } fn seal_weight_to_fee() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_417_000 picoseconds. - Weight::from_parts(1_547_000, 0) + // Minimum execution time: 1_222_000 picoseconds. + Weight::from_parts(1_387_000, 0) } /// The range of component `n` is `[0, 262140]`. fn seal_copy_to_contract(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 364_000 picoseconds. - Weight::from_parts(566_499, 0) + // Minimum execution time: 392_000 picoseconds. + Weight::from_parts(397_500, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(237, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(206, 0).saturating_mul(n.into())) } fn seal_call_data_load() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 279_000 picoseconds. - Weight::from_parts(305_000, 0) + // Minimum execution time: 267_000 picoseconds. + Weight::from_parts(322_000, 0) } /// The range of component `n` is `[0, 262144]`. fn seal_call_data_copy(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 265_000 picoseconds. - Weight::from_parts(359_300, 0) + // Minimum execution time: 234_000 picoseconds. + Weight::from_parts(291_182, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(148, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(113, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 262140]`. fn seal_return(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 278_000 picoseconds. - Weight::from_parts(474_421, 0) + // Minimum execution time: 253_000 picoseconds. + Weight::from_parts(271_000, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(237, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(212, 0).saturating_mul(n.into())) } /// Storage: `Revive::AddressSuffix` (r:1 w:0) /// Proof: `Revive::AddressSuffix` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `Measured`) @@ -586,10 +592,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `324 + n * (88 ±0)` // Estimated: `3790 + n * (2563 ±0)` - // Minimum execution time: 23_182_000 picoseconds. - Weight::from_parts(23_833_588, 3790) - // Standard Error: 12_448 - .saturating_add(Weight::from_parts(4_277_757, 0).saturating_mul(n.into())) + // Minimum execution time: 22_082_000 picoseconds. + Weight::from_parts(22_815_417, 3790) + // Standard Error: 9_515 + .saturating_add(Weight::from_parts(4_283_767, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(4_u64)) @@ -602,22 +608,22 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_433_000 picoseconds. - Weight::from_parts(4_321_363, 0) - // Standard Error: 2_536 - .saturating_add(Weight::from_parts(207_597, 0).saturating_mul(t.into())) - // Standard Error: 22 - .saturating_add(Weight::from_parts(957, 0).saturating_mul(n.into())) + // Minimum execution time: 4_242_000 picoseconds. + Weight::from_parts(4_360_337, 0) + // Standard Error: 3_223 + .saturating_add(Weight::from_parts(201_105, 0).saturating_mul(t.into())) + // Standard Error: 28 + .saturating_add(Weight::from_parts(723, 0).saturating_mul(n.into())) } /// The range of component `i` is `[0, 262144]`. fn seal_debug_message(i: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 353_000 picoseconds. - Weight::from_parts(78_798, 0) + // Minimum execution time: 340_000 picoseconds. + Weight::from_parts(773_824, 0) // Standard Error: 1 - .saturating_add(Weight::from_parts(762, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(722, 0).saturating_mul(i.into())) } /// Storage: `Skipped::Metadata` (r:0 w:0) /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -625,8 +631,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `744` // Estimated: `744` - // Minimum execution time: 7_701_000 picoseconds. - Weight::from_parts(8_043_000, 744) + // Minimum execution time: 7_741_000 picoseconds. + Weight::from_parts(8_048_000, 744) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -635,8 +641,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `10754` // Estimated: `10754` - // Minimum execution time: 42_961_000 picoseconds. - Weight::from_parts(44_719_000, 10754) + // Minimum execution time: 42_314_000 picoseconds. + Weight::from_parts(43_255_000, 10754) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -645,8 +651,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `744` // Estimated: `744` - // Minimum execution time: 8_575_000 picoseconds. - Weight::from_parts(9_239_000, 744) + // Minimum execution time: 8_741_000 picoseconds. + Weight::from_parts(9_123_000, 744) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -656,8 +662,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `10754` // Estimated: `10754` - // Minimum execution time: 43_585_000 picoseconds. - Weight::from_parts(45_719_000, 10754) + // Minimum execution time: 44_703_000 picoseconds. + Weight::from_parts(46_403_000, 10754) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -669,12 +675,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `248 + o * (1 ±0)` // Estimated: `247 + o * (1 ±0)` - // Minimum execution time: 9_147_000 picoseconds. - Weight::from_parts(9_851_872, 247) - // Standard Error: 40 - .saturating_add(Weight::from_parts(222, 0).saturating_mul(n.into())) - // Standard Error: 40 - .saturating_add(Weight::from_parts(411, 0).saturating_mul(o.into())) + // Minimum execution time: 9_285_000 picoseconds. + Weight::from_parts(10_046_720, 247) + // Standard Error: 37 + .saturating_add(Weight::from_parts(365, 0).saturating_mul(n.into())) + // Standard Error: 37 + .saturating_add(Weight::from_parts(273, 0).saturating_mul(o.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(o.into())) @@ -686,10 +692,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `248 + n * (1 ±0)` // Estimated: `247 + n * (1 ±0)` - // Minimum execution time: 8_859_000 picoseconds. - Weight::from_parts(9_633_190, 247) - // Standard Error: 55 - .saturating_add(Weight::from_parts(995, 0).saturating_mul(n.into())) + // Minimum execution time: 8_879_000 picoseconds. + Weight::from_parts(9_736_050, 247) + // Standard Error: 48 + .saturating_add(Weight::from_parts(514, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -701,10 +707,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `248 + n * (1 ±0)` // Estimated: `247 + n * (1 ±0)` - // Minimum execution time: 8_270_000 picoseconds. - Weight::from_parts(9_208_849, 247) - // Standard Error: 67 - .saturating_add(Weight::from_parts(1_686, 0).saturating_mul(n.into())) + // Minimum execution time: 8_475_000 picoseconds. + Weight::from_parts(9_410_206, 247) + // Standard Error: 58 + .saturating_add(Weight::from_parts(1_409, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -715,10 +721,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `248 + n * (1 ±0)` // Estimated: `247 + n * (1 ±0)` - // Minimum execution time: 8_002_000 picoseconds. - Weight::from_parts(8_695_892, 247) - // Standard Error: 48 - .saturating_add(Weight::from_parts(721, 0).saturating_mul(n.into())) + // Minimum execution time: 8_017_000 picoseconds. + Weight::from_parts(8_879_089, 247) + // Standard Error: 51 + .saturating_add(Weight::from_parts(512, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -729,10 +735,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `248 + n * (1 ±0)` // Estimated: `247 + n * (1 ±0)` - // Minimum execution time: 9_204_000 picoseconds. - Weight::from_parts(10_176_756, 247) - // Standard Error: 57 - .saturating_add(Weight::from_parts(1_550, 0).saturating_mul(n.into())) + // Minimum execution time: 9_196_000 picoseconds. + Weight::from_parts(10_285_787, 247) + // Standard Error: 65 + .saturating_add(Weight::from_parts(1_553, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -741,36 +747,36 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_518_000 picoseconds. - Weight::from_parts(1_578_000, 0) + // Minimum execution time: 1_456_000 picoseconds. + Weight::from_parts(1_593_000, 0) } fn set_transient_storage_full() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_846_000 picoseconds. - Weight::from_parts(1_996_000, 0) + // Minimum execution time: 1_897_000 picoseconds. + Weight::from_parts(2_059_000, 0) } fn get_transient_storage_empty() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_442_000 picoseconds. - Weight::from_parts(1_562_000, 0) + // Minimum execution time: 1_487_000 picoseconds. + Weight::from_parts(1_588_000, 0) } fn get_transient_storage_full() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_602_000 picoseconds. - Weight::from_parts(1_730_000, 0) + // Minimum execution time: 1_622_000 picoseconds. + Weight::from_parts(1_732_000, 0) } fn rollback_transient_storage() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_096_000 picoseconds. - Weight::from_parts(1_176_000, 0) + // Minimum execution time: 1_188_000 picoseconds. + Weight::from_parts(1_239_000, 0) } /// The range of component `n` is `[0, 512]`. /// The range of component `o` is `[0, 512]`. @@ -778,52 +784,50 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_328_000 picoseconds. - Weight::from_parts(2_470_198, 0) - // Standard Error: 14 - .saturating_add(Weight::from_parts(256, 0).saturating_mul(n.into())) - // Standard Error: 14 - .saturating_add(Weight::from_parts(441, 0).saturating_mul(o.into())) + // Minimum execution time: 2_269_000 picoseconds. + Weight::from_parts(2_528_717, 0) + // Standard Error: 12 + .saturating_add(Weight::from_parts(163, 0).saturating_mul(n.into())) + // Standard Error: 12 + .saturating_add(Weight::from_parts(332, 0).saturating_mul(o.into())) } /// The range of component `n` is `[0, 512]`. fn seal_clear_transient_storage(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_037_000 picoseconds. - Weight::from_parts(2_439_061, 0) - // Standard Error: 17 - .saturating_add(Weight::from_parts(303, 0).saturating_mul(n.into())) + // Minimum execution time: 2_051_000 picoseconds. + Weight::from_parts(2_507_009, 0) + // Standard Error: 20 + .saturating_add(Weight::from_parts(309, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 512]`. fn seal_get_transient_storage(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_900_000 picoseconds. - Weight::from_parts(2_095_135, 0) - // Standard Error: 12 - .saturating_add(Weight::from_parts(310, 0).saturating_mul(n.into())) + // Minimum execution time: 1_829_000 picoseconds. + Weight::from_parts(2_052_749, 0) + // Standard Error: 14 + .saturating_add(Weight::from_parts(350, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 512]`. fn seal_contains_transient_storage(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_772_000 picoseconds. - Weight::from_parts(1_964_542, 0) - // Standard Error: 16 - .saturating_add(Weight::from_parts(298, 0).saturating_mul(n.into())) + // Minimum execution time: 1_717_000 picoseconds. + Weight::from_parts(1_930_820, 0) + // Standard Error: 12 + .saturating_add(Weight::from_parts(161, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 512]`. - fn seal_take_transient_storage(n: u32, ) -> Weight { + fn seal_take_transient_storage(_n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_555_000 picoseconds. - Weight::from_parts(2_864_143, 0) - // Standard Error: 22 - .saturating_add(Weight::from_parts(45, 0).saturating_mul(n.into())) + // Minimum execution time: 2_502_000 picoseconds. + Weight::from_parts(2_829_951, 0) } /// Storage: `Revive::AddressSuffix` (r:1 w:0) /// Proof: `Revive::AddressSuffix` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `Measured`) @@ -837,14 +841,16 @@ impl WeightInfo for SubstrateWeight { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) /// The range of component `t` is `[0, 1]`. /// The range of component `i` is `[0, 262144]`. - fn seal_call(t: u32, _i: u32, ) -> Weight { + fn seal_call(t: u32, i: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1292 + t * (280 ±0)` // Estimated: `4757 + t * (2518 ±0)` - // Minimum execution time: 40_760_000 picoseconds. - Weight::from_parts(45_131_001, 4757) - // Standard Error: 302_594 - .saturating_add(Weight::from_parts(2_769_232, 0).saturating_mul(t.into())) + // Minimum execution time: 40_791_000 picoseconds. + Weight::from_parts(42_421_336, 4757) + // Standard Error: 53_086 + .saturating_add(Weight::from_parts(2_057_850, 0).saturating_mul(t.into())) + // Standard Error: 0 + .saturating_add(Weight::from_parts(1, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(T::DbWeight::get().writes(1_u64)) @@ -860,8 +866,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1237` // Estimated: `4702` - // Minimum execution time: 36_975_000 picoseconds. - Weight::from_parts(38_368_000, 4702) + // Minimum execution time: 35_825_000 picoseconds. + Weight::from_parts(37_377_000, 4702) .saturating_add(T::DbWeight::get().reads(3_u64)) } /// Storage: `Revive::CodeInfoOf` (r:1 w:1) @@ -877,10 +883,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1310` // Estimated: `4769` - // Minimum execution time: 122_553_000 picoseconds. - Weight::from_parts(117_325_822, 4769) + // Minimum execution time: 121_920_000 picoseconds. + Weight::from_parts(115_842_357, 4769) // Standard Error: 10 - .saturating_add(Weight::from_parts(4_147, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(4_062, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -890,63 +896,63 @@ impl WeightInfo for SubstrateWeight { // Measured: `0` // Estimated: `0` // Minimum execution time: 657_000 picoseconds. - Weight::from_parts(3_531_259, 0) + Weight::from_parts(2_219_539, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(1_428, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_413, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 262144]`. fn seal_hash_keccak_256(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_072_000 picoseconds. - Weight::from_parts(5_487_006, 0) + // Minimum execution time: 1_091_000 picoseconds. + Weight::from_parts(4_036_613, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(3_634, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(3_600, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 262144]`. fn seal_hash_blake2_256(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 638_000 picoseconds. - Weight::from_parts(3_097_177, 0) + // Minimum execution time: 635_000 picoseconds. + Weight::from_parts(4_636_213, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(1_551, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_514, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 262144]`. fn seal_hash_blake2_128(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 682_000 picoseconds. - Weight::from_parts(2_963_774, 0) + // Minimum execution time: 648_000 picoseconds. + Weight::from_parts(3_658_083, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(1_561, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_516, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 261889]`. fn seal_sr25519_verify(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 42_791_000 picoseconds. - Weight::from_parts(27_471_391, 0) + // Minimum execution time: 42_722_000 picoseconds. + Weight::from_parts(28_496_037, 0) // Standard Error: 13 - .saturating_add(Weight::from_parts(5_246, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(5_235, 0).saturating_mul(n.into())) } fn seal_ecdsa_recover() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 46_565_000 picoseconds. - Weight::from_parts(48_251_000, 0) + // Minimum execution time: 46_924_000 picoseconds. + Weight::from_parts(48_639_000, 0) } fn seal_ecdsa_to_eth_address() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 12_562_000 picoseconds. - Weight::from_parts(12_664_000, 0) + // Minimum execution time: 12_882_000 picoseconds. + Weight::from_parts(13_108_000, 0) } /// Storage: `Revive::CodeInfoOf` (r:1 w:1) /// Proof: `Revive::CodeInfoOf` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `Measured`) @@ -954,8 +960,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `300` // Estimated: `3765` - // Minimum execution time: 18_527_000 picoseconds. - Weight::from_parts(19_134_000, 3765) + // Minimum execution time: 17_907_000 picoseconds. + Weight::from_parts(18_634_000, 3765) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -965,8 +971,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `338` // Estimated: `3803` - // Minimum execution time: 13_843_000 picoseconds. - Weight::from_parts(14_750_000, 3803) + // Minimum execution time: 14_091_000 picoseconds. + Weight::from_parts(14_393_000, 3803) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -976,8 +982,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `338` // Estimated: `3561` - // Minimum execution time: 13_013_000 picoseconds. - Weight::from_parts(13_612_000, 3561) + // Minimum execution time: 12_824_000 picoseconds. + Weight::from_parts(13_304_000, 3561) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -986,10 +992,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 15_182_000 picoseconds. - Weight::from_parts(16_987_060, 0) - // Standard Error: 105 - .saturating_add(Weight::from_parts(72_086, 0).saturating_mul(r.into())) + // Minimum execution time: 9_185_000 picoseconds. + Weight::from_parts(10_532_230, 0) + // Standard Error: 189 + .saturating_add(Weight::from_parts(71_786, 0).saturating_mul(r.into())) } } @@ -1001,8 +1007,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1594` - // Minimum execution time: 2_729_000 picoseconds. - Weight::from_parts(2_919_000, 1594) + // Minimum execution time: 2_752_000 picoseconds. + Weight::from_parts(2_990_000, 1594) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -1012,10 +1018,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `425 + k * (69 ±0)` // Estimated: `415 + k * (70 ±0)` - // Minimum execution time: 16_062_000 picoseconds. - Weight::from_parts(2_790_037, 415) - // Standard Error: 1_371 - .saturating_add(Weight::from_parts(1_187_192, 0).saturating_mul(k.into())) + // Minimum execution time: 16_130_000 picoseconds. + Weight::from_parts(3_413_527, 415) + // Standard Error: 1_190 + .saturating_add(Weight::from_parts(1_184_912, 0).saturating_mul(k.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(k.into()))) .saturating_add(RocksDbWeight::get().writes(2_u64)) @@ -1039,8 +1045,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1465` // Estimated: `7405` - // Minimum execution time: 94_592_000 picoseconds. - Weight::from_parts(100_095_688, 7405) + // Minimum execution time: 91_977_000 picoseconds. + Weight::from_parts(96_482_355, 7405) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -1060,16 +1066,14 @@ impl WeightInfo for () { /// Proof: `Revive::PristineCode` (`max_values`: None, `max_size`: Some(262180), added: 264655, mode: `Measured`) /// The range of component `c` is `[0, 262144]`. /// The range of component `i` is `[0, 262144]`. - fn instantiate_with_code(c: u32, i: u32, ) -> Weight { + fn instantiate_with_code(_c: u32, i: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `416` // Estimated: `6348` - // Minimum execution time: 205_430_000 picoseconds. - Weight::from_parts(190_302_613, 6348) - // Standard Error: 10 - .saturating_add(Weight::from_parts(2, 0).saturating_mul(c.into())) - // Standard Error: 10 - .saturating_add(Weight::from_parts(4_465, 0).saturating_mul(i.into())) + // Minimum execution time: 197_911_000 picoseconds. + Weight::from_parts(185_839_401, 6348) + // Standard Error: 9 + .saturating_add(Weight::from_parts(4_419, 0).saturating_mul(i.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -1092,10 +1096,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1309` // Estimated: `4760` - // Minimum execution time: 168_842_000 picoseconds. - Weight::from_parts(154_652_310, 4760) + // Minimum execution time: 162_062_000 picoseconds. + Weight::from_parts(146_040_237, 4760) // Standard Error: 15 - .saturating_add(Weight::from_parts(4_407, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(4_410, 0).saturating_mul(i.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -1115,8 +1119,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1465` // Estimated: `7405` - // Minimum execution time: 144_703_000 picoseconds. - Weight::from_parts(151_937_000, 7405) + // Minimum execution time: 143_737_000 picoseconds. + Weight::from_parts(151_572_000, 7405) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -1131,8 +1135,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `109` // Estimated: `3574` - // Minimum execution time: 52_912_000 picoseconds. - Weight::from_parts(54_905_094, 3574) + // Minimum execution time: 52_301_000 picoseconds. + Weight::from_parts(54_773_649, 3574) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -1146,8 +1150,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `285` // Estimated: `3750` - // Minimum execution time: 46_323_000 picoseconds. - Weight::from_parts(47_075_000, 3750) + // Minimum execution time: 45_699_000 picoseconds. + Weight::from_parts(46_961_000, 3750) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -1159,8 +1163,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `529` // Estimated: `6469` - // Minimum execution time: 27_120_000 picoseconds. - Weight::from_parts(28_635_000, 6469) + // Minimum execution time: 26_501_000 picoseconds. + Weight::from_parts(27_913_000, 6469) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -1172,8 +1176,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `109` // Estimated: `3574` - // Minimum execution time: 42_489_000 picoseconds. - Weight::from_parts(43_230_000, 3574) + // Minimum execution time: 41_673_000 picoseconds. + Weight::from_parts(42_360_000, 3574) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -1185,8 +1189,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `56` // Estimated: `3521` - // Minimum execution time: 34_042_000 picoseconds. - Weight::from_parts(34_758_000, 3521) + // Minimum execution time: 32_530_000 picoseconds. + Weight::from_parts(33_997_000, 3521) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -1198,8 +1202,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `145` // Estimated: `3610` - // Minimum execution time: 14_322_000 picoseconds. - Weight::from_parts(14_761_000, 3610) + // Minimum execution time: 13_327_000 picoseconds. + Weight::from_parts(13_976_000, 3610) .saturating_add(RocksDbWeight::get().reads(2_u64)) } /// The range of component `r` is `[0, 1600]`. @@ -1207,24 +1211,24 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 14_300_000 picoseconds. - Weight::from_parts(14_435_272, 0) - // Standard Error: 357 - .saturating_add(Weight::from_parts(151_410, 0).saturating_mul(r.into())) + // Minimum execution time: 7_317_000 picoseconds. + Weight::from_parts(7_742_783, 0) + // Standard Error: 274 + .saturating_add(Weight::from_parts(166_272, 0).saturating_mul(r.into())) } fn seal_caller() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 315_000 picoseconds. - Weight::from_parts(355_000, 0) + // Minimum execution time: 300_000 picoseconds. + Weight::from_parts(349_000, 0) } fn seal_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 252_000 picoseconds. - Weight::from_parts(300_000, 0) + // Minimum execution time: 248_000 picoseconds. + Weight::from_parts(293_000, 0) } /// Storage: `Revive::ContractInfoOf` (r:1 w:0) /// Proof: `Revive::ContractInfoOf` (`max_values`: None, `max_size`: Some(1779), added: 4254, mode: `Measured`) @@ -1232,8 +1236,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `306` // Estimated: `3771` - // Minimum execution time: 10_073_000 picoseconds. - Weight::from_parts(10_791_000, 3771) + // Minimum execution time: 10_018_000 picoseconds. + Weight::from_parts(10_399_000, 3771) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Revive::ContractInfoOf` (r:1 w:0) @@ -1242,16 +1246,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `403` // Estimated: `3868` - // Minimum execution time: 11_216_000 picoseconds. - Weight::from_parts(11_917_000, 3868) + // Minimum execution time: 11_209_000 picoseconds. + Weight::from_parts(11_640_000, 3868) .saturating_add(RocksDbWeight::get().reads(1_u64)) } fn seal_own_code_hash() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 269_000 picoseconds. - Weight::from_parts(308_000, 0) + // Minimum execution time: 280_000 picoseconds. + Weight::from_parts(309_000, 0) } /// Storage: `Revive::ContractInfoOf` (r:1 w:0) /// Proof: `Revive::ContractInfoOf` (`max_values`: None, `max_size`: Some(1779), added: 4254, mode: `Measured`) @@ -1261,51 +1265,51 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `473` // Estimated: `3938` - // Minimum execution time: 15_159_000 picoseconds. - Weight::from_parts(15_933_000, 3938) + // Minimum execution time: 14_718_000 picoseconds. + Weight::from_parts(15_292_000, 3938) .saturating_add(RocksDbWeight::get().reads(2_u64)) } fn seal_caller_is_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 367_000 picoseconds. + // Minimum execution time: 336_000 picoseconds. Weight::from_parts(391_000, 0) } fn seal_caller_is_root() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 294_000 picoseconds. - Weight::from_parts(331_000, 0) + // Minimum execution time: 275_000 picoseconds. + Weight::from_parts(296_000, 0) } fn seal_address() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 275_000 picoseconds. - Weight::from_parts(318_000, 0) + // Minimum execution time: 262_000 picoseconds. + Weight::from_parts(304_000, 0) } fn seal_weight_left() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 660_000 picoseconds. - Weight::from_parts(697_000, 0) + // Minimum execution time: 628_000 picoseconds. + Weight::from_parts(714_000, 0) } fn seal_ref_time_left() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 288_000 picoseconds. - Weight::from_parts(306_000, 0) + // Minimum execution time: 246_000 picoseconds. + Weight::from_parts(265_000, 0) } fn seal_balance() -> Weight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `0` - // Minimum execution time: 5_577_000 picoseconds. - Weight::from_parts(5_918_000, 0) + // Minimum execution time: 5_605_000 picoseconds. + Weight::from_parts(5_769_000, 0) } /// Storage: `Revive::AddressSuffix` (r:1 w:0) /// Proof: `Revive::AddressSuffix` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `Measured`) @@ -1315,8 +1319,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `264` // Estimated: `3729` - // Minimum execution time: 9_264_000 picoseconds. - Weight::from_parts(9_589_000, 3729) + // Minimum execution time: 8_990_000 picoseconds. + Weight::from_parts(9_223_000, 3729) .saturating_add(RocksDbWeight::get().reads(2_u64)) } /// Storage: `Revive::ImmutableDataOf` (r:1 w:0) @@ -1326,10 +1330,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `238 + n * (1 ±0)` // Estimated: `3703 + n * (1 ±0)` - // Minimum execution time: 6_082_000 picoseconds. - Weight::from_parts(6_789_222, 3703) + // Minimum execution time: 6_001_000 picoseconds. + Weight::from_parts(6_630_017, 3703) // Standard Error: 4 - .saturating_add(Weight::from_parts(670, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(622, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -1340,39 +1344,46 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_950_000 picoseconds. - Weight::from_parts(2_244_232, 0) + // Minimum execution time: 2_026_000 picoseconds. + Weight::from_parts(2_271_985, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(574, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(537, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().writes(1_u64)) } fn seal_value_transferred() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 254_000 picoseconds. - Weight::from_parts(304_000, 0) + // Minimum execution time: 287_000 picoseconds. + Weight::from_parts(323_000, 0) } fn seal_minimum_balance() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 251_000 picoseconds. - Weight::from_parts(292_000, 0) + // Minimum execution time: 230_000 picoseconds. + Weight::from_parts(275_000, 0) + } + fn seal_return_data_size() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 242_000 picoseconds. + Weight::from_parts(268_000, 0) } fn seal_call_data_size() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 262_000 picoseconds. - Weight::from_parts(288_000, 0) + // Minimum execution time: 244_000 picoseconds. + Weight::from_parts(271_000, 0) } fn seal_block_number() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 269_000 picoseconds. - Weight::from_parts(302_000, 0) + // Minimum execution time: 266_000 picoseconds. + Weight::from_parts(304_000, 0) } /// Storage: `System::BlockHash` (r:1 w:0) /// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `Measured`) @@ -1380,60 +1391,60 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `30` // Estimated: `3495` - // Minimum execution time: 3_690_000 picoseconds. - Weight::from_parts(3_791_000, 3495) + // Minimum execution time: 3_559_000 picoseconds. + Weight::from_parts(3_697_000, 3495) .saturating_add(RocksDbWeight::get().reads(1_u64)) } fn seal_now() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 261_000 picoseconds. - Weight::from_parts(307_000, 0) + // Minimum execution time: 242_000 picoseconds. + Weight::from_parts(294_000, 0) } fn seal_weight_to_fee() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_417_000 picoseconds. - Weight::from_parts(1_547_000, 0) + // Minimum execution time: 1_222_000 picoseconds. + Weight::from_parts(1_387_000, 0) } /// The range of component `n` is `[0, 262140]`. fn seal_copy_to_contract(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 364_000 picoseconds. - Weight::from_parts(566_499, 0) + // Minimum execution time: 392_000 picoseconds. + Weight::from_parts(397_500, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(237, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(206, 0).saturating_mul(n.into())) } fn seal_call_data_load() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 279_000 picoseconds. - Weight::from_parts(305_000, 0) + // Minimum execution time: 267_000 picoseconds. + Weight::from_parts(322_000, 0) } /// The range of component `n` is `[0, 262144]`. fn seal_call_data_copy(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 265_000 picoseconds. - Weight::from_parts(359_300, 0) + // Minimum execution time: 234_000 picoseconds. + Weight::from_parts(291_182, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(148, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(113, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 262140]`. fn seal_return(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 278_000 picoseconds. - Weight::from_parts(474_421, 0) + // Minimum execution time: 253_000 picoseconds. + Weight::from_parts(271_000, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(237, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(212, 0).saturating_mul(n.into())) } /// Storage: `Revive::AddressSuffix` (r:1 w:0) /// Proof: `Revive::AddressSuffix` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `Measured`) @@ -1450,10 +1461,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `324 + n * (88 ±0)` // Estimated: `3790 + n * (2563 ±0)` - // Minimum execution time: 23_182_000 picoseconds. - Weight::from_parts(23_833_588, 3790) - // Standard Error: 12_448 - .saturating_add(Weight::from_parts(4_277_757, 0).saturating_mul(n.into())) + // Minimum execution time: 22_082_000 picoseconds. + Weight::from_parts(22_815_417, 3790) + // Standard Error: 9_515 + .saturating_add(Weight::from_parts(4_283_767, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(RocksDbWeight::get().writes(4_u64)) @@ -1466,22 +1477,22 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_433_000 picoseconds. - Weight::from_parts(4_321_363, 0) - // Standard Error: 2_536 - .saturating_add(Weight::from_parts(207_597, 0).saturating_mul(t.into())) - // Standard Error: 22 - .saturating_add(Weight::from_parts(957, 0).saturating_mul(n.into())) + // Minimum execution time: 4_242_000 picoseconds. + Weight::from_parts(4_360_337, 0) + // Standard Error: 3_223 + .saturating_add(Weight::from_parts(201_105, 0).saturating_mul(t.into())) + // Standard Error: 28 + .saturating_add(Weight::from_parts(723, 0).saturating_mul(n.into())) } /// The range of component `i` is `[0, 262144]`. fn seal_debug_message(i: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 353_000 picoseconds. - Weight::from_parts(78_798, 0) + // Minimum execution time: 340_000 picoseconds. + Weight::from_parts(773_824, 0) // Standard Error: 1 - .saturating_add(Weight::from_parts(762, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(722, 0).saturating_mul(i.into())) } /// Storage: `Skipped::Metadata` (r:0 w:0) /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -1489,8 +1500,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `744` // Estimated: `744` - // Minimum execution time: 7_701_000 picoseconds. - Weight::from_parts(8_043_000, 744) + // Minimum execution time: 7_741_000 picoseconds. + Weight::from_parts(8_048_000, 744) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -1499,8 +1510,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `10754` // Estimated: `10754` - // Minimum execution time: 42_961_000 picoseconds. - Weight::from_parts(44_719_000, 10754) + // Minimum execution time: 42_314_000 picoseconds. + Weight::from_parts(43_255_000, 10754) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -1509,8 +1520,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `744` // Estimated: `744` - // Minimum execution time: 8_575_000 picoseconds. - Weight::from_parts(9_239_000, 744) + // Minimum execution time: 8_741_000 picoseconds. + Weight::from_parts(9_123_000, 744) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1520,8 +1531,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `10754` // Estimated: `10754` - // Minimum execution time: 43_585_000 picoseconds. - Weight::from_parts(45_719_000, 10754) + // Minimum execution time: 44_703_000 picoseconds. + Weight::from_parts(46_403_000, 10754) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1533,12 +1544,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `248 + o * (1 ±0)` // Estimated: `247 + o * (1 ±0)` - // Minimum execution time: 9_147_000 picoseconds. - Weight::from_parts(9_851_872, 247) - // Standard Error: 40 - .saturating_add(Weight::from_parts(222, 0).saturating_mul(n.into())) - // Standard Error: 40 - .saturating_add(Weight::from_parts(411, 0).saturating_mul(o.into())) + // Minimum execution time: 9_285_000 picoseconds. + Weight::from_parts(10_046_720, 247) + // Standard Error: 37 + .saturating_add(Weight::from_parts(365, 0).saturating_mul(n.into())) + // Standard Error: 37 + .saturating_add(Weight::from_parts(273, 0).saturating_mul(o.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(o.into())) @@ -1550,10 +1561,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `248 + n * (1 ±0)` // Estimated: `247 + n * (1 ±0)` - // Minimum execution time: 8_859_000 picoseconds. - Weight::from_parts(9_633_190, 247) - // Standard Error: 55 - .saturating_add(Weight::from_parts(995, 0).saturating_mul(n.into())) + // Minimum execution time: 8_879_000 picoseconds. + Weight::from_parts(9_736_050, 247) + // Standard Error: 48 + .saturating_add(Weight::from_parts(514, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -1565,10 +1576,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `248 + n * (1 ±0)` // Estimated: `247 + n * (1 ±0)` - // Minimum execution time: 8_270_000 picoseconds. - Weight::from_parts(9_208_849, 247) - // Standard Error: 67 - .saturating_add(Weight::from_parts(1_686, 0).saturating_mul(n.into())) + // Minimum execution time: 8_475_000 picoseconds. + Weight::from_parts(9_410_206, 247) + // Standard Error: 58 + .saturating_add(Weight::from_parts(1_409, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -1579,10 +1590,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `248 + n * (1 ±0)` // Estimated: `247 + n * (1 ±0)` - // Minimum execution time: 8_002_000 picoseconds. - Weight::from_parts(8_695_892, 247) - // Standard Error: 48 - .saturating_add(Weight::from_parts(721, 0).saturating_mul(n.into())) + // Minimum execution time: 8_017_000 picoseconds. + Weight::from_parts(8_879_089, 247) + // Standard Error: 51 + .saturating_add(Weight::from_parts(512, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -1593,10 +1604,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `248 + n * (1 ±0)` // Estimated: `247 + n * (1 ±0)` - // Minimum execution time: 9_204_000 picoseconds. - Weight::from_parts(10_176_756, 247) - // Standard Error: 57 - .saturating_add(Weight::from_parts(1_550, 0).saturating_mul(n.into())) + // Minimum execution time: 9_196_000 picoseconds. + Weight::from_parts(10_285_787, 247) + // Standard Error: 65 + .saturating_add(Weight::from_parts(1_553, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -1605,36 +1616,36 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_518_000 picoseconds. - Weight::from_parts(1_578_000, 0) + // Minimum execution time: 1_456_000 picoseconds. + Weight::from_parts(1_593_000, 0) } fn set_transient_storage_full() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_846_000 picoseconds. - Weight::from_parts(1_996_000, 0) + // Minimum execution time: 1_897_000 picoseconds. + Weight::from_parts(2_059_000, 0) } fn get_transient_storage_empty() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_442_000 picoseconds. - Weight::from_parts(1_562_000, 0) + // Minimum execution time: 1_487_000 picoseconds. + Weight::from_parts(1_588_000, 0) } fn get_transient_storage_full() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_602_000 picoseconds. - Weight::from_parts(1_730_000, 0) + // Minimum execution time: 1_622_000 picoseconds. + Weight::from_parts(1_732_000, 0) } fn rollback_transient_storage() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_096_000 picoseconds. - Weight::from_parts(1_176_000, 0) + // Minimum execution time: 1_188_000 picoseconds. + Weight::from_parts(1_239_000, 0) } /// The range of component `n` is `[0, 512]`. /// The range of component `o` is `[0, 512]`. @@ -1642,52 +1653,50 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_328_000 picoseconds. - Weight::from_parts(2_470_198, 0) - // Standard Error: 14 - .saturating_add(Weight::from_parts(256, 0).saturating_mul(n.into())) - // Standard Error: 14 - .saturating_add(Weight::from_parts(441, 0).saturating_mul(o.into())) + // Minimum execution time: 2_269_000 picoseconds. + Weight::from_parts(2_528_717, 0) + // Standard Error: 12 + .saturating_add(Weight::from_parts(163, 0).saturating_mul(n.into())) + // Standard Error: 12 + .saturating_add(Weight::from_parts(332, 0).saturating_mul(o.into())) } /// The range of component `n` is `[0, 512]`. fn seal_clear_transient_storage(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_037_000 picoseconds. - Weight::from_parts(2_439_061, 0) - // Standard Error: 17 - .saturating_add(Weight::from_parts(303, 0).saturating_mul(n.into())) + // Minimum execution time: 2_051_000 picoseconds. + Weight::from_parts(2_507_009, 0) + // Standard Error: 20 + .saturating_add(Weight::from_parts(309, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 512]`. fn seal_get_transient_storage(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_900_000 picoseconds. - Weight::from_parts(2_095_135, 0) - // Standard Error: 12 - .saturating_add(Weight::from_parts(310, 0).saturating_mul(n.into())) + // Minimum execution time: 1_829_000 picoseconds. + Weight::from_parts(2_052_749, 0) + // Standard Error: 14 + .saturating_add(Weight::from_parts(350, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 512]`. fn seal_contains_transient_storage(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_772_000 picoseconds. - Weight::from_parts(1_964_542, 0) - // Standard Error: 16 - .saturating_add(Weight::from_parts(298, 0).saturating_mul(n.into())) + // Minimum execution time: 1_717_000 picoseconds. + Weight::from_parts(1_930_820, 0) + // Standard Error: 12 + .saturating_add(Weight::from_parts(161, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 512]`. - fn seal_take_transient_storage(n: u32, ) -> Weight { + fn seal_take_transient_storage(_n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_555_000 picoseconds. - Weight::from_parts(2_864_143, 0) - // Standard Error: 22 - .saturating_add(Weight::from_parts(45, 0).saturating_mul(n.into())) + // Minimum execution time: 2_502_000 picoseconds. + Weight::from_parts(2_829_951, 0) } /// Storage: `Revive::AddressSuffix` (r:1 w:0) /// Proof: `Revive::AddressSuffix` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `Measured`) @@ -1701,14 +1710,16 @@ impl WeightInfo for () { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) /// The range of component `t` is `[0, 1]`. /// The range of component `i` is `[0, 262144]`. - fn seal_call(t: u32, _i: u32, ) -> Weight { + fn seal_call(t: u32, i: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1292 + t * (280 ±0)` // Estimated: `4757 + t * (2518 ±0)` - // Minimum execution time: 40_760_000 picoseconds. - Weight::from_parts(45_131_001, 4757) - // Standard Error: 302_594 - .saturating_add(Weight::from_parts(2_769_232, 0).saturating_mul(t.into())) + // Minimum execution time: 40_791_000 picoseconds. + Weight::from_parts(42_421_336, 4757) + // Standard Error: 53_086 + .saturating_add(Weight::from_parts(2_057_850, 0).saturating_mul(t.into())) + // Standard Error: 0 + .saturating_add(Weight::from_parts(1, 0).saturating_mul(i.into())) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(RocksDbWeight::get().writes(1_u64)) @@ -1724,8 +1735,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1237` // Estimated: `4702` - // Minimum execution time: 36_975_000 picoseconds. - Weight::from_parts(38_368_000, 4702) + // Minimum execution time: 35_825_000 picoseconds. + Weight::from_parts(37_377_000, 4702) .saturating_add(RocksDbWeight::get().reads(3_u64)) } /// Storage: `Revive::CodeInfoOf` (r:1 w:1) @@ -1741,10 +1752,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1310` // Estimated: `4769` - // Minimum execution time: 122_553_000 picoseconds. - Weight::from_parts(117_325_822, 4769) + // Minimum execution time: 121_920_000 picoseconds. + Weight::from_parts(115_842_357, 4769) // Standard Error: 10 - .saturating_add(Weight::from_parts(4_147, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(4_062, 0).saturating_mul(i.into())) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -1754,63 +1765,63 @@ impl WeightInfo for () { // Measured: `0` // Estimated: `0` // Minimum execution time: 657_000 picoseconds. - Weight::from_parts(3_531_259, 0) + Weight::from_parts(2_219_539, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(1_428, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_413, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 262144]`. fn seal_hash_keccak_256(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_072_000 picoseconds. - Weight::from_parts(5_487_006, 0) + // Minimum execution time: 1_091_000 picoseconds. + Weight::from_parts(4_036_613, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(3_634, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(3_600, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 262144]`. fn seal_hash_blake2_256(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 638_000 picoseconds. - Weight::from_parts(3_097_177, 0) + // Minimum execution time: 635_000 picoseconds. + Weight::from_parts(4_636_213, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(1_551, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_514, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 262144]`. fn seal_hash_blake2_128(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 682_000 picoseconds. - Weight::from_parts(2_963_774, 0) + // Minimum execution time: 648_000 picoseconds. + Weight::from_parts(3_658_083, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(1_561, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_516, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 261889]`. fn seal_sr25519_verify(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 42_791_000 picoseconds. - Weight::from_parts(27_471_391, 0) + // Minimum execution time: 42_722_000 picoseconds. + Weight::from_parts(28_496_037, 0) // Standard Error: 13 - .saturating_add(Weight::from_parts(5_246, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(5_235, 0).saturating_mul(n.into())) } fn seal_ecdsa_recover() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 46_565_000 picoseconds. - Weight::from_parts(48_251_000, 0) + // Minimum execution time: 46_924_000 picoseconds. + Weight::from_parts(48_639_000, 0) } fn seal_ecdsa_to_eth_address() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 12_562_000 picoseconds. - Weight::from_parts(12_664_000, 0) + // Minimum execution time: 12_882_000 picoseconds. + Weight::from_parts(13_108_000, 0) } /// Storage: `Revive::CodeInfoOf` (r:1 w:1) /// Proof: `Revive::CodeInfoOf` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `Measured`) @@ -1818,8 +1829,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `300` // Estimated: `3765` - // Minimum execution time: 18_527_000 picoseconds. - Weight::from_parts(19_134_000, 3765) + // Minimum execution time: 17_907_000 picoseconds. + Weight::from_parts(18_634_000, 3765) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1829,8 +1840,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `338` // Estimated: `3803` - // Minimum execution time: 13_843_000 picoseconds. - Weight::from_parts(14_750_000, 3803) + // Minimum execution time: 14_091_000 picoseconds. + Weight::from_parts(14_393_000, 3803) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1840,8 +1851,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `338` // Estimated: `3561` - // Minimum execution time: 13_013_000 picoseconds. - Weight::from_parts(13_612_000, 3561) + // Minimum execution time: 12_824_000 picoseconds. + Weight::from_parts(13_304_000, 3561) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1850,9 +1861,9 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 15_182_000 picoseconds. - Weight::from_parts(16_987_060, 0) - // Standard Error: 105 - .saturating_add(Weight::from_parts(72_086, 0).saturating_mul(r.into())) + // Minimum execution time: 9_185_000 picoseconds. + Weight::from_parts(10_532_230, 0) + // Standard Error: 189 + .saturating_add(Weight::from_parts(71_786, 0).saturating_mul(r.into())) } } diff --git a/substrate/frame/revive/uapi/src/host.rs b/substrate/frame/revive/uapi/src/host.rs index 2214563faf02..ae4479cd1549 100644 --- a/substrate/frame/revive/uapi/src/host.rs +++ b/substrate/frame/revive/uapi/src/host.rs @@ -87,12 +87,8 @@ pub trait HostFn: private::Sealed { /// Returns the [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain ID. fn chain_id(output: &mut [u8; 32]); - /// Stores the call data size as little endian U256 value into the supplied buffer. - /// - /// # Parameters - /// - /// - `output`: A reference to the output data buffer to write the call data size. - fn call_data_size(output: &mut [u8; 32]); + /// Returns the call data size. + fn call_data_size() -> u64; /// Call (possibly transferring some amount of funds) into the specified account. /// @@ -170,17 +166,16 @@ pub trait HostFn: private::Sealed { /// otherwise `zero`. fn code_hash(addr: &[u8; 20], output: &mut [u8; 32]); - /// Retrieve the code size for a specified contract address. + /// Returns the code size for a specified contract address. /// /// # Parameters /// /// - `addr`: The address of the contract. - /// - `output`: A reference to the output data buffer to write the code size. /// /// # Note /// /// If `addr` is not a contract the `output` will be zero. - fn code_size(addr: &[u8; 20], output: &mut [u8; 32]); + fn code_size(addr: &[u8; 20]) -> u64; /// Execute code in the context (storage, caller, value) of the current contract. /// @@ -384,12 +379,8 @@ pub trait HostFn: private::Sealed { /// - `output`: A reference to the output data buffer to write the price. fn weight_to_fee(ref_time_limit: u64, proof_size_limit: u64, output: &mut [u8; 32]); - /// Stores the size of the returned data of the last contract call or instantiation. - /// - /// # Parameters - /// - /// - `output`: A reference to the output buffer to write the size. - fn return_data_size(output: &mut [u8; 32]); + /// Returns the size of the returned data of the last contract call or instantiation. + fn return_data_size() -> u64; /// Stores the returned data of the last contract call or contract instantiation. /// diff --git a/substrate/frame/revive/uapi/src/host/riscv64.rs b/substrate/frame/revive/uapi/src/host/riscv64.rs index a73a13ed1af5..d45e0d65646c 100644 --- a/substrate/frame/revive/uapi/src/host/riscv64.rs +++ b/substrate/frame/revive/uapi/src/host/riscv64.rs @@ -69,7 +69,7 @@ mod sys { pub fn origin(out_ptr: *mut u8); pub fn is_contract(account_ptr: *const u8) -> ReturnCode; pub fn code_hash(address_ptr: *const u8, out_ptr: *mut u8); - pub fn code_size(address_ptr: *const u8, out_ptr: *mut u8); + pub fn code_size(address_ptr: *const u8) -> u64; pub fn own_code_hash(out_ptr: *mut u8); pub fn caller_is_origin() -> ReturnCode; pub fn caller_is_root() -> ReturnCode; @@ -91,7 +91,7 @@ mod sys { data_ptr: *const u8, data_len: u32, ); - pub fn call_data_size(out_ptr: *mut u8); + pub fn call_data_size() -> u64; pub fn block_number(out_ptr: *mut u8); pub fn block_hash(block_number_ptr: *const u8, out_ptr: *mut u8); pub fn hash_sha2_256(input_ptr: *const u8, input_len: u32, out_ptr: *mut u8); @@ -131,7 +131,7 @@ mod sys { msg_len: u32, out_ptr: *mut u8, ) -> ReturnCode; - pub fn return_data_size(out_ptr: *mut u8); + pub fn return_data_size() -> u64; pub fn return_data_copy(out_ptr: *mut u8, out_len_ptr: *mut u32, offset: u32); } } @@ -386,13 +386,17 @@ impl HostFn for HostFnImpl { unsafe { sys::call_data_load(out_ptr.as_mut_ptr(), offset) }; } + fn call_data_size() -> u64 { + unsafe { sys::call_data_size() } + } + fn return_value(flags: ReturnFlags, return_value: &[u8]) -> ! { unsafe { sys::seal_return(flags.bits(), return_value.as_ptr(), return_value.len() as u32) } panic!("seal_return does not return"); } impl_wrapper_for! { - [u8; 32] => call_data_size, balance, value_transferred, now, chain_id; + [u8; 32] => balance, value_transferred, now, chain_id; [u8; 20] => address, caller, origin; } @@ -425,12 +429,12 @@ impl HostFn for HostFnImpl { unsafe { sys::code_hash(address.as_ptr(), output.as_mut_ptr()) } } - fn code_size(address: &[u8; 20], output: &mut [u8; 32]) { - unsafe { sys::code_size(address.as_ptr(), output.as_mut_ptr()) } + fn code_size(address: &[u8; 20]) -> u64 { + unsafe { sys::code_size(address.as_ptr()) } } - fn return_data_size(output: &mut [u8; 32]) { - unsafe { sys::return_data_size(output.as_mut_ptr()) }; + fn return_data_size() -> u64 { + unsafe { sys::return_data_size() } } fn return_data_copy(output: &mut &mut [u8], offset: u32) {