Skip to content

Commit

Permalink
Deploying to gh-pages from @ f8bf280 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
github-merge-queue[bot] committed May 7, 2024
1 parent c9b810d commit 053a210
Show file tree
Hide file tree
Showing 40 changed files with 176 additions and 221 deletions.
14 changes: 7 additions & 7 deletions domain_eth_service/provider/struct.EthProvider.html

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions pallet_rewards/trait.Config.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
type <a href="#associatedtype.TransactionByteFee" class="associatedtype">TransactionByteFee</a>: Get&lt;&lt;&lt;Self as <a class="trait" href="trait.Config.html" title="trait pallet_rewards::Config">Config</a>&gt;::<a class="associatedtype" href="trait.Config.html#associatedtype.Currency" title="type pallet_rewards::Config::Currency">Currency</a> as Currency&lt;&lt;Self as Config&gt;::AccountId&gt;&gt;::Balance&gt;;
type <a href="#associatedtype.MaxRewardPoints" class="associatedtype">MaxRewardPoints</a>: Get&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;;
type <a href="#associatedtype.ProposerTaxOnVotes" class="associatedtype">ProposerTaxOnVotes</a>: Get&lt;(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)&gt;;
type <a href="#associatedtype.RewardsEnabled" class="associatedtype">RewardsEnabled</a>: <a class="trait" href="../subspace_runtime_primitives/trait.RewardsEnabled.html" title="trait subspace_runtime_primitives::RewardsEnabled">RewardsEnabled</a>;
type <a href="#associatedtype.FindBlockRewardAddress" class="associatedtype">FindBlockRewardAddress</a>: <a class="trait" href="../subspace_runtime_primitives/trait.FindBlockRewardAddress.html" title="trait subspace_runtime_primitives::FindBlockRewardAddress">FindBlockRewardAddress</a>&lt;Self::AccountId&gt;;
type <a href="#associatedtype.FindVotingRewardAddresses" class="associatedtype">FindVotingRewardAddresses</a>: <a class="trait" href="../subspace_runtime_primitives/trait.FindVotingRewardAddresses.html" title="trait subspace_runtime_primitives::FindVotingRewardAddresses">FindVotingRewardAddresses</a>&lt;Self::AccountId&gt;;
type <a href="#associatedtype.RewardsEnabled" class="associatedtype">RewardsEnabled</a>: RewardsEnabled;
type <a href="#associatedtype.FindBlockRewardAddress" class="associatedtype">FindBlockRewardAddress</a>: FindBlockRewardAddress&lt;Self::AccountId&gt;;
type <a href="#associatedtype.FindVotingRewardAddresses" class="associatedtype">FindVotingRewardAddresses</a>: FindVotingRewardAddresses&lt;Self::AccountId&gt;;
type <a href="#associatedtype.WeightInfo" class="associatedtype">WeightInfo</a>: <a class="trait" href="weights/trait.WeightInfo.html" title="trait pallet_rewards::weights::WeightInfo">WeightInfo</a>;
type <a href="#associatedtype.OnReward" class="associatedtype">OnReward</a>: <a class="trait" href="trait.OnReward.html" title="trait pallet_rewards::OnReward">OnReward</a>&lt;Self::AccountId, &lt;&lt;Self as <a class="trait" href="trait.Config.html" title="trait pallet_rewards::Config">Config</a>&gt;::<a class="associatedtype" href="trait.Config.html#associatedtype.Currency" title="type pallet_rewards::Config::Currency">Currency</a> as Currency&lt;&lt;Self as Config&gt;::AccountId&gt;&gt;::Balance&gt;;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Configuration trait of this pallet.</p>
Expand All @@ -20,7 +20,7 @@
</div></details><details class="toggle" open><summary><section id="associatedtype.TransactionByteFee" class="method"><a class="src rightside" href="../src/pallet_rewards/lib.rs.html#99">source</a><h4 class="code-header">type <a href="#associatedtype.TransactionByteFee" class="associatedtype">TransactionByteFee</a>: Get&lt;&lt;&lt;Self as <a class="trait" href="trait.Config.html" title="trait pallet_rewards::Config">Config</a>&gt;::<a class="associatedtype" href="trait.Config.html#associatedtype.Currency" title="type pallet_rewards::Config::Currency">Currency</a> as Currency&lt;&lt;Self as Config&gt;::AccountId&gt;&gt;::Balance&gt;</h4></section></summary><div class="docblock"><p>Cost of one byte of blockspace</p>
</div></details><details class="toggle" open><summary><section id="associatedtype.MaxRewardPoints" class="method"><a class="src rightside" href="../src/pallet_rewards/lib.rs.html#103">source</a><h4 class="code-header">type <a href="#associatedtype.MaxRewardPoints" class="associatedtype">MaxRewardPoints</a>: Get&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;</h4></section></summary><div class="docblock"><p>Max number of reward points</p>
</div></details><details class="toggle" open><summary><section id="associatedtype.ProposerTaxOnVotes" class="method"><a class="src rightside" href="../src/pallet_rewards/lib.rs.html#107">source</a><h4 class="code-header">type <a href="#associatedtype.ProposerTaxOnVotes" class="associatedtype">ProposerTaxOnVotes</a>: Get&lt;(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)&gt;</h4></section></summary><div class="docblock"><p>Tax of the proposer on vote rewards</p>
</div></details><details class="toggle" open><summary><section id="associatedtype.RewardsEnabled" class="method"><a class="src rightside" href="../src/pallet_rewards/lib.rs.html#110">source</a><h4 class="code-header">type <a href="#associatedtype.RewardsEnabled" class="associatedtype">RewardsEnabled</a>: <a class="trait" href="../subspace_runtime_primitives/trait.RewardsEnabled.html" title="trait subspace_runtime_primitives::RewardsEnabled">RewardsEnabled</a></h4></section></summary><div class="docblock"><p>Determine whether rewards are enabled or not</p>
</div></details><details class="toggle" open><summary><section id="associatedtype.FindBlockRewardAddress" class="method"><a class="src rightside" href="../src/pallet_rewards/lib.rs.html#113">source</a><h4 class="code-header">type <a href="#associatedtype.FindBlockRewardAddress" class="associatedtype">FindBlockRewardAddress</a>: <a class="trait" href="../subspace_runtime_primitives/trait.FindBlockRewardAddress.html" title="trait subspace_runtime_primitives::FindBlockRewardAddress">FindBlockRewardAddress</a>&lt;Self::AccountId&gt;</h4></section></summary><div class="docblock"><p>Reward address of block producer</p>
</div></details><details class="toggle" open><summary><section id="associatedtype.FindVotingRewardAddresses" class="method"><a class="src rightside" href="../src/pallet_rewards/lib.rs.html#116">source</a><h4 class="code-header">type <a href="#associatedtype.FindVotingRewardAddresses" class="associatedtype">FindVotingRewardAddresses</a>: <a class="trait" href="../subspace_runtime_primitives/trait.FindVotingRewardAddresses.html" title="trait subspace_runtime_primitives::FindVotingRewardAddresses">FindVotingRewardAddresses</a>&lt;Self::AccountId&gt;</h4></section></summary><div class="docblock"><p>Reward addresses of all receivers of voting rewards</p>
</div></details><details class="toggle" open><summary><section id="associatedtype.RewardsEnabled" class="method"><a class="src rightside" href="../src/pallet_rewards/lib.rs.html#110">source</a><h4 class="code-header">type <a href="#associatedtype.RewardsEnabled" class="associatedtype">RewardsEnabled</a>: RewardsEnabled</h4></section></summary><div class="docblock"><p>Determine whether rewards are enabled or not</p>
</div></details><details class="toggle" open><summary><section id="associatedtype.FindBlockRewardAddress" class="method"><a class="src rightside" href="../src/pallet_rewards/lib.rs.html#113">source</a><h4 class="code-header">type <a href="#associatedtype.FindBlockRewardAddress" class="associatedtype">FindBlockRewardAddress</a>: FindBlockRewardAddress&lt;Self::AccountId&gt;</h4></section></summary><div class="docblock"><p>Reward address of block producer</p>
</div></details><details class="toggle" open><summary><section id="associatedtype.FindVotingRewardAddresses" class="method"><a class="src rightside" href="../src/pallet_rewards/lib.rs.html#116">source</a><h4 class="code-header">type <a href="#associatedtype.FindVotingRewardAddresses" class="associatedtype">FindVotingRewardAddresses</a>: FindVotingRewardAddresses&lt;Self::AccountId&gt;</h4></section></summary><div class="docblock"><p>Reward addresses of all receivers of voting rewards</p>
</div></details><section id="associatedtype.WeightInfo" class="method"><a class="src rightside" href="../src/pallet_rewards/lib.rs.html#118">source</a><h4 class="code-header">type <a href="#associatedtype.WeightInfo" class="associatedtype">WeightInfo</a>: <a class="trait" href="weights/trait.WeightInfo.html" title="trait pallet_rewards::weights::WeightInfo">WeightInfo</a></h4></section><section id="associatedtype.OnReward" class="method"><a class="src rightside" href="../src/pallet_rewards/lib.rs.html#120">source</a><h4 class="code-header">type <a href="#associatedtype.OnReward" class="associatedtype">OnReward</a>: <a class="trait" href="trait.OnReward.html" title="trait pallet_rewards::OnReward">OnReward</a>&lt;Self::AccountId, &lt;&lt;Self as <a class="trait" href="trait.Config.html" title="trait pallet_rewards::Config">Config</a>&gt;::<a class="associatedtype" href="trait.Config.html#associatedtype.Currency" title="type pallet_rewards::Config::Currency">Currency</a> as Currency&lt;&lt;Self as Config&gt;::AccountId&gt;&gt;::Balance&gt;</h4></section></div><h2 id="object-safety" class="section-header">Object Safety<a href="#object-safety" class="anchor">§</a></h2><div class="object-safety-info">This trait is <b>not</b> <a href="https://doc.rust-lang.org/nightly/reference/items/traits.html#object-safety">object safe</a>.</div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../trait.impl/pallet_rewards/pallet/trait.Config.js" async></script></section></div></main></body></html>
4 changes: 2 additions & 2 deletions search-index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion search.desc/subspace_farmer/subspace_farmer-desc-0-.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/subspace_farmer/lib.rs.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@
<a href="#59" id="59">59</a>
<a href="#60" id="60">60</a>
<a href="#61" id="61">61</a>
<a href="#62" id="62">62</a>
</pre></div><pre class="rust"><code><span class="attr">#![feature(
array_chunks,
array_windows,
assert_matches,
const_option,
duration_constructors,
exact_size_is_empty,
fmt_helpers_for_derive,
hash_extract_if,
impl_trait_in_assoc_type,
int_roundings,
Expand Down
72 changes: 60 additions & 12 deletions src/subspace_farmer/plotter.rs.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,24 +91,44 @@
<a href="#91" id="91">91</a>
<a href="#92" id="92">92</a>
<a href="#93" id="93">93</a>
<a href="#94" id="94">94</a>
<a href="#95" id="95">95</a>
<a href="#96" id="96">96</a>
<a href="#97" id="97">97</a>
<a href="#98" id="98">98</a>
<a href="#99" id="99">99</a>
<a href="#100" id="100">100</a>
<a href="#101" id="101">101</a>
<a href="#102" id="102">102</a>
<a href="#103" id="103">103</a>
<a href="#104" id="104">104</a>
<a href="#105" id="105">105</a>
<a href="#106" id="106">106</a>
<a href="#107" id="107">107</a>
<a href="#108" id="108">108</a>
<a href="#109" id="109">109</a>
<a href="#110" id="110">110</a>
<a href="#111" id="111">111</a>
<a href="#112" id="112">112</a>
<a href="#113" id="113">113</a>
<a href="#114" id="114">114</a>
<a href="#115" id="115">115</a>
<a href="#116" id="116">116</a>
<a href="#117" id="117">117</a>
</pre></div><pre class="rust"><code><span class="kw">pub mod </span>cpu;

<span class="kw">use </span>async_trait::async_trait;
<span class="kw">use </span>futures::Sink;
<span class="kw">use </span>parity_scale_codec::{Decode, Encode};
<span class="kw">use </span>futures::{Sink, Stream};
<span class="kw">use </span>std::error::Error;
<span class="kw">use </span>std::fmt;
<span class="kw">use </span>std::pin::Pin;
<span class="kw">use </span>std::sync::Arc;
<span class="kw">use </span>std::time::Duration;
<span class="kw">use </span>subspace_core_primitives::{PublicKey, SectorIndex};
<span class="kw">use </span>subspace_farmer_components::plotting::PlottedSector;
<span class="kw">use </span>subspace_farmer_components::FarmerProtocolInfo;

<span class="comment">// TODO: It is a bit awkward that this mimics `SectorPlottingDetails` with slight differences, maybe
// `SectorPlottingDetails` should be a bit generic and support customization of
// `Starting`/`Finished` contents
</span><span class="doccomment">/// Sector plotting progress
</span><span class="attr">#[derive(Debug, Clone, Encode, Decode)]
#[allow(clippy::large_enum_variant)]
<span class="doccomment">/// Sector plotting progress
</span><span class="kw">pub enum </span>SectorPlottingProgress {
<span class="doccomment">/// Downloading sector pieces
</span>Downloading,
Expand All @@ -124,10 +144,8 @@
</span>plotted_sector: PlottedSector,
<span class="doccomment">/// How much time it took to plot a sector
</span>time: Duration,
<span class="doccomment">/// All plotted sector bytes
</span>sector: Vec&lt;u8&gt;,
<span class="doccomment">/// All plotted sector metadata bytes
</span>sector_metadata: Vec&lt;u8&gt;,
<span class="doccomment">/// Stream of all plotted sector bytes
</span>sector: Pin&lt;Box&lt;<span class="kw">dyn </span>Stream&lt;Item = <span class="prelude-ty">Result</span>&lt;Vec&lt;u8&gt;, String&gt;&gt; + Send + Sync&gt;&gt;,
},
<span class="doccomment">/// Plotting failed
</span>Error {
Expand All @@ -136,6 +154,36 @@
},
}

<span class="kw">impl </span>fmt::Debug <span class="kw">for </span>SectorPlottingProgress {
<span class="attr">#[inline]
</span><span class="kw">fn </span>fmt(<span class="kw-2">&amp;</span><span class="self">self</span>, f: <span class="kw-2">&amp;mut </span>fmt::Formatter) -&gt; fmt::Result {
<span class="kw">match </span><span class="self">self </span>{
SectorPlottingProgress::Downloading =&gt; fmt::Formatter::write_str(f, <span class="string">"Downloading"</span>),
SectorPlottingProgress::Downloaded(time) =&gt; {
f.debug_tuple_field1_finish(<span class="string">"Downloaded"</span>, <span class="kw-2">&amp;</span>time)
}
SectorPlottingProgress::Encoding =&gt; fmt::Formatter::write_str(f, <span class="string">"Encoding"</span>),
SectorPlottingProgress::Encoded(time) =&gt; f.debug_tuple_field1_finish(<span class="string">"Encoded"</span>, <span class="kw-2">&amp;</span>time),
SectorPlottingProgress::Finished {
plotted_sector,
time,
sector: <span class="kw">_</span>,
} =&gt; f.debug_struct_field3_finish(
<span class="string">"Finished"</span>,
<span class="string">"plotted_sector"</span>,
plotted_sector,
<span class="string">"time"</span>,
time,
<span class="string">"sector"</span>,
<span class="kw-2">&amp;</span><span class="string">"&lt;stream&gt;"</span>,
),
SectorPlottingProgress::Error { error } =&gt; {
f.debug_struct_field1_finish(<span class="string">"Error"</span>, <span class="string">"error"</span>, <span class="kw-2">&amp;</span>error)
}
}
}
}

<span class="doccomment">/// Abstract plotter implementation
</span><span class="attr">#[async_trait]
</span><span class="kw">pub trait </span>Plotter {
Expand Down
14 changes: 4 additions & 10 deletions src/subspace_farmer/plotter/cpu.rs.html
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,6 @@
<a href="#389" id="389">389</a>
<a href="#390" id="390">390</a>
<a href="#391" id="391">391</a>
<a href="#392" id="392">392</a>
<a href="#393" id="393">393</a>
<a href="#394" id="394">394</a>
</pre></div><pre class="rust"><code><span class="kw">use </span><span class="kw">crate</span>::plotter::{Plotter, SectorPlottingProgress};
<span class="kw">use </span><span class="kw">crate</span>::thread_pool_manager::PlottingThreadPoolManager;
<span class="kw">use </span><span class="kw">crate</span>::utils::AsyncJoinOnDrop;
Expand All @@ -400,7 +397,7 @@
<span class="kw">use </span>event_listener_primitives::{Bag, HandlerId};
<span class="kw">use </span>futures::channel::mpsc;
<span class="kw">use </span>futures::stream::FuturesUnordered;
<span class="kw">use </span>futures::{select, FutureExt, Sink, SinkExt, StreamExt};
<span class="kw">use </span>futures::{select, stream, FutureExt, Sink, SinkExt, StreamExt};
<span class="kw">use </span>std::error::Error;
<span class="kw">use </span>std::future::pending;
<span class="kw">use </span>std::marker::PhantomData;
Expand Down Expand Up @@ -569,13 +566,12 @@
};

<span class="comment">// Plotting
</span><span class="kw">let </span>(sector, sector_metadata, plotted_sector) = {
</span><span class="kw">let </span>(sector, plotted_sector) = {
<span class="kw">let </span>thread_pools = plotting_thread_pool_manager.get_thread_pools().<span class="kw">await</span>;

<span class="kw">let </span>plotting_fn = || {
tokio::task::block_in_place(|| {
<span class="kw">let </span><span class="kw-2">mut </span>sector = Vec::new();
<span class="kw">let </span><span class="kw-2">mut </span>sector_metadata = Vec::new();

<span class="kw">let </span>plotted_sector = encode_sector::&lt;PosTable&gt;(
downloaded_sector,
Expand All @@ -584,7 +580,6 @@
erasure_coding: <span class="kw-2">&amp;</span>erasure_coding,
pieces_in_sector,
sector_output: <span class="kw-2">&amp;mut </span>sector,
sector_metadata_output: <span class="kw-2">&amp;mut </span>sector_metadata,
table_generators: <span class="kw-2">&amp;mut </span>(<span class="number">0</span>..record_encoding_concurrency.get())
.map(|<span class="kw">_</span>| PosTable::generator())
.collect::&lt;Vec&lt;<span class="kw">_</span>&gt;&gt;(),
Expand All @@ -593,7 +588,7 @@
},
)<span class="question-mark">?</span>;

<span class="prelude-val">Ok</span>((sector, sector_metadata, plotted_sector))
<span class="prelude-val">Ok</span>((sector, plotted_sector))
})
};

Expand Down Expand Up @@ -658,8 +653,7 @@
SectorPlottingProgress::Finished {
plotted_sector,
time: start.elapsed(),
sector,
sector_metadata,
sector: Box::pin(stream::once(<span class="kw">async move </span>{ <span class="prelude-val">Ok</span>(sector) })),
},
)
.<span class="kw">await</span>;
Expand Down
4 changes: 0 additions & 4 deletions src/subspace_farmer/single_disk_farm.rs.html
Original file line number Diff line number Diff line change
Expand Up @@ -2270,8 +2270,6 @@
<a href="#2270" id="2270">2270</a>
<a href="#2271" id="2271">2271</a>
<a href="#2272" id="2272">2272</a>
<a href="#2273" id="2273">2273</a>
<a href="#2274" id="2274">2274</a>
</pre></div><pre class="rust"><code><span class="kw">pub mod </span>farming;
<span class="kw">pub mod </span>piece_cache;
<span class="kw">pub mod </span>piece_reader;
Expand Down Expand Up @@ -2976,7 +2974,6 @@
<span class="kw">let </span>public_key = <span class="kw-2">*</span>single_disk_farm_info.public_key();
<span class="kw">let </span>pieces_in_sector = single_disk_farm_info.pieces_in_sector();
<span class="kw">let </span>sector_size = sector_size(pieces_in_sector);
<span class="kw">let </span>sector_metadata_size = SectorMetadataChecksummed::encoded_size();

<span class="kw">let </span>SingleDiskFarmOptions {
directory,
Expand Down Expand Up @@ -3099,7 +3096,6 @@
node_client: <span class="kw-2">&amp;</span>node_client,
pieces_in_sector,
sector_size,
sector_metadata_size,
plot_file: <span class="kw-2">&amp;</span>plot_file,
metadata_file,
sectors_metadata: <span class="kw-2">&amp;</span>sectors_metadata,
Expand Down
Loading

0 comments on commit 053a210

Please sign in to comment.