You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Step 4 - Adding the NodeAuthorization to the construct_runtime! macro. This macro does not seem to be used anymore, instead I added it to the mod runtime as follows:
mod runtime {//...existing code//...#[runtime::pallet_index(9)]pubtypeNodeAuthorization = pallet_node_authorization;}
The cargo check command works after adding it this way, so it seems to be fine; however, making this more clear in the tutorial steps would be very helpful, especially for folks (like myself) who are new to Rust and Substrate 🙏 🙏
The bigger issue I am experiencing is under Add genesis storage for authorized nodes step 6 & 7 where we need to add NodeAuthorization to the testnet_genesis function in node/src/chain_spec.rs. The body of the function in the current codebase is different than what's in the tutorial. instead of adding to the GenesisConfig struct, it's returning a JSON object by using serde_json::json!. tried adding a JSON object with key nodeAuthorization with a few different schemas, but cannot get the node to run. for example:
Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Bug report for compiling, code snippets, templates, etc.
Hello,
I am going through the Build a Blockchain -> Authorize specific nodes tutorial and am having some issues with two steps.
Implement the Config Trait
Step 4 - Adding the NodeAuthorization to the
construct_runtime!
macro. This macro does not seem to be used anymore, instead I added it to themod runtime
as follows:The
cargo check
command works after adding it this way, so it seems to be fine; however, making this more clear in the tutorial steps would be very helpful, especially for folks (like myself) who are new to Rust and Substrate 🙏 🙏The bigger issue I am experiencing is under
Add genesis storage for authorized nodes
step 6 & 7 where we need to addNodeAuthorization
to thetestnet_genesis
function innode/src/chain_spec.rs
. The body of the function in the current codebase is different than what's in the tutorial. instead of adding to theGenesisConfig
struct, it's returning a JSON object by usingserde_json::json!
. tried adding a JSON object with keynodeAuthorization
with a few different schemas, but cannot get the node to run. for example:however I am getting an error when starting the node -
Invalid JSON blob: invalid type: map, expected a sequence at line 1 column 1189
any guidance on what the expected JSON structure is here would be greatly appreciated!
Steps to reproduce the problem
No response
The text was updated successfully, but these errors were encountered: