Skip to content
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

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

Merged
merged 34 commits into from
May 18, 2023

Conversation

Powersource
Copy link
Collaborator

@Powersource Powersource commented May 4, 2023

Fixes #76

  • add-member people to all tip epochs
  • test that we add to all epoch tips
  • test that a late added member can read old stuff
  • send added people all old secrets as well
  • when joining a group, grab all tip invites (maybe we do already?) and all the secrets in them
  • check that we send the right secrets
  • update addMembers readme
  • did we put/plan to put this in one of the specs? mix? check for issue/task. yeah mix seems to have a task
  • add a comment to replicate about it breaking when people have secret feeds from someone else

@Powersource
Copy link
Collaborator Author

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
Copy link
Collaborator Author

was a weird mismatch between create and create tests. made this issue for some other time #107

@Powersource

This comment was marked as duplicate.

package.json Outdated Show resolved Hide resolved
@socket-security
Copy link

socket-security bot commented May 5, 2023

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

lib/epochs.js Outdated Show resolved Hide resolved
@Powersource
Copy link
Collaborator Author

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

@Powersource Powersource marked this pull request as ready for review May 8, 2023 13:55
@Powersource Powersource requested a review from mixmix May 8, 2023 14:07
@Powersource
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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

index.js Outdated Show resolved Hide resolved
@Powersource Powersource requested a review from mixmix May 11, 2023 13:14
@Powersource
Copy link
Collaborator Author

@mixmix made change and replied to comments

@Powersource
Copy link
Collaborator Author

oh no there's still flakes 😱

@mixmix
Copy link
Member

mixmix commented May 12, 2023

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

suggestions:

test/add-member.test.js Outdated Show resolved Hide resolved
Powersource and others added 11 commits May 16, 2023 16:20
Squashed commit of the following:

commit 770f283
Author: mix irving <mix@protozoa.nz>
Date:   Thu May 18 14:54:09 2023 +1200

    blah

commit 9e76b8e
Author: mix irving <mix@protozoa.nz>
Date:   Thu May 18 14:39:01 2023 +1200

    rm ssb-caps, use randomBytes, add timeout for final test

commit ffc89c4
Author: mix irving <mix@protozoa.nz>
Date:   Thu May 18 14:16:09 2023 +1200

    disable legacy-replication

commit 61ad664
Author: mix irving <mix@protozoa.nz>
Date:   Thu May 18 10:38:11 2023 +1200

    add licenses to new files

commit 38e8eeb
Author: mix irving <mix@protozoa.nz>
Date:   Thu May 18 10:36:35 2023 +1200

    add legacyReplication

commit 3dc4eb6
Author: mix irving <mix@protozoa.nz>
Date:   Thu May 18 10:16:55 2023 +1200

    fixups

commit 5dacf0a
Author: mix irving <mix@protozoa.nz>
Date:   Thu May 18 09:54:41 2023 +1200

    tests: log for when ebt fails to replicate

commit 25d5c0f
Author: Jacob Karlsson <jacob.karlsson95@gmail.com>
Date:   Fri May 12 12:12:46 2023 +0200

    1.0.1

commit 8c896ad
Author: Jacob Karlsson <jacob.karlsson95@gmail.com>
Date:   Fri May 12 12:12:34 2023 +0200

    Include all lib files in module

commit 0714473
Author: Jacob Karlsson <jacob.karlsson95@gmail.com>
Date:   Fri May 12 11:52:42 2023 +0200

    1.0.0
lib/epochs.js Show resolved Hide resolved
Copy link
Member

@mixmix mixmix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.
I made what I think is an improved "replicate-all" that we can use everywhere.

Worked on this to get the tests passing :
#117

@Powersource Powersource mentioned this pull request May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test getting added to the group after the first epoch, but still getting access to all the epochs
2 participants