Rome version of content working group#87
Rome version of content working group#87mnaamani merged 108 commits intoJoystream:developmentfrom bedeho:add-content-wg
Conversation
|
@bedeho the build is currently failing because we need to update the dependencies to use the same commit hash for substrate, as well as some minor tweaks to fix issues that only show up when building for WASM. (specifically use of |
|
Great that you are on top of it, I have a temporary fix for the Vec issue here Joystream/substrate-versioned-store-permissions-module#3 so I am not blocked by that. |
|
I know get this build error when doing
#[cfg_attr(feature = "std", derive(Serialize, Deserialize, Debug))]which only includes the derives when we are not building the WASM target? I hope we can have a more safe and sound solution to resolve this issue of things breaking when they are used in ways that are not so visible when they are built and run on their own. |
Plus lots of supporting apparatus usable in other extrinsics later
A new way to ensure that an origin is signed by the controller account of a member
Update to use ensure_member_controller_account_signed.
Is used in transfer_channel_ownership
- Update name - Enforce availability of name
A new utility routine for updating channel properties
mnaamani
left a comment
There was a problem hiding this comment.
Really clean and surprisingly easy to go through, despite the number of modules that come together in this module.
| trait Store for Module<T: Trait> as ContentWorkingGroup { | ||
|
|
||
| /// The mint currently funding the rewards for this module. | ||
| pub Mint get(mint) config(): <T as minting::Trait>::MintId; |
There was a problem hiding this comment.
we don't have configurable mints at genesis.. so setting a mintid at genesis is problematic atm.
Either we can have this be an Option<MintId> with the mint getting created later with a sudo call,
or my preferred way to use a build() with some extra_genesis values to create a new mint.
There was a problem hiding this comment.
It also just occurred to me, I don't see the mint id being used when creating reward relationships.
There was a problem hiding this comment.
I see now the relationship is created through an extrinsic where the mintid is provided..
There was a problem hiding this comment.
Here is one approach to create mint with build() at genesis: 438c031
|
|
||
| Self::update_channel( | ||
| &channel_id, | ||
| &None, |
There was a problem hiding this comment.
new_channel_name isn't used to update
| &None, | |
| &new_channel_name, |
| pub fn fill_curator_opening( | ||
| origin, | ||
| curator_opening_id: CuratorOpeningId<T>, | ||
| successful_curator_application_ids: BTreeSet<CuratorApplicationId<T>> |
There was a problem hiding this comment.
Does an empty set need to be handled in a special way?
Would have to look at behavior of hiring module when calling fill_opening with empty application set.
| stake_id: StakeId<T> | ||
| ) { | ||
| // Ensure its a runtime root origin | ||
| ensure_root(origin)?; |
There was a problem hiding this comment.
This can be called via sudo extrinsic. I don't think this is what you intended. Its probably the method that will be called from handler for StakingEventHandler::unstaked ?
There was a problem hiding this comment.
No values are ever inserted into UnstakerByStakeId map. Is that step missing in apply_on_curator_opening()
There was a problem hiding this comment.
Correction.. (as per chat) step is missing in deactivate_curator()
There was a problem hiding this comment.
Yes this is a bug, we must add to this map whenever there is async unstaking initaited, that is staking with an unboding period.
| member_id: T::MemberId, | ||
| curator_opening_id: CuratorOpeningId<T>, | ||
| role_account: T::AccountId, | ||
| source_account: T::AccountId, |
There was a problem hiding this comment.
There are no guarantees that the origin controls the funds in the source_account provided, which means they can stake funds from arbitrary accounts.
In the storage role staking module we split this staking into a two step process but I found that a little too complex both on the runtime and ui side.
So maybe we can opt for something simpler here, for example that the source account must be the member's root_account or controller_account?
There was a problem hiding this comment.
Well spotted, quite a severe oversight, I don't love the remedy, but may be best to do for Rome, and fix properly later.
|
I think we need to add some extrinsics to give sudo ability to update the mint capacity, and or adjustment policy. |
- Update From<WrappedError<AddOpeningError>>: add message for the new error type - ApplicationRationingZeroMaxApplicants - Cover From<WrappedError<AddOpeningError>> with tests
- update hiring-module dependency revision - update stake-module dependency to restore compatibility with hiring module - both dependencies are latest development revision to date
Hiring module update support
|
merging, but there are pending issues to be fixed. see #117 |
Link to setup guide
Specification
#107
Progress
create_channeltransfer_channel_ownershipadd_curator_openingaccept_curator_applicationsbegin_curator_applicant_reviewfill_curator_openingterminate_curator_roleapply_on_curator_openingset_leadunset_leadupdate_curator_creation_policiesleave_curator_roleterminate_curator_applicationwithdraw_curator_applicationaccount_can_act_as_principalupdate_curator_reward_accountupdate_curator_role_accountupdate_channel_curation_statusupdate_channel_as_ownerupdate_channel_as_curatorFuture
update_curator_application_role_account: switch out account using membership, in case key was lost?Dropped
These were all dropped when the principal model was simplified.
update_lead_credentialupdate_any_member_credentialupdate_any_curator_credentialcreate_dynamic_credentialupdate_dynamic_credentialComments
Missing
Integrity check on channel ownership in memership module #96
Constraining max number of applications and openings. Not only simultaneous, but also cumulative, because this is not cleaned up in hiring/staking: Allow optional channel fields to have an empty vector as a value #126 (comment).