Skip to content

fix: Jenkins lookup3 checksum for h5dump/h5py compatibility (Issue #17)#18

Merged
kolkov merged 2 commits intomainfrom
fix/issue-17-jenkins-checksum
Feb 2, 2026
Merged

fix: Jenkins lookup3 checksum for h5dump/h5py compatibility (Issue #17)#18
kolkov merged 2 commits intomainfrom
fix/issue-17-jenkins-checksum

Conversation

@kolkov
Copy link
Contributor

@kolkov kolkov commented Feb 2, 2026

Summary

  • CRITICAL FIX: Replace CRC32 IEEE with Jenkins lookup3 hash for all metadata checksums
  • Files created with Superblock V2/V3 now compatible with h5dump, h5py, and HDF5 C library
  • Add JenkinsChecksum() function - direct port of H5_checksum_lookup3() from HDF5 C library
  • Validated against known HDF5 files (aggr.h5 checksum: 0xD5CB91E3)

Test plan

  • All unit tests pass (100%)
  • Lint: 0 issues (34+ linters)
  • Integration test validates against aggr.h5 reference file
  • Checksum test vectors match expected values

Closes #17


Generated with Claude Code

HDF5 requires Jenkins lookup3 hash for all metadata checksums,
but we incorrectly used CRC32 IEEE. This caused V2/V3 superblock
files to be rejected by h5dump, h5py, and the HDF5 C library.

Changes:
- Add JenkinsChecksum() in internal/core/checksum.go
- Replace crc32.ChecksumIEEE with JenkinsChecksum in:
  - superblock.go (V2/V3 superblock checksum)
  - btreev2_write.go (B-tree v2 header/leaf checksums)
  - fractalheap_write.go (fractal heap header checksum)
  - fractalheap_indirect.go (indirect block checksum)

Validated against aggr.h5 (checksum: 0xD5CB91E3)

Closes #17
@codecov
Copy link

codecov bot commented Feb 2, 2026

Codecov Report

❌ Patch coverage is 88.88889% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/core/checksum.go 89.02% 9 Missing ⚠️
internal/structures/fractalheap_indirect.go 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@kolkov kolkov merged commit 01a277d into main Feb 2, 2026
11 checks passed
@kolkov kolkov deleted the fix/issue-17-jenkins-checksum branch February 2, 2026 11:42
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.

HDF5 uses Jenkins lookup3 hash

1 participant