-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Author reward destination through inherent, fees, tips, and treasury #11
Conversation
83dcf7b
to
3b7f170
Compare
This comment is out of date? Zombienet looks fine with your last commit |
pub const ProposalBond: Permill = Permill::from_percent(5); | ||
pub const ProposalBondMinimum: Balance = 0; | ||
pub const ProposalBondMaximum: Option<Balance> = Option::None; | ||
pub const SpendPeriod: BlockNumber = 24 * DAYS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, actually we might need to create our own treasury pallet which doesn't have these kinds of concepts, since the chain won't necessarily be producing a block every 6 seconds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, we should set this very low, like 100 blocks maybe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, just remembering, we need to make our own pallet which is actually connected to the relay chain block number
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally feature should be added to treasury
Maybe SpendPeriod
type should be able to take either a block number or a relay block number. I will look into it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nits. Probably need to think a little more about treasury, but can be done in a follow up PR.
Once test is fixed, happy to merge.
#[pallet::config] | ||
pub trait Config: frame_system::Config { | ||
/// The type `Self::AccountId` but with additional constraint. | ||
type AccountIdType: IsType<<Self as frame_system::Config>::AccountId> + From<InherentType>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Set the author reward destination for the block. | ||
#[pallet::call_index(0)] | ||
#[pallet::weight(( | ||
T::DbWeight::get().writes(1), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fwiw this is not really POV friendly as types like RuntimeDbWeight
and such don't track PoV at all.
The solution for now is to not use this "manual" weighing in code and only write and run benchmarks.
I can't find it, but we recently re-discovered this and made an issue to solve it or want users about it better cc @ggwpez
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or to provide a weight metered DB: polkadot-fellows/RFCs#49
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But anyway we will do becnhmarks in a final sprint of the runtime
happy to merge |
ok to merge. treasury needs more work, |
related issue: #3
Ready for review.
DROPIT_AUTHOR_REWARD_DEST
and format is SS58.zombie test net may need more adjustment so every collator adds this environment variable but it doesn't work on master. We can do in a follow up.