pub struct BlockContentV0 {
pub commit_header: CommitHeaderObject,
pub children: Vec<BlockId>,
pub encrypted_content: Vec<u8>,
}
Expand description
unencrypted part of the Block
Fields§
§commit_header: CommitHeaderObject
Reference (actually, only its ID or an embedded block if the size is small enough) to a CommitHeader of the root Block of a commit that contains references to other objects (e.g. Commit deps & acks) Only set if the block is a commit (and it is the root block of the Object). It is an easy way to know if the Block is a commit (but be careful because some root commits can be without a header).
children: Vec<BlockId>
Block IDs for child nodes in the Merkle tree, is empty if ObjectContent fits in one block or this block is a leaf. in both cases, encrypted_content is then not empty
encrypted_content: Vec<u8>
contains encrypted ChunkContentV0 (entirely, when fitting, or chunks of ObjectContentV0, in DataChunk) used for leaves of the Merkle tree, or to store the keys of children (in InternalNode)
Encrypted using convergent encryption with ChaCha20:
- convergence_key: BLAKE3 derive_key (“NextGraph Data BLAKE3 key”, StoreRepo + store’s repo ReadCapSecret ) // basically similar to the InnerOverlayId but not hashed, so that brokers cannot do “confirmation of a file” attack
- key: BLAKE3 keyed hash (convergence_key, plain_chunk_content)
- nonce: 0
Trait Implementations§
Source§impl Clone for BlockContentV0
impl Clone for BlockContentV0
Source§fn clone(&self) -> BlockContentV0
fn clone(&self) -> BlockContentV0
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more