What should be the initial state of a PVM?
The following discussion from !4343 (merged) should be addressed:
-
@hans.hoglund started a discussion: (+4 comments) It is confusing that two PVMs can have identical state hashes (zero) even though they are in fact in different states (due to having different boot sectors).
Fortunately, I don't think this special-casing is necessary. We could instead say that:
- Pre-boot state means
commitment_hash = 0. By implicationstate_hash = 0andtick_count = 0. - The boot sector
ismay be written in a single tick using this function. - The machine now performs perform
N>=0or more computation steps, which we observe by iteratingevaluntilis_input_stateholds. - At this point the machine enters its regular loop, alternating
set_input_stateand (evaluntilis_input_state).
So terminology-wise the machine is in pre-boot at tick 0, booting at tick [1..N+1] and running at tick N+2.
In the context of this MR, this just means removing the requirement that
[state_hash state = State_hash.zero]from this docstring, and removing the special-casing ofHaltedinstate_hash. - Pre-boot state means