Skip to content

Conversation

@iorveth
Copy link
Contributor

@iorveth iorveth commented Jun 3, 2020

Long-running PR for v2.0 of the content directory

VLOS

https://github.com/Joystream/joystream-landing/issues/175

  • Drop all events in VLOS

  • Enforce unique class names. <= Why? perhaps we should even drop them?

  • Enforce unique property names within each class. <= Why? perhaps we should even drop them?

  • Rename PropertyType::Internal to PropertyType::Reference, and same for PropertyValue::Internal, as we are dropping the no'tion of external references.

  • Remove PropertyType::None, was added to have some value for required Default trait, but has no semantic content. Instead just return some other value needed, we should not sacrifice our type safety due to a bad Substrate design decision.

  • Remove Class::id and Entity::id, as per convention Fix test for storage module and add new #36 (comment).

  • Make ClassId and EntityId, configurable through runtime.

  • Raw index types u16 are used for index types, replace with aliases for each use case, e.g. ClassId, EntityId, PropertyId etc. for clarity. Also make public

  • Add boolean field in ClassSchema which indicates whether a schema is active or not. It is only possible to add schema support to an entity for an active schema. Introduce method for updating this status also.

  • ClassSchema -> Schema

  • Change values field of Entity to BTreeMap<u16, PropertyValue> where key is index of property in class, and kill ClassPropertyValue.

  • Change in_class_schema_indexes in Entity to BTreeSet, and give better name to field, like supported_schemas.

  • Make vector properties updatable as vectors substrate-versioned-store-module#13

  • Entity removal substrate-versioned-store-module#22

  • Drop from storage these from storage, they need not be tuneable at runtime, just make them configurable through runtime trait.

pub PropertyNameConstraint get(property_name_constraint)
    config(): InputValidationLengthConstraint;

pub PropertyDescriptionConstraint get(property_description_constraint)
    config(): InputValidationLengthConstraint;

pub ClassNameConstraint get(class_name_constraint)
    config(): InputValidationLengthConstraint;

pub ClassDescriptionConstraint get(class_description_constraint)
    config(): InputValidationLengthConstraint;

paritytech/substrate#3263 - is not implemented yet

  • Remove InputValidationLengthConstraint, as it is no longer needed.

  • Introduce a new trait for Module, so that other modules depending on VLOS can consume this trait on runtime, which also allows for mocking.

  • Proposal: Merge permission and version store #380

  • Merge permission and version store

  • Class and ClassPermission, only have one instance per class, and only one map

  • Entity and EntityPermission, only have one instance per entity, and only one map.

  • Drop ClassPermission::properties_locked_from_controller, and instead enrich PropertyType to include a locking flag for controllers.

  • Drop ClassPermission::properties_locked_from_maintainers, and instead enrich PropertyType to include a locking flag for maintainers.

  • Drop ClassPermission::referenced_entity_must_have_same_controller, and instead enrich PropertyType::Reference to include a same owner boolean flag.

VLOS Permissions

@iorveth iorveth self-assigned this Jun 26, 2020
iorveth and others added 29 commits September 15, 2020 17:05
…tIndex

Colossus - accountNextIndex() instead of nonce caching
Content directory runtime integration
…akingEventsHandler & StorageWgStakingEventsHandler
…oring

Content directory schema refactoring:  move property related logic to separate file
@bedeho bedeho closed this Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants