Search documentation of macula

# macula_resolve_quorum (macula v4.4.9)

View Source

Eclipse-mitigation wrapper for `macula_resolve_address`.

Phase 4.4 — see PLAN_MACULA_NET_PHASE4_4_RESOLVE_QUORUM.md.

Wraps a list of `find_fn` callbacks (each backed by a different DHT endpoint) into a single `find_fn` that fans out in parallel, requires M of N to return byte-equal records, and reports disagreement as `{error, eclipse_suspected}`.

Signature-based comparison: two records "agree" iff their Ed25519 signatures are byte-equal — the strongest possible check short of full payload equality, and equivalent in practice because the signing operation is deterministic over the canonical CBOR encoding of the payload.

# Summary

## Types

find_fn/0
opts/0

## Functions

wrap(FindFns, Opts)

Returns a `find_fn` that queries every Fn in `FindFns` (in parallel by default) and applies a quorum check.

# Types

# find_fn/0

    -type find_fn() :: macula_resolve_address:find_fn().

# opts/0

    -type opts() :: #{threshold => pos_integer(), timeout_ms => pos_integer(), parallel => boolean()}.

# Functions

# wrap(FindFns, Opts)

    -spec wrap([find_fn()], opts()) -> find_fn().

Returns a `find_fn` that queries every Fn in `FindFns` (in parallel by default) and applies a quorum check.