-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Record file hash mismatch #159
Conversation
src/main/java/com/hedera/databaseUtilities/ApplicationStatus.java
Outdated
Show resolved
Hide resolved
src/main/resources/db/migration/V1.10.1__freeze_transaction.sql
Outdated
Show resolved
Hide resolved
src/main/java/com/hedera/recordFileLogger/RecordFileLogger.java
Outdated
Show resolved
Hide resolved
b1e52bb
to
f390fef
Compare
…type not known Signed-off-by: Greg Scullard <gregscullard@hedera.com>
…sed by mirror node) Signed-off-by: Greg Scullard <gregscullard@hedera.com>
…efore being moved to /valid Signed-off-by: Greg Scullard <gregscullard@hedera.com>
Signed-off-by: Greg Scullard <gregscullard@hedera.com>
Signed-off-by: Greg Scullard <gregscullard@hedera.com>
Signed-off-by: Greg Scullard <gregscullard@hedera.com>
Signed-off-by: Greg Scullard <gregscullard@hedera.com>
Signed-off-by: Greg Scullard <gregscullard@hedera.com>
Signed-off-by: Greg Scullard <gregscullard@hedera.com>
Signed-off-by: Greg Scullard <gregscullard@hedera.com>
Signed-off-by: Greg Scullard <gregscullard@hedera.com>
Signed-off-by: Greg Scullard <gregscullard@hedera.com>
Signed-off-by: Greg Scullard <gregscullard@hedera.com>
f390fef
to
bf1b343
Compare
Signed-off-by: Greg Scullard <gregscullard@hedera.com>
…type not known Ensures downloaded files are validated for previous hash continuity before being moved to /valid modify the way to calculate RecordStream File Hash; Add a test; #157 Use the newer file hash calculator for recordStream files PR Comments Signed-off-by: Mike Burrage <mike.burrage@hedera.com>
d92dfce
to
7dad85d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found a bug plus some logging enhancements
…mirrornode into 157-file-hash-mismatch
My PR #170 added record download tests, but the test records are probably the old format. Hopefully the tests still pass and we can add some v2 test data in a later PR. |
Signed-off-by: Greg Scullard <gregscullard@hedera.com>
Other than still needing to calculate the event hash with the correct method this LGTM |
Signed-off-by: Greg Scullard <gregscullard@hedera.com>
Signed-off-by: Greg Scullard <gregscullard@hedera.com>
Done, also removed now obsolete |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also remove the src/test/resources/*.rcd and sig files that were added and not used.
@@ -62,8 +62,9 @@ | |||
|
|||
private static final Long SCALAR = 1_000_000_000L; | |||
|
|||
// private static final byte TYPE_PREV_HASH = 1; // next 48 bytes are hash384 of previous files | |||
// private static final byte TYPE_RECORD = 2; // next data type is transaction and its record | |||
static final int RECORD_FORMAT_VERSION = 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove these added static variables as they're not used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Signed-off-by: Greg Scullard <gregscullard@hedera.com>
Signed-off-by: Greg Scullard <gregscullard@hedera.com>
|
Signed-off-by: Greg Scullard <gregscullard@hedera.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Detailed description:
This fixes a number of issues related to record file hash mismatches
-When downloading and parsing files in parallel, the two processes would overlap on files in /valid and a parsed file would move from /valid to /processed resulting in a gap during hash sequence validation in the downloader
Which issue(s) this PR fixes:
Fixes #157
Checklist