diff --git a/star-lite/readme.md b/star-lite/readme.md index 84b4632..2fdfeee 100644 --- a/star-lite/readme.md +++ b/star-lite/readme.md @@ -208,10 +208,10 @@ Since our depth-first walk finalizes children before parents, and the final pare ```python # MstNode interface changes: -# entries list of (key, cid, log position, right link) -# left, entries[].right optional subtree link + stashed emit plan -# link_record(key, cid, log_pos) stash the carv1 frame's byte log position -# link_subtree(cid, emit_plan) stash an emit plan with the link +# entries list of (key, cid, frame position, right link) +# left, entries[].right optional subtree link + stashed emit plan +# link_record(key, cid, frame_pos) stash the carv1 frame's byte log position +# link_subtree(cid, subtree_emit_plan) stash an emit plan with the link def car_frame(data_bytes: bytes) -> tuple[Cid, bytes]: """CARv1 block framing: [ varint | CID | data ]""" @@ -221,8 +221,8 @@ def car_frame(data_bytes: bytes) -> tuple[Cid, bytes]: def frame_at(byte_log: bytes, position: int) -> bytes: """Get a logged CARv1 frame from `position` using its own varint length""" - varint_len, payload_len = varint_read(byte_log, position) - frame_end = position + varint_len + payload_len + varint_size, payload_len = varint_read(byte_log, position) + frame_end = position + varint_size + payload_len return byte_log[position:frame_end] @@ -232,8 +232,7 @@ def build_subtree_emit_plan(node: MstNode, node_frame_position): this is the core of how we drive the CAR preorder traversal output! node_frame_position: offset in the byte log of this node's own CARv1 frame - - returns: ordered list of value-log indexes to serialized CARv1 frames + returns: ordered list of byte_log indexes to serialized CARv1 frames """ plan = []