Skip to content

Use correct hapi proto version for current wrapped record block #24591

@mhess-swl

Description

@mhess-swl

Background

When BlockRecordManagerImpl calculates the corresponding wrapped record block hash of a record file that just closed, it must pass the configured version of the app as part of the input. Currently this code passes the version it retrieves from the live configProvider--while most of the time this is correct, there are situations where the config version has been updated since the start of the current record file. In these cases, because the wrapped record block hash is calculated at the end of the block, it's possible to pass in the new/modified version to the hash calculation, instead of the previous version that gets written to the record file itself. This can lead to a hash mismatch when reconciling the record stream with the current wrapped record block hash calculated by the node.

See failed github runs here and here.

Acceptance Criteria

  1. Create a test to demonstrate the bug
  2. Fix the bug

Dependencies

None

Definition of Ready (DoR) Checklist

  • Clear acceptance criteria
  • Clear and detailed description
  • Dependencies identified
  • Links to documentation
  • Should be completable in 2-3 Days
  • Initial draft of Low-level design document
  • At least high level test plan
  • Groomed/Estimated

Definition of Done (DoD) Checklist

  • Acceptance Criteria complete
  • No Codacy issues greater than minor (in new code)
  • JavaDocs updated/created
  • Code commented
  • Unit tests created/updated
  • 80% test code coverage (in new code)
  • Happy Path and major negative cases in HAPI tests as applicable

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions