Skip to content

Continuations cleanup: docs, comments, and regression tests#714

Merged
MauroToscano merged 1 commit into
continuations-local-to-globalfrom
continuations-cleanup
Jun 25, 2026
Merged

Continuations cleanup: docs, comments, and regression tests#714
MauroToscano merged 1 commit into
continuations-local-to-globalfrom
continuations-cleanup

Conversation

@MauroToscano

@MauroToscano MauroToscano commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Follow-up cleanup on top of #685 (continuations), targeting the continuations-local-to-global branch so it can be folded into the PR.

This version intentionally leaves the performance changes out so they can be rechecked separately.

Soundness-regression tests

The production code is correct today; these guard against silent regressions of the main continuation properties:

  • L2G MU selector — MU=0 on a touched row, MU=1 on padding, and MU=2 non-boolean are each rejected.
  • Design-Y orphan / chain-truncation (MU=0 on a later epoch's row) is rejected.
  • init_epoch < fini_epoch ordering arithmetic for self/future references.
  • Tampered EpochProof.l2g_root is rejected, covering the epoch-to-global L2G root binding.
  • A private-input program proven as a multi-epoch continuation verifies.

Cleanup

  • Replace bare 508 literals with register_base_address(254).
  • Remove the unused DEFAULT_EPOCH_SIZE; note run_epochs as a test/bench helper.
  • Docs: drop the non-existent page_configs bundle field from design section 8, register the design doc in SUMMARY.md, and correct the global_memory column table.
  • Fix the stale test comment about L2G-root binding coverage.

Verification

  • make lint
  • cargo test --release -p lambda-vm-prover local_to_global_bus_tests
  • cargo test --release -p lambda-vm-prover test_split_verify_rejects_tampered_l2g_root

Deferred

  • Streaming --num-epochs cycle counting.
  • Skipping the redundant per-epoch L2G trace build inside from_image_and_logs.

Keep the follow-up scoped to non-performance cleanup while preserving the soundness regression coverage.

- Add L2G/global-memory regression tests for MU selector behavior, chain truncation, l2g-root binding, and private-input continuations.

- Fix stale continuation/global-memory docs and comments.

- Replace bare x254 byte address literals with register_base_address(254).

- Remove the unused DEFAULT_EPOCH_SIZE constant and document run_epochs as a test/bench helper.
@MauroToscano MauroToscano force-pushed the continuations-cleanup branch from 973a14c to 2bddaff Compare June 25, 2026 20:29
@MauroToscano MauroToscano changed the title Continuations follow-up: per-epoch L2G dedup, streaming epoch count, regression tests, doc fixes Continuations cleanup: docs, comments, and regression tests Jun 25, 2026
@MauroToscano MauroToscano merged commit 1d08374 into continuations-local-to-global Jun 25, 2026
9 checks passed
@MauroToscano MauroToscano deleted the continuations-cleanup branch June 25, 2026 20:31
@github-actions

Copy link
Copy Markdown

Benchmark Results for unmodified programs 🚀

Command Mean [ms] Min [ms] Max [ms] Relative
base binary_search 60.6 ± 2.6 58.5 67.8 1.03 ± 0.05
head binary_search 59.0 ± 0.6 58.3 60.4 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base bitwise_ops 59.9 ± 1.5 58.4 61.4 1.03 ± 0.03
head bitwise_ops 58.4 ± 0.9 57.9 61.0 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base ecsm 3.3 ± 0.1 3.1 3.5 1.00
head ecsm 3.4 ± 0.2 3.2 3.7 1.03 ± 0.06
Command Mean [ms] Min [ms] Max [ms] Relative
base fibonacci_26 63.9 ± 1.4 63.0 67.0 1.00 ± 0.03
head fibonacci_26 63.6 ± 0.8 62.7 64.8 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base hashmap 131.8 ± 4.0 125.7 137.7 1.00
head hashmap 134.5 ± 2.8 130.4 140.1 1.02 ± 0.04
Command Mean [ms] Min [ms] Max [ms] Relative
base keccak 126.5 ± 2.6 121.0 128.9 1.00
head keccak 128.7 ± 2.5 125.5 134.9 1.02 ± 0.03
Command Mean [ms] Min [ms] Max [ms] Relative
base matrix_multiply 66.2 ± 1.5 63.5 68.3 1.00 ± 0.03
head matrix_multiply 65.9 ± 1.4 64.0 67.9 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base modular_exp 59.2 ± 0.5 58.4 60.2 1.00
head modular_exp 59.6 ± 0.7 58.5 60.6 1.01 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
base quicksort 63.4 ± 0.5 62.6 63.9 1.00
head quicksort 63.6 ± 0.6 62.6 64.8 1.00 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
base sieve 64.8 ± 0.5 64.4 65.7 1.00
head sieve 65.4 ± 0.6 64.5 66.3 1.01 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
base sum_array 75.3 ± 3.3 73.3 84.1 1.00
head sum_array 79.2 ± 14.8 73.5 121.3 1.05 ± 0.20
Command Mean [ms] Min [ms] Max [ms] Relative
base syscall_commit 91.5 ± 0.8 90.6 92.7 1.00 ± 0.01
head syscall_commit 91.2 ± 0.7 90.5 92.4 1.00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant