Nodes without any heads should not build on top of unsynced branches
- Dominant language
- Go
- Stars
- 489
- Forks
- 60
- Avg merge
- 1h 15m
- Merged PRs (30d)
- 1
Description
This code here:
https://github.com/ipfs/go-ds-crdt/blob/master/crdt.go#L379-L401
was well intentioned, but it can be a bit of a footgun as it risks building on top of irretrievable DAGs branches that other nodes may be broadcasting, something we generally want to avoid so that they don't become blockers to progress.
Instead, new nodes can build on their own branch until they sync and set-heads in a normal fashion. The only consideration would be that the height they use should be probably set to the highest seen one even if we haven't finished syncing such a branch.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in crdt.go at lines 379-401 and trace how a node with no heads selects its branch and height before synchronization. Check how set-heads is reached after syncing. Done means new nodes avoid building on unsynced branches while still using the highest seen height.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100