-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Name Service Pallet as Collectives Service #14491
base: master
Are you sure you want to change the base?
Conversation
bot clean |
bot rebase |
Rebased |
This pull request has been mentioned on Polkadot Forum. There might be relevant details there: |
bot rebase |
Rebased |
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.
Love this! 🚀
Left mostly comments about documentation.
//! * node: Either a to-level name hash or a subnode record that exists in the service registry. | ||
//! * name hash: A blake2_256 hash representation of a registered name. | ||
//! * subnode: A child name of a registered name hash. Subnodes of a name can be registered | ||
//! recursively, so the depth a subnode can be registered is unbounded. |
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 is the depth unbounded?
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 pallet leaves the market to decide how valuable subnode depth will be. Since all subnodes require a deposit, the user is always trading subnode registrations with token value, so this should prevent any flooding of storage.
frame_system::limits::BlockWeights::simple_max(Weight::MAX); | ||
} | ||
|
||
impl frame_system::Config for Test { |
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.
You could use the derive_impl
macro to use a default for most of these. You can still override the items you need to.
For example:
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] |
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.
Excellent, just the expertise this pallet needs.
I found that BlockHashCount
and AccountData
yielded errors when they were left out. Should they be removed from the example in frame support?:
substrate/frame/support/procedural/src/lib.rs
Line 870 in f8c9358
/// #[register_default_impl(TestDefaultConfig)] |
(NameService::<T>::name_hash(&name), owner, caller) | ||
} | ||
|
||
benchmarks! { |
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.
benchmarks v2?
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.
👀 Are you referring to usage of the #[benchmark]
maco?
Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
Super appreciated @franciscoaguirre , this is exactly the FRAME expertise the pallet needs. 💪 |
Testing the feature problem of paritytech/substrate#14491 Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix plural (s) and add polkadot#7537 test Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add tests and --feature-enables-dep Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Run CI on self hosted Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Bump to 0.7.0 Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add test for Substrate Testing the feature problem of paritytech/substrate#14491 Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Use deterministic commit hash len on UI tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add --left-side-feature-missing Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix toml comma formatting when adding features Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update UI tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fmt Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update to 1.73 nightly Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add MSRV Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Grammar Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
The CI pipeline was cancelled due to failure one of the required jobs. |
The CI pipeline was cancelled due to failure one of the required jobs. |
This PR expands on what was worked on in #11052, getting the name service pallet to a production ready state.
The addition of a
register_para
andderegister_para
will be added, ideally only callable via XCM over OpenGov proposals, as a mechanism for paras to be registered on the service. This will prevent arbitrary / non-existent Para IDs from being stored on the service. Theset_address
call within the name service resolver can then take apara_id
in addition to theaddress
itself, so the service knows which para to route addresses to.Registrations
storage item to have counter.register_para
andderegister_para
calls to store Para IDs that wish to be a part of the name service.RegistrationManager
and ensure origin isRuntimeOrigin
for these calls.set_address
to also requirepara_id
arg, ensure para id is registered.set_configs
call (similar to Nomination Poolsset_configs
) for root origin to manage.NameService
Collectives proxy type.domain
terminology for para registrations, andname
terminology for nodes.NameService
proxy to have access to resolver management and registration of new subdomains.Other tasks post initial release
force_deregister_para
is possible, to asynchronously query Relay Chain and remove para from name service if the para is no longer registered.