pub struct PreflightRequest {
    pub app_entry_hash: HoloHash<Entry>,
    pub signing_agents: Vec<(HoloHash<Agent>, Vec<Role, Global>), Global>,
    pub optional_signing_agents: Vec<(HoloHash<Agent>, Vec<Role, Global>), Global>,
    pub minimum_optional_signing_agents: u8,
    pub enzymatic: bool,
    pub session_times: CounterSigningSessionTimes,
    pub action_base: ActionBase,
    pub preflight_bytes: PreflightBytes,
}
Expand description

The same PreflightRequest is sent to every agent. Each agent signs this data as part of their PreflightResponse. Every preflight must be identical and signed by every agent for a session to be valid.

Fields

app_entry_hash: HoloHash<Entry>

The hash of the app entry, as if it were not countersigned. The final entry hash will include the countersigning session.

signing_agents: Vec<(HoloHash<Agent>, Vec<Role, Global>), Global>

The agents that are participating in this countersignature session.

optional_signing_agents: Vec<(HoloHash<Agent>, Vec<Role, Global>), Global>

The optional additional M of N signers. If there are additional signers then M MUST be the majority of N. If there are additional signers then the enzyme MUST be used and is the first signer in BOTH signing_agents and optional_signing_agents.

minimum_optional_signing_agents: u8

The M in the M of N signers. M MUST be strictly greater than than N / 2 and NOT larger than N.

enzymatic: bool

The first signing agent (index 0) is acting as an enzyme. If true AND optional_signing_agents are set then the first agent MUST be the same in both signing_agents and optional_signing_agents.

session_times: CounterSigningSessionTimes

The session times. Session actions must all have the same timestamp, which is the session offset.

action_base: ActionBase

The action information that is shared by all agents. Contents depend on the action type, create, update, etc.

preflight_bytes: PreflightBytes

The preflight bytes for session.

Implementations

Fallible constructor.

Combined integrity checks.

Verify there are no duplicate agents to sign.

Verify the number of signing agents is within the correct range.

Verify the optional signing agents.

Verify the preflight request agents.

Verify everything about the enzyme.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

The archived version of the pointer metadata for this type.

Converts some archived metadata to the pointer metadata for itself.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Deserializes using the given deserializer

Compare self to key and return true if they are equal.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type for metadata in pointers and references to Self.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more