2

We are running a substrate private blockchain network. We are able to add a total of 8 nodes but are not able to increase more than that.

For the 9th node: 9th node is not starting to sync after performing node authorization. So here I am trying to understand do we have any limit in the no of connecting nodes in Substrate private network.

And Is there a way we can increase the no of nodes in the same network?

Thanks in Advance

4
  • is there any error you are facing while adding the 9th node? Feb 27, 2023 at 8:58
  • @ImmanuelJohn There are no errors, but node sync is not happening for the 9th node. I could find some suggestions like adding max-peers flag to the configuration but not able to identify the exact file to update this flag.
    – Anbu
    Feb 27, 2023 at 9:18
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Feb 27, 2023 at 10:30
  • You can trying using the --in-peers and --out-peers flags to set the desired peers count.
    – pepoviola
    Apr 23, 2023 at 13:53

2 Answers 2

1

Did you use auto-discovery?

I encountered this before, but I'm not sure if they were caused by the same reason.

Try:

  1. setting up a bootnode and use --bootnodes
  2. manually setting up the --port for each of them
1

If you are using the pallet_node_authorization then the default limit is 8 which is set in the runtime config. You can increase/update this number accordingly. I have set this to 512 in the below example.

    parameter_types! {
        pub const MaxWellKnownNodes: u32 = 512;
        pub const MaxPeerIdLength: u32 = 128;
    }
    
    impl pallet_node_authorization::Config for Runtime {
        type Event = Event;
        type MaxWellKnownNodes = MaxWellKnownNodes;
        type MaxPeerIdLength = MaxPeerIdLength;
        type AddOrigin = EnsureRoot<AccountId>;
        type RemoveOrigin = EnsureRoot<AccountId>;
        type SwapOrigin = EnsureRoot<AccountId>;
        type ResetOrigin = EnsureRoot<AccountId>;
        type WeightInfo = ();
    }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.