profile
viewpoint
Raoul Millais raoulmillais @controlplaneio Kilpeck, Herefordshire www.raoulmillais.com

catsAndSolenoids/website 1

website for catsandsolenoids.eu

raoulmillais/7digital-cli 1

7digital API CLI client

raoulmillais/ace 1

Ajax.org Cloud9 Editor

raoulmillais/capybara-zombie 1

NOTE: This is a work in progress. Capybara driver for zombie.js running on top of node.js

startedampproject/rollup-plugin-closure-compiler

started time in 7 minutes

pull request commentparitytech/substrate

Telemetry per node

I've been thinking a bit about code organization. I think that perhaps the new sc-logging crate should actually be a module of sc-tracing. Also move the profiling layer into sc_tracing::profiling. It's possible we will soon need a state_tracing module for sc-tracing soon also. It seems like all these things belong together.

cecton

comment created time in 26 minutes

PR opened paritytech/substrate

*/Cargo.toml: Remove unused dependencies A0-pleasereview B0-silent C1-low

Using cargo-udeps to detect unused dependencies.

+0 -19

0 comment

7 changed files

pr created time in 28 minutes

push eventparitytech/substrate

dependabot[bot]

commit sha 31733d5075bdba62df00975df0463a56fadbcaa1

Bump tracing from 0.1.21 to 0.1.22 (#7589) Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.21 to 0.1.22. - [Release notes](https://github.com/tokio-rs/tracing/releases) - [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.21...tracing-0.1.22) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

view details

push time in 34 minutes

delete branch paritytech/substrate

delete branch : dependabot/cargo/tracing-0.1.22

delete time in 34 minutes

PR merged paritytech/substrate

Bump tracing from 0.1.21 to 0.1.22 A0-pleasereview A2-insubstantial B0-silent C1-low

Bumps tracing from 0.1.21 to 0.1.22. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/tokio-rs/tracing/commit/fc3eb9f0d03c82cfb07fcae0ce8cd649e16574d5"><code>fc3eb9f</code></a> tracing: prepare to release v0.1.22 (<a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1119">#1119</a>)</li> <li><a href="https://github.com/tokio-rs/tracing/commit/43440ef81558fe4278fba922aad25e3a42316eda"><code>43440ef</code></a> chore(deps): update pin-project-lite requirement from 0.1 to 0.2 (<a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1116">#1116</a>)</li> <li><a href="https://github.com/tokio-rs/tracing/commit/75ba2789732c3b468c9f1c5bc079f5c0a4b1c723"><code>75ba278</code></a> ci: switch to <code>audit-check</code> GitHub Action for <code>cargo audit</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1117">#1117</a>)</li> <li><a href="https://github.com/tokio-rs/tracing/commit/50e1fadb273fee52e19025f5b506c93e21cc4448"><code>50e1fad</code></a> ci: install cargo-hack from GitHub release instead of using cache (<a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1100">#1100</a>)</li> <li><a href="https://github.com/tokio-rs/tracing/commit/1cdd554954722b4a46f29aabd1487a05b32d30a8"><code>1cdd554</code></a> opentelemetry: prepare for 0.9.0 release (<a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1104">#1104</a>) (<a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1105">#1105</a>)</li> <li><a href="https://github.com/tokio-rs/tracing/commit/642ad19d620bbeabe6f495043ab1f464b584f503"><code>642ad19</code></a> opentelemetry: update to latest otel release version (<a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1049">#1049</a>) (<a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1099">#1099</a>)</li> <li><a href="https://github.com/tokio-rs/tracing/commit/692c56f63039ba0ec72958ea60fca3d8cf5da074"><code>692c56f</code></a> subscriber: prepare to release 0.2.15 (<a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1083">#1083</a>)</li> <li><a href="https://github.com/tokio-rs/tracing/commit/2d277033f170e2a1ad282b76541a87b5fb56ba8a"><code>2d27703</code></a> subscriber: fix accessing the field formatter from <code>FmtContext</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1081">#1081</a>) (<a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1082">#1082</a>)</li> <li><a href="https://github.com/tokio-rs/tracing/commit/8bdc6c367dbfa7964b488d0c1e4b1c1b8628aa67"><code>8bdc6c3</code></a> subscriber: add <code>Pretty</code> formatter (backports <a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1067">#1067</a>) (<a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1080">#1080</a>)</li> <li><a href="https://github.com/tokio-rs/tracing/commit/3bc2fd35e68c768598f5fd3bdf27c3e32d94d4c6"><code>3bc2fd3</code></a> subscriber: prepare to release 0.2.14 (<a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1065">#1065</a>)</li> <li>Additional commits viewable in <a href="https://github.com/tokio-rs/tracing/compare/tracing-0.1.21...tracing-0.1.22">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

+23 -17

2 comments

9 changed files

dependabot[bot]

pr closed time in 34 minutes

pull request commentparitytech/substrate

Bump tracing from 0.1.21 to 0.1.22

Trying merge.

dependabot[bot]

comment created time in 34 minutes

pull request commentparitytech/substrate

Bump tracing from 0.1.21 to 0.1.22

bot merge

dependabot[bot]

comment created time in 34 minutes

issue commentparitytech/substrate

Uncover memory leaks

Following up on this issue. Has there been any progress?

gavofyork

comment created time in 35 minutes

push eventparitytech/substrate

Bastian Köcher

commit sha 7e94f01af67c498605eb0206b7fca261f12a278c

Wasm-builder 3.0 (#7532) * Build every wasm crate in its own project with wasm-builder Building all wasm crates in one workspace was a nice idea, however it just introduced problems: 1. We needed to prune old members, but this didn't worked for old git deps. 2. We locked the whole wasm workspace while building one crate. This could lead to infinitely locking the workspace on a crash. Now we just build every crate in its own project, this means we will build the dependencies multiple times. While building the dependencies multiple times, we still decrease the build time by around 30 seconds for Polkadot and Substrate because of the new parallelism ;) * Remove the requirement on wasm-builder-runner This removes the requirement on wasm-builder-runner by using the new `build_dep` feature of cargo. We use nightly anyway and that enables us to use this feature. This solves the problem of not mixing build/proc-macro deps with normal deps. By doing this we get rid off this complicated project structure and can depend directly on `wasm-builder`. This also removes all the code from wasm-builder-runner and mentions that it is deprecated. * Copy the `Cargo.lock` to the correct folder * Remove wasm-builder-runner * Update docs * Fix deterministic check Modified-by: Bastian Köcher <git@kchr.de> * Try to make the ui test happy * Switch to `SKIP_WASM_BUILD` * Rename `SKIP_WASM_BINARY` to the correct name... * Update utils/wasm-builder/src/builder.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update utils/wasm-builder/src/builder.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

view details

push time in an hour

delete branch paritytech/substrate

delete branch : bkchr-wasm-builder-improvements

delete time in an hour

PR merged paritytech/substrate

Reviewers
Wasm-builder 3.0 A0-pleasereview B0-silent C1-low D2-breaksapi

It's time for a new wasm-builder era :P

This pr adds the following notable changes:

  • Instead of building all wasm binaries in one big workspace, we now build each wasm binary in its own project. Is this guy crazy? No! Why have I done this?

    1. It eliminates some problems with wasm-builder are being stuck: https://github.com/paritytech/substrate/issues/7375. Before we always had to lock the whole workspace when doing any change to build a wasm binary. This is now gone.
    2. When updating the git reference, it could happen that the build was failing the first time because there was a race condition updating all the project of the wasm workspace: https://github.com/paritytech/cumulus/issues/174
    3. Because we don't do 1 anymore we can build all wasm binaries in parallel, this lead to a build time decrease in Polkadot (release build) of around 40-50 seconds on my machine. It may happens that on machines with a small number of cores, the compile time could increase because we now build the dependencies for the wasm binaries multiple times.
  • The next big change is the removal of the wasm-builder-runner. This is achieved by using the unstable host_deps feature of cargo. Luckily we are using nightly anyway and being able to use this new feature. This simplifies the build process extremely, because we can include the wasm-builder directly as dependency and aren't forced anymore to do a special dependency handling for the wasm-builder in the build.rs file.

  • wasm-builder and wasm-builder-runner are updated to 3.0.0 on crates.io when this pr is approved. While the later one will be an empty crate that just points on the former one saying that people now only need to use this one.

Fixes: https://github.com/paritytech/substrate/issues/7375 Fixes: https://github.com/paritytech/cumulus/issues/174

+443 -886

3 comments

36 changed files

bkchr

pr closed time in an hour

issue closedparitytech/substrate

wasm-builder stalls build

While working (mostly cargo check) on polkadot I've stumbled on a problem where the kusama-runtime (only it) build hangs. According to cargo build -vv kusama-runtime starts building in the very start and the waits for the lock on build directory.

Here is the excerpt

[kusama-runtime 0.8.25]     Blocking waiting for file lock on package cache
[rococo-v1-runtime 0.8.25]     Blocking waiting for file lock on package cache
[polkadot-test-runtime 0.8.25]     Blocking waiting for file lock on package cache
[polkadot-runtime 0.8.25]     Blocking waiting for file lock on package cache
[westend-runtime 0.8.25]     Blocking waiting for file lock on package cache
[kusama-runtime 0.8.25]     Blocking waiting for file lock on build directory

Apparently, it never actually releases this lock. Removing wbuild and wbuild-runner didn't help and has lead to inclusion failures. Removing locks across the target directory didn't help as well, but probably I missed the right one.

cargo clean saved the day, but it's really annoying to wait for the rebuild.

closed time in an hour

pepyakin

issue commentparitytech/substrate

Blake2-256 or 512 ?

64 byte output (512 bits), also see https://github.com/paritytech/substrate/blob/master/primitives/core/src/crypto.rs#L305

bruce1ee

comment created time in an hour

Pull request review commentparitytech/substrate

Issue 7143 pallet treasury refactor

 impl<T: Trait<I>, I: Instance> Module<T, I> { 		T::ModuleId::get().into_account() 	} -	/// The account ID of a bounty account-	pub fn bounty_account_id(id: BountyIndex) -> T::AccountId {-		// only use two byte prefix to support 16 byte account id (used by test)-		// "modl" ++ "py/trsry" ++ "bt" is 14 bytes, and two bytes remaining for bounty index-		T::ModuleId::get().into_sub_account(("bt", id))-	}+	// /// The account ID of a bounty account+	// pub fn bounty_account_id(id: BountyIndex) -> T::AccountId {+	// 	// only use two byte prefix to support 16 byte account id (used by test)+	// 	// "modl" ++ "py/trsry" ++ "bt" is 14 bytes, and two bytes remaining for bounty index+	// 	T::ModuleId::get().into_sub_account(("bt", id))+	// }  	/// The needed bond for a proposal whose spend is `value`. 	fn calculate_bond(value: BalanceOf<T, I>) -> BalanceOf<T, I> { 		T::ProposalBondMinimum::get().max(T::ProposalBond::get() * value) 	} -	/// Given a mutable reference to an `OpenTip`, insert the tip into it and check whether it-	/// closes, if so, then deposit the relevant event and set closing accordingly.-	///-	/// `O(T)` and one storage access.-	fn insert_tip_and_check_closing(-		tip: &mut OpenTip<T::AccountId, BalanceOf<T, I>, T::BlockNumber, T::Hash>,-		tipper: T::AccountId,-		tip_value: BalanceOf<T, I>,-	) -> bool {-		match tip.tips.binary_search_by_key(&&tipper, |x| &x.0) {-			Ok(pos) => tip.tips[pos] = (tipper, tip_value),-			Err(pos) => tip.tips.insert(pos, (tipper, tip_value)),-		}-		Self::retain_active_tips(&mut tip.tips);-		let threshold = (T::Tippers::count() + 1) / 2;-		if tip.tips.len() >= threshold && tip.closes.is_none() {-			tip.closes = Some(system::Module::<T>::block_number() + T::TipCountdown::get());-			true-		} else {-			false-		}-	}--	/// Remove any non-members of `Tippers` from a `tips` vector. `O(T)`.-	fn retain_active_tips(tips: &mut Vec<(T::AccountId, BalanceOf<T, I>)>) {-		let members = T::Tippers::sorted_members();-		let mut members_iter = members.iter();-		let mut member = members_iter.next();-		tips.retain(|(ref a, _)| loop {-			match member {-				None => break false,-				Some(m) if m > a => break false,-				Some(m) => {-					member = members_iter.next();-					if m < a {-						continue-					} else {-						break true;-					}-				}-			}-		});-	}--	/// Execute the payout of a tip.-	///-	/// Up to three balance operations.-	/// Plus `O(T)` (`T` is Tippers length).-	fn payout_tip(hash: T::Hash, tip: OpenTip<T::AccountId, BalanceOf<T, I>, T::BlockNumber, T::Hash>) {-		let mut tips = tip.tips;-		Self::retain_active_tips(&mut tips);-		tips.sort_by_key(|i| i.1);-		let treasury = Self::account_id();-		let max_payout = Self::pot();-		let mut payout = tips[tips.len() / 2].1.min(max_payout);-		if !tip.deposit.is_zero() {-			let _ = T::Currency::unreserve(&tip.finder, tip.deposit);-		}-		if tip.finders_fee {-			if tip.finder != tip.who {-				// pay out the finder's fee.-				let finders_fee = T::TipFindersFee::get() * payout;-				payout -= finders_fee;-				// this should go through given we checked it's at most the free balance, but still-				// we only make a best-effort.-				let _ = T::Currency::transfer(&treasury, &tip.finder, finders_fee, KeepAlive);-			}-		}-		// same as above: best-effort only.-		let _ = T::Currency::transfer(&treasury, &tip.who, payout, KeepAlive);-		Self::deposit_event(RawEvent::TipClosed(hash, tip.who, payout));-	}- 	/// Spend some money! returns number of approvals before spend.-	fn spend_funds() -> Weight {+	pub fn spend_funds_top() -> Weight {

Really name change not required, reverted back to "spend_funds()".

shamb0

comment created time in an hour

delete branch paritytech/substrate

delete branch : dependabot/cargo/impl-trait-for-tuples-0.2.0

delete time in 2 hours

pull request commentparitytech/substrate

Bump impl-trait-for-tuples from 0.1.3 to 0.2.0

OK, I won't notify you again about this release, but will get in touch when a new version is available.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

dependabot[bot]

comment created time in 2 hours

PR closed paritytech/substrate

Bump impl-trait-for-tuples from 0.1.3 to 0.2.0 A0-pleasereview A2-insubstantial B0-silent C1-low D2-breaksapi

Bumps impl-trait-for-tuples from 0.1.3 to 0.2.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/bkchr/impl-trait-for-tuples/releases">impl-trait-for-tuples's releases</a>.</em></p> <blockquote> <h2>V0.2</h2> <p>This release includes two changes:</p> <ul> <li>Custom trait bounds: <a href="https://github-redirect.dependabot.com/bkchr/impl-trait-for-tuples/pull/2">bkchr/impl-trait-for-tuples#2</a></li> <li>Allow tuples to be reference types: <a href="https://github-redirect.dependabot.com/bkchr/impl-trait-for-tuples/pull/3">bkchr/impl-trait-for-tuples#3</a></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/bkchr/impl-trait-for-tuples/commits/v0.2">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

+30 -19

0 comment

10 changed files

dependabot[bot]

pr closed time in 2 hours

Pull request review commentparitytech/substrate

Issue 7143 pallet treasury refactor

 pub type ProposalIndex = u32; #[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug)] pub struct Proposal<AccountId, Balance> { 	/// The account proposing it.-	proposer: AccountId,+	pub proposer: AccountId,

Indeed its my bad, no need for pub visibility for this struct members, corrected it.

shamb0

comment created time in 2 hours

Pull request review commentparitytech/substrate

Issue 7143 pallet treasury refactor

 //! - `reject_proposal` - Reject a proposal, slashing the deposit. //! - `approve_proposal` - Accept the proposal, returning the deposit. //!-//! Tipping protocol:-//! - `report_awesome` - Report something worthy of a tip and register for a finders fee.-//! - `retract_tip` - Retract a previous (finders fee registered) report.-//! - `tip_new` - Report an item worthy of a tip and declare a specific amount to tip.-//! - `tip` - Declare or redeclare an amount to tip for a particular reason.-//! - `close_tip` - Close and pay out a tip.-//!-//! Bounty protocol:-//! - `propose_bounty` - Propose a specific treasury amount to be earmarked for a predefined set of-//! tasks and stake the required deposit.-//! - `approve_bounty` - Accept a specific treasury amount to be earmarked for a predefined body of work.-//! - `propose_curator` - Assign an account to a bounty as candidate curator.-//! - `accept_curator` - Accept a bounty assignment from the Council, setting a curator deposit.-//! - `extend_bounty_expiry` - Extend the expiry block number of the bounty and stay active.-//! - `award_bounty` - Close and pay out the specified amount for the completed work.-//! - `claim_bounty` - Claim a specific bounty amount from the Payout Address.-//! - `unassign_curator` - Unassign an accepted curator from a specific earmark.-//! - `close_bounty` - Cancel the earmark for a specific treasury amount and close the bounty.-//!-//! //! ## GenesisConfig //! //! The Treasury module depends on the [`GenesisConfig`](./struct.GenesisConfig.html).  #![cfg_attr(not(feature = "std"), no_std)] +#[cfg(test)] mod tests;+

:-) removed it, Could you plz point me to any Linting tool or coding guideline docs, helpful to avoid such stuffs in future ...

shamb0

comment created time in 2 hours

Pull request review commentparitytech/substrate

Issue 7143 pallet treasury refactor

+[package]+name = "pallet-tips"+version = "2.0.0"+authors = ["Parity Technologies <admin@parity.io>"]+edition = "2018"+license = "Apache-2.0"+homepage = "https://substrate.dev"+repository = "https://github.com/paritytech/substrate/"+description = "FRAME pallet to manage tips"+readme = "README.md"++[package.metadata.docs.rs]+targets = ["x86_64-unknown-linux-gnu"]++[dependencies]+serde = { version = "1.0.101", optional = true, features = ["derive"] }+codec = { package = "parity-scale-codec", version = "1.3.1", default-features = false, features = ["derive"] }+sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" }+sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" }+frame-support = { version = "2.0.0", default-features = false, path = "../support" }+frame-system = { version = "2.0.0", default-features = false, path = "../system" }+pallet-balances = { version = "2.0.0", default-features = false, path = "../balances" }

Good one, Indeed it should be part of dev-dependencies, and moved "pallet-balances" as part of dev-dependencies

shamb0

comment created time in 2 hours

Pull request review commentparitytech/substrate

Issue 7143 pallet treasury refactor

+// This file is part of Substrate.++// Copyright (C) 2017-2020 Parity Technologies (UK) Ltd.+// SPDX-License-Identifier: Apache-2.0++// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+// 	http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License.++//! # Bounties Module ( pallet-bounties )+//!+//! ### Bounty+//!+//! This pallet is build on top of pallet-treasury+//!+//! A Bounty Spending is a reward for a specified body of work - or specified set of objectives - that+//! needs to be executed for a predefined Treasury amount to be paid out. A curator is assigned after+//! the bounty is approved and funded by Council, to be delegated+//! with the responsibility of assigning a payout address once the specified set of objectives is completed.+//!+//! After the Council has activated a bounty, it delegates the work that requires expertise to a curator+//! in exchange of a deposit. Once the curator accepts the bounty, they+//! get to close the Active bounty. Closing the Active bounty enacts a delayed payout to the payout+//! address, the curator fee and the return of the curator deposit. The+//! delay allows for intervention through regular democracy. The Council gets to unassign the curator,+//! resulting in a new curator election. The Council also gets to cancel+//! the bounty if deemed necessary before assigning a curator or once the bounty is active or payout+//! is pending, resulting in the slash of the curator's deposit.+//!+//!+//! ### Terminology+//!+//! - **Proposal:** A suggestion to allocate funds from the pot to a beneficiary.+//! - **Beneficiary:** An account who will receive the funds from a proposal iff+//! the proposal is approved.+//! - **Deposit:** Funds that a proposer must lock when making a proposal. The+//! deposit will be returned or slashed if the proposal is approved or rejected+//! respectively.+//! - **Pot:** Unspent funds accumulated by the treasury module.+//!+//! Bounty:+//! - **Bounty spending proposal:** A proposal to reward a predefined body of work upon completion by+//! the Treasury.+//! - **Proposer:** An account proposing a bounty spending.+//! - **Curator:** An account managing the bounty and assigning a payout address receiving the reward+//! for the completion of work.+//! - **Deposit:** The amount held on deposit for placing a bounty proposal plus the amount held on+//! deposit per byte within the bounty description.+//! - **Curator deposit:** The payment from a candidate willing to curate an approved bounty. The deposit+//! is returned when/if the bounty is completed.+//! - **Bounty value:** The total amount that should be paid to the Payout Address if the bounty is+//! rewarded.+//! - **Payout address:** The account to which the total or part of the bounty is assigned to.+//! - **Payout Delay:** The delay period for which a bounty beneficiary needs to wait before claiming.+//! - **Curator fee:** The reserved upfront payment for a curator for work related to the bounty.+//!+//! ## Interface+//!+//! ### Dispatchable Functions+//!+//! Bounty protocol:+//! - `propose_bounty` - Propose a specific treasury amount to be earmarked for a predefined set of+//! tasks and stake the required deposit.+//! - `approve_bounty` - Accept a specific treasury amount to be earmarked for a predefined body of work.+//! - `propose_curator` - Assign an account to a bounty as candidate curator.+//! - `accept_curator` - Accept a bounty assignment from the Council, setting a curator deposit.+//! - `extend_bounty_expiry` - Extend the expiry block number of the bounty and stay active.+//! - `award_bounty` - Close and pay out the specified amount for the completed work.+//! - `claim_bounty` - Claim a specific bounty amount from the Payout Address.+//! - `unassign_curator` - Unassign an accepted curator from a specific earmark.+//! - `close_bounty` - Cancel the earmark for a specific treasury amount and close the bounty.+//!+//! ## GenesisConfig+//!+//! None++#![cfg_attr(not(feature = "std"), no_std)]++mod tests;+mod benchmarking;+pub mod weights;++use sp_std::prelude::*;++use frame_support::{decl_module, decl_storage, decl_event, ensure, decl_error};++use frame_support::traits::{+	Currency, Get, Imbalance, OnUnbalanced, ExistenceRequirement::{AllowDeath},+	ReservableCurrency};++use sp_runtime::{Permill, RuntimeDebug, DispatchResult, traits::{+	Zero, StaticLookup, AccountIdConversion, Saturating, BadOrigin+}};++use frame_support::dispatch::DispatchResultWithPostInfo;+use frame_support::traits::{EnsureOrigin};++use frame_support::weights::{Weight};++use codec::{Encode, Decode};+use frame_system::{self as system, ensure_signed};+pub use weights::WeightInfo;++type BalanceOf<T> = pallet_treasury::BalanceOf<T>;++type PositiveImbalanceOf<T> = pallet_treasury::PositiveImbalanceOf<T>;++pub trait Trait: frame_system::Trait + pallet_treasury::Trait {++	/// The amount held on deposit for placing a bounty proposal.+	type BountyDepositBase: Get<BalanceOf<Self>>;++	/// The delay period for which a bounty beneficiary need to wait before claim the payout.+	type BountyDepositPayoutDelay: Get<Self::BlockNumber>;++	/// Bounty duration in blocks.+	type BountyUpdatePeriod: Get<Self::BlockNumber>;++	/// Percentage of the curator fee that will be reserved upfront as deposit for bounty curator.+	type BountyCuratorDeposit: Get<Permill>;++	/// Minimum value for a bounty.+	type BountyValueMinimum: Get<BalanceOf<Self>>;++	/// The overarching event type.+	type Event: From<Event<Self>> + Into<<Self as frame_system::Trait>::Event>;++	/// Weight information for extrinsics in this pallet.+	type WeightInfo: WeightInfo;+}++/// An index of a bounty. Just a `u32`.+pub type BountyIndex = u32;++/// A bounty proposal.+#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug)]+pub struct Bounty<AccountId, Balance, BlockNumber> {+	/// The account proposing it.+	proposer: AccountId,+	/// The (total) amount that should be paid if the bounty is rewarded.+	value: Balance,+	/// The curator fee. Included in value.+	fee: Balance,+	/// The deposit of curator.+	curator_deposit: Balance,+	/// The amount held on deposit (reserved) for making this proposal.+	bond: Balance,+	/// The status of this bounty.+	status: BountyStatus<AccountId, BlockNumber>,+}++/// The status of a bounty proposal.+#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug)]+pub enum BountyStatus<AccountId, BlockNumber> {+	/// The bounty is proposed and waiting for approval.+	Proposed,+	/// The bounty is approved and waiting to become active at next spend period.+	Approved,+	/// The bounty is funded and waiting for curator assignment.+	Funded,+	/// A curator has been proposed by the `ApproveOrigin`. Waiting for acceptance from the curator.+	CuratorProposed {+		/// The assigned curator of this bounty.+		curator: AccountId,+	},+	/// The bounty is active and waiting to be awarded.+	Active {+		/// The curator of this bounty.+		curator: AccountId,+		/// An update from the curator is due by this block, else they are considered inactive.+		update_due: BlockNumber,+	},+	/// The bounty is awarded and waiting to released after a delay.+	PendingPayout {+		/// The curator of this bounty.+		curator: AccountId,+		/// The beneficiary of the bounty.+		beneficiary: AccountId,+		/// When the bounty can be claimed.+		unlock_at: BlockNumber,+	},+}++decl_storage! {+	trait Store for Module<T: Trait> as Treasury {++		/// Number of bounty proposals that have been made.+		pub BountyCount get(fn bounty_count): BountyIndex;++		/// Bounties that have been made.+		pub Bounties get(fn bounties):+		map hasher(twox_64_concat) BountyIndex+		=> Option<Bounty<T::AccountId, BalanceOf<T>, T::BlockNumber>>;++		/// The description of each bounty.+		pub BountyDescriptions get(fn bounty_descriptions): map hasher(twox_64_concat) BountyIndex => Option<Vec<u8>>;++		/// Bounty indices that have been approved but not yet funded.+		pub BountyApprovals get(fn bounty_approvals): Vec<BountyIndex>;+	}+}++decl_event!(+	pub enum Event<T>+	where+		Balance = BalanceOf<T>,+		<T as frame_system::Trait>::AccountId,+	{+		/// New bounty proposal. [index]+		BountyProposed(BountyIndex),+		/// A bounty proposal was rejected; funds were slashed. [index, bond]+		BountyRejected(BountyIndex, Balance),+		/// A bounty proposal is funded and became active. [index]+		BountyBecameActive(BountyIndex),+		/// A bounty is awarded to a beneficiary. [index, beneficiary]+		BountyAwarded(BountyIndex, AccountId),+		/// A bounty is claimed by beneficiary. [index, payout, beneficiary]+		BountyClaimed(BountyIndex, Balance, AccountId),+		/// A bounty is cancelled. [index]+		BountyCanceled(BountyIndex),+		/// A bounty expiry is extended. [index]+		BountyExtended(BountyIndex),+	}+);++decl_error! {+	/// Error for the treasury module.+	pub enum Error for Module<T: Trait> {+		/// Proposer's balance is too low.+		InsufficientProposersBalance,+		/// No proposal or bounty at that index.+		InvalidIndex,+		/// The reason given is just too big.+		ReasonTooBig,+		/// The bounty status is unexpected.+		UnexpectedStatus,+		/// Require bounty curator.+		RequireCurator,+		/// Invalid bounty value.+		InvalidValue,+		/// Invalid bounty fee.+		InvalidFee,+		/// A bounty payout is pending.+		/// To cancel the bounty, you must unassign and slash the curator.+		PendingPayout,+		/// The tip cannot be claimed/closed because it's still in the countdown period.

Error enum "Premature" is valid and used in few extrinsic, rephrased the comment as below ... "/// The bounties cannot be claimed/closed because it's still in the countdown period."

shamb0

comment created time in 2 hours

pull request commentparitytech/substrate

Bump wasmtime from 0.19.0 to 0.21.0

I don't know whether Substrate still uses weird unsafeties to integrate wasmtime. If yes, then this needs more eyes.

dependabot[bot]

comment created time in 2 hours

push eventparitytech/substrate

Alexander Theißen

commit sha e26a46a805d68ce55457d67552ba71b76421f708

contracts: Add missing instruction to the `Schedule` (#7527)

view details

Bastian Köcher

commit sha 02771e146f126a9759a62948ec8a2edd6ad47ee9

Don't log with colors when we are writing to a tty (#7525) * Don't log with colors when we are writing to a tty This fixes a regression that was introduced by the switch to tracing. Before we killed all colors before writing to a tty, this pr brings the behaviour back. * Remove accidentally added crate * Review feedback * More feedback * Update client/cli/src/logging.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update client/cli/src/logging.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

view details

Pierre Krieger

commit sha 1c0f76b168345d1a42bb6a106d74d22d10ae2310

MemoryId -> u32 (#7534)

view details

Bastian Köcher

commit sha 5222a8f4a71134e3a95f268d1bcd9c8c5715b048

Enable local addresses in DHT when chain type == `Local` | `Development` (#7538) * Enable local addresses in DHT when chain type == `Local` | `Development` This pr changes when to add local addresses to DHT. Instead of only checking if `--discover-local` and `--dev` are present, we now also check if the chain type is `Local` or `Development`. * Update the docs!

view details

Kirill Pimenov

commit sha 77007ed87727a761169d4c57cbeae0151d9efb81

Update tiny-bip39 to v0.8 (#7539) It would improve secret zeroization due to https://github.com/maciejhirsz/tiny-bip39/pull/22, and would also remove one of the points where we depend on `failure` crate, which is deprecated (see https://github.com/rust-lang-nursery/failure/pull/347)

view details

Andrew Plaza

commit sha f31e7784e8b7c1c14535274c7b6c0be7b8310b4b

make LocalCallExecutor public (#7528)

view details

Bastian Köcher

commit sha 74e01c84ca73b22cb9053e6e641a61ed87c31f7b

Fix some weirdness in `offchain_worker` (#7541) We call `offchain_worker` with the state of the imported block and pass the header of this block. However in the runtime we call all `offchain_worker` functions with the number of the parent block. Besides that we also pass all digests and not only the pre runtime digests. In the context where the offchain worker is executed we have all digests, so there is no real reason to only pass pre runtime digests. Another fix is that we also insert the hash of the current header into the block hash map.

view details

Pierre Krieger

commit sha 99602cda4e1c06d66a40aa933789308d4ca9a7ce

Use inbound peerslot slots when a substream is received, rather than a connection (#7464) * Use inbound peerslot slots when a substream is received, rather than a connection * Refactor PeerState * Some bugfixes * Fix warnings so that CI runs, gmlrlblbl * Bugfixes * Update docs * Apply suggestions from code review Co-authored-by: Roman Borschel <romanb@users.noreply.github.com> * Clean up Banned state * Refactor connections state * Fix possibility of Enabled with no Opening or Open connection * Line width * Add some debug_asserts! and fix TODO * Refactor legacy handler * Rewrite group.rs entirely [part 1] * Rewrite group.rs entirely [part 2] * Remove faulty assertion Because of the asynchronous nature of the behaviour <-> handler communications, it is possible to receive notifications while in the Closing state * Don't poll the legacy substream is not Open * Tolerate when not all substreams are accepted * Remove TODOs * Dummy commit to make CI log interesting things * Try race condition fix * Revert "Try race condition fix" This reverts commit 0675c659d06195c30f8c5bc13e2d88141d57a3ba. * Correctly rebuild pending_opening * Minor tweaks * Printlns for CI debugging * Revert "Printlns for CI debugging" This reverts commit e7852a231f4fc418898767aaa27c9a4358e12e8b. * Revert "Dummy commit to make CI log interesting things" This reverts commit 259ddd74088e53e7c6a9b0a62a8d1573a0063ce3. * mv group.rs ../handler.rs * Apply suggestions from code review Co-authored-by: Max Inden <mail@max-inden.de> * Banned => Backoff * Mention the actual PeerStates * OpenDesired -> OpenDesiredByRemote * OpeningThenClosing * Add doc links to PeerState * Simplify increment logic * One more debug_assert * debug_assert! * OpenDesiredByRemote * Update client/network/src/protocol/generic_proto/behaviour.rs Co-authored-by: Max Inden <mail@max-inden.de> Co-authored-by: Roman Borschel <romanb@users.noreply.github.com> Co-authored-by: Max Inden <mail@max-inden.de>

view details

Max Inden

commit sha 08b217a0650635f8430655979c581f0cebe4bed3

*: Update to libp2p v0.30.0 (#7508) * *: Update to libp2p v0.30.0 * Cargo.lock: Update * *: Update to libp2p v0.30.1

view details

Andrew Plaza

commit sha 11ace4ef8b2ad176293ad6db2b3dd795befd2c79

make ClientConfig public (#7544)

view details

Qinxuan Chen

commit sha 407cd3af06b03201a506b645c9ee587e5d4748bb

sc-basic-authorship: remove useless dependencies (#7550) Signed-off-by: koushiro <koushiro.cqx@gmail.com>

view details

Kian Paimani

commit sha 2d97a12fb7070a5fbc3dcc9d2918247df69d6245

Add slashing events to elections-phragmen. (#7543) * Add slashing events to elections-phragmen. * Fix build * Apply suggestions from code review * Update frame/elections-phragmen/src/lib.rs * Update frame/elections-phragmen/src/lib.rs Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com> Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>

view details

Pierre Krieger

commit sha c180950de63dbdfaa11053a8a56f35e694ed9e36

Remove necessity to pass ConsensusEngineId when registering notifications protocol (#7549) * Remove necessity to pass ConsensusEngineId when registering notifications protocol * Line width * Fix tests protocol name * Other renames * Doc update * Change issue in TODO

view details

Qinxuan Chen

commit sha 9d65d983a08c59f4239965f4fb65bd7d0099c788

sc-cli: replace bip39 with tiny-bip39 (#7551) Signed-off-by: koushiro <koushiro.cqx@gmail.com>

view details

Tomasz Drwięga

commit sha 69198d1e5735798c8baa1921c6e2091c93260752

Add extra docs to on_initialize (#7552) * Add some extra on_initialize docs. * Address review comments.

view details

Shawn Tabrizi

commit sha f74de63d23214b530ac24ac3ea4ead1180e22e83

More Extensible Multiaddress Format (#7380) * More extensible multiaddress format * update name * Don't depend on indices to define multiaddress type * Use MultiAddress in Node Template too! * reduce traits, fix build * support multiple `StaticLookup` * bump tx version * feedback

view details

Alexander Theißen

commit sha 1c122c6d138f7f58f1ed7ce1414cf3dd283cd4ce

Fix weight template to remove ugliness in rust doc (#7565) fixed weight template

view details

Max Inden

commit sha a0e8b7ecd1d1d44bfdad1e67ef4028121f7d9d82

Cargo.lock: Run cargo update (#7553) * Cargo.lock: Run cargo update * Cargo.lock: Downgrade cc to v1.0.62 * Cargo.lock: Revert wasm-* updates

view details

Max Inden

commit sha 5f17393cdd9748993b8370d7f166d9538ccdb29c

.github: Add dependabot config and thus enable dependabot (#7509) * .github: Add dependabot config and thus enable dependabot * Update .github/dependabot.yml Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com> Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>

view details

Kian Paimani

commit sha faad534b30d78a7e3ff8979cb839635a34680c5b

Thread-local parameter_types for testing. (#7542) * Thread-local parameter_types for testing. * Better docs. * Some minors * Merge'em * Update frame/support/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Align more to basti's trick * Update frame/support/src/lib.rs * Update frame/support/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Bastian Köcher <git@kchr.de>

view details

push time in 2 hours

Pull request review commentparitytech/substrate

Issue 7143 pallet treasury refactor

+[package]+name = "pallet-bounties"+version = "2.0.0"+authors = ["Parity Technologies <admin@parity.io>"]+edition = "2018"+license = "Apache-2.0"+homepage = "https://substrate.dev"+repository = "https://github.com/paritytech/substrate/"+description = "FRAME pallet to manage bounties"+readme = "README.md"++[package.metadata.docs.rs]+targets = ["x86_64-unknown-linux-gnu"]++[dependencies]+serde = { version = "1.0.101", optional = true, features = ["derive"] }+codec = { package = "parity-scale-codec", version = "1.3.1", default-features = false, features = ["derive"] }+sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" }+sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" }+frame-support = { version = "2.0.0", default-features = false, path = "../support" }+frame-system = { version = "2.0.0", default-features = false, path = "../system" }+pallet-balances = { version = "2.0.0", default-features = false, path = "../balances" }

Good one, Indeed it should be part of dev-dependencies, and moved "pallet-balances" as part of dev-dependencies

shamb0

comment created time in 2 hours

created repositoryid3as/purescript-erl-opentelemetry

Bindings to opentelemetry-erlang

created time in 2 hours

PullRequestEvent

startedandrepxx/go-dsp-guitar

started time in 3 hours

create barnchparitytech/substrate

branch : dependabot/cargo/tracing-0.1.22

created branch time in 3 hours

PR opened paritytech/substrate

Bump tracing from 0.1.21 to 0.1.22

Bumps tracing from 0.1.21 to 0.1.22. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/tokio-rs/tracing/commit/fc3eb9f0d03c82cfb07fcae0ce8cd649e16574d5"><code>fc3eb9f</code></a> tracing: prepare to release v0.1.22 (<a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1119">#1119</a>)</li> <li><a href="https://github.com/tokio-rs/tracing/commit/43440ef81558fe4278fba922aad25e3a42316eda"><code>43440ef</code></a> chore(deps): update pin-project-lite requirement from 0.1 to 0.2 (<a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1116">#1116</a>)</li> <li><a href="https://github.com/tokio-rs/tracing/commit/75ba2789732c3b468c9f1c5bc079f5c0a4b1c723"><code>75ba278</code></a> ci: switch to <code>audit-check</code> GitHub Action for <code>cargo audit</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1117">#1117</a>)</li> <li><a href="https://github.com/tokio-rs/tracing/commit/50e1fadb273fee52e19025f5b506c93e21cc4448"><code>50e1fad</code></a> ci: install cargo-hack from GitHub release instead of using cache (<a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1100">#1100</a>)</li> <li><a href="https://github.com/tokio-rs/tracing/commit/1cdd554954722b4a46f29aabd1487a05b32d30a8"><code>1cdd554</code></a> opentelemetry: prepare for 0.9.0 release (<a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1104">#1104</a>) (<a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1105">#1105</a>)</li> <li><a href="https://github.com/tokio-rs/tracing/commit/642ad19d620bbeabe6f495043ab1f464b584f503"><code>642ad19</code></a> opentelemetry: update to latest otel release version (<a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1049">#1049</a>) (<a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1099">#1099</a>)</li> <li><a href="https://github.com/tokio-rs/tracing/commit/692c56f63039ba0ec72958ea60fca3d8cf5da074"><code>692c56f</code></a> subscriber: prepare to release 0.2.15 (<a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1083">#1083</a>)</li> <li><a href="https://github.com/tokio-rs/tracing/commit/2d277033f170e2a1ad282b76541a87b5fb56ba8a"><code>2d27703</code></a> subscriber: fix accessing the field formatter from <code>FmtContext</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1081">#1081</a>) (<a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1082">#1082</a>)</li> <li><a href="https://github.com/tokio-rs/tracing/commit/8bdc6c367dbfa7964b488d0c1e4b1c1b8628aa67"><code>8bdc6c3</code></a> subscriber: add <code>Pretty</code> formatter (backports <a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1067">#1067</a>) (<a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1080">#1080</a>)</li> <li><a href="https://github.com/tokio-rs/tracing/commit/3bc2fd35e68c768598f5fd3bdf27c3e32d94d4c6"><code>3bc2fd3</code></a> subscriber: prepare to release 0.2.14 (<a href="https://github-redirect.dependabot.com/tokio-rs/tracing/issues/1065">#1065</a>)</li> <li>Additional commits viewable in <a href="https://github.com/tokio-rs/tracing/compare/tracing-0.1.21...tracing-0.1.22">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

+23 -17

0 comment

9 changed files

pr created time in 3 hours

more