-
Notifications
You must be signed in to change notification settings - Fork 169
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Description
When using the QMDB crate inside a monorepo, I am observing a state root mismatch between:
- the state root obtained after calling
merkleize(beforecommit), and - the state root obtained after calling
commit.
This happens even when no additional state changes are made between these two steps.
Expected Behavior
merkleizecomputes the state root based on the in-memory state after execution.commitshould only persist the already-computed state to the database.
Given this, the state root should remain the same before and after commit, since no new state transitions are introduced during persistence.
Actual Behavior
- Calling
commitintroduces a new commit operation that changes the resulting state root. - As a result, the state root after
merkleizedoes not match the state root aftercommit.
Question / Clarification Needed
Is this the intended design for QMDB?
Specifically:
- Should
commitaffect the state root? - Or should the state root be fully determined by execution +
merkleize, withcommitonly persisting data to storage?
This distinction is important for verification logic, where the state root is expected to remain stable between execution and persistence.
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Type
Projects
Status
Backlog