Skip to content
Open
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
a65d19f
feat: add clock module for slot/epoch timing (Zig 0.16)
GrapeBaBa May 8, 2026
8152b31
feat(clock): migrate Config from seconds_per_slot to slot_duration_ms
GrapeBaBa May 8, 2026
da65ee2
fix(clock): address codex review on gr/clock-replant
GrapeBaBa May 8, 2026
b2806e4
feat(clock): fork-aware slot duration schedule
GrapeBaBa May 8, 2026
3c9959a
refactor(clock): swap schedule slice for TS-style 2-field fork config
GrapeBaBa May 8, 2026
eb98c28
refactor(clock): slot duration with optional `duration_transitions` s…
GrapeBaBa May 8, 2026
7a1be9f
refactor(clock): inline duration_transitions as a fixed-size array
GrapeBaBa May 8, 2026
cba0b3a
fix(clock): use std.Io.concurrent for waitForSlot, address codex P1
GrapeBaBa May 8, 2026
90b9bea
fix(clock): close two remaining codex P2 findings
GrapeBaBa May 8, 2026
08ea084
test(clock): wire time_source tests into test:clock
GrapeBaBa May 8, 2026
07565e0
fix(clock): invoke listener callbacks outside mutex
GrapeBaBa May 9, 2026
6a49f5f
fix(clock): reserve snapshot capacity before iter.next, fail-fast on OOM
GrapeBaBa May 9, 2026
7adc8ab
refactor(clock): panic on snapshot OOM, narrow error set back to Canc…
GrapeBaBa May 9, 2026
c874d73
refactor(clock): surface snapshot OOM as error.OutOfMemory
GrapeBaBa May 9, 2026
d39a73d
fix(clock): address codex P1-P4 (waiter ordering, catch-up timing, ta…
GrapeBaBa May 9, 2026
ccad20d
fix(clock): close codex round-2 P2 findings (cancel race, suspend-awa…
GrapeBaBa May 9, 2026
b3da05b
fix(clock): close codex round-3 P2 findings (in-flight fast-path + sl…
GrapeBaBa May 9, 2026
cf96065
refactor(clock): drop mutex / dispatching / snapshot dance for single…
GrapeBaBa May 9, 2026
02ca002
fix(clock): adopt Evented-only model; close codex round-4 P2 findings
GrapeBaBa May 9, 2026
7f7ed18
refactor(clock): restore PR #301 EventClock structure
GrapeBaBa May 9, 2026
d713863
docs(clock): clarify callback re-entry rules (off* safe, on* not)
GrapeBaBa May 9, 2026
400364d
docs(clock): drop TS-mirror references from comments
GrapeBaBa May 9, 2026
2383d45
ci(clock): switch test IO to Threaded; wire test:clock into CI
GrapeBaBa May 9, 2026
ad04e5f
test(clock): use std.testing.io instead of a custom TestIo
GrapeBaBa May 9, 2026
de9cbf4
ci(clock): skip clock tests on macOS
GrapeBaBa May 9, 2026
7ee67d2
ci(clock): per-test diagnostic on macOS to find hang
GrapeBaBa May 9, 2026
12ee8af
ci(clock): fix filter option name for diagnostic step
GrapeBaBa May 9, 2026
100fe46
fix(clock): use std.Io.concurrent for start + waitForSlot spawns
GrapeBaBa May 9, 2026
72fe0bd
docs(clock): trim redundant comments
GrapeBaBa May 9, 2026
c1a6d65
fix(clock): drop redundant destroy on concurrent-spawn failure
GrapeBaBa May 9, 2026
a3207f4
feat(clock): switch tests to zio runtime; add property + gap tests
GrapeBaBa May 12, 2026
620f4c0
docs(clock): drop section dividers and outdated GCD-futex references
GrapeBaBa May 12, 2026
c3b9a25
refactor(clock): align Slot/Epoch with consensus_types; drop Unix ali…
GrapeBaBa May 13, 2026
2330514
refactor(clock): replace empty-body while with for-else in transitions()
GrapeBaBa May 13, 2026
1233cb2
refactor(clock): forward-scan slotDurationMsAt with early break
GrapeBaBa May 13, 2026
ffa7df7
refactor(clock): replace dead defensive checks with asserts; tighten …
GrapeBaBa May 13, 2026
f3be750
refactor(clock): single nowMs snapshot in gossip-disparity helpers
GrapeBaBa May 13, 2026
b132167
style(clock): separate defer/errdefer resource blocks with blank lines
GrapeBaBa May 13, 2026
1ead736
refactor(clock): introduce BoundedArray helper; harden clock buffer caps
GrapeBaBa May 13, 2026
d40ec6f
style(clock): reorder struct members to fields-first
GrapeBaBa May 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ jobs:
- name: Run fork-choice tests
run: |
zig build test:fork_choice
- name: Run clock tests
run: |
zig build test:clock

- name: Build benchmarks
run: |
Expand Down
4 changes: 4 additions & 0 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@
.time = .{
.root_source_file = "src/time.zig",
},
.clock = .{
.root_source_file = "src/clock/root.zig",
},
.hashing = .{
.root_source_file = "src/hashing/root.zig",
.imports = .{ .build_options, .hex, .hashtree },
Expand Down Expand Up @@ -352,6 +355,7 @@
.state_transition = .{ .root_module = .state_transition },
.era = .{ .root_module = .era },
.fork_choice = .{ .root_module = .fork_choice },
.clock = .{ .root_module = .clock },

.int = .{
.root_module = .{
Expand Down
Loading
Loading