Typeberry by Fluffy Labs - v0.11.0
    Preparing search index...

    Interface ValueRefsUpdate

    A batch of refcounting mutations produced by a single ValueRefs operation.

    The backend is responsible for applying the batch using its own write primitive - ideally atomically with the state write that triggered it (one fjall persist).

    Counts are absolute values rather than increments, so applying the same update more than once (e.g. on crash-replay) is harmless.

    When atomicity is not available, apply in field order and removeValues strictly last: a crash after counts are persisted but before values are removed only leaks values, while the opposite order could drop a value the persisted counts still consider referencd.

    interface ValueRefsUpdate {
        finalizedCounts: [OpaqueHash & WithOpaque<"trieValue">, number][];
        pendingCounts: [OpaqueHash & WithOpaque<"trieValue">, number][];
        removeDeltas: (OpaqueHash & WithOpaque<"HeaderHash">)[];
        removeValues: (OpaqueHash & WithOpaque<"trieValue">)[];
        setDeltas: [OpaqueHash & WithOpaque<"HeaderHash">, ValueDelta][];
    }
    Index

    Properties

    finalizedCounts: [OpaqueHash & WithOpaque<"trieValue">, number][]

    New absolute finalized counts. Count 0 means the entry should be removed.

    pendingCounts: [OpaqueHash & WithOpaque<"trieValue">, number][]

    New absolute pending counts. Count 0 means the entry should be removed.

    removeDeltas: (OpaqueHash & WithOpaque<"HeaderHash">)[]

    Deltas consumed by finalization or fork pruning.

    removeValues: (OpaqueHash & WithOpaque<"trieValue">)[]

    Values that are no longer referenced and can be removed from the values DB.

    setDeltas: [OpaqueHash & WithOpaque<"HeaderHash">, ValueDelta][]

    Deltas of freshly imported blocks to persist.