Skip to content

Fulu misc helpers property test#10337

Open
zilm13 wants to merge 8 commits intoConsensys:masterfrom
zilm13:fulu-misc-helpers-property-test
Open

Fulu misc helpers property test#10337
zilm13 wants to merge 8 commits intoConsensys:masterfrom
zilm13:fulu-misc-helpers-property-test

Conversation

@zilm13
Copy link
Contributor

@zilm13 zilm13 commented Feb 6, 2026

PR Description

Based on #10335 and requires it to be merged first
Property tests with 10 tries instead of 100 are heavy on memory consumption, so I decrease a number of runs rapidly. Not sure it's a right way to go.
UPDATE: removed all tests which usually cause java heap OOM

Fixed Issue(s)

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

Note

Medium Risk
Mostly test-only additions, but it changes CKZG4844 exception handling around native JNI calls, which could affect runtime error reporting/behavior in KZG operations.

Overview
Adds new jqwik property tests for Fulu Cell, DataColumn, and DataColumnSidecar to validate JSON/SSZ round-trips and ensure deserialization of mutated inputs fails as expected.

Introduces additional Fulu fuzz/property tests for CKZG4844 and MiscHelpersFulu that exercise cell computation, batch verification/recovery, and data-column sidecar verification paths while asserting failures surface as KZGException/IllegalArgumentException.

Supports the new generators by adding multiple test-fixture Supplier classes and extending DataStructureUtil with convenience randomCell()/randomDataColumn() helpers; also exposes KzgResolver publicly and hardens CKZG4844 JNI wrappers to consistently convert native exceptions into clearer KZGExceptions for computeCellsAndProofs, verifyCellProofBatch, and recoverCellsAndProofs.

Written by Cursor Bugbot for commit ebe93f0. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

} catch (final Exception ex) {
throw new KZGException(
"Failed to compute KZG cells and proofs for blob " + blob.toShortHexString(), ex);
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent try-catch scope in computeCellsAndProofs post-processing

Low Severity

In computeCellsAndProofs, the KZGCell.splitBytes and KZGProof.splitBytes calls (line 176-177) are outside the try-catch, while in both computeCells (line 161, inside try-catch) and recoverCellsAndProofs (lines 224-225, inside try-catch) the equivalent post-processing is wrapped. This inconsistency means any exception from splitBytes in computeCellsAndProofs would propagate unwrapped rather than as a KZGException, breaking the contract expected by the fuzzBlobToCellsAndProofs property test.

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

post-processing doesn't depends on user data, so it shouldn't be a big issue

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