···208208209209```python
210210# MstNode interface changes:
211211-# entries list of (key, cid, log position, right link)
212212-# left, entries[].right optional subtree link + stashed emit plan
213213-# link_record(key, cid, log_pos) stash the carv1 frame's byte log position
214214-# link_subtree(cid, emit_plan) stash an emit plan with the link
211211+# entries list of (key, cid, frame position, right link)
212212+# left, entries[].right optional subtree link + stashed emit plan
213213+# link_record(key, cid, frame_pos) stash the carv1 frame's byte log position
214214+# link_subtree(cid, subtree_emit_plan) stash an emit plan with the link
215215216216def car_frame(data_bytes: bytes) -> tuple[Cid, bytes]:
217217 """CARv1 block framing: [ varint | CID | data ]"""
···221221222222def frame_at(byte_log: bytes, position: int) -> bytes:
223223 """Get a logged CARv1 frame from `position` using its own varint length"""
224224- varint_len, payload_len = varint_read(byte_log, position)
225225- frame_end = position + varint_len + payload_len
224224+ varint_size, payload_len = varint_read(byte_log, position)
225225+ frame_end = position + varint_size + payload_len
226226 return byte_log[position:frame_end]
227227228228···232232 this is the core of how we drive the CAR preorder traversal output!
233233234234 node_frame_position: offset in the byte log of this node's own CARv1 frame
235235-236236- returns: ordered list of value-log indexes to serialized CARv1 frames
235235+ returns: ordered list of byte_log indexes to serialized CARv1 frames
237236 """
238237 plan = []
239238