-
Notifications
You must be signed in to change notification settings - Fork 23
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
Leftovers for private groups #67
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this was confusing since there is also a keys.go in the root of the repo for the signing keypair. right now these keys are used for private messages, so move the package there to make this clearer.
> the stream of messages as it arrive the old term wasn't good, also collided with tangle root.
untyped messages
supports three domains: claimed, received and feed sequence(*) also supports createFeedStream and messagesByType sorting by claimed timestamp *: this will become important later once feeds are received out of order.
this function taints the package with internal implementation assumptions. also with TFK the original StorageAddr is obsolete. this also drops some old migration code which shouldnt be in use anymore.
fixed bugs in direct-message key derivation TODO: lot's of debug print to remove
fix index address and setting Heads() for loose ends
renamed muxrpc command renamed to tangles.replies to make space for tangles.heads. also started a muxrpc managment API for groups (groups.create, groups.invite, groups.publishTo). TODO: support get({private:true, id})
I will do re-indexing as a follow-up PR. This one is big enough as it is. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TODO
Done
move keys to private/keys (bed7170)
this was confusing since there is also a keys.go in the root of the repo for the signing keypair.
right now these keys are used for private messages, so move the package there to make this clearer.
rename
sbot.RootLog
tosbot.ReceiveLog
(ad164d7)The old term wasn't saying much and also collided with tangle root.
sort by timestamp support (61c5c03)
supports three domains: claimed, received and feed sequence(*)
also supports
createFeedStream
andmessagesByType
sorting by claimed timestamp. (TODO:createUserStream
)*: this will become important later once feeds are received out of order.
ditch
func (r ref) StorageRef() librarian.Addr
from refs package and use TFK insteadSee 5ce3d02 for the gory details. tldr: the refs package has fewer internal specifics from go-ssb.
(not merged yet, uses with-branches branch. to be merged with the tangle sort fixes)
fix tangle sort, add
Heads() MessageRefs
(69e6790)go.mindeco.de/[email protected]
can sort slices of TangledPost now. It's a bit cumbersome to use because of go's type system. A slice ofrefs.Message
needs to be copied into a slice ofrefs.TangledPost
before that can be assigned to(refs.ByPrevious).Items
to be sorted.start interop testing against ssb-tribes
I added two cases to the tests that run against the javascript implementation. One where the JS side creates a group and invites the Go side, the other one does it in reverse (Go creates and invites JS).
This helped me thin out some problems in the DM key derivation (used for 1:1 messages and group invites) and that the cloaked groupID is actually using the read key not the group key for the derivation. So this work now, which is great!
On the negative side, i found two issues that feel like races on the JS side. They both only show if you run the tests over and over again (simply done using
go test -count 100
). I opened ssbc/ssb-db#316 and ssbc/ssb-db#317 respectively.add
private:bool
query parameterAdded to
messagesByType
andtangles.replies
but there is lot's TODO about it still. Before I add it tocreateLogStream
I want to find a solution to the following but that can happen later.First the code is terrible repetitive and doesn't fold in nicely with the existing margaret query code, similar to the
live:bool
code there now are two versions to drain a query to muxrpc. Consequently it isn't straight forward to add this to the internal indexing, to support private contact messages for instance.Another missing feature from the application perspective is how to publish. As it stands an application needs to use
groups.publishTo(groupID, { /* content */ })
and this doesn't play nice with existing clients which usepublish({content, recps})
, looking at the recps array to do the right thing. Using the existing code would leak messages.