-
Notifications
You must be signed in to change notification settings - Fork 115
Content directory runtime integration #1273
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
Content directory runtime integration #1273
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need spaces between lines?
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.
The purpose is to make constraints of different types distinguishable. I can remove them, though.
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.
Yes, please. Remove or introduce explicit comments for different types.
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.
Done. Removed them in content directory mock.rs as well. d993a64
shamil-gadelshin
left a comment
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need spaces between lines?
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you remove conditional compilation for this and other Debug implementations>
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Please, keep in mind to remove those implemented traits after the refactoring.
|
|
||
| Ok(worker) | ||
| } | ||
|
|
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.
Add a comment for a public method, please.
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.
Done 9d6bbb0
| @@ -0,0 +1,47 @@ | |||
| use crate::{AccountId, MemberId, Runtime}; | |||
|
|
|||
| // The content directory working group instance alias. | |||
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. But i saw, both service-discovery and storage modules are using Instance2 Is that correct case?
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.
Done here b9c741e
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.
Yes. Because they use the same working group.
bedeho
left a comment
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.
LGTM.
shamil-gadelshin
left a comment
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.
LGTM
The scope of this PR includes:
content_directorymodule runtime integrationcontent_directoryandworking_group&membershipmodules integration related work, implemented throughcontent_directory::ActorAuthenticatortrait.Closes #1281, #1275