-
Notifications
You must be signed in to change notification settings - Fork 9
Need more basic explanations and examples for bitfield #1
Comments
Yeah, that covers the gist of it! -- because Hypercore is append-only, data can be tracked by just flipping a bit, and once it's flipped we don't need to download that piece of data ever again.
The data is stored in a tree format, so it would be represented differently on disk. But it seems you've got the right intuition about it! I'll be spending some time after this month to write more docs. Questions like these are super helpful to know where we should focus more on writing docs. Please keep the questions coming! 🎉 |
From bitfield.md
Hypercore is append-only, It seems when the previous bit is 0 then the next rest of bits should all be 0, so why this happens: the |
Oh yeah, so while Hypercore is append-only, it also supports sparse replication. So:
The bitfield represents the data that you have stored on your machine. Because we can do sparse copies (e.g. only copy a few entries in hypercore, or just one file in Hyperdrive) it must be able to represent that in its data structure, which means interior mutability. Does that make sense? |
Yeah, that's what I want to make sure. Thanks |
I'm learning hypercore, I think SLEEP files prefixed by |
Not quite; they're both |
These are some 🔦questions:
I red up bitfield, sparse-bitfield though. I've still struggled to figure out the bitfield module for few days. The source of indexed-field and hypercore/bitfield are both hard to read. And sleep.md/bitfiled is similar to this document. So I decide to ask questions now.
"Data Bitfield: Indicates which data you have, and which data you don't. " What does 'the data you have' means? Does this means data entries I've already downloaded, then when update coming, I don't need to download them again? I don't know. Hypercore is a append-only log. So if there are 3 entries in
metadata.data
, the Data Bitfield will be111000000
?I want to figure out this one first.
The text was updated successfully, but these errors were encountered: