Skip to content

server-zd: tighten the sourced history page comparison in the time travel simulation - #1364

Merged
longquanzheng merged 1 commit into
mainfrom
history-offload/b4-sim-errors
Nov 7, 2026
Merged

longquanzheng merged 1 commit into
mainfrom
history-offload/b4-sim-errors

Conversation

@longquanzheng

Copy link
Copy Markdown
Contributor

Summary

  • The sourced history page comparison in time_travel_targets.rs now accepts an error only when both the local and the sourced read return HistoryEventTooLarge under a finite byte limit.
  • Each checked run reads its first event under a limit one byte below that event's single-event response. The read must be rejected with the same event ID, size, and limit, both locally and through the history source.
  • The coverage now requires at least one compared rejection.

Why

The re-review of #1348 found that compare_pages accepted any matching errors, including errors on unlimited reads that must succeed. compared_history_page_errors was also never required to be positive. Refs #1325.

Testing

  • cargo test -p dexzd-simulation --test time_travel_targets: pass (5092 compared rejections, 93,777 pages compared, 19 pages ended by the byte limit).
  • cargo fmt --all --check and cargo clippy -p dexzd-simulation --all-targets -- -D warnings: pass.

The sourced page comparison accepted any pair of matching errors, even for
reads without a byte limit, and never required an error to be compared.
It now accepts only HistoryEventTooLarge under a finite limit. Each checked
run also reads its first event under a limit one byte below that event's
response, which must reject it the same way locally and through the
history source, and the coverage requires such rejections.
@codecov

codecov Bot commented Nov 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@longquanzheng
longquanzheng merged commit 4f36d96 into main Nov 7, 2026
45 of 47 checks passed
@longquanzheng
longquanzheng deleted the history-offload/b4-sim-errors branch November 7, 2026 06:52
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