ssbc / ssb-tribes2

SSB private groups with ssb-db2
8 stars 1 forks source link

Fix members tangle calculation when reset on new epochs #69

Closed Powersource closed 1 year ago

Powersource commented 1 year ago

Needed if things end up like suggested here https://github.com/ssbc/ssb-group-exclusion-spec/issues/17#issuecomment-1467134868

Powersource commented 1 year ago

Maybe we could extract the getGroupInfo out of https://github.com/ssbc/ssb-tribes2/blob/master/lib/get-tangle.js and move it into https://github.com/ssbc/ssb-tribes2/blob/master/lib/add-tangles.js Then we could pass different roots in as arguments into the different GetTangles. Then get-tangle.js could be kept/made even more generic. Initially we could maybe just calculate the epoch root. If that turns out to be slow then we could maybe store it in the keyring.