Skip to content

fix(module): preserve snapshot-tip timestamp across local history pages #27

Description

@3esmit

Problem

LEZCoreModule::get_local_public_block_history currently accepts an expected snapshot tip containing exactly block_id, block_hash, and previous_block_hash. The current source-history FFI receipt also contains a timestamp, and the source service requires the complete previous snapshot tip to match exactly.

A caller that passes the real snapshot_tip from page one into page two is rejected by the module before the FFI call because the JSON has the additional timestamp field. Accepting the field without forwarding it would still fail the source equality check because the zero-initialized timestamp is not the returned value.

Scope

  • Update the module parser and FFI test stub to represent the complete receipt.
  • Forward the timestamp unchanged through the module FFI boundary.
  • Extend mock capture coverage for timestamp forwarding.
  • Add a first-page-to-second-page continuation regression test using a real snapshot-tip JSON shape.

Acceptance criteria

  • A snapshot tip returned by the source-history API can be supplied unchanged as the next request's expected tip.
  • Invalid, incomplete, negative, and malformed receipt data remains rejected before the FFI boundary.
  • Unit and full module builds pass against the final integrated source revision.

Dependency order

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions