Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes: #6588
Description
This PR cherry picks the Moddable SDK fixes identified to cause GC divergences after reloading from a snapshot, which are the root cause of the anachrophobia issues that have been experienced on mainnet by some validators, and tracked in #6588.
Security Considerations
See testing below
Documentation Considerations
TBD
Testing Considerations
I have verified that an xsnap worker with these fixes can load any snapshot generated by a non fixed version, and that all variations behave consistently except for the expected Virtual Collection syscalls sensitive to organic GC. There should be no risk of anachrophobia resulting in panic, or future divergence in execution by validators.
If we're lucky, at the time of a future in consensus upgrade (see #6728), all validators with have the same snapshot content. If that's the case, from then on, all will behave exactly the same including for VC syscall timing, and keep the same snapshot hashes.
Please note however that none of these snapshot hashes will likely be what we'd consider to be the "correct" hashes had the fixed versions been used since agd upgrade.