Skip to main content

Module service

Module service 

Source
Expand description

The node’s pointer request handler.

Sits between the wire messages in ant_protocol::chunk and the PointerStore, and owns the three things a pointer PUT needs that a chunk PUT does not:

  1. Payment at state_id, not at the address. A pointer’s address is stable for its life, so quoting against it would make every update after the first free — 1.0’s defect. The quote’s content is the state identifier; the close group that answers is still the one around the address.
  2. Merge instead of “already exists”. The chunk path answers AlreadyExists and stops, which for a mutable record silently drops every update.
  3. Cross-kind collision refusal. A pointer address and a chunk address are both 32 bytes from the same range; the domain separator makes a collision infeasible, not impossible. A node that holds one kind at an address refuses the other rather than silently choosing.

§Order of work

parse → compare with what is held → verify signature → check payment → commit

The comparison precedes the signature check, so re-submitting a state the node already holds costs a parse and a map lookup rather than an ML-DSA verification. The payment check sits between validation and commit, and the commit re-checks, because a newer state can land while payment is verified.

Structs§

PointerService
Handles pointer requests against a PointerStore.