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.
  4. A look before a final state. A state at the final counter is replaced by nothing, so a node that takes one can never be corrected. Before taking one it neither holds nor lost, the node asks its close group whether a different final state is already held there, and refuses if a peer proves one with the signed record (ADR-0018). That is what keeps a former owner from handing an address over a second time to a node that had not heard of the first, whenever a peer can prove the first in time. A proven loser is remembered and refused again before its signature is checked.

§Order of work

parse → compare with what is held → (final state only) a proven loser?
      → verify signature → check payment
      → (final state only) ask the close group → 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.

Enums§

FinalityCheck
What a close group said about a final state a node is about to take.

Traits§

FinalStateWitness
Where a node looks, before it takes a final state, for a different final state its close group already holds (ADR-0018).