hiero-ledger / hiero-ledger/hiero-consensus-node

PreviousOrigin is not updated in PcesFileReader, short-circuiting one of the file validity checks

Open Beginner friendly
#26,752 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
406
Forks
226
Avg merge
3d 4h
Merged PRs (30d)
210

Description

PcesFileReader compares previousOrigin in `buildFileHandler` to the one in the file to ensure proper ordering, but it never updates the local variable, so it always compares it against -1.

It should be corrected, after checking if that invariant really holds and a test case should be created to make sure it catches origin failure

Contributor guide

Open the contributing guide

Research direction

Start in PcesFileReader.buildFileHandler and verify whether the previousOrigin ordering invariant holds across files. Add a regression test that exercises an invalid origin and confirms the validity check catches it; done means the local previousOrigin state is maintained and the test fails for the invalid ordering.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.