ssbc / ssb-tribes2

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

People added late to a group should get access to all epochs #106

Closed Powersource closed 1 year ago

Powersource commented 1 year ago

Fixes https://github.com/ssbc/ssb-tribes2/issues/76

Powersource commented 1 year ago

interesting error

# create reuses a group feed that hasn't had members yet (because of an earlier crash or something)
ok 17 got root
ok 18 there are no group feeds yet
ok 19 there is 1 group feed after we created a group
ok 20 there is 1 used group feed and 1 we created now with a root message but not ourselves as a member
fail create Error: Failed to add myself to the group when creating a group
    at /home/me/prj/ssb/ssb-tribes2/index.js:100:30
    at /home/me/prj/ssb/ssb-tribes2/index.js:156:29
  Error: todo
    at /home/me/prj/ssb/ssb-tribes2/index.js:156:32
    at /home/me/prj/ssb/ssb-tribes2/lib/epochs.js:109:25
  Error: Failed to resolve epoch @tangle/reduce
    at /home/me/prj/ssb/ssb-tribes2/lib/epochs.js:109:28
    at /home/me/prj/ssb/ssb-tribes2/lib/epochs.js:243:16
  Error: Malformed group/init root message
    at /home/me/prj/ssb/ssb-tribes2/lib/epochs.js:244:11
  Error
    at /home/me/prj/ssb/ssb-tribes2/lib/epochs.js:245:13
    at /home/me/prj/ssb/ssb-tribes2/node_modules/.pnpm/ssb-db2@6.3.3/node_modules/ssb-db2/core.js:251:22
    at /home/me/prj/ssb/ssb-tribes2/node_modules/.pnpm/ssb-db2@6.3.3/node_modules/ssb-db2/core.js:271:7
    at /home/me/prj/ssb/ssb-tribes2/node_modules/.pnpm/ssb-db2@6.3.3/node_modules/ssb-db2/log.js:109:9
    at gotBlock (/home/me/prj/ssb/ssb-tribes2/node_modules/.pnpm/async-append-only-log@4.3.10/node_modules/async-append-only-log/index.js:255:7)
    at getBlock (/home/me/prj/ssb/ssb-tribes2/node_modules/.pnpm/async-append-only-log@4.3.10/node_modules/async-append-only-log/index.js:233:7)
    at get (/home/me/prj/ssb/ssb-tribes2/node_modules/.pnpm/async-append-only-log@4.3.10/node_modules/async-append-only-log/index.js:251:5)
    at waitForLogLoaded (/home/me/prj/ssb/ssb-tribes2/node_modules/.pnpm/async-append-only-log@4.3.10/node_modules/async-append-only-log/index.js:616:12)
    at Object.log.get (/home/me/prj/ssb/ssb-tribes2/node_modules/.pnpm/ssb-db2@6.3.3/node_modules/ssb-db2/log.js:105:5)
    at getMsgByOffset (/home/me/prj/ssb/ssb-tribes2/node_modules/.pnpm/ssb-db2@6.3.3/node_modules/ssb-db2/core.js:269:9)
Powersource commented 1 year ago

was a weird mismatch between create and create tests. made this issue for some other time https://github.com/ssbc/ssb-tribes2/issues/107

Powersource commented 1 year ago

spec update https://github.com/ssbc/private-group-spec/pull/33

socket-security[bot] commented 1 year ago

New dependency changes detected. Learn more about Socket for GitHub ↗︎


👍 No new dependency issues detected in pull request

Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

Pull request alert summary
Issue Status
Install scripts ✅ 0 issues
Native code ✅ 0 issues
Bin script shell injection ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
Deprecated license ✅ 0 issues
Missing license ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues

📊 Modified Dependency Overview:

🚮 Removed packages: private-group-spec@7.0.0, ssb-caps@1.1.0

Powersource commented 1 year ago

updated keyring to fix a list() bug https://gitlab.com/ahau/lib/ssb-keyring/-/merge_requests/27

Powersource commented 1 year ago

hmm "publish many messages that might need pruning" is mysteriously freezing sometimes. i think it was happening before we merged the db2 optimization as well (test is gone because re-ran it)

Powersource commented 1 year ago

trying out using normal db2 config like in https://github.com/ssbc/ssb-tribes2/pull/108/files

Powersource commented 1 year ago

@mixmix made change and replied to comments

Powersource commented 1 year ago

oh no there's still flakes :scream:

mixmix commented 1 year ago

@Powersource seems to be flaking on same test with 500 writes

suggestions: