Skip to content

fix: correct genesis parent_hash from vec![0,32] to vec![0;32] - #1019

Open
Sertug17 wants to merge 1 commit into
farcasterxyz:mainfrom
Sertug17:fix/genesis-parent-hash
Open

fix: correct genesis parent_hash from vec![0,32] to vec![0;32]#1019
Sertug17 wants to merge 1 commit into
farcasterxyz:mainfrom
Sertug17:fix/genesis-parent-hash

Conversation

@Sertug17

Copy link
Copy Markdown

Summary

Fixes issue #1017.

Problem

In src/consensus/proposer.rs:173, the genesis parent_hash uses a comma instead of a semicolon:

// BEFORE
None => vec![0, 32],  // 2-byte array: [0x00, 0x20]

Rust syntax:

  • vec![0, 32]2-element array [0x00, 0x20]
  • vec![0; 32]32-element array of zeros

The genesis parent_hash must be 32 zero bytes to match the hash length used throughout the codebase. This typo corrupts the genesis shard chunk hash chain from block 0 onward.

Fix

// AFTER
None => vec![0; 32],  // 32 zero bytes

Files Changed

  • src/consensus/proposer.rsShardProposer::create_new_shard_chunk

Closes #1017

vec![0, 32] produces a 2-byte array [0x00, 0x20] due to Rust comma syntax.
The genesis parent_hash must be 32 zero bytes to match the expected hash
length throughout the codebase. This typo corrupts the genesis shard chunk
hash chain from block 0 onward.

Closes farcasterxyz#1017
@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

@claude is attempting to deploy a commit to the Internal - Neynar Team on Vercel.

A member of the Team first needs to authorize it.

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.

bug: genesis shard chunk parent_hash is 2 bytes instead of 32 zeros

2 participants