I have some IoT(Internet of things) nodes sharing the received data from sensors with each others. I partitioned them to 2 permissioned networks: Network 1 includes: X,Y,Z nodes trusting each other. Network 2 includes: M,N,O nodes trusting each other.
Can I define a smart contract to each network containing the list of nodes (their PK) that enables nodes to accept the data of only its own peers in own network?
For instance, smart contract 1 includes the PK of X,Y,Z and enable them share data with each other. smart contract 2 includes the PK of M,N,O and enable them share data with each other.
Due to some conditions, for changing these partitions, for example, moving node Z from network 1 to network 2.
Can I send update list of members to two smart contracts 1 and 2 to change automatically partitions as follow?
Precisely, the list of smart contract 1 is updated to X,Y,
and Node z plus its logical or Physical address is added to smart contract 2. That is,now, in network 2, M,N,O and plus new node Z can share their data with each other. Regards