Skip to content

Commit ddbf084

Browse files
GrapeBaBamarkolazic01
authored andcommitted
fix(state-transition): repair Pool.init call broken by ChainSafe#346×ChainSafe#367 merge skew (ChainSafe#394)
## Problem `main` CI is red: the `build & test` job fails to **compile** `test:state_transition`: \`\`\` src/state_transition/sync_committees_witness.zig:148:33: error: expected 1 argument(s), found 2 pub fn init(opts: InitOptions) Error!Pool { \`\`\` ## Root cause — a semantic merge conflict (merge skew) - **ChainSafe#346** (chunked-leaf) changed `Node.Pool.init(allocator, pool_size)` → `Node.Pool.init(opts: InitOptions)` (2 positional args → 1 options struct). - **ChainSafe#367** (`getSyncCommitteesWitness`) landed `sync_committees_witness.zig` in parallel, still calling the **old 2-arg** form: `Node.Pool.init(allocator, 500_000)`. Both PR branches were green because neither tree contained the *combination*: ChainSafe#346's branch didn't have `sync_committees_witness.zig` (it predates ChainSafe#367 and was never updated to the latest `main`), and ChainSafe#367's base still had the old `Pool.init`. Merging ChainSafe#346 into a `main` that already had ChainSafe#367 produced code git merged cleanly (different files, no textual conflict) but which no longer compiles. ## Fix One line — update the stale call site to the new `InitOptions` form (matching every other PMT test in the repo, both fields pinned to the testing allocator for leak tracking). `git grep` confirms this is the only remaining old-style call site. ## Verification `zig build test:state_transition` → **96/96 tests passed** (was: compile error). ## Prevention Consider enabling **"Require branches to be up to date before merging"** or a **GitHub merge queue** so PR CI runs against the real post-merge tree and catches this class of logical conflict that git can't see.
1 parent 8462c8f commit ddbf084

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/state_transition/sync_committees_witness.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ const ProofFixture = struct {
145145

146146
fn init(fork: ForkSeq) !ProofFixture {
147147
const allocator = std.testing.allocator;
148-
var pool = try Node.Pool.init(allocator, 500_000);
148+
var pool = try Node.Pool.init(.{ .page_allocator = allocator, .allocator = allocator, .pool_size = 500_000 });
149149
errdefer pool.deinit();
150150

151151
var state = switch (fork) {

0 commit comments

Comments
 (0)