Skip to content

Commit

Permalink
deploy: 5cd3686
Browse files Browse the repository at this point in the history
  • Loading branch information
liamaharon committed Sep 26, 2023
1 parent 5f42f01 commit a152e85
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 4 deletions.
58 changes: 56 additions & 2 deletions src/try_runtime_core/commands/on_runtime_upgrade.rs.html
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,33 @@
<a href="#218" id="218">218</a>
<a href="#219" id="219">219</a>
<a href="#220" id="220">220</a>
<a href="#221" id="221">221</a>
<a href="#222" id="222">222</a>
<a href="#223" id="223">223</a>
<a href="#224" id="224">224</a>
<a href="#225" id="225">225</a>
<a href="#226" id="226">226</a>
<a href="#227" id="227">227</a>
<a href="#228" id="228">228</a>
<a href="#229" id="229">229</a>
<a href="#230" id="230">230</a>
<a href="#231" id="231">231</a>
<a href="#232" id="232">232</a>
<a href="#233" id="233">233</a>
<a href="#234" id="234">234</a>
<a href="#235" id="235">235</a>
<a href="#236" id="236">236</a>
<a href="#237" id="237">237</a>
<a href="#238" id="238">238</a>
<a href="#239" id="239">239</a>
<a href="#240" id="240">240</a>
<a href="#241" id="241">241</a>
<a href="#242" id="242">242</a>
<a href="#243" id="243">243</a>
<a href="#244" id="244">244</a>
<a href="#245" id="245">245</a>
<a href="#246" id="246">246</a>
<a href="#247" id="247">247</a>
</pre></div><pre class="rust"><code><span class="comment">// This file is part of try-runtime-cli.

// Copyright (C) Parity Technologies (UK) Ltd.
Expand Down Expand Up @@ -307,16 +334,43 @@
</span>);
}

<span class="kw">let </span>pre_root = ext.backend.root();
<span class="comment">// Run `TryRuntime_on_runtime_upgrade` with the given checks.
</span><span class="macro">log::info!</span>(
<span class="string">&quot;🔬 Running TryRuntime_on_runtime_upgrade with checks: {:?}&quot;</span>,
command.checks
);
<span class="kw">let </span>(<span class="kw">_</span>, proof, ref_time_results) = state_machine_call_with_proof::&lt;Block, HostFns&gt;(
<span class="kw-2">&amp;</span>ext,
<span class="kw-2">&amp;</span>executor,
<span class="string">&quot;TryRuntime_on_runtime_upgrade&quot;</span>,
command.checks.encode().as_ref(),
Default::default(), <span class="comment">// we don&#39;t really need any extensions here.
</span>shared.export_proof,
</span>shared.export_proof.clone(),
)<span class="question-mark">?</span>;

<span class="comment">// If the above call ran with checks then we need to run the call again without checks to
// measure PoV correctly.
// Otherwise, storage lookups from try-runtime logic like pre/post hooks are included in the PoV
// calculation.
</span><span class="kw">let </span>(proof, ref_time_results) = <span class="kw">match </span>command.checks {
UpgradeCheckSelect::None =&gt; (proof, ref_time_results),
<span class="kw">_ </span>=&gt; {
<span class="macro">log::info!</span>(
<span class="string">&quot;🔬 TryRuntime_on_runtime_upgrade succeeded! Running it again without checks for weight measurements.&quot;
</span>);
<span class="kw">let </span>(<span class="kw">_</span>, proof, ref_time_results) = state_machine_call_with_proof::&lt;Block, HostFns&gt;(
<span class="kw-2">&amp;</span>ext,
<span class="kw-2">&amp;</span>executor,
<span class="string">&quot;TryRuntime_on_runtime_upgrade&quot;</span>,
UpgradeCheckSelect::None.encode().as_ref(),
Default::default(), <span class="comment">// we don&#39;t really need any extensions here.
</span>shared.export_proof,
)<span class="question-mark">?</span>;
(proof, ref_time_results)
}
};

<span class="kw">let </span>pre_root = ext.backend.root();
<span class="kw">let </span>pov_safety = analyse_pov::&lt;HashingFor&lt;Block&gt;&gt;(proof, <span class="kw-2">*</span>pre_root, command.no_weight_warnings);
<span class="kw">let </span>ref_time_safety = analyse_ref_time(ref_time_results, command.no_weight_warnings);

Expand Down
2 changes: 1 addition & 1 deletion try_runtime_core/commands/on_runtime_upgrade/fn.run.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `run` fn in crate `try_runtime_core`."><title>run in try_runtime_core::commands::on_runtime_upgrade - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-f3501f0f5ae15dfb.css" id="mainThemeStyle"><div id="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="try_runtime_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.71.1 (eb26296b5 2023-08-03)" data-search-js="search-4926e5fc22a5646a.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ></div><script src="../../../static.files/storage-62ce34ea385b278a.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-f0540c1d82cde29b.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../../static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../../static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="../../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="logo-container" href="../../../try_runtime_core/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../../try_runtime_core/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In try_runtime_core::commands::on_runtime_upgrade</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../../index.html">try_runtime_core</a>::<wbr><a href="../index.html">commands</a>::<wbr><a href="index.html">on_runtime_upgrade</a>::<wbr><a class="fn" href="#">run</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../../src/try_runtime_core/commands/on_runtime_upgrade.rs.html#67-124">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub async fn run&lt;Block, HostFns&gt;(
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `run` fn in crate `try_runtime_core`."><title>run in try_runtime_core::commands::on_runtime_upgrade - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-f3501f0f5ae15dfb.css" id="mainThemeStyle"><div id="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="try_runtime_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.71.1 (eb26296b5 2023-08-03)" data-search-js="search-4926e5fc22a5646a.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ></div><script src="../../../static.files/storage-62ce34ea385b278a.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-f0540c1d82cde29b.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../../static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../../static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="../../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="logo-container" href="../../../try_runtime_core/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../../try_runtime_core/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In try_runtime_core::commands::on_runtime_upgrade</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../../index.html">try_runtime_core</a>::<wbr><a href="../index.html">commands</a>::<wbr><a href="index.html">on_runtime_upgrade</a>::<wbr><a class="fn" href="#">run</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../../src/try_runtime_core/commands/on_runtime_upgrade.rs.html#67-151">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub async fn run&lt;Block, HostFns&gt;(
shared: <a class="struct" href="../../shared_parameters/struct.SharedParams.html" title="struct try_runtime_core::shared_parameters::SharedParams">SharedParams</a>,
command: <a class="struct" href="struct.Command.html" title="struct try_runtime_core::commands::on_runtime_upgrade::Command">Command</a>
) -&gt; Result&lt;<a class="primitive" href="https://doc.rust-lang.org/1.71.1/std/primitive.unit.html">()</a>&gt;<span class="where fmt-newline">where
Expand Down
Loading

0 comments on commit a152e85

Please sign in to comment.