rusk icon indicating copy to clipboard operation
rusk copied to clipboard

node-data: Remove ConsensusHeader field from non-consensus messages

Open goshawk-3 opened this issue 9 months ago • 2 comments

Describe the bug ConsensusHeader field is a metadata included in any message on the wire. However, it makes sense only in the context of consensus. This is a well-known tech debt left from the migration golang->rust.

Example print of GetResource msg:

{
  "timestamp": "2024-05-16T10:40:37.165888Z",
  "level": "INFO",
  "event": "handle_request",
  "msg": "Message { topic: GetResource, header: ConsensusHeader { prev_block_hash: \"0000000000000000...0000000000000000\", round: 0, iteration: 0 }, payload: GetResource(GetResource { inventory: Inv { inv_list: [InvVect { inv_type: BlockFromHash, param: Hash: 72af53638efce71b...111843103f0e5098 }, InvVect { inv_type: CandidateFromHash, param: Hash: 72af53638efce71b...111843103f0e5098 }], max_entries: 1 }, requester_addr: 127.0.0.1:7031, ttl_as_sec: 18446744073709551615, hops_limit: 100 }), metadata: Some(Metadata { height: 127, src_addr: 127.0.0.1:7031 }) }",
  "target": "node::databroker"
}

Additional context

It's recommended to be removed before any protocol release.

goshawk-3 avatar May 16 '24 10:05 goshawk-3