Assign nodes to groups in the blockchain