Comments (5)
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.
- Generate an account ID for your colaltor account. You can use metamask, or polkadot js or whatever for this.
- Use subkey or any other tool to generate an SR25519 session key
subkey generate
Secret phrase `learn possible obey useful ill venue wine ivory divide secret gallery fortune` is account:
Secret seed: 0xa5621d70ee2834728867a6d221ed01ce23edea9a6e43b0e50b9d52a65c46cf93
Public key (hex): 0x7c3174f25a5d6fa706948a31614c6a8e82a6f3337b29274855ffb1461a4b994b
Public key (SS58): 5EsYVBCuVTWKX4NUeDmQePHvGiy8Jeg56ySpqtpe4Tp88xek
Account ID: 0x7c3174f25a5d6fa706948a31614c6a8e82a6f3337b29274855ffb1461a4b994b
SS58 Address: 5EsYVBCuVTWKX4NUeDmQePHvGiy8Jeg56ySpqtpe4Tp88xek
- Export our local chain spec into a json file that you can edit
moonbeam build-spec --chain moonbase-local > moonbase-custom.json
. (If you want to use the development service without a relay chain, start withmoonbase-dev
instead.) - Edit that spec to contain your account information. Here are some considerations:
- Give your account some tokens
- List your account as sudo (not necessary, but possibly useful)
- List your account as a collator candidate
- Enter your author mapping in the genesis config.
- make your spec raw `moonbeam build-spec --chain moonbase-custom.json --raw > moonbase-custom-raw.json (Not necessary if you're doing everything locally, but necessary for production)
- Start your node
moonbeam --collator --chain moonbase-custom-raw.json
- Insert your key via RPC. You can use curl or Apps. The keytype is
nmbs
.
from moonbeam.
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 --session-key
flag idea would work but is not secure. It requires you putting the key on the cli. The RPC call is the standard way to do it. If you don't like that you could also try moonbeam key insert
but I'd recommend against that until you have it working with the RPC call.
unsuccessfully tried to call author_insertKey
What was unsucessful about it. Did you get an error message?
rotateKeys
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.
from moonbeam.
My apologies @JoshOrndorff, everything is now working as expected. Previous attempts weren't successful because of my lack of attention.
In any case, I really appreciate your help and patience. Not everybody is keen to help so thank you very much!
from moonbeam.
cc @albertov19 @themacexpert @eshaben this might be a good thing to have in the docs eventually.
from moonbeam.
@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 0x7c3174f25a5d6fa706948a31614c6a8e82a6f3337b29274855ffb1461a4b994b
causing an address mismatch, therefore, no block will be produced. This situation could be solved with an hypothetical way to enforce session keys at application start-up. For example:
moonbeam --collator --chain moonbase-custom-raw.json --session-key 0x7c3174f25a5d6fa706948a31614c6a8e82a6f3337b29274855ffb1461a4b994b
Also unsuccessfully tried to call author_insertKey
providing the manually generated session key public key and/or the collator session key (rotateKeys
) along side the account seed and/or the manually generated session key seed. Every possible combination, variant and alternative didn't change anything.
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?
from moonbeam.
Related Issues (20)
- tokens stuck in parachain bridge HOT 1
- The node failed to use trace. Procedure HOT 5
- runtime-2800 release HOT 1
- When will purestake/moonbeam-tracing 2700 be released, please? HOT 2
- client v0.36.0 release
- [Alphanet] Parachain Collation Wasn't Advertised to Any Validator HOT 4
- runtime-2801 release
- newHeads subscription not being emited in local node HOT 2
- Issue connecting to Moonbeam Safe HOT 1
- Update polkadot-sdk from v1.3.0 to v1.7.2 HOT 1
- [HELP] What's the canonical way to use a moonbeam pallet as dependency? HOT 3
- client 0.36.1 release
- Imposible to use a moonbeam version releated to polkadot-v1.1.0 HOT 6
- [HELP] add moondeam debug_traceTransaction for out project HOT 1
- [HELP] debug_traceTransaction
- client v0.37.0 release
- Runtime 2900 release
- runtime-2901 release
- runtime-runtime-2902 release
- [Bug] Method "eth_getLogs" not found HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moonbeam.