Documentation
¶
Overview ¶
Package edgeverify implements redundant edge-output verification against a single TRUSTED anchor (pure Go, deterministic).
Model: a work unit is executed REDUNDANTLY on several edge devices. One device is the TRUSTED reference (or its result is taken as the trusted baseline). A Verifier computes a content checksum (SHA-256) of each device's result payload and compares every peer's checksum against the trusted checksum. A MATCH is accepted; a MISMATCH is detected and the offending device's result is REJECTED/FLAGGED. The Report names exactly which devices disagreed with the trusted anchor.
This is DISTINCT from package redundantexec, which is a BOINC-style quorum trust-scorer (majority agreement among peers, reputation deltas). edgeverify has NO quorum and NO trust score: correctness is defined purely by byte-exact agreement with the one trusted reference, using a content checksum (so a single differing byte is detected — not a length-only comparison).
The package is pure Go, deterministic, and self-contained: it performs no network/host I/O and consults no clock. The same inputs always produce the same Report.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PeerVerdict ¶
type PeerVerdict struct {
DeviceID string
// Checksum is the hex SHA-256 of this peer's payload.
Checksum string
// TrustedChecksum is the hex SHA-256 of the trusted anchor's payload
// (repeated here so a verdict is self-describing).
TrustedChecksum string
// OK is true iff Checksum == TrustedChecksum (peer agreed with the anchor).
OK bool
}
PeerVerdict records the verification outcome for a single peer device against the trusted anchor.
type Report ¶
type Report struct {
TrustedDevice string
TrustedChecksum string
Peers []PeerVerdict
Mismatched []string
Accepted bool
}
Report is the overall verification outcome for a work unit. TrustedDevice and TrustedChecksum identify the anchor. Peers holds one verdict per peer (in the order peers were supplied). Mismatched lists, sorted, the IDs of every peer that DISAGREED with the anchor. Accepted is true iff every peer matched.
func Verify ¶
Verify checks each peer result against the trusted reference by comparing content checksums. A peer whose checksum matches the trusted checksum is marked OK; a peer whose checksum differs is flagged as a MISMATCH and its device ID is added to Report.Mismatched. The overall verdict is Accepted iff no peer mismatched.
The trusted result itself is the anchor and is NOT included in Peers; if it happens to also appear in peers it is verified like any other peer (and will match itself).