Skip to content

chore(PocketIC): deterministic registry and validation #5379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mraszyk
Copy link
Contributor

@mraszyk mraszyk commented Jun 2, 2025

This PR fixes the PocketIC registry to be deterministic for newly created instances and when instances are restarted from a previous state. This fact is also validated when restarting an instance (which fails if the newly created registry does not match the previous registry serialized to disk).

The determinism is achieved by:

  • sorting canister ranges of a subnet before deriving its seed;
  • creating TLS certificates from deterministic (subnet) seeds;
  • preserving the order of subnets established by their creation (by using a Vec instead of a BTreeMap).

@github-actions github-actions bot added the chore label Jun 2, 2025
@mraszyk mraszyk marked this pull request as ready for review June 2, 2025 15:03
@mraszyk mraszyk requested review from a team as code owners June 2, 2025 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant