-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specify in private-group-spec how group/init tangles should work #17
Comments
Group epoch tangleEpoch 0flowchart RL
subgraph invitations
0_add_0[add: Alice]
0_add_1[add: Bob, Carol]
end
subgraph epoch_0
0_init[init]
end
%% epoch 0 members tangle
0_add_1 --> 0_add_0 --> 0_init
classDef default fill:#fff,stroke:#000,color:#222;
classDef cluster fill:#eee,stroke:#000,color:#333;
classDef groupTangle fill:#f55,color:white;
classDef memberTangle_0 stroke:#5ff,stroke-width:3;
classDef memberTangle_1 stroke:#0f0,stroke-width:3;
class 0_init,1_init groupTangle
class 0_init,0_add_0,0_add_1,0_remove_2 memberTangle_0
class 1_init,1_add_0 memberTangle_1
Epoch 1 (remove Carol)Init new epoch (backlinking to prior epoch), then add "remaining" members to new epoch flowchart RL
subgraph epoch_0
0_init[init]
1_add_0[add: Alice, Bob]
end
subgraph epoch_1
1_init[init]
end
%% epoch tangle
1_init -.-> 0_init
%% epoch 1 members tangle
1_add_0 --> 1_init
classDef default fill:#fff,stroke:#000,color:#222;
classDef cluster fill:#eee,stroke:#000,color:#333;
classDef groupTangle fill:#f55,color:white;
classDef memberTangle_0 stroke:#5ff,stroke-width:3;
classDef memberTangle_1 stroke:#0f0,stroke-width:3;
class 0_init,1_init groupTangle
class 0_init,0_add_0,0_add_1,0_remove_2 memberTangle_0
class 1_init,1_add_0 memberTangle_1
Second init message may look something like this: // epoch 1
{
type: 'group/init',
version: 'v2',
groupKey: new_group_key.toString('base64'),
tangles: {
group: {
root: 'A',
previous: ['X'] // last message in the "group" ?
},
epoch: {
root: 'A', // << new init points to root + previous epochs
previous: ['A']
},
members: { // initialises a new members tangle for this epoch
root: null,
previous: null
}
}
} Announce to Carol they were removed flowchart RL
subgraph invitations
0_add_0[add: Alice]
0_add_1[add: Bob, Carol]
end
subgraph epoch_0
0_init[init]
0_remove_2[remove: Carol]
end
%% epoch tangle
%% epoch 0 members tangle
0_remove_2 --> 0_add_1 --> 0_add_0 --> 0_init
classDef default fill:#fff,stroke:#000,color:#222;
classDef cluster fill:#eee,stroke:#000,color:#333;
classDef groupTangle fill:#f55,color:white;
classDef memberTangle_0 stroke:#5ff,stroke-width:3;
classDef memberTangle_1 stroke:#0f0,stroke-width:3;
class 0_init,1_init groupTangle
class 0_init,0_add_0,0_add_1,0_remove_2 memberTangle_0
class 1_init,1_add_0 memberTangle_1
Question: should the remove be in the epoch itself of the epoch prior? (i.e. invitations in this case) Full diagramflowchart RL
subgraph invitations
0_add_0[add: Alice]
0_add_1[add: Bob, Carol]
end
subgraph epoch_0
0_init[init]
1_add_0[add: Alice, Bob]
0_remove_2[remove: Carol]
end
subgraph epoch_1
1_init[init]
end
%% epoch tangle
1_init -.-> 0_init
%% epoch 0 members tangle
0_remove_2 --> 0_add_1 --> 0_add_0 --> 0_init
%% epoch 1 members tangle
1_add_0 --> 1_init
classDef default fill:#fff,stroke:#000,color:#222;
classDef cluster fill:#eee,stroke:#000,color:#333;
classDef groupTangle fill:#f55,color:white;
classDef memberTangle_0 stroke:#5ff,stroke-width:3;
classDef memberTangle_1 stroke:#0f0,stroke-width:3;
class 0_init,1_init groupTangle
class 0_init,0_add_0,0_add_1,0_remove_2 memberTangle_0
class 1_init,1_add_0 memberTangle_1
KEY:
|
This is what I had been imagining @Powersource I wanted that so that you could easily pull all the |
Great! I love the diagrams. Why would I guess the question is why did you choose these arrows like this? What purpose do they serve/enable? |
|
Don't fully understand but the removal announce I think should be placed like
Yeah now that I see the Full diagram it's kind of confusing why Remove: carol is placed after Add: alice, bob. I didn't expect the members tangle to be re-inited in a new epoch, but that actually probably makes a lot of sense if we use add-members to send people the new key. Before I was thinking that we would keep the same members tangle and send people the new key using a message type different to add-members, just one that sends the new key. But now we reset the member tangle on each epoch and get a clean slate where it's kind of easy to check the current membership. |
flowchart RL
subgraph invitations
0_add_0[add: Alice]
0_add_1[add: Bob, Carol]
end
subgraph epoch_0
0_init[init]
1_add_0[add: Alice, Bob]
0_remove_2[remove: Carol]
end
subgraph epoch_1
1_init[init]
end
%% epoch tangle
1_init -.-> 0_init
%% epoch 0 members tangle
0_remove_2 --> 0_add_1 --> 0_add_0 --> 0_init
%% epoch 1 members tangle
1_add_0 --> 1_init
1_init-.->0_remove_2
classDef default fill:#fff,stroke:#000,color:#222;
classDef cluster fill:#eee,stroke:#000,color:#333;
classDef groupTangle fill:#f55,color:white;
classDef memberTangle_0 stroke:#5ff,stroke-width:3;
classDef memberTangle_1 stroke:#0f0,stroke-width:3;
class 0_init,1_init groupTangle
class 0_init,0_add_0,0_add_1,0_remove_2 memberTangle_0
class 1_init,1_add_0 memberTangle_1
Added just one link for clarification, between init 1 and remove carol. I think that's the group tangle. |
Sweet, I'll fold in the feedback and open a PR reflecting this |
Need to update the allowed states of the
group
tangle on init msgs (should tangle like normal, while still being null at root)Need to add definition for
epoch
tangle, that tangles different epoch inits (with root at group root)The text was updated successfully, but these errors were encountered: