Skip to content

chore: Increase VirtualLeafBytes parse max size#24951

Open
derektriley wants to merge 5 commits intomainfrom
24934-virtual-leaf-bytes-parse-limit
Open

chore: Increase VirtualLeafBytes parse max size#24951
derektriley wants to merge 5 commits intomainfrom
24934-virtual-leaf-bytes-parse-limit

Conversation

@derektriley
Copy link
Copy Markdown
Contributor

Description:
VirtualLeafBytes was updated to parse values with an explicit max-size limit because the default PBJ parse limit (2 MB) is too small for large HistoryProof payloads that can include uncompressed_wraps_proof (~31 MB at genesis). This caused deserialization to fail during state reads and triggered TSS reconciliation errors. Setting a bounded 36 MB limit keeps parsing safe while allowing valid large WRAPS proofs to be read from state.

Related issue(s):

Fixes #24934

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Signed-off-by: Derek Riley <derek.riley@swirldslabs.com>
@derektriley derektriley added this to the v0.74 milestone Apr 13, 2026
@derektriley derektriley self-assigned this Apr 13, 2026
@derektriley derektriley requested a review from a team as a code owner April 13, 2026 20:59
@trunk-io
Copy link
Copy Markdown

trunk-io Bot commented Apr 13, 2026

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@lfdt-bot
Copy link
Copy Markdown

lfdt-bot commented Apr 13, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Apr 13, 2026

Not up to standards ⛔

🔴 Issues 1 high · 2 minor

Alerts:
⚠ 3 issues (≤ 0 issues of at least minor severity)

Results:
3 new issues

Category Results
Documentation 2 minor
ErrorProne 1 high

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0

View in Codacy

🟢 Coverage 100.00% diff coverage · +0.02% coverage variation

Metric Results
Coverage variation +0.02% coverage variation (-1.00%)
Diff coverage 100.00% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (5277776) 99532 78342 78.71%
Head commit (77ad317) 99537 (+5) 78362 (+20) 78.73% (+0.02%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#24951) 8 8 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

TIP This summary will be updated as you push new changes. Give us feedback

Copy link
Copy Markdown
Contributor

@anthony-swirldslabs anthony-swirldslabs left a comment

Choose a reason for hiding this comment

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

The code looks good to me as far as a call to PBJ is concerned.

However, it'd be nice if @imalygin and/or @artemananiev could take a look as well because they're experts in the VirtualMap implementation.

imalygin
imalygin previously approved these changes Apr 13, 2026
@imalygin imalygin dismissed their stale review April 13, 2026 21:18

added a comment

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@             Coverage Diff              @@
##               main   #24951      +/-   ##
============================================
+ Coverage     74.88%   74.90%   +0.01%     
- Complexity    11777    11780       +3     
============================================
  Files          2577     2577              
  Lines         99629    99634       +5     
  Branches      10959    10958       -1     
============================================
+ Hits          74612    74631      +19     
+ Misses        21237    21222      -15     
- Partials       3780     3781       +1     
Files with missing lines Coverage Δ Complexity Δ
.../com/swirlds/state/merkle/VirtualMapStateImpl.java 88.10% <100.00%> (+0.05%) 0.00 <0.00> (ø)
...c/main/java/com/swirlds/virtualmap/VirtualMap.java 78.01% <100.00%> (+0.08%) 0.00 <0.00> (ø)
...om/swirlds/virtualmap/config/VirtualMapConfig.java 90.47% <ø> (ø) 0.00 <0.00> (ø)
...wirlds/virtualmap/datasource/VirtualLeafBytes.java 83.06% <100.00%> (+0.13%) 0.00 <0.00> (ø)

... and 15 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Derek Riley <derek.riley@swirldslabs.com>
Signed-off-by: Derek Riley <derek.riley@swirldslabs.com>
Copy link
Copy Markdown
Contributor

@anthony-swirldslabs anthony-swirldslabs left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you!

Signed-off-by: Derek Riley <derek.riley@swirldslabs.com>
@derektriley derektriley requested a review from a team as a code owner April 14, 2026 11:47
Signed-off-by: Derek Riley <derek.riley@swirldslabs.com>
@github-actions
Copy link
Copy Markdown

Flaky Test(s) Detected

One or more flaky tests were detected in this run. These tests have been reported before.

Test Ticket
com.hedera.services.bdd.suites.validation.StreamValidationTest#streamsAreValid #24709

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.

CATASTROPHIC "Failed to deserialize a value from bytes" ReadableHistoryStoreImpl.java:79

5 participants