Skip to content

[Bug]: Initial commits from document creation are not synced upon delegating document accessΒ #136

@Zyell

Description

@Zyell

What happened?

The initial commit to a document does not appear to sync to any peers that are given access to the document.

By initial commit, I mean that one that is passed on document creation. All subsequent commits added are immediately synced. I noticed this in my own code and in the current beelay_core tests. The process is as follows:

  1. Create 2 peers.
  2. peer1 creates a document with an initial commit
  3. peer1 adds peer2 to the document
  4. peers connect and synchronize
  5. load the doc on peer2 and it will be empty without the first commit. However, the doc status for peer2 will show that the local head is at the hash of the initial commit. The log line provided shows up claiming a KeyNotFound Decryption error that may be related.

Version

Latest code in main branch

Which librraies in this workspace are impacted?

beelay-core

On which environment did you encounter this on?

System code

Which OSes have you noticed the issue on?

Fedora

Relevant log output

025-06-02T19:22:51.577529Z ERROR ThreadId(29) run:load_doc_commits: /git/checkouts/keyhive-9280979f16b10d15/af26dee/beelay/beelay-core/src/commands.rs:269: failed to decrypt commit err=Decrypt(KeyNotFound) local_peer_id=3c1d7a049bebe5cc3a1c81176e79ca5bf1fc8164251d7718dc005cd7a9353c69 doc_id=DocumentId(2DY6BQPJuiUH3DZMfPhKe92NGQt3nxAK5v6y8uzmu4f69tJQba) decrypt=true

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions