Conversation
runtimes/common/src/constants.rs
Outdated
| use super::*; | ||
|
|
||
| parameter_types! { | ||
| pub const DataDepositPerByte: Balance = deposit(0, 1); |
There was a problem hiding this comment.
In Polkadot, this is set to 1 cent. However, I wanted to align with our other deposits.
There was a problem hiding this comment.
We already have a constant ByteDeposit. Maybe we use this across all pallets that require a byte deposit? I'm not sure if there are cases where we want to have different byte deposits for different pallets.
| pub const MaximumReasonLength: u32 = 16384; | ||
| pub const TipCountdown: BlockNumber = DAYS; | ||
| pub const TipFindersFee: Percent = Percent::from_percent(20); | ||
| pub const TipReportDepositBase: Balance = deposit(1, 1); |
There was a problem hiding this comment.
In Polkadot, this is set to 1 Dollar. However, I wanted to align with our other deposits.
|
|
||
| parameter_types! { | ||
| pub const DataDepositPerByte: Balance = deposit(0, 1); | ||
| pub const MaximumReasonLength: u32 = 16384; |
There was a problem hiding this comment.
This is naively taken from Kusama configuration, I could not find any information where this value comes from unfortunately.
There was a problem hiding this comment.
I think we were told once that there is a threshold up to which a storage entry size doesn't influence the weights. If this threshold is passed, the storage needs to be taken into account when doing benchmarks. Maybe the value is related to that?
|
/bench runtime spiritnet-runtime pallet-tips |
|
Starting benchmark for branch: wf-add-tips-pallet (vs develop) Toolchain: Comment will be updated. |
|
/bench runtime spiritnet-runtime pallet-tips |
|
ERROR: Failed to query the currently active Rust toolchain |
|
/bench runtime spiritnet-runtime pallet-tips |
|
Benchmark Runtime Pallet for branch "wf-add-tips-pallet" with command cargo run --quiet --release -p kilt-parachain --features=runtime-benchmarks -- benchmark --chain=spiritnet-dev --steps=50 --repeat=20 --pallet=pallet-tips --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/spiritnet/src/weights/pallet_tips.rs --template=.maintain/runtime-weight-template.hbs ResultsERROR: Unable to commit file ./runtimes/spiritnet/src/weights/pallet_tips.rs |
weichweich
left a comment
There was a problem hiding this comment.
LGTM I got two minor comments.
runtimes/peregrine/src/lib.rs
Outdated
| // Preimage registrar | ||
| Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>} = 44, | ||
|
|
||
| // Tips module. |
There was a problem hiding this comment.
The comment doesn't really explain more than the code already shows. Maybe we can add a one sentence description?
| // Tips module. | |
| // Tips module to reward contributions to the ecosystem with small amount of KILTs |
There was a problem hiding this comment.
Done in 31eaad3. I was wondering whether we rather want to add the tips pallet to the Governance block though. One argument against this would be to leave space for Governance 2.0.
runtimes/peregrine/src/lib.rs
Outdated
| pub struct CouncilProvider; | ||
| impl frame_support::traits::SortedMembers<AccountId> for CouncilProvider { | ||
| fn contains(who: &AccountId) -> bool { | ||
| Council::is_member(who) |
There was a problem hiding this comment.
Forgot to attach this to the review. 🙄
I had the crazy idea that this could be generic and be part of the runtime common. But i'm not sure if that's possible.
There was a problem hiding this comment.
That would be the technical committee now. Right? Council would be one of the two pallet_membership instances?
There was a problem hiding this comment.
ah no! pallet_collective are the Council and Technical committe. pallet_membership is only technical committteee
There was a problem hiding this comment.
Yes, I think we eventually want to have the Council here as originally proposed by me.
There was a problem hiding this comment.
Ok I am finally happy with my changes from 31eaad3. I introduced a new instance of the membership pallet such that the Tippers are not tied to either the Council or the Technical Committee.
|
/bench runtime spiritnet-runtime pallet-tips |
| type MembershipInitialized = (); | ||
| type MembershipChanged = (); |
There was a problem hiding this comment.
These two receivers can be kept empty for Tippers IMO as we don't need to handle membership change anywhere else in contrast to the Technical Committee which also needs to apply it to the collective pallet.
|
/bench runtime spiritnet-runtime pallet-tips |
|
Benchmark Runtime Pallet for branch "wf-add-tips-pallet" with command cargo run --quiet --release -p kilt-parachain --features=runtime-benchmarks -- benchmark --chain=spiritnet-dev --steps=50 --repeat=20 --pallet=pallet-tips --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/spiritnet/src/weights/pallet_tips.rs --template=.maintain/runtime-weight-template.hbs Toolchain: nightly-2022-01-08-x86_64-unknown-linux-gnu (default) Results |
…hmarks -- benchmark --chain=spiritnet-dev --steps=50 --repeat=20 --pallet=pallet-tips --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/spiritnet/src/weights/pallet_tips.rs --template=.maintain/runtime-weight-template.hbs
|
/bench runtime peregrine pallet-tips |
|
Benchmark Runtime Substrate Pallet for branch "wf-add-tips-pallet" with command cargo run --quiet --release -p kilt-parachain --features=runtime-benchmarks -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet-tips --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/peregrine/src/weights/pallet_tips.rs --template=.maintain/runtime-weight-template.hbs Toolchain: nightly-2022-01-08-x86_64-unknown-linux-gnu (directory override for '/home/benchbot/bench-bot/git/mashnet-node') Results |
…hmarks -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet-tips --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/peregrine/src/weights/pallet_tips.rs --template=.maintain/runtime-weight-template.hbs
ntn-x2
left a comment
There was a problem hiding this comment.
I had just a few nit picks, otherwise it looks good 👍
* feat: add tips pallet * fix: benchmarks * refactor: move provider to common * feat: add tips membership pallet * cargo run --quiet --release -p kilt-parachain --features=runtime-benchmarks -- benchmark --chain=spiritnet-dev --steps=50 --repeat=20 --pallet=pallet-tips --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/spiritnet/src/weights/pallet_tips.rs --template=.maintain/runtime-weight-template.hbs * cargo run --quiet --release -p kilt-parachain --features=runtime-benchmarks -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet-tips --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/peregrine/src/weights/pallet_tips.rs --template=.maintain/runtime-weight-template.hbs * refactor: apply suggestions from @ntn-x2 Co-authored-by: kiltbot <> (cherry picked from commit 9d318ee)
* Adds two more relaychain bootnodes for staging environment (#334) * chore: reset peregrine stg (#335) * ci: use custom ci image (#336) * Optimizes docker layer (#337) * fix: add did lookup pallet to DID authorization logic + reverse lookup index (#343) * chore: update toolchain version to nightly 1.59 (#339) * feat: proxy type for disableling deposit claiming (#341) * fix: rococo protocol id (#369) * feat: generic access control (#316) * Updates toolchain version (#345) * refactor: enforce no runtime in pallet (#349) * fix: features (#353) * feat: add tips pallet (#352) * feat: upgrade to Polkadot v0.9.19 (#357) * chore: upgrade and clean up (#360) * Adds the new rococo chainspec (#363) * feat: add launch pallet removal migration (#359) * refactor: update rilt para id from 2015 to 2108 (#364) * fix: rilt para id (#365) * feat: upgrade to Polkadot v0.9.23 (#366) * use ci-linx:production base image (#368) * feat: upgrade to Polkadot v0.9.24 (#370) * fix: fix CI builders compilation errors and pin to a specific hash (#372)
fixes KILTProtocol/ticket#1829
Todo
Checklist:
array[3]useget(3), ...)