Content directory runtime integration#1273
Content directory runtime integration#1273bedeho merged 14 commits intoJoystream:content_directory_second_tryfrom iorveth:runtime_integration
Conversation
runtime/src/lib.rs
Outdated
| pub const PropertyDescriptionLengthConstraint: InputValidationLengthConstraint = InputValidationLengthConstraint::new(1, 500); | ||
| pub const ClassNameLengthConstraint: InputValidationLengthConstraint = InputValidationLengthConstraint::new(1, 49); | ||
| pub const ClassDescriptionLengthConstraint: InputValidationLengthConstraint = InputValidationLengthConstraint::new(1, 500); | ||
|
|
There was a problem hiding this comment.
Do we need spaces between lines?
There was a problem hiding this comment.
The purpose is to make constraints of different types distinguishable. I can remove them, though.
There was a problem hiding this comment.
Yes, please. Remove or introduce explicit comments for different types.
There was a problem hiding this comment.
Done. Removed them in content directory mock.rs as well. d993a64
shamil-gadelshin
left a comment
There was a problem hiding this comment.
We need to implement the working_group for Instance3, check StorageWorkingGroupInstance implementation for details.
runtime/src/lib.rs
Outdated
| type Nonce = u64; | ||
| type ClassId = u64; | ||
| type EntityId = u64; | ||
|
|
There was a problem hiding this comment.
Do we need spaces between lines?
There was a problem hiding this comment.
The purpose is to make constraints of different types distinguishable. I can remove them, though.
|
|
||
| impl<T: Trait> core::fmt::Debug for Actor<T> { | ||
| #[cfg(feature = "std")] | ||
| fn fmt(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { |
There was a problem hiding this comment.
Why did you remove conditional compilation for this and other Debug implementations>
There was a problem hiding this comment.
I still getting errors, related to T: Trait inheritance, when conditional compilation enabled here. I hope this will be fixed with further refactoring.
There was a problem hiding this comment.
Ok. Please, keep in mind to remove those implemented traits after the refactoring.
| @@ -1298,7 +1298,7 @@ impl<T: Trait<I>, I: Instance> Module<T, I> { | |||
| Ok(worker) | |||
| } | |||
|
|
|||
There was a problem hiding this comment.
Add a comment for a public method, please.
| @@ -0,0 +1,47 @@ | |||
| use crate::{AccountId, MemberId, Runtime}; | |||
|
|
|||
| // The content directory working group instance alias. | |||
There was a problem hiding this comment.
It is already taken. Take instance3 instead. Also to prevent future errors - please move this line to the lib.rs closer to the Instance2 declaration.
There was a problem hiding this comment.
Ok. But i saw, both service-discovery and storage modules are using Instance2 Is that correct case?
There was a problem hiding this comment.
Yes. Because they use the same working group.
The scope of this PR includes:
content_directorymodule runtime integrationcontent_directoryandworking_group&membershipmodules integration related work, implemented throughcontent_directory::ActorAuthenticatortrait.Closes #1281, #1275