Documentation
¶
Overview ¶
Package voting is the TRC voting application: the resident application a founding core hosts for the cores of its ISD to submit TRC updates on. A core that enrolled as a normal node submits the successor it assembled and signed — its proofs of possession, and its own vote when it rolls by regular update — and the application hands the submission to the control plane's decision, which pins what verifies as submitted and casts the founder's sensitive vote itself where the update needs it: the application decides nothing, and the control plane serves no submission of its own. Nothing else depends on the application — the network serves the drafts' control plane, enrollment, and paths with or without it — and a joining core whose founder hosts none stops itself rather than wait, for no voting power can be obtained that way.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is the voting application: its submission service mounted on the control endpoint, every submission identified by the verified chain of the channel it arrived on and handed to the control plane's decision.
func New ¶
New mounts the application's submission service on the control endpoint: the service registered on a connect server, which connecthttp.Mount spreads over a private mux mounted at the service name's canonical pattern.
type Config ¶
type Config struct {
// IA is the node's ISD-AS.
IA addr.IA
// Decide is the control plane's decision the submissions are handed
// to: the founding core's, the one role the application loads on.
Decide Decider
// MountControlEndpoint mounts one of the application's handlers on the
// node's control endpoint, behind the peer-identity middleware.
MountControlEndpoint func(pattern string, handler http.Handler)
}
Config configures the voting application.
type Decider ¶
type Decider interface {
DecideTRC(ctx context.Context, presenter addr.IA, source netip.AddrPort,
trc cppki.SignedTRC) (cppki.SignedTRC, error)
}
Decider is the decision the submissions are handed to: the control plane's own update of the pinned TRC — the founder asking its gates, pinning what verifies as submitted, and casting its sensitive vote on its admission policy's allow — answered with the TRC it pinned. The presenter is the ISD-AS the application's channel verified, never a claim, and the source is the address the submission arrived from.
type Submitter ¶
type Submitter struct {
// contains filtered or unexported fields
}
Submitter sends TRC update submissions to the core's voting application over the node's verified peer channel — the node's chain presented, the core's verified against the pinned TRC — so the submission arrives identified by the chain the decision gates on and names to its admission policy.
func NewSubmitter ¶
NewSubmitter builds the submitter over the verified peer channel.
func (*Submitter) SubmitTRC ¶
SubmitTRC hands the signed successor to the core's voting application and answers with the TRC its control plane pinned. A submission nothing answers — the endpoint replies that no such application is mounted — is the core hosting no voting application, the terminal condition the caller stops the node on.