paritytech / polkadot-sdk

The Parity Polkadot Blockchain SDK
https://polkadot.com/
1.93k stars 710 forks source link

Runtime restriction of peers #358

Open gavofyork opened 4 years ago

gavofyork commented 4 years ago

Right now, managing (reserved) peers is entiely client-side with no input/integration from within the runtime. However there are usecases where we might want to allow the runtime to state which node IDs should be connected to (e.g. with a secure private network).

This could be done in one of two ways:

g2udevelopment commented 4 years ago

@gavofyork I was thinking about this issues but with the tools already available this should already be possible. it is a bit cumbersome but using OCW http calls to rpc endpoints peers / addReservedPeer , it is already possible to use the OCW infrastructure to make this kind of calls.

kaichaosun commented 4 years ago

TODOs:

g2udevelopment commented 4 years ago

TODOs:

  • [ ] Persist the reserved nodes configure properly
  • [ ] Tutorial / guidance on how to use this feature

Thanks was really waiting on this feature. Hope to use it soon.

kaichaosun commented 4 years ago

The tutorial is ready. I'd like hear how you feel about this feature. @g2udevelopment @mattdean-digicatapult

g2udevelopment commented 4 years ago

@kaichaosun very nice I will follow the tutorial this will certainly help permissioned chain usecases. Combining this with this like rbac and on-chain governance opens up alot of possibilities thank you.