-
Notifications
You must be signed in to change notification settings - Fork 321
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
Initial collator set-up #512
Comments
Hi there. it sounds like you're trying to start your own local Moonbeam network using your own generated keys rather than Alice, Bob, etc, right? You're definitely on the right track. I'll give an overview here and feel free to ask further questions.
|
cc @albertov19 @themacexpert @eshaben this might be a good thing to have in the docs eventually. |
@JoshOrndorff Thanks for the detailed information and congratulations for all the hard work in regards to Cumulus. As lucky as lucky can be, the above steps were already tried without success on my side. Quoting your example, there is an account ID and a session key (Author ID) so the genesis mapping should be: (
hex::hex!["SOME_RANDOM_ACCOUNT_ID_HEX"].into(),
hex::hex!["0x7c3174f25a5d6fa706948a31614c6a8e82a6f3337b29274855ffb1461a4b994b"].unchecked_into(),
SOME_STAKING_AMOUNT
) But the collator session key is different than moonbeam --collator --chain moonbase-custom-raw.json --session-key 0x7c3174f25a5d6fa706948a31614c6a8e82a6f3337b29274855ffb1461a4b994b Also unsuccessfully tried to call Maybe I am doing something wrong but this relationship between Author ID/Session key and a genesis collator that produces initial blocks is not clear to me. Could you provide more insight? |
I don't understand what the first block of code you wrote means. The author mapping genesis config has just two fields. There is no amount there. The
What was unsucessful about it. Did you get an error message?
This is not useful for starting a network. This is useful for adding new collators or rotating the keys of existing collators after genesis. If you are trying to launch a new network, don't waste time with this rpc call. |
My apologies @JoshOrndorff, everything is now working as expected. Previous attempts weren't successful because of my lack of attention. |
Hello,
Could you guys answer a question about setting up an initial collator? Let me introduce some context first.
To attach a regular validator session key to an account, it is usually a matter of calling the
insertKey
RPC endpoint but similar thing doesn't exist for thepallet-author-mapping
pallet and theadd_association
method is an extrinsic that needs a collator in the first place. So it is like trying to register the first collator without a collator to produce the first block.AuthorMappingConfig 's genesis mapping is useful for development networks and local test-nets because
--alice
(or--bob
, or--fred
, etc) are fixed known keys with a gentle Substrate CLI application that automatically inserts these pre-fixed keys (https://github.com/paritytech/substrate/blob/7f09a7619c863c964a93ceb915d6e0b9ddc39e2e/primitives/session/src/lib.rs#L109-L112). Unfortunately, the same can not be said to live networks as, for example, an initial genesis mapping to Alice could be easily exploited by third-parties.With all that said, how to set-up an initial collator to start producing blocks or how did you guys end up doing to successfully achieve this situation? Any tip would be very helpful.
Cheers
The text was updated successfully, but these errors were encountered: