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

Consider persisting tombstones #57

Merged
merged 3 commits into from
Dec 18, 2024

Conversation

maackle
Copy link
Contributor

@maackle maackle commented Dec 17, 2024

Hey, your friendly neighborhood model checker here. Model checking showed me this seemingly unhandled case and I was wondering if you had considered it:

It looks to me like tombstones don't persist, they just remove an entry and "expire" immediately. If another entry later comes in which predates the tombstone, it is allowed to be stored. This test fails.

If this is true, and the current behavior is desired, it might be good as an extra line in the spec, since the usual meaning of "tombstone" would imply that this test should pass.

@ThetaSinner ThetaSinner requested a review from a team December 17, 2024 22:22
Copy link
Collaborator

@neonphog neonphog left a comment

Choose a reason for hiding this comment

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

The tombstones are persisted in the gossiped peer stores of the individual nodes. This is why the term tombstone is in the data structure.

We have to sign those and send them anyway. The bootstrap server needs a way of verifying that the same client which published a non-tombstone entry is the one that is requesting a deletion of that entry. Rather than coming up with a totally parallel set of data to sign, we're just using the gossip tombstone entry as the delete mechanism in the bootstrap server.

If it becomes a real problem that legitimate nodes are copying pre-tombstone entries and re-publishing them to grief systems in the short time before they expire we can add some extra cache to maintain tombstones on the server... but that will come with downsides of memory usage. We don't want to push out other non-tombstone entries from the space memory.

I'm happy to merge some docs to this affect as suggested into the spec.

@maackle
Copy link
Contributor Author

maackle commented Dec 18, 2024

That design decision makes sense. Yeah, a line in the spec sounds good, for completeness, and to keep in mind the potential griefing vector.

@neonphog neonphog self-requested a review December 18, 2024 17:16
ThetaSinner
ThetaSinner previously approved these changes Dec 18, 2024
crates/bootstrap_srv/src/lib.rs Outdated Show resolved Hide resolved
@neonphog neonphog enabled auto-merge (squash) December 18, 2024 18:16
@neonphog neonphog merged commit 2997a0a into holochain:main Dec 18, 2024
5 checks passed
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.

3 participants