Browse Source

Merge branch 'sumer' of https://github.com/Joystream/joystream into content_cli_reworkings

iorveth 4 years ago
parent
commit
b38515c2cb

+ 2 - 2
Cargo.lock

@@ -1993,7 +1993,7 @@ dependencies = [
 
 [[package]]
 name = "joystream-node"
-version = "3.7.1"
+version = "3.7.2"
 dependencies = [
  "frame-benchmarking",
  "frame-benchmarking-cli",
@@ -2053,7 +2053,7 @@ dependencies = [
 
 [[package]]
 name = "joystream-node-runtime"
-version = "7.14.0"
+version = "7.15.0"
 dependencies = [
  "frame-benchmarking",
  "frame-executive",

+ 1 - 1
node/Cargo.toml

@@ -3,7 +3,7 @@ authors = ['Joystream contributors']
 build = 'build.rs'
 edition = '2018'
 name = 'joystream-node'
-version = '3.7.1'
+version = '3.7.2'
 default-run = "joystream-node"
 
 [[bin]]

+ 4 - 4
pioneer/packages/joy-proposals/src/validationSchema.ts

@@ -32,8 +32,8 @@ const RATIONALE_MAX_LENGTH = 3000;
 const FILE_SIZE_BYTES_MIN = 1;
 
 // Set Election Parameters
-const ANNOUNCING_PERIOD_MAX = 43200;
 const ANNOUNCING_PERIOD_MIN = 14400;
+const ANNOUNCING_PERIOD_MAX = 43200;
 const VOTING_PERIOD_MIN = 14400;
 const VOTING_PERIOD_MAX = 28800;
 const REVEALING_PERIOD_MIN = 14400;
@@ -42,10 +42,10 @@ const MIN_COUNCIL_STAKE_MIN = 1;
 const MIN_COUNCIL_STAKE_MAX = 100000;
 const NEW_TERM_DURATION_MIN = 14400;
 const NEW_TERM_DURATION_MAX = 432000;
-const CANDIDACY_LIMIT_MIN = 25;
+const CANDIDACY_LIMIT_MIN = 50;
 const CANDIDACY_LIMIT_MAX = 100;
-const COUNCIL_SIZE_MAX = 20;
 const COUNCIL_SIZE_MIN = 4;
+const COUNCIL_SIZE_MAX = 20;
 const MIN_VOTING_STAKE_MIN = 1;
 const MIN_VOTING_STAKE_MAX = 100000;
 
@@ -55,7 +55,7 @@ const TOKENS_MAX = 5000000;
 
 // Set Validator Count
 const MAX_VALIDATOR_COUNT_MIN = 4;
-const MAX_VALIDATOR_COUNT_MAX = 100;
+const MAX_VALIDATOR_COUNT_MAX = 300;
 
 // Add Working Group Leader Opening Parameters
 // TODO: Discuss the actual values

+ 0 - 3
runtime-modules/content/src/errors.rs

@@ -10,9 +10,6 @@ decl_error! {
         // Curator Management Errors
         // -------------------------
 
-        /// Curator group can`t be removed
-        CuratorGroupRemovalForbidden,
-
         /// Curator under provided curator id is not a member of curaror group under given id
         CuratorIsNotAMemberOfGivenCuratorGroup,
 

+ 10 - 7
runtime-modules/content/src/lib.rs

@@ -638,7 +638,7 @@ decl_module! {
             actor: ContentActor<T::CuratorGroupId, T::CuratorId, T::MemberId>,
             params: ChannelCreationParameters<ContentParameters<T>, T::AccountId>,
         ) {
-            ensure_actor_authorized_to_create_channels_and_videos_assets::<T>(
+            ensure_actor_authorized_to_create_channel::<T>(
                 origin,
                 &actor,
             )?;
@@ -691,7 +691,7 @@ decl_module! {
             // check that channel exists
             let channel = Self::ensure_channel_exists(&channel_id)?;
 
-            ensure_actor_authorized_update_channel_and_videos::<T>(
+            ensure_actor_authorized_to_update_channel::<T>(
                 origin,
                 &actor,
                 &channel.owner,
@@ -752,7 +752,7 @@ decl_module! {
             // check that channel exists
             let channel = Self::ensure_channel_exists(&channel_id)?;
 
-            ensure_actor_authorized_update_channel_and_videos::<T>(
+            ensure_actor_authorized_to_update_channel::<T>(
                 origin,
                 &actor,
                 &channel.owner,
@@ -926,9 +926,13 @@ decl_module! {
             channel_id: T::ChannelId,
             params: VideoCreationParameters<ContentParameters<T>>,
         ) {
-            ensure_actor_authorized_to_create_channels_and_videos_assets::<T>(
+            // check that channel exists
+            let channel = Self::ensure_channel_exists(&channel_id)?;
+
+            ensure_actor_authorized_to_update_channel::<T>(
                 origin,
                 &actor,
+                &channel.owner,
             )?;
 
             // Pick out the assets to be uploaded to storage system
@@ -982,10 +986,9 @@ decl_module! {
             // check that video exists, retrieve corresponding channel id.
             let channel_id = Self::ensure_video_exists(&video_id)?.in_channel;
 
-            ensure_actor_authorized_update_channel_and_videos::<T>(
+            ensure_actor_authorized_to_update_channel::<T>(
                 origin,
                 &actor,
-                // The channel owner will be..
                 &Self::channel_by_id(channel_id).owner,
             )?;
 
@@ -1035,7 +1038,7 @@ decl_module! {
 
             let channel_id = video.in_channel;
 
-            ensure_actor_authorized_update_channel_and_videos::<T>(
+            ensure_actor_authorized_to_update_channel::<T>(
                 origin,
                 &actor,
                 // The channel owner will be..

+ 17 - 17
runtime-modules/content/src/permissions/mod.rs

@@ -12,7 +12,7 @@ use frame_support::{ensure, Parameter};
 pub use serde::{Deserialize, Serialize};
 use sp_arithmetic::traits::BaseArithmetic;
 use sp_runtime::traits::{MaybeSerializeDeserialize, Member};
-use system::ensure_root;
+// use system::ensure_root;
 
 /// Model of authentication manager.
 pub trait ContentActorAuthenticator: system::Trait + MembershipTypes {
@@ -99,7 +99,7 @@ pub fn ensure_is_lead<T: Trait>(origin: T::Origin) -> DispatchResult {
     ensure_lead_auth_success::<T>(&account_id)
 }
 
-pub fn ensure_actor_authorized_to_create_channels_and_videos_assets<T: Trait>(
+pub fn ensure_actor_authorized_to_create_channel<T: Trait>(
     origin: T::Origin,
     actor: &ContentActor<T::CuratorGroupId, T::CuratorId, T::MemberId>,
 ) -> DispatchResult {
@@ -128,8 +128,8 @@ pub fn ensure_actor_authorized_to_create_channels_and_videos_assets<T: Trait>(
     }
 }
 
-// Enure actor can update or delete channels and videos
-pub fn ensure_actor_authorized_update_channel_and_videos<T: Trait>(
+// Enure actor can update channels and videos in the channel
+pub fn ensure_actor_authorized_to_update_channel<T: Trait>(
     origin: T::Origin,
     actor: &ContentActor<T::CuratorGroupId, T::CuratorId, T::MemberId>,
     owner: &ChannelOwner<T::MemberId, T::CuratorGroupId, T::DAOId>,
@@ -263,19 +263,19 @@ pub fn ensure_actor_authorized_to_manage_categories<T: Trait>(
     }
 }
 
-pub fn ensure_actor_authorized_to_delete_stale_assets<T: Trait>(
-    origin: T::Origin,
-    actor: &ContentActor<T::CuratorGroupId, T::CuratorId, T::MemberId>,
-) -> DispatchResult {
-    // Only Lead and (sudo) can delete assets no longer associated with a channel or person.
-    if let ContentActor::Lead = actor {
-        let sender = ensure_signed(origin)?;
-        ensure_lead_auth_success::<T>(&sender)
-    } else {
-        ensure_root(origin)?;
-        Ok(())
-    }
-}
+// pub fn ensure_actor_authorized_to_delete_stale_assets<T: Trait>(
+//     origin: T::Origin,
+//     actor: &ContentActor<T::CuratorGroupId, T::CuratorId, T::MemberId>,
+// ) -> DispatchResult {
+//     // Only Lead and (sudo) can delete assets no longer associated with a channel or person.
+//     if let ContentActor::Lead = actor {
+//         let sender = ensure_signed(origin)?;
+//         ensure_lead_auth_success::<T>(&sender)
+//     } else {
+//         ensure_root(origin)?;
+//         Ok(())
+//     }
+// }
 
 /// Enum, representing all possible `Actor`s
 #[cfg_attr(feature = "std", derive(Serialize, Deserialize))]

+ 224 - 26
runtime-modules/content/src/tests/channels.rs

@@ -1,33 +1,16 @@
 #![cfg(test)]
 
+use super::curators;
 use super::mock::*;
 use crate::*;
 use frame_support::{assert_err, assert_ok};
 
-fn add_curator_to_new_group(curator_id: CuratorId) -> CuratorGroupId {
-    let curator_group_id = Content::next_curator_group_id();
-    // create new group and add curator id to it
-    assert_ok!(Content::create_curator_group(Origin::signed(LEAD_ORIGIN)));
-    assert_ok!(Content::add_curator_to_group(
-        Origin::signed(LEAD_ORIGIN),
-        curator_group_id,
-        curator_id
-    ));
-    // make group active
-    assert_ok!(Content::set_curator_group_status(
-        Origin::signed(LEAD_ORIGIN),
-        curator_group_id,
-        true
-    ));
-    curator_group_id
-}
-
 #[test]
 fn lead_cannot_create_channel() {
     with_default_mock_builder(|| {
         assert_err!(
             Content::create_channel(
-                Origin::signed(FIRST_MEMBER_ORIGIN),
+                Origin::signed(LEAD_ORIGIN),
                 ContentActor::Lead,
                 ChannelCreationParameters {
                     assets: vec![],
@@ -41,8 +24,11 @@ fn lead_cannot_create_channel() {
 }
 
 #[test]
-fn curators_can_create_channel() {
+fn curator_owned_channels() {
     with_default_mock_builder(|| {
+        // Run to block one to see emitted events
+        run_to_block(1);
+
         // Curator group doesn't exist yet
         assert_err!(
             Content::create_channel(
@@ -57,7 +43,7 @@ fn curators_can_create_channel() {
             Error::<Test>::CuratorGroupIsNotActive
         );
 
-        let group_id = add_curator_to_new_group(FIRST_CURATOR_ID);
+        let group_id = curators::add_curator_to_new_group(FIRST_CURATOR_ID);
         assert_eq!(FIRST_CURATOR_GROUP_ID, group_id);
 
         // Curator from wrong group
@@ -88,6 +74,8 @@ fn curators_can_create_channel() {
             Error::<Test>::CuratorAuthFailed
         );
 
+        let channel_id = Content::next_channel_id();
+
         // Curator in correct active group, with correct origin
         assert_ok!(Content::create_channel(
             Origin::signed(FIRST_CURATOR_ORIGIN),
@@ -98,11 +86,60 @@ fn curators_can_create_channel() {
                 reward_account: None,
             }
         ));
+
+        assert_eq!(
+            System::events().last().unwrap().event,
+            MetaEvent::content(RawEvent::ChannelCreated(
+                ContentActor::Curator(FIRST_CURATOR_GROUP_ID, FIRST_CURATOR_ID),
+                channel_id,
+                ChannelRecord {
+                    owner: ChannelOwner::CuratorGroup(FIRST_CURATOR_GROUP_ID),
+                    videos: vec![],
+                    playlists: vec![],
+                    series: vec![],
+                    is_censored: false,
+                    reward_account: None,
+                },
+                ChannelCreationParameters {
+                    assets: vec![],
+                    meta: vec![],
+                    reward_account: None,
+                }
+            ))
+        );
+
+        // Curator can update channel
+        assert_ok!(Content::update_channel(
+            Origin::signed(FIRST_CURATOR_ORIGIN),
+            ContentActor::Curator(FIRST_CURATOR_GROUP_ID, FIRST_CURATOR_ID),
+            channel_id,
+            ChannelUpdateParameters {
+                assets: None,
+                new_meta: None,
+                reward_account: None,
+            }
+        ));
+
+        // Lead can update curator owned channels
+        assert_ok!(Content::update_channel(
+            Origin::signed(LEAD_ORIGIN),
+            ContentActor::Lead,
+            channel_id,
+            ChannelUpdateParameters {
+                assets: None,
+                new_meta: None,
+                reward_account: None,
+            }
+        ));
     })
 }
+
 #[test]
-fn members_can_manage_channels() {
+fn member_owned_channels() {
     with_default_mock_builder(|| {
+        // Run to block one to see emitted events
+        run_to_block(1);
+
         // Not a member
         assert_err!(
             Content::create_channel(
@@ -130,7 +167,26 @@ fn members_can_manage_channels() {
             }
         ));
 
-        // TODO: assert emitted events...
+        assert_eq!(
+            System::events().last().unwrap().event,
+            MetaEvent::content(RawEvent::ChannelCreated(
+                ContentActor::Member(FIRST_MEMBER_ID),
+                channel_id_1,
+                ChannelRecord {
+                    owner: ChannelOwner::Member(FIRST_MEMBER_ID),
+                    videos: vec![],
+                    playlists: vec![],
+                    series: vec![],
+                    is_censored: false,
+                    reward_account: None,
+                },
+                ChannelCreationParameters {
+                    assets: vec![],
+                    meta: vec![],
+                    reward_account: None,
+                }
+            ))
+        );
 
         let channel_id_2 = Content::next_channel_id();
 
@@ -145,7 +201,26 @@ fn members_can_manage_channels() {
             }
         ));
 
-        // TODO: assert emitted events...
+        assert_eq!(
+            System::events().last().unwrap().event,
+            MetaEvent::content(RawEvent::ChannelCreated(
+                ContentActor::Member(SECOND_MEMBER_ID),
+                channel_id_2,
+                ChannelRecord {
+                    owner: ChannelOwner::Member(SECOND_MEMBER_ID),
+                    videos: vec![],
+                    playlists: vec![],
+                    series: vec![],
+                    is_censored: false,
+                    reward_account: None,
+                },
+                ChannelCreationParameters {
+                    assets: vec![],
+                    meta: vec![],
+                    reward_account: None,
+                }
+            ))
+        );
 
         // Update channel
         assert_ok!(Content::update_channel(
@@ -159,7 +234,26 @@ fn members_can_manage_channels() {
             }
         ));
 
-        // TODO: assert emitted events...
+        assert_eq!(
+            System::events().last().unwrap().event,
+            MetaEvent::content(RawEvent::ChannelUpdated(
+                ContentActor::Member(FIRST_MEMBER_ID),
+                channel_id_1,
+                ChannelRecord {
+                    owner: ChannelOwner::Member(FIRST_MEMBER_ID),
+                    videos: vec![],
+                    playlists: vec![],
+                    series: vec![],
+                    is_censored: false,
+                    reward_account: None,
+                },
+                ChannelUpdateParameters {
+                    assets: None,
+                    new_meta: None,
+                    reward_account: None,
+                }
+            ))
+        );
 
         // Member cannot update a channel they do not own
         assert_err!(
@@ -175,7 +269,111 @@ fn members_can_manage_channels() {
             ),
             Error::<Test>::ActorNotAuthorized
         );
+    })
+}
+
+#[test]
+fn channel_censoring() {
+    with_default_mock_builder(|| {
+        // Run to block one to see emitted events
+        run_to_block(1);
+
+        let channel_id = Content::next_channel_id();
+        assert_ok!(Content::create_channel(
+            Origin::signed(FIRST_MEMBER_ORIGIN),
+            ContentActor::Member(FIRST_MEMBER_ID),
+            ChannelCreationParameters {
+                assets: vec![],
+                meta: vec![],
+                reward_account: None,
+            }
+        ));
+
+        let group_id = curators::add_curator_to_new_group(FIRST_CURATOR_ID);
+
+        // Curator can censor channels
+        assert_ok!(Content::censor_channel(
+            Origin::signed(FIRST_CURATOR_ORIGIN),
+            ContentActor::Curator(group_id, FIRST_CURATOR_ID),
+            channel_id,
+            vec![]
+        ));
+
+        assert_eq!(
+            System::events().last().unwrap().event,
+            MetaEvent::content(RawEvent::ChannelCensored(
+                ContentActor::Curator(group_id, FIRST_CURATOR_ID),
+                channel_id,
+                vec![]
+            ))
+        );
+
+        let channel = Content::channel_by_id(channel_id);
+
+        assert!(channel.is_censored);
+
+        // Curator can un-censor channels
+        assert_ok!(Content::uncensor_channel(
+            Origin::signed(FIRST_CURATOR_ORIGIN),
+            ContentActor::Curator(group_id, FIRST_CURATOR_ID),
+            channel_id,
+            vec![]
+        ));
 
-        // TODO: assert emitted events...
+        assert_eq!(
+            System::events().last().unwrap().event,
+            MetaEvent::content(RawEvent::ChannelUncensored(
+                ContentActor::Curator(group_id, FIRST_CURATOR_ID),
+                channel_id,
+                vec![]
+            ))
+        );
+
+        let channel = Content::channel_by_id(channel_id);
+
+        assert!(!channel.is_censored);
+
+        // Member cannot censor channels
+        assert_err!(
+            Content::censor_channel(
+                Origin::signed(FIRST_MEMBER_ORIGIN),
+                ContentActor::Member(FIRST_MEMBER_ID),
+                channel_id,
+                vec![]
+            ),
+            Error::<Test>::ActorNotAuthorized
+        );
+
+        let curator_channel_id = Content::next_channel_id();
+
+        // create curator channel
+        assert_ok!(Content::create_channel(
+            Origin::signed(FIRST_CURATOR_ORIGIN),
+            ContentActor::Curator(group_id, FIRST_CURATOR_ID),
+            ChannelCreationParameters {
+                assets: vec![],
+                meta: vec![],
+                reward_account: None,
+            }
+        ));
+
+        // Curator cannot censor curator group channels
+        assert_err!(
+            Content::censor_channel(
+                Origin::signed(FIRST_CURATOR_ORIGIN),
+                ContentActor::Curator(group_id, FIRST_CURATOR_ID),
+                curator_channel_id,
+                vec![]
+            ),
+            Error::<Test>::CannotCensoreCuratorGroupOwnedChannels
+        );
+
+        // Lead can still censor curator group channels
+        assert_ok!(Content::censor_channel(
+            Origin::signed(LEAD_ORIGIN),
+            ContentActor::Lead,
+            curator_channel_id,
+            vec![]
+        ));
     })
 }

+ 131 - 0
runtime-modules/content/src/tests/curators.rs

@@ -0,0 +1,131 @@
+#![cfg(test)]
+
+use super::mock::*;
+use crate::*;
+use frame_support::{assert_err, assert_ok};
+
+pub fn add_curator_to_new_group(curator_id: CuratorId) -> CuratorGroupId {
+    let curator_group_id = Content::next_curator_group_id();
+    // create new group and add curator id to it
+    assert_ok!(Content::create_curator_group(Origin::signed(LEAD_ORIGIN)));
+    assert_ok!(Content::add_curator_to_group(
+        Origin::signed(LEAD_ORIGIN),
+        curator_group_id,
+        curator_id
+    ));
+    // make group active
+    assert_ok!(Content::set_curator_group_status(
+        Origin::signed(LEAD_ORIGIN),
+        curator_group_id,
+        true
+    ));
+    curator_group_id
+}
+
+#[test]
+fn curator_group_management() {
+    with_default_mock_builder(|| {
+        // Run to block one to see emitted events
+        run_to_block(1);
+
+        let curator_group_id = Content::next_curator_group_id();
+        assert_ok!(Content::create_curator_group(Origin::signed(LEAD_ORIGIN)));
+
+        assert_eq!(
+            System::events().last().unwrap().event,
+            MetaEvent::content(RawEvent::CuratorGroupCreated(curator_group_id))
+        );
+
+        let group = Content::curator_group_by_id(curator_group_id);
+
+        // By default group is empty and not active
+        assert_eq!(group.is_active(), false);
+        assert_eq!(group.get_curators().len(), 0);
+
+        // Activate group
+        assert_ok!(Content::set_curator_group_status(
+            Origin::signed(LEAD_ORIGIN),
+            curator_group_id,
+            true
+        ));
+
+        assert_eq!(
+            System::events().last().unwrap().event,
+            MetaEvent::content(RawEvent::CuratorGroupStatusSet(curator_group_id, true))
+        );
+
+        let group = Content::curator_group_by_id(curator_group_id);
+        assert_eq!(group.is_active(), true);
+
+        // Cannot add non curators into group
+        assert_err!(
+            Content::add_curator_to_group(
+                Origin::signed(LEAD_ORIGIN),
+                curator_group_id,
+                MEMBERS_COUNT + 1 // not a curator
+            ),
+            Error::<Test>::CuratorIdInvalid
+        );
+
+        // Add curator to group
+        assert_ok!(Content::add_curator_to_group(
+            Origin::signed(LEAD_ORIGIN),
+            curator_group_id,
+            FIRST_CURATOR_ID
+        ));
+
+        assert_eq!(
+            System::events().last().unwrap().event,
+            MetaEvent::content(RawEvent::CuratorAdded(curator_group_id, FIRST_CURATOR_ID))
+        );
+
+        // Ensure curator is in group
+        let group = Content::curator_group_by_id(curator_group_id);
+        assert!(group.has_curator(&FIRST_CURATOR_ID));
+
+        // Cannot add same curator again
+        assert_err!(
+            Content::add_curator_to_group(
+                Origin::signed(LEAD_ORIGIN),
+                curator_group_id,
+                FIRST_CURATOR_ID
+            ),
+            Error::<Test>::CuratorIsAlreadyAMemberOfGivenCuratorGroup
+        );
+
+        // Cannot remove curator if not in group
+        assert_err!(
+            Content::remove_curator_from_group(
+                Origin::signed(LEAD_ORIGIN),
+                curator_group_id,
+                MEMBERS_COUNT + 1 // not a curator
+            ),
+            Error::<Test>::CuratorIsNotAMemberOfGivenCuratorGroup
+        );
+
+        // Remove curator from group
+        assert_ok!(Content::remove_curator_from_group(
+            Origin::signed(LEAD_ORIGIN),
+            curator_group_id,
+            FIRST_CURATOR_ID
+        ));
+
+        assert_eq!(
+            System::events().last().unwrap().event,
+            MetaEvent::content(RawEvent::CuratorRemoved(curator_group_id, FIRST_CURATOR_ID))
+        );
+
+        let group = Content::curator_group_by_id(curator_group_id);
+        assert!(!group.has_curator(&FIRST_CURATOR_ID));
+
+        // Already removed cannot remove again
+        assert_err!(
+            Content::remove_curator_from_group(
+                Origin::signed(LEAD_ORIGIN),
+                curator_group_id,
+                FIRST_CURATOR_ID
+            ),
+            Error::<Test>::CuratorIsNotAMemberOfGivenCuratorGroup
+        );
+    })
+}

+ 12 - 3
runtime-modules/content/src/tests/mock.rs

@@ -2,8 +2,7 @@
 
 use crate::*;
 
-// use frame_support::storage::StorageMap;
-// use frame_support::traits::{OnFinalize, OnInitialize};
+use frame_support::traits::{OnFinalize, OnInitialize};
 use frame_support::{impl_outer_event, impl_outer_origin, parameter_types};
 use sp_core::H256;
 use sp_runtime::{
@@ -20,7 +19,7 @@ use common::storage::StorageSystem;
 pub type CuratorId = <Test as ContentActorAuthenticator>::CuratorId;
 pub type CuratorGroupId = <Test as ContentActorAuthenticator>::CuratorGroupId;
 pub type MemberId = <Test as MembershipTypes>::MemberId;
-// pub type ChannelId = <Test as StorageOwnership>::ChannelId;
+pub type ChannelId = <Test as StorageOwnership>::ChannelId;
 // pub type DAOId = <Test as StorageOwnership>::DAOId;
 
 /// Origins
@@ -294,3 +293,13 @@ impl ExtBuilder {
 pub fn with_default_mock_builder<R, F: FnOnce() -> R>(f: F) -> R {
     ExtBuilder::default().build().execute_with(|| f())
 }
+
+// Recommendation from Parity on testing on_finalize
+// https://substrate.dev/docs/en/next/development/module/tests
+pub fn run_to_block(n: u64) {
+    while System::block_number() < n {
+        <System as OnFinalize<u64>>::on_finalize(System::block_number());
+        System::set_block_number(System::block_number() + 1);
+        <System as OnInitialize<u64>>::on_initialize(System::block_number());
+    }
+}

+ 2 - 0
runtime-modules/content/src/tests/mod.rs

@@ -1,4 +1,6 @@
 #![cfg(test)]
 
 mod channels;
+mod curators;
 mod mock;
+mod videos;

+ 247 - 0
runtime-modules/content/src/tests/videos.rs

@@ -0,0 +1,247 @@
+#![cfg(test)]
+
+use super::curators;
+use super::mock::*;
+use crate::*;
+use frame_support::{assert_err, assert_ok};
+
+fn create_member_channel() -> ChannelId {
+    let channel_id = Content::next_channel_id();
+
+    // Member can create the channel
+    assert_ok!(Content::create_channel(
+        Origin::signed(FIRST_MEMBER_ORIGIN),
+        ContentActor::Member(FIRST_MEMBER_ID),
+        ChannelCreationParameters {
+            assets: vec![],
+            meta: vec![],
+            reward_account: None,
+        }
+    ));
+
+    channel_id
+}
+
+#[test]
+fn member_can_create_videos() {
+    with_default_mock_builder(|| {
+        // Run to block one to see emitted events
+        run_to_block(1);
+        let channel_id = create_member_channel();
+
+        let video_id = Content::next_video_id();
+        assert_ok!(Content::create_video(
+            Origin::signed(FIRST_MEMBER_ORIGIN),
+            ContentActor::Member(FIRST_MEMBER_ID),
+            channel_id,
+            VideoCreationParameters {
+                assets: vec![NewAsset::Urls(vec![b"https://somewhere.com/".to_vec()])],
+                meta: b"metablob".to_vec(),
+            }
+        ));
+
+        assert_eq!(
+            System::events().last().unwrap().event,
+            MetaEvent::content(RawEvent::VideoCreated(
+                ContentActor::Member(FIRST_MEMBER_ID),
+                channel_id,
+                video_id,
+                VideoCreationParameters {
+                    assets: vec![NewAsset::Urls(vec![b"https://somewhere.com/".to_vec()])],
+                    meta: b"metablob".to_vec(),
+                }
+            ))
+        );
+
+        // Video is created in correct channel
+        let video = Content::video_by_id(video_id);
+        assert_eq!(channel_id, video.in_channel);
+
+        // Can update own video
+        assert_ok!(Content::update_video(
+            Origin::signed(FIRST_MEMBER_ORIGIN),
+            ContentActor::Member(FIRST_MEMBER_ID),
+            video_id,
+            VideoUpdateParameters {
+                assets: Some(vec![NewAsset::Urls(vec![
+                    b"https://somewhere-else.com/".to_vec()
+                ])]),
+                new_meta: Some(b"newmetablob".to_vec()),
+            }
+        ));
+
+        assert_eq!(
+            System::events().last().unwrap().event,
+            MetaEvent::content(RawEvent::VideoUpdated(
+                ContentActor::Member(FIRST_MEMBER_ID),
+                video_id,
+                VideoUpdateParameters {
+                    assets: Some(vec![NewAsset::Urls(vec![
+                        b"https://somewhere-else.com/".to_vec()
+                    ])]),
+                    new_meta: Some(b"newmetablob".to_vec()),
+                }
+            ))
+        );
+
+        // Member cannot create video in a channel they do not own
+        assert_err!(
+            Content::create_video(
+                Origin::signed(SECOND_MEMBER_ORIGIN),
+                ContentActor::Member(SECOND_MEMBER_ID),
+                channel_id,
+                VideoCreationParameters {
+                    assets: vec![],
+                    meta: vec![],
+                }
+            ),
+            Error::<Test>::ActorNotAuthorized
+        );
+
+        // Member cannot update video in a channel they do not own
+        assert_err!(
+            Content::update_video(
+                Origin::signed(SECOND_MEMBER_ORIGIN),
+                ContentActor::Member(SECOND_MEMBER_ID),
+                video_id,
+                VideoUpdateParameters {
+                    assets: None,
+                    new_meta: None,
+                }
+            ),
+            Error::<Test>::ActorNotAuthorized
+        );
+
+        // Member cannot delete video in a channel they do not own
+        assert_err!(
+            Content::delete_video(
+                Origin::signed(SECOND_MEMBER_ORIGIN),
+                ContentActor::Member(SECOND_MEMBER_ID),
+                video_id
+            ),
+            Error::<Test>::ActorNotAuthorized
+        );
+
+        // Owner can delete their video
+        assert_ok!(Content::delete_video(
+            Origin::signed(FIRST_MEMBER_ORIGIN),
+            ContentActor::Member(FIRST_MEMBER_ID),
+            video_id
+        ));
+
+        assert_eq!(
+            System::events().last().unwrap().event,
+            MetaEvent::content(RawEvent::VideoDeleted(
+                ContentActor::Member(FIRST_MEMBER_ID),
+                video_id
+            ))
+        );
+    })
+}
+
+#[test]
+fn curators_can_censor_videos() {
+    with_default_mock_builder(|| {
+        // Run to block one to see emitted events
+        run_to_block(1);
+        let channel_id = create_member_channel();
+
+        let video_id = Content::next_video_id();
+        assert_ok!(Content::create_video(
+            Origin::signed(FIRST_MEMBER_ORIGIN),
+            ContentActor::Member(FIRST_MEMBER_ID),
+            channel_id,
+            VideoCreationParameters {
+                assets: vec![NewAsset::Urls(vec![b"https://somewhere.com/".to_vec()])],
+                meta: b"metablob".to_vec(),
+            }
+        ));
+
+        let group_id = curators::add_curator_to_new_group(FIRST_CURATOR_ID);
+
+        // Curator can censor videos
+        assert_ok!(Content::censor_video(
+            Origin::signed(FIRST_CURATOR_ORIGIN),
+            ContentActor::Curator(group_id, FIRST_CURATOR_ID),
+            video_id,
+            vec![]
+        ));
+
+        assert_eq!(
+            System::events().last().unwrap().event,
+            MetaEvent::content(RawEvent::VideoCensored(
+                ContentActor::Curator(group_id, FIRST_CURATOR_ID),
+                video_id,
+                vec![]
+            ))
+        );
+
+        let video = Content::video_by_id(video_id);
+
+        assert!(video.is_censored);
+
+        // Curator can un-censor videos
+        assert_ok!(Content::uncensor_video(
+            Origin::signed(FIRST_CURATOR_ORIGIN),
+            ContentActor::Curator(group_id, FIRST_CURATOR_ID),
+            video_id,
+            vec![]
+        ));
+
+        assert_eq!(
+            System::events().last().unwrap().event,
+            MetaEvent::content(RawEvent::VideoUncensored(
+                ContentActor::Curator(group_id, FIRST_CURATOR_ID),
+                video_id,
+                vec![]
+            ))
+        );
+
+        let video = Content::video_by_id(video_id);
+
+        assert!(!video.is_censored);
+
+        // Members cannot censor videos
+        assert_err!(
+            Content::censor_video(
+                Origin::signed(FIRST_MEMBER_ORIGIN),
+                ContentActor::Member(FIRST_MEMBER_ORIGIN),
+                channel_id,
+                vec![]
+            ),
+            Error::<Test>::ActorNotAuthorized
+        );
+    })
+}
+
+#[test]
+fn featured_videos() {
+    with_default_mock_builder(|| {
+        // Run to block one to see emitted events
+        run_to_block(1);
+
+        // Lead can update curator owned channels
+        assert_ok!(Content::set_featured_videos(
+            Origin::signed(LEAD_ORIGIN),
+            ContentActor::Lead,
+            vec![1, 2, 3]
+        ));
+
+        assert_eq!(
+            System::events().last().unwrap().event,
+            MetaEvent::content(RawEvent::FeaturedVideosSet(
+                ContentActor::Lead,
+                vec![1, 2, 3]
+            ))
+        );
+
+        assert_err!(
+            Content::set_featured_videos(
+                Origin::signed(FIRST_MEMBER_ORIGIN),
+                ContentActor::Member(FIRST_MEMBER_ID),
+                vec![1, 2, 3]
+            ),
+            Error::<Test>::ActorNotAuthorized
+        );
+    })
+}

+ 2 - 2
runtime-modules/proposals/codex/src/lib.rs

@@ -85,13 +85,13 @@ const WORKING_GROUP_MINT_CAPACITY_MAX_VALUE: u32 = 5_000_000;
 // Max allowed value for 'spending' proposal
 const MAX_SPENDING_PROPOSAL_VALUE: u32 = 5_000_000_u32;
 // Max validator count for the 'set validator count' proposal
-const MAX_VALIDATOR_COUNT: u32 = 100;
+const MAX_VALIDATOR_COUNT: u32 = 300;
 // council_size min value for the 'set election parameters' proposal
 const ELECTION_PARAMETERS_COUNCIL_SIZE_MIN_VALUE: u32 = 4;
 // council_size max value for the 'set election parameters' proposal
 const ELECTION_PARAMETERS_COUNCIL_SIZE_MAX_VALUE: u32 = 20;
 // candidacy_limit min value for the 'set election parameters' proposal
-const ELECTION_PARAMETERS_CANDIDACY_LIMIT_MIN_VALUE: u32 = 25;
+const ELECTION_PARAMETERS_CANDIDACY_LIMIT_MIN_VALUE: u32 = 50;
 // candidacy_limit max value for the 'set election parameters' proposal
 const ELECTION_PARAMETERS_CANDIDACY_LIMIT_MAX_VALUE: u32 = 100;
 // min_voting_stake min value for the 'set election parameters' proposal

+ 1 - 1
runtime-modules/proposals/codex/src/proposal_types/mod.rs

@@ -317,7 +317,7 @@ impl Default for ProposalsConfigParameters {
             set_validator_count_proposal_voting_period: 43200u32,
             set_validator_count_proposal_grace_period: 0u32,
             runtime_upgrade_proposal_voting_period: 72000u32,
-            runtime_upgrade_proposal_grace_period: 72000u32,
+            runtime_upgrade_proposal_grace_period: 28800u32,
             text_proposal_voting_period: 72000u32,
             text_proposal_grace_period: 0u32,
             set_election_parameters_proposal_voting_period: 72000u32,

+ 3 - 3
runtime-modules/proposals/codex/src/proposal_types/parameters.rs

@@ -10,7 +10,7 @@ pub(crate) fn set_validator_count_proposal<T: crate::Trait>(
         approval_threshold_percentage: 80,
         slashing_quorum_percentage: 60,
         slashing_threshold_percentage: 80,
-        required_stake: Some(<BalanceOf<T>>::from(100_000_u32)),
+        required_stake: Some(<BalanceOf<T>>::from(500_000_u32)),
     }
 }
 
@@ -24,7 +24,7 @@ pub(crate) fn runtime_upgrade_proposal<T: crate::Trait>(
         approval_threshold_percentage: 100,
         slashing_quorum_percentage: 60,
         slashing_threshold_percentage: 80,
-        required_stake: Some(<BalanceOf<T>>::from(1_000_000_u32)),
+        required_stake: Some(<BalanceOf<T>>::from(5_000_000_u32)),
     }
 }
 
@@ -51,7 +51,7 @@ pub(crate) fn set_election_parameters_proposal<T: crate::Trait>(
         approval_threshold_percentage: 80,
         slashing_quorum_percentage: 60,
         slashing_threshold_percentage: 80,
-        required_stake: Some(<BalanceOf<T>>::from(200_000_u32)),
+        required_stake: Some(<BalanceOf<T>>::from(1_000_000_u32)),
     }
 }
 

+ 8 - 8
runtime-modules/proposals/codex/src/tests/mod.rs

@@ -187,7 +187,7 @@ fn create_text_proposal_codex_call_fails_with_incorrect_text_size() {
 #[test]
 fn create_runtime_upgrade_common_checks_succeed() {
     initial_test_ext().execute_with(|| {
-        increase_total_balance_issuance_using_account_id(1, 5000000);
+        increase_total_balance_issuance_using_account_id(1, 10000000);
 
         let proposal_fixture = ProposalTestFixture {
             insufficient_rights_call: || {
@@ -226,7 +226,7 @@ fn create_runtime_upgrade_common_checks_succeed() {
                     1,
                     b"title".to_vec(),
                     b"body".to_vec(),
-                    Some(<BalanceOf<Test>>::from(1_000_000_u32)),
+                    Some(<BalanceOf<Test>>::from(5_000_000_u32)),
                     b"wasm".to_vec(),
                 )
             },
@@ -272,7 +272,7 @@ fn create_upgrade_runtime_proposal_codex_call_fails_with_incorrect_wasm_size() {
 #[test]
 fn create_set_election_parameters_proposal_common_checks_succeed() {
     initial_test_ext().execute_with(|| {
-        increase_total_balance_issuance_using_account_id(1, 500000);
+        increase_total_balance_issuance_using_account_id(1, 2000000);
 
         let proposal_fixture = ProposalTestFixture {
             insufficient_rights_call: || {
@@ -311,7 +311,7 @@ fn create_set_election_parameters_proposal_common_checks_succeed() {
                     1,
                     b"title".to_vec(),
                     b"body".to_vec(),
-                    Some(<BalanceOf<Test>>::from(200_000_u32)),
+                    Some(<BalanceOf<Test>>::from(1_000_000_u32)),
                     get_valid_election_parameters(),
                 )
             },
@@ -348,7 +348,7 @@ fn get_valid_election_parameters() -> ElectionParameters<u64, u64> {
         voting_period: 14400,
         revealing_period: 14400,
         council_size: 4,
-        candidacy_limit: 25,
+        candidacy_limit: 50,
         new_term_duration: 14400,
         min_council_stake: 1,
         min_voting_stake: 1,
@@ -358,7 +358,7 @@ fn get_valid_election_parameters() -> ElectionParameters<u64, u64> {
 #[test]
 fn create_set_election_parameters_call_fails_with_incorrect_parameters() {
     initial_test_ext().execute_with(|| {
-        increase_total_balance_issuance_using_account_id(1, 500000);
+        increase_total_balance_issuance_using_account_id(1, 1500000);
 
         let mut election_parameters = get_valid_election_parameters();
         election_parameters.council_size = 2;
@@ -566,7 +566,7 @@ fn create_spending_proposal_call_fails_with_incorrect_balance() {
 #[test]
 fn create_set_validator_count_proposal_common_checks_succeed() {
     initial_test_ext().execute_with(|| {
-        increase_total_balance_issuance_using_account_id(1, 500000);
+        increase_total_balance_issuance_using_account_id(1, 1000000);
 
         let proposal_fixture = ProposalTestFixture {
             insufficient_rights_call: || {
@@ -605,7 +605,7 @@ fn create_set_validator_count_proposal_common_checks_succeed() {
                     1,
                     b"title".to_vec(),
                     b"body".to_vec(),
-                    Some(<BalanceOf<Test>>::from(100_000_u32)),
+                    Some(<BalanceOf<Test>>::from(500_000_u32)),
                     4,
                 )
             },

+ 9 - 4
runtime-modules/storage/src/data_directory.rs

@@ -39,10 +39,15 @@ use crate::data_object_type_registry;
 use crate::data_object_type_registry::IsActiveDataObjectType;
 use crate::*;
 
-pub const DEFAULT_VOUCHER_SIZE_LIMIT_UPPER_BOUND: u64 = 100000000;
-pub const DEFAULT_VOUCHER_OBJECTS_LIMIT_UPPER_BOUND: u64 = 200;
-pub const DEFAULT_GLOBAL_VOUCHER: Voucher = Voucher::new(200000000, 2000);
-pub const DEFAULT_VOUCHER: Voucher = Voucher::new(5000000, 100);
+/// The default maximum storage size (bytes) that lead can set on the voucher of an owner
+pub const DEFAULT_VOUCHER_SIZE_LIMIT_UPPER_BOUND: u64 = 54_000_000_000;
+/// The default maximum number of objects that lead can set on the voucher of an owner
+pub const DEFAULT_VOUCHER_OBJECTS_LIMIT_UPPER_BOUND: u64 = 10_000;
+/// The default system global storage limits
+pub const DEFAULT_GLOBAL_VOUCHER: Voucher = Voucher::new(1_100_000_000_000, 1_000_000);
+/// The default initial owner voucher
+pub const DEFAULT_VOUCHER: Voucher = Voucher::new(5_400_000_000, 1_000);
+/// The default starting upload blocked status
 pub const DEFAULT_UPLOADING_BLOCKED_STATUS: bool = false;
 
 /// The _Data directory_ main _Trait_.

+ 1 - 1
runtime/Cargo.toml

@@ -4,7 +4,7 @@ edition = '2018'
 name = 'joystream-node-runtime'
 # Follow convention: https://github.com/Joystream/substrate-runtime-joystream/issues/1
 # {Authoring}.{Spec}.{Impl} of the RuntimeVersion
-version = '7.14.0'
+version = '7.15.0'
 
 [dependencies]
 # Third-party dependencies

+ 1 - 1
runtime/src/constants.rs

@@ -18,7 +18,7 @@ pub const MILLISECS_PER_BLOCK: Moment = 6000;
 pub const SECS_PER_BLOCK: Moment = MILLISECS_PER_BLOCK / 1000;
 
 pub const SLOT_DURATION: Moment = 6000;
-pub const BONDING_DURATION: u32 = 24;
+pub const BONDING_DURATION: u32 = 24 * 7;
 
 pub const EPOCH_DURATION_IN_BLOCKS: BlockNumber = 10 * MINUTES;
 pub const EPOCH_DURATION_IN_SLOTS: u64 = {

+ 2 - 2
runtime/src/lib.rs

@@ -71,7 +71,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
     spec_name: create_runtime_str!("joystream-node"),
     impl_name: create_runtime_str!("joystream-node"),
     authoring_version: 7,
-    spec_version: 14,
+    spec_version: 15,
     impl_version: 0,
     apis: crate::runtime_api::EXPORTED_RUNTIME_API_VERSIONS,
     transaction_version: 1,
@@ -538,7 +538,7 @@ parameter_types! {
     pub const ProposalRejectionFee: u64 = 5000;
     pub const ProposalTitleMaxLength: u32 = 40;
     pub const ProposalDescriptionMaxLength: u32 = 3000;
-    pub const ProposalMaxActiveProposalLimit: u32 = 5;
+    pub const ProposalMaxActiveProposalLimit: u32 = 20;
 }
 
 impl proposals_engine::Trait for Runtime {

+ 4 - 4
runtime/src/tests/proposals_integration/mod.rs

@@ -513,7 +513,7 @@ where
             setup_members(NUMBER_OF_MEMBERS_TO_SETUP_IN_CODEX_PROPOSAL_FIXTURE);
             setup_council();
 
-            increase_total_balance_issuance_using_account_id(account_id.clone().into(), 500000);
+            increase_total_balance_issuance_using_account_id(account_id.clone().into(), 1000000);
         }
 
         assert_eq!((self.successful_call)(), Ok(()));
@@ -620,7 +620,7 @@ fn set_election_parameters_proposal_execution_succeeds() {
             voting_period: 14400,
             revealing_period: 14400,
             council_size: 4,
-            candidacy_limit: 25,
+            candidacy_limit: 50,
             new_term_duration: 14400,
             min_council_stake: 1,
             min_voting_stake: 1,
@@ -633,7 +633,7 @@ fn set_election_parameters_proposal_execution_succeeds() {
                 member_id as u64,
                 b"title".to_vec(),
                 b"body".to_vec(),
-                Some(<BalanceOf<Runtime>>::from(200_000_u32)),
+                Some(<BalanceOf<Runtime>>::from(1_000_000_u32)),
                 election_parameters,
             )
         });
@@ -658,7 +658,7 @@ fn set_validator_count_proposal_execution_succeeds() {
                 member_id as u64,
                 b"title".to_vec(),
                 b"body".to_vec(),
-                Some(<BalanceOf<Runtime>>::from(100_000_u32)),
+                Some(<BalanceOf<Runtime>>::from(500_000_u32)),
                 new_validator_count,
             )
         });

+ 4 - 0
testnets/joy-testnet-4.json

@@ -12,6 +12,10 @@
     [
       "/dns/telemetry.polkadot.io/tcp/443/x-parity-wss/%2Fsubmit%2F",
       0
+    ],
+    [
+      "/dns/telemetry.joystream.org/tcp/443/x-parity-wss/%2Fsubmit%2F",
+      0
     ]
   ],
   "protocolId": "/joy/testnet/4",

+ 16 - 12
tests/network-tests/src/fixtures/proposalsModule.ts

@@ -415,7 +415,7 @@ export class ElectionParametersProposalFixture extends BaseFixture {
   public async execute(): Promise<void> {
     // Setup
     const proposalTitle: string = 'Testing proposal ' + uuid().substring(0, 8)
-    const description: string = 'Testing validator count proposal ' + uuid().substring(0, 8)
+    const description: string = 'Testing Election Parameters proposal ' + uuid().substring(0, 8)
 
     const announcingPeriod: BN = new BN(28800)
     const votingPeriod: BN = new BN(14400)
@@ -428,7 +428,7 @@ export class ElectionParametersProposalFixture extends BaseFixture {
 
     // Proposal stake calculation
     // Required stake is hardcoded in runtime-module (but not available as const)
-    const proposalStake: BN = new BN(200000)
+    const proposalStake: BN = new BN(1000000)
     const proposalFee: BN = this.api.estimateProposeElectionParametersFee(
       description,
       description,
@@ -450,7 +450,9 @@ export class ElectionParametersProposalFixture extends BaseFixture {
     const proposedVotingPeriod: BN = votingPeriod.addn(1)
     const proposedRevealingPeriod: BN = revealingPeriod.addn(1)
     const proposedCouncilSize: BN = councilSize.addn(1)
-    const proposedCandidacyLimit: BN = candidacyLimit.addn(1)
+    const proposedCandidacyLimit: BN = new BN(51) // candidacyLimit.addn(1)
+    // assert they are different
+    assert(!candidacyLimit.eq(proposedCandidacyLimit))
     const proposedNewTermDuration: BN = newTermDuration.addn(1)
     const proposedMinCouncilStake: BN = minCouncilStake.addn(1)
     const proposedMinVotingStake: BN = minVotingStake.addn(1)
@@ -618,12 +620,12 @@ export class TextProposalFixture extends BaseFixture {
 
 export class ValidatorCountProposalFixture extends BaseFixture {
   private proposer: string
-  private validatorCountIncrement: BN
+  private proposedValidatorCount: BN
 
-  constructor(api: Api, proposer: string, validatorCountIncrement: BN) {
+  constructor(api: Api, proposer: string, validatorCount: BN) {
     super(api)
     this.proposer = proposer
-    this.validatorCountIncrement = validatorCountIncrement
+    this.proposedValidatorCount = validatorCount
   }
 
   public async execute(): Promise<void> {
@@ -632,19 +634,21 @@ export class ValidatorCountProposalFixture extends BaseFixture {
     const description: string = 'Testing validator count proposal ' + uuid().substring(0, 8)
 
     // Proposal stake calculation
-    const proposalStake: BN = new BN(100000)
+    const proposalStake: BN = new BN(500000)
     const proposalFee: BN = this.api.estimateProposeValidatorCountFee(description, description, proposalStake)
     this.api.treasuryTransferBalance(this.proposer, proposalFee.add(proposalStake))
-    const validatorCount: BN = await this.api.getValidatorCount()
+    const currentValidatorCount: BN = await this.api.getValidatorCount()
 
     // Proposal creation
-    const proposedValidatorCount: BN = validatorCount.add(this.validatorCountIncrement)
+    // Make sure proposed is different than current to ensure change is applied.
+    assert(!currentValidatorCount.eq(this.proposedValidatorCount))
+
     const result = await this.api.proposeValidatorCount(
       this.proposer,
       proposalTitle,
       description,
       proposalStake,
-      proposedValidatorCount
+      this.proposedValidatorCount
     )
     const proposalNumber: ProposalId = this.api.findProposalCreatedEvent(result.events) as ProposalId
     assert.notEqual(proposalNumber, undefined)
@@ -656,8 +660,8 @@ export class ValidatorCountProposalFixture extends BaseFixture {
 
     const newValidatorCount: BN = await this.api.getValidatorCount()
     assert(
-      proposedValidatorCount.eq(newValidatorCount),
-      `Validator count has unexpeccted value ${newValidatorCount}, expected ${proposedValidatorCount}`
+      this.proposedValidatorCount.eq(newValidatorCount),
+      `Validator count has unexpeccted value ${newValidatorCount}, expected ${this.proposedValidatorCount}`
     )
   }
 }

+ 3 - 4
tests/network-tests/src/flows/proposals/validatorCountProposal.ts

@@ -6,7 +6,7 @@ import { FixtureRunner } from '../../Fixture'
 import Debugger from 'debug'
 import { Resource } from '../../Resources'
 
-export default async function validatorCount({ api, env, lock }: FlowProps): Promise<void> {
+export default async function validatorCount({ api, lock }: FlowProps): Promise<void> {
   const debug = Debugger('flow:validatorCountProposal')
   debug('Started')
   await lock(Resource.Proposals)
@@ -16,13 +16,12 @@ export default async function validatorCount({ api, env, lock }: FlowProps): Pro
   assert(council.length)
 
   const proposer = council[0].member.toString()
-
-  const validatorCountIncrement: BN = new BN(+env.VALIDATOR_COUNT_INCREMENT!)
+  const proposedValidatorCount = new BN(300)
 
   const validatorCountProposalFixture: ValidatorCountProposalFixture = new ValidatorCountProposalFixture(
     api,
     proposer,
-    validatorCountIncrement
+    proposedValidatorCount
   )
   await new FixtureRunner(validatorCountProposalFixture).run()