diff --git a/docs/route-continuity-cut.md b/docs/route-continuity-cut.md index bb551bf..5d30194 100644 --- a/docs/route-continuity-cut.md +++ b/docs/route-continuity-cut.md @@ -456,7 +456,59 @@ reverted (Idunn).** - F0 is not required. This cut could land before F0 if Self wants the drift closed first. +**B1 status, 2026-09-29 (Self).** Landed on `idunn/route-b1` (`87fa57d` revert of `a148802`, +`4427769`, `4a9fe87`); 177 tests pass. **Soul (Opus): do not close.** The rule held (one +rule, one resolution, exact activation, the Expected never withdrawn, foreign activations +refused, the revert exact). The transition failed: +- **High, CONFIRMED:** a continuity abort persisted under the old rule (`Skipped` although + an activation was issued) fails the new validation (`control_plane.rs:1031-1044`). + `ControlSnapshot::read` fails the whole store on one record, so a resident record stops + Idunn from booting, for every target. +- **Medium, CONFIRMED:** supervision's pre-restart demotion failure is only logged + (`:3557-3576`). A continuity failing between `prepare_activation` and + `publish_observed_activation` then wedges its abort on "substituted" every tick. Drift + left by a pre-B1 failed continuity wedges a later deploy abort the same way. +- Low: `docs/deployment-authority.md` says the projection "never drifts". + +**Self's ruling for the B1 fix batch, which runs on top of F0 because F0 owns the legacy lift:** +1. The legacy-transaction lift maps a pre-B1 continuity abort that issued an activation to + `Pending`. The new single resolution then demotes its own activation, which also cleans + the residue that record left behind. +2. Supervision owns the Expected-only precondition. It does not mint a continuity while its + pre-restart demotion fails; the failure is recorded, not merely logged. +3. A one-time boot reconciliation demotes a projected activation only when its issuing + transaction is a failed transaction in history (exact identity). It never adopts. +4. Engine-layer tests for both abort paths, using Soul's EngineFixture probe shape (candidate + cleanup already Complete, so no systemctl runs). cargo-mutants found 6 Engine-path mutants + missed. +5. Correct the doc's "never drifts". +Before any deploy, check the live host for resident continuity abort records. That is a read +of `control.cc`, and the operator's to authorise. + **B2 — Bounded, backed-off route and unit repair (Idunn).** + +*Widened 2026-09-29 by Self, from Soul's S1 pass.* S1 closed the healthy-target storm, and +Soul found two storm paths S1 does not claim. Both are B2's: +- **A failing reload deletes the fragment** (`restore_admitted_membership`, + `drivers.rs:5472-5478`). The next tick reads the file as missing, treats that as drift, and + restores again: one `systemd-run`, ufw, `nginx -t` and reload every 500 ms, unbounded. + This was probed over 4 ticks. A broken global nginx config does the same through the + private-mount unit. +- **`NginxRouteDriver::install` (`drivers.rs:5402`) runs ufw, `nginx -t` and reload + unconditionally.** The Routing phase re-runs it on every resume, and a post-fence proof + failure resumes forever (F17), so a candidate failing its proof reloads every tick. A + stateless candidate reloads twice (install, then rollback). The post-fence abort's + `withdraw_candidate_membership` then calls `restore`, which does the same. + +So B2's actuation ceiling covers **`install`, `restore` and `restore_admitted_membership`**, +not only supervision. B2 also adds the seam Soul specified: the route actuator program paths +and `preflight_root` on `RuntimeOptions`, defaulting to today's paths and used at every +`NginxRouteDriver::new` site, plus a routed `Stored` fixture beside +`EngineFixture`. Deleting `supervise_admitted_route`'s body currently survives every test +(cargo-mutants), and B2's reload-count timeline test needs the same seam. A failed proof +marks the route degraded (Q5 a). Today nothing is written and the next tick re-challenges +with no backoff. + - Challenges back off exponentially per target on consecutive failures, with a floor at max age and a cap. - Route actuations (write, reload, ufw) go through a per-target rolling @@ -521,6 +573,35 @@ reverted (Idunn).** - The lease pickup contract is unchanged. - Tests are in the package. Verify under the node image on Yggdrasil. +**C1 status, 2026-09-29 (Self).** Landed on CultLib `idunn-ts/route-c1` (`795fd10`). Soul closed +it on conditions, and a fix batch is in Hands: +- stateful, lease-bound Rust vectors; +- the signer owns health (`reportHealth`), starting at `warming`; +- the signer records every warming it signs, so a route-proof stateful target can take its lease; +- one signer per authority, a frozen authority, and a subpath export without the Odin publisher. +**Two consequences for later cuts:** +- **C2 covers the StreamPixels service too.** `apps/service/src/app.ts:155` answers route + challenges through `publishRouteObservation`, which C1 removed, so the gitlink bump breaks + the service unless C2 moves it to `answerRouteObservation` and `reportHealth`. +- **B3 surfaces the typed capacity shortfall** on the route path. Today it reads as a + generic "disagrees with current authority" (`control_plane.rs:5190`). + +**S3 + C2 code status, 2026-09-29 (Self).** Landed on StreamPixels `route/s3-c2` (`8e6d891`), +after Soul and a fix batch: +- `vendor/CultLib` is at `30ee8b9`, and the web has no Odin dependency or env. +- Both apps answer through the signer, with one health owner, `driveRuntimeHealth`. +- CI now builds the vendored gitlink, not a sibling `main`. +- A production-named launcher test runs `runIdunnRuntime`. It caught a dropped `publish` + argument that would have broken the service's write lease. +- Checks: 172 tests, typecheck, the web build and the release assembly. +**Not merged to StreamPixels `main` until B3 lands.** Idunn cannot yet admit a web with no +Odin dependency, so a deploy of `main` would fail readiness. +Follow-up: the production fixtures are generated by applying +`test-data/idunn-runtime/fixture.patch` to CultLib's `idunn_runtime_fixture.rs`. The generator +should take the target, contract and dependencies as input, so no consumer patches it. +Recorded: web `/api/healthz` is constant `{ok:true}`, so the route proves "HTTP answers", not +store health. + **C2 — StreamPixels web binding proves invariant 3 end to end (StreamPixels, after C1, S3, B3).** - Point the gitlink at the C1 commit. diff --git a/src/control_plane.rs b/src/control_plane.rs index 5a862b2..cd82a0e 100644 --- a/src/control_plane.rs +++ b/src/control_plane.rs @@ -49,9 +49,13 @@ use crate::host_actuator::{ }; const DEPLOYMENT_COMMAND_SCHEMA: &str = "idunn.deployment_command.v2"; -const DEPLOYMENT_TRANSACTION_SCHEMA: &str = "idunn.deployment_transaction.v3"; +const DEPLOYMENT_TRANSACTION_SCHEMA: &str = "idunn.deployment_transaction.v4"; +const DEPLOYMENT_TRANSACTION_SCHEMA_V3: &str = "idunn.deployment_transaction.v3"; const DEPLOYMENT_TRANSACTION_SCHEMA_V2: &str = "idunn.deployment_transaction.v2"; -const ADMITTED_GENERATION_SCHEMA: &str = "idunn.admitted_generation.v2"; +const ADMITTED_GENERATION_SCHEMA: &str = "idunn.admitted_generation.v3"; +const ADMITTED_GENERATION_SCHEMA_V2: &str = "idunn.admitted_generation.v2"; +/// The capability whose declaration makes a target Odin-correlated. +const ODIN_RENDEZVOUS_CAPABILITY: &str = "odin.verse-rendezvous"; /// How many times continuity will restart one admitted release before it /// concludes the release itself is the problem. More than one because a start /// can fail for a passing reason -- a port still held, a peer not yet up -- @@ -518,12 +522,223 @@ impl RoutingEvidence { } } +/// Which kind of proof admits a target as Ready. Derived from the target's +/// Expected, never stored: Expected is digest-bound, so the class cannot drift +/// from the incarnation it describes. A target that declares a +/// `shared-infrastructure odin.verse-rendezvous` dependency advertises into the +/// Verse and is Odin-correlated; one that declares none is route-proof. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +enum ReadinessClass { + OdinCorrelated, + RouteProof, +} + +impl ReadinessClass { + fn of(expected: &IdunnExpectedIncarnationRecord) -> Self { + let declares_odin = expected.dependencies.iter().any(|dependency| { + dependency.kind == "shared-infrastructure" + && dependency.capability == ODIN_RENDEZVOUS_CAPABILITY + }); + if declares_odin { + Self::OdinCorrelated + } else { + Self::RouteProof + } + } +} + +/// The receipt that admitted a candidate as Ready, tagged by the class of proof +/// that produced it. The tag records what was collected; the class a target +/// must collect is `ReadinessClass::of(expected)`. +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +#[serde(tag = "class", rename_all = "kebab-case", deny_unknown_fields)] +enum ReadinessEvidence { + OdinCorrelated { evidence: TopologyEvidence }, + RouteProof { evidence: RuntimePresenceEvidence }, +} + +impl ReadinessEvidence { + fn class(&self) -> ReadinessClass { + match self { + Self::OdinCorrelated { .. } => ReadinessClass::OdinCorrelated, + Self::RouteProof { .. } => ReadinessClass::RouteProof, + } + } + + fn validate_shape(&self) -> Result<()> { + match self { + Self::OdinCorrelated { evidence } => evidence.validate_shape(), + Self::RouteProof { evidence } => evidence.validate_shape(), + } + } + + fn odin(&self) -> Option<&TopologyEvidence> { + match self { + Self::OdinCorrelated { evidence } => Some(evidence), + Self::RouteProof { .. } => None, + } + } +} + +/// Signed evidence that the candidate process picked up the lease Idunn +/// granted: its presence carries `write_lease_sha256` equal to the grant. +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +struct LeaseAdoptionEvidence { + write_lease_sha256: String, + signed_presence_sha256: String, + source: AdoptionSource, + observed_at_unix_millis: u64, +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "kebab-case")] +enum AdoptionSource { + Direct, + OdinTopology, +} + +impl LeaseAdoptionEvidence { + /// Whether this evidence is about exactly the lease that was granted. + fn names(&self, leasing: &LeasingEvidence) -> bool { + leasing.lease_sha256() == Some(self.write_lease_sha256.as_str()) + } + + fn validate_shape(&self) -> Result<()> { + require_id(&self.write_lease_sha256, "adopted lease digest")?; + require_id(&self.signed_presence_sha256, "lease adoption presence digest")?; + ensure!( + self.observed_at_unix_millis > 0, + "lease adoption has no observation time" + ); + Ok(()) + } +} + +/// When the transaction entered its current post-fencing phase and when that +/// phase must end. Durations come from the plan's frozen `PhaseDeadlines`. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +struct PhaseDeadline { + phase: DeploymentPhase, + entered_at_unix_millis: u64, + deadline_at_unix_millis: u64, +} + +impl PhaseDeadline { + /// `None` for a phase that has no deadline (pre-fencing and Complete). + fn entering( + phase: DeploymentPhase, + plan: &CompiledDeploymentPlan, + now: u64, + ) -> Option { + let deadlines = plan.phase_deadlines(); + let seconds = match phase { + DeploymentPhase::Fencing => deadlines.fencing_seconds, + DeploymentPhase::Leasing => deadlines.leasing_seconds, + DeploymentPhase::AwaitingReady => deadlines.awaiting_ready_seconds, + DeploymentPhase::Routing => deadlines.routing_seconds, + DeploymentPhase::Committing => deadlines.committing_seconds, + _ => return None, + }; + Some(Self { + phase, + entered_at_unix_millis: now, + deadline_at_unix_millis: now.saturating_add(u64::from(seconds) * 1000), + }) + } +} + +/// How a post-fencing failure recovers. `RestoreIncumbent` is what a +/// post-fencing abort has always done and is the default for records that +/// predate the field. +#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] +#[serde(tag = "action", rename_all = "kebab-case", deny_unknown_fields)] +enum TerminalRecovery { + RestartAdmitted, + #[default] + RestoreIncumbent, + OperatorRequired { + reason: String, + }, +} + +/// Route supervision's durable memory for one admitted routed target. Carried +/// across commits except for the per-incarnation parts. +#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +struct RouteSupervisionState { + last_challenge_at_unix_millis: Option, + consecutive_failures: u32, + next_challenge_at_unix_millis: Option, + /// Set while route proof keeps failing. Marks the route degraded so + /// dependents stop selecting it; it never authorizes a restart. + degraded_since_unix_millis: Option, + actuations: ActuationWindow, +} + +/// Route actuations (write, reload, firewall) inside a rolling window, so a +/// per-target ceiling survives an Idunn restart. +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +struct ActuationWindow { + window_started_at_unix_millis: u64, + count: u32, +} + +impl RouteSupervisionState { + /// A new incarnation starts unobserved and undegraded, but inherits the + /// target's actuation window: a ceiling that reset on every commit would + /// not be a ceiling. + fn for_new_incarnation(incumbent: Option<&Self>) -> Self { + Self { + actuations: incumbent.map(|state| state.actuations).unwrap_or_default(), + ..Self::default() + } + } + + fn validate(&self) -> Result<()> { + if let Some(since) = self.degraded_since_unix_millis { + ensure!(since > 0, "route degradation has no start time"); + } + ensure!( + self.actuations.count == 0 || self.actuations.window_started_at_unix_millis > 0, + "route actuation window has a count but no start" + ); + Ok(()) + } +} + +/// Continuity restarts of one target inside a rolling window. Belongs to the +/// target, not the generation: a restart that succeeds must not reset it. +#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +struct ContinuityBackoff { + window_started_at_unix_millis: Option, + attempts: u32, + next_restart_at_unix_millis: Option, +} + +impl ContinuityBackoff { + fn validate(&self) -> Result<()> { + ensure!( + self.attempts == 0 || self.window_started_at_unix_millis.is_some(), + "continuity backoff has attempts but no window" + ); + Ok(()) + } +} + #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] #[serde(tag = "outcome", rename_all = "kebab-case", deny_unknown_fields)] enum TransactionCompletion { Admitted { generation_id: String }, FailedBeforeFencing { error: String }, - FailedAfterFencing { error: String }, + FailedAfterFencing { + error: String, + #[serde(default)] + recovery: TerminalRecovery, + }, } #[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)] @@ -642,7 +857,7 @@ impl PostCommitCleanup { #[derive(Clone, Debug, PartialEq, Eq, DatabaseEntry)] #[cultcache( type = "idunn.deployment_transaction", - schema = "idunn.deployment_transaction.v2" + schema = "idunn.deployment_transaction.v4" )] struct DeploymentTransaction { #[cultcache(key = 0)] @@ -700,7 +915,7 @@ struct DeploymentTransaction { #[cultcache(key = 26)] leasing: Option, #[cultcache(key = 27)] - ready: Option, + ready: Option, #[cultcache(key = 28)] routing: Option, #[cultcache(key = 29)] @@ -719,9 +934,26 @@ struct DeploymentTransaction { // control store and crashloops. #[cultcache(key = 34, default)] post_fencing_abort: Option, + /// Set by `transition` on entry to each post-fencing phase. + #[cultcache(key = 35)] + phase_deadline: Option, + #[cultcache(key = 36)] + lease_adoption: Option, } impl DeploymentTransaction { + /// The one writer of `phase`. It stamps the update time and the phase + /// deadline together, so a record outside Fencing..=Committing carries no + /// deadline by construction. No other code assigns `phase`. + fn enter_phase(&mut self, phase: DeploymentPhase, now: u64) { + self.phase = phase; + self.updated_at_unix_millis = now; + self.phase_deadline = self + .plan + .as_ref() + .and_then(|plan| PhaseDeadline::entering(phase, plan, now)); + } + /// Whether this transaction's binding declares stop-then-start. A /// transaction without a plan yet cannot, so it reads as false. fn rollout_stops_incumbent_first(&self) -> bool { @@ -775,6 +1007,8 @@ impl DeploymentTransaction { pre_fencing_abort: None, post_fencing_abort: None, post_commit_cleanup: None, + phase_deadline: None, + lease_adoption: None, }; transaction.validate()?; Ok(transaction) @@ -814,8 +1048,7 @@ impl DeploymentTransaction { fn rejected(command: &DeploymentCommand, error: anyhow::Error, now: u64) -> Result { let mut transaction = Self::new(command, command.selector.clone(), 0, None, now)?; let detail = truncate(&format!("{error:#}"), 2048); - transaction.phase = DeploymentPhase::Complete; - transaction.updated_at_unix_millis = now; + transaction.enter_phase(DeploymentPhase::Complete, now); transaction.last_error = Some(detail.clone()); transaction.pre_fencing_abort = Some(PreFencingAbort { error: detail.clone(), @@ -875,8 +1108,7 @@ impl DeploymentTransaction { require_id(&self.command_id, "transaction command id")?; require_id(&self.target, "transaction target")?; ensure!( - self.created_at_unix_millis > 0 - && self.updated_at_unix_millis >= self.created_at_unix_millis, + self.created_at_unix_millis > 0 && self.updated_at_unix_millis > 0, "deployment transaction timestamps are invalid" ); if let Some(generation) = &self.incumbent_generation_id { @@ -937,7 +1169,8 @@ impl DeploymentTransaction { self.workload.is_none() || self.activation.is_some(), "workload observation exists without its prepared activation" ); - for evidence in [&self.latest_odin_observation, &self.ready] + let ready_odin = self.ready.as_ref().and_then(ReadinessEvidence::odin); + for evidence in [self.latest_odin_observation.as_ref(), ready_odin] .into_iter() .flatten() { @@ -947,6 +1180,15 @@ impl DeploymentTransaction { "topology evidence exceeds the transaction replay cursor" ); } + if let Some(ready) = &self.ready { + ready.validate_shape()?; + if let (ReadinessClass::RouteProof, Some(expected)) = (ready.class(), &self.expected) { + ensure!( + ReadinessClass::of(expected) == ReadinessClass::RouteProof, + "route-proof Ready evidence for a target that declares Odin" + ); + } + } if let Some(warming) = &self.warming { warming.validate_shape()?; match warming { @@ -1009,6 +1251,25 @@ impl DeploymentTransaction { if let Some(error) = &self.last_error { require_detail(error, "transaction error")?; } + if let Some(deadline) = &self.phase_deadline { + ensure!( + deadline.phase == self.phase + && (DeploymentPhase::Fencing..=DeploymentPhase::Committing) + .contains(&deadline.phase) + && deadline.entered_at_unix_millis > 0 + && deadline.deadline_at_unix_millis > deadline.entered_at_unix_millis, + "phase deadline does not describe the current post-fencing phase" + ); + } + if let Some(adoption) = &self.lease_adoption { + adoption.validate_shape()?; + ensure!( + self.leasing + .as_ref() + .is_some_and(|leasing| adoption.names(leasing)), + "lease adoption does not name the granted lease" + ); + } if let Some(authorization) = &self.deployment_authorization { authorization.validate_shape()?; } @@ -1088,11 +1349,14 @@ impl DeploymentTransaction { &self.post_fencing_abort, "terminal post-fence abort evidence", )?; - let TransactionCompletion::FailedAfterFencing { error } = + let TransactionCompletion::FailedAfterFencing { error, recovery } = self.completion.as_ref().unwrap() else { unreachable!() }; + if let TerminalRecovery::OperatorRequired { reason } = recovery { + require_detail(reason, "operator-required recovery reason")?; + } ensure!( abort.is_complete() && abort.error == *error, "terminal failure lacks complete matching abort evidence" @@ -1204,11 +1468,7 @@ impl DeploymentTransaction { }) = &self.routing { observation.validate()?; - ensure!( - *promoted_at_unix_millis > 0 - && *promoted_at_unix_millis <= self.updated_at_unix_millis, - "route promotion time is outside the durable transaction timeline" - ); + ensure!(*promoted_at_unix_millis > 0, "route promotion has no time"); } if self.phase == DeploymentPhase::Complete { ensure!( @@ -1309,7 +1569,7 @@ impl AdmittedOdinAuthority { #[derive(Clone, Debug, PartialEq, Eq, DatabaseEntry)] #[cultcache( type = "idunn.admitted_generation", - schema = "idunn.admitted_generation.v2" + schema = "idunn.admitted_generation.v3" )] struct AdmittedGeneration { #[cultcache(key = 0)] @@ -1338,30 +1598,82 @@ struct AdmittedGeneration { workload: WorkloadObservation, #[cultcache(key = 12)] leasing: LeasingEvidence, + /// The receipt that admitted this incarnation, tagged by proof class. #[cultcache(key = 13)] - ready: TopologyEvidence, + ready: ReadinessEvidence, + /// Present exactly when `ready` is Odin-correlated. #[cultcache(key = 14)] - latest_odin_observation: TopologyEvidence, + latest_odin_observation: Option, #[cultcache(key = 15)] routing: RoutingEvidence, + /// Present exactly when `ready` is Odin-correlated. #[cultcache(key = 16)] - odin_authority: AdmittedOdinAuthority, + odin_authority: Option, + /// Meaningful only for an Odin-correlated generation. #[cultcache(key = 17)] odin_publisher_sequence_cursor: u64, + /// Still readable, decides nothing new: route supervision state replaces it. #[cultcache(key = 18)] route_repair_started_at_unix_millis: Option, + /// Present exactly when `routing` is Promoted. + #[cultcache(key = 19)] + route_supervision: Option, + #[cultcache(key = 20)] + continuity_backoff: ContinuityBackoff, +} + +/// The Odin-side receipts of an Odin-correlated generation. Decisions that +/// consume Odin evidence read it through here, so a route-proof generation +/// cannot be mistaken for one. +struct OdinReceipts<'a> { + ready: &'a TopologyEvidence, + latest: &'a TopologyEvidence, } impl AdmittedGeneration { + fn odin_receipts(&self) -> Result> { + match ( + &self.ready, + &self.latest_odin_observation, + &self.odin_authority, + ) { + (ReadinessEvidence::OdinCorrelated { evidence }, Some(latest), Some(_)) => { + Ok(OdinReceipts { + ready: evidence, + latest, + }) + } + _ => bail!("admitted generation of {} is not Odin-correlated", self.target), + } + } + fn from_transaction( transaction: &DeploymentTransaction, odin_authority: AdmittedOdinAuthority, + incumbent: Option<&AdmittedGeneration>, now: u64, ) -> Result { ensure!( transaction.phase == DeploymentPhase::Committing, "only Committing can create an admitted generation" ); + let ready = required(&transaction.ready, "Ready receipt")?.clone(); + let (latest_odin_observation, odin_authority) = match ready.class() { + ReadinessClass::OdinCorrelated => ( + Some( + required(&transaction.latest_odin_observation, "latest Odin receipt")? + .clone(), + ), + Some(odin_authority), + ), + ReadinessClass::RouteProof => (None, None), + }; + let routing = required(&transaction.routing, "route disposition")?.clone(); + let route_supervision = matches!(&routing, RoutingEvidence::Promoted { .. }).then(|| { + RouteSupervisionState::for_new_incarnation( + incumbent.and_then(|value| value.route_supervision.as_ref()), + ) + }); let generation = Self { schema_version: ADMITTED_GENERATION_SCHEMA.into(), target: transaction.target.clone(), @@ -1377,16 +1689,16 @@ impl AdmittedGeneration { activation: required(&transaction.activation, "activation")?.clone(), workload: required(&transaction.workload, "workload")?.clone(), leasing: required(&transaction.leasing, "lease disposition")?.clone(), - ready: required(&transaction.ready, "Ready receipt")?.clone(), - latest_odin_observation: required( - &transaction.latest_odin_observation, - "latest Odin receipt", - )? - .clone(), - routing: required(&transaction.routing, "route disposition")?.clone(), + ready, + latest_odin_observation, + routing, odin_authority, odin_publisher_sequence_cursor: transaction.odin_publisher_sequence_cursor, route_repair_started_at_unix_millis: None, + route_supervision, + continuity_backoff: incumbent + .map(|value| value.continuity_backoff.clone()) + .unwrap_or_default(), }; generation.validate()?; Ok(generation) @@ -1407,18 +1719,33 @@ impl AdmittedGeneration { self.expected.validate()?; self.activation.validate()?; self.ready.validate_shape()?; - self.latest_odin_observation.validate_shape()?; - self.odin_authority.validate()?; + match ( + &self.ready, + &self.latest_odin_observation, + &self.odin_authority, + ) { + (ReadinessEvidence::OdinCorrelated { evidence }, Some(latest), Some(authority)) => { + latest.validate_shape()?; + authority.validate()?; + ensure!( + evidence.publisher_sequence <= self.odin_publisher_sequence_cursor + && latest.publisher_sequence == self.odin_publisher_sequence_cursor, + "admitted generation evidence does not describe one incarnation" + ); + } + (ReadinessEvidence::RouteProof { .. }, None, None) => ensure!( + ReadinessClass::of(&self.expected) == ReadinessClass::RouteProof, + "route-proof Ready evidence for a target that declares Odin" + ), + _ => bail!("admitted readiness evidence and Odin receipts disagree"), + } ensure!( self.target == self.expected.target && self.expected.plan_id == self.plan.plan_id && self.expected.sealed_release_id == self.sealed_release.sealed_release_id && self.activation.expected_projection_sha256 == self.expected.canonical_sha256()? - && self.activation.runtime_instance_id == self.workload.runtime_instance_id() - && self.ready.publisher_sequence <= self.odin_publisher_sequence_cursor - && self.latest_odin_observation.publisher_sequence - == self.odin_publisher_sequence_cursor, + && self.activation.runtime_instance_id == self.workload.runtime_instance_id(), "admitted generation evidence does not describe one incarnation" ); ensure!( @@ -1443,6 +1770,15 @@ impl AdmittedGeneration { "only a promoted routed generation can own route repair intent" ); } + ensure!( + self.route_supervision.is_some() + == matches!(&self.routing, RoutingEvidence::Promoted { .. }), + "route supervision state exists exactly for a promoted route" + ); + if let Some(state) = &self.route_supervision { + state.validate()?; + } + self.continuity_backoff.validate()?; Ok(()) } } @@ -1878,12 +2214,7 @@ impl ControlSnapshot { snapshot.transactions.push(Stored { envelope, value }); } AdmittedGeneration::TYPE => { - ensure!( - envelope.schema_id.as_deref() == Some(ADMITTED_GENERATION_SCHEMA), - "Idunn control store contains an unsupported admitted generation" - ); - let value: AdmittedGeneration = decode_record(&envelope)?; - value.validate()?; + let value = read_generation_record(&envelope)?; ensure!( envelope.key == value.target, "admitted generation key is not its target" @@ -2068,7 +2399,11 @@ impl ControlSnapshot { .iter() .filter(|stored| { stored.value.target == target - && stored.value.odin_authority.signer_identity_id == signer_identity_id + && stored + .value + .odin_authority + .as_ref() + .is_some_and(|authority| authority.signer_identity_id == signer_identity_id) }) .map(|stored| stored.value.odin_publisher_sequence_cursor) .max() @@ -2100,20 +2435,256 @@ fn command_envelope(value: &DeploymentCommand, now: u64) -> Result, + #[cultcache(key = 10)] + plan: Option, + #[cultcache(key = 11)] + frozen_source: Option, + #[cultcache(key = 12)] + sealed_release: Option, + #[cultcache(key = 13)] + installed_release: Option, + #[cultcache(key = 14)] + expected: Option, + #[cultcache(key = 15)] + expected_publication_sha256: Option, + #[cultcache(key = 16)] + deployment_authorization: Option, + #[cultcache(key = 17)] + lifecycle_authorized_at_unix_millis: Option, + #[cultcache(key = 18)] + activation: Option, + #[cultcache(key = 19)] + workload: Option, + #[cultcache(key = 20)] + activation_publication_sha256: Option, + #[cultcache(key = 21)] + latest_odin_observation: Option, + #[cultcache(key = 22)] + warming: Option, + #[cultcache(key = 23)] + route_preflight: Option, + #[cultcache(key = 24)] + isolation: Option, + #[cultcache(key = 25)] + fencing: Option, + #[cultcache(key = 26)] + leasing: Option, + #[cultcache(key = 27)] + ready: Option, + #[cultcache(key = 28)] + routing: Option, + #[cultcache(key = 29)] + odin_publisher_sequence_cursor: u64, + #[cultcache(key = 30)] + last_error: Option, + #[cultcache(key = 31)] + completion: Option, + #[cultcache(key = 32)] + pre_fencing_abort: Option, + #[cultcache(key = 33)] + post_commit_cleanup: Option, + // A v2 record has no key 34: it predates post-fencing aborts. + #[cultcache(key = 34, default)] + post_fencing_abort: Option, +} + +impl LegacyDeploymentTransaction { + /// Every legacy Ready receipt is an Odin receipt: no route-proof class + /// existed. The new slots start empty, which is what an older transaction + /// had. + fn into_current(self) -> DeploymentTransaction { + DeploymentTransaction { + schema_version: DEPLOYMENT_TRANSACTION_SCHEMA.into(), + transaction_id: self.transaction_id, + command_id: self.command_id, + command_kind: self.command_kind, + target: self.target, + ordinal: self.ordinal, + phase: self.phase, + created_at_unix_millis: self.created_at_unix_millis, + updated_at_unix_millis: self.updated_at_unix_millis, + incumbent_generation_id: self.incumbent_generation_id, + plan: self.plan, + frozen_source: self.frozen_source, + sealed_release: self.sealed_release, + installed_release: self.installed_release, + expected: self.expected, + expected_publication_sha256: self.expected_publication_sha256, + deployment_authorization: self.deployment_authorization, + lifecycle_authorized_at_unix_millis: self.lifecycle_authorized_at_unix_millis, + activation: self.activation, + workload: self.workload, + activation_publication_sha256: self.activation_publication_sha256, + latest_odin_observation: self.latest_odin_observation, + warming: self.warming, + route_preflight: self.route_preflight, + isolation: self.isolation, + fencing: self.fencing, + leasing: self.leasing, + ready: self + .ready + .map(|evidence| ReadinessEvidence::OdinCorrelated { evidence }), + routing: self.routing, + odin_publisher_sequence_cursor: self.odin_publisher_sequence_cursor, + last_error: self.last_error, + completion: self.completion, + pre_fencing_abort: self.pre_fencing_abort, + post_commit_cleanup: self.post_commit_cleanup, + post_fencing_abort: self.post_fencing_abort, + phase_deadline: None, + lease_adoption: None, + } + } +} + +/// The v2 admitted-generation layout. Same lifetime rule as +/// `LegacyDeploymentTransaction`. +#[derive(Clone, Debug, PartialEq, Eq, DatabaseEntry)] +#[cultcache( + type = "idunn.admitted_generation", + schema = "idunn.admitted_generation.v2" +)] +struct LegacyAdmittedGeneration { + #[cultcache(key = 0)] + schema_version: String, + #[cultcache(key = 1)] + target: String, + #[cultcache(key = 2)] + generation_id: String, + #[cultcache(key = 3)] + command_id: String, + #[cultcache(key = 4)] + transaction_id: String, + #[cultcache(key = 5)] + admitted_at_unix_millis: u64, + #[cultcache(key = 6)] + plan: CompiledDeploymentPlan, + #[cultcache(key = 7)] + sealed_release: SealedRelease, + #[cultcache(key = 8)] + installed_release: InstalledReleaseObservation, + #[cultcache(key = 9)] + expected: IdunnExpectedIncarnationRecord, + #[cultcache(key = 10)] + activation: IdunnRuntimeActivationRecord, + #[cultcache(key = 11)] + workload: WorkloadObservation, + #[cultcache(key = 12)] + leasing: LeasingEvidence, + #[cultcache(key = 13)] + ready: TopologyEvidence, + #[cultcache(key = 14)] + latest_odin_observation: TopologyEvidence, + #[cultcache(key = 15)] + routing: RoutingEvidence, + #[cultcache(key = 16)] + odin_authority: AdmittedOdinAuthority, + #[cultcache(key = 17)] + odin_publisher_sequence_cursor: u64, + #[cultcache(key = 18)] + route_repair_started_at_unix_millis: Option, +} + +impl LegacyAdmittedGeneration { + /// Every v2 generation was admitted on Odin receipts, so it migrates as + /// Odin-correlated with those receipts unchanged. Route supervision state + /// starts empty for a promoted route; backoff starts empty. + fn into_current(self) -> AdmittedGeneration { + let route_supervision = matches!(&self.routing, RoutingEvidence::Promoted { .. }) + .then(RouteSupervisionState::default); + AdmittedGeneration { + schema_version: ADMITTED_GENERATION_SCHEMA.into(), + target: self.target, + generation_id: self.generation_id, + command_id: self.command_id, + transaction_id: self.transaction_id, + admitted_at_unix_millis: self.admitted_at_unix_millis, + plan: self.plan, + sealed_release: self.sealed_release, + installed_release: self.installed_release, + expected: self.expected, + activation: self.activation, + workload: self.workload, + leasing: self.leasing, + ready: ReadinessEvidence::OdinCorrelated { + evidence: self.ready, + }, + latest_odin_observation: Some(self.latest_odin_observation), + routing: self.routing, + odin_authority: Some(self.odin_authority), + odin_publisher_sequence_cursor: self.odin_publisher_sequence_cursor, + route_repair_started_at_unix_millis: self.route_repair_started_at_unix_millis, + route_supervision, + continuity_backoff: ContinuityBackoff::default(), + } + } +} + +/// Decode a v2 or v3 transaction and lift it to the current shape, without +/// validating it. History reads stop here; the control store validates. +fn lift_legacy_transaction(envelope: &CultCacheEnvelope) -> Result { + let schema = match envelope.schema_id.as_deref() { + Some(schema @ (DEPLOYMENT_TRANSACTION_SCHEMA_V2 | DEPLOYMENT_TRANSACTION_SCHEMA_V3)) => { + schema + } + _ => bail!("Idunn control store contains an unsupported transaction"), + }; + let value: LegacyDeploymentTransaction = rmp_serde::from_slice(&envelope.payload) + .with_context(|| format!("decoding a {schema} deployment transaction"))?; + ensure!( + value.schema_version == schema, + "stored transaction schema differs from its envelope" + ); + ensure!( + schema != DEPLOYMENT_TRANSACTION_SCHEMA_V2 || value.post_fencing_abort.is_none(), + "a v2 transaction cannot carry post-fencing abort evidence" + ); + Ok(value.into_current()) +} + +/// Read one stored transaction, lifting a v2 or v3 record to the current shape. /// /// The control store refuses noncanonical bytes: a record must re-encode to /// exactly what is stored. That check is what makes tampering visible, and it -/// also means adding a field is a schema change -- every transaction written -/// before `post_fencing_abort` existed re-encodes with one extra key and would -/// be read as tampered. +/// also means adding a field is a schema change: an older record re-encodes +/// with extra keys and would be read as tampered. /// -/// So a v2 record is decoded by key, which tolerates the absent key, and lifted -/// with no post-fencing abort, because a transaction written before the field -/// existed cannot have had one. Byte-exactness cannot apply across a version -/// boundary -- the bytes are a different schema by definition -- so the lift -/// leans on the full semantic `validate()` instead, and everything downstream -/// sees only the current shape. +/// So an older record is decoded by its own layout and lifted. Byte-exactness +/// cannot apply across a version boundary -- the bytes are a different schema +/// by definition -- so the lift leans on the full semantic `validate()` +/// instead, and everything downstream sees only the current shape. fn read_transaction_record(envelope: &CultCacheEnvelope) -> Result { match envelope.schema_id.as_deref() { Some(DEPLOYMENT_TRANSACTION_SCHEMA) => { @@ -2121,33 +2692,46 @@ fn read_transaction_record(envelope: &CultCacheEnvelope) -> Result { - let mut value: DeploymentTransaction = rmp_serde::from_slice(&envelope.payload) - .context("decoding a v2 deployment transaction")?; - ensure!( - value.schema_version == DEPLOYMENT_TRANSACTION_SCHEMA_V2, - "stored transaction schema differs from its envelope" - ); - ensure!( - value.post_fencing_abort.is_none(), - "a v2 transaction cannot carry post-fencing abort evidence" - ); - value.schema_version = DEPLOYMENT_TRANSACTION_SCHEMA.into(); + _ => { + let value = lift_legacy_transaction(envelope)?; value.validate()?; Ok(value) } - _ => bail!("Idunn control store contains an unsupported transaction"), } } -/// Rewrite every v2 transaction as v3, once, before the engine runs. +/// Read one stored admitted generation, lifting a v2 record to the current +/// shape by the same rule as `read_transaction_record`. +fn read_generation_record(envelope: &CultCacheEnvelope) -> Result { + match envelope.schema_id.as_deref() { + Some(ADMITTED_GENERATION_SCHEMA) => { + let value: AdmittedGeneration = decode_record(envelope)?; + value.validate()?; + Ok(value) + } + Some(ADMITTED_GENERATION_SCHEMA_V2) => { + let legacy: LegacyAdmittedGeneration = rmp_serde::from_slice(&envelope.payload) + .context("decoding a v2 admitted generation")?; + ensure!( + legacy.schema_version == ADMITTED_GENERATION_SCHEMA_V2, + "stored generation schema differs from its envelope" + ); + let value = legacy.into_current(); + value.validate()?; + Ok(value) + } + _ => bail!("Idunn control store contains an unsupported admitted generation"), + } +} + +/// Rewrite every v2 and v3 record as current, once, before the engine runs. /// -/// The read path lifts v2 records on its own, so this is convergence rather -/// than correctness: without it the store keeps records in two shapes for as -/// long as the oldest terminal transaction survives retention. Each rewrite is -/// a compare-exchange against the exact stored envelope, so a record that -/// changed underneath is left alone rather than clobbered. -fn migrate_transactions_to_current_schema(store_path: &Path) -> Result { +/// The read path lifts older records on its own, so this is convergence rather +/// than correctness: without it the store keeps records in several shapes for +/// as long as the oldest one survives. Each rewrite is a compare-exchange +/// against the exact stored envelope, so a record that changed underneath is +/// left alone rather than clobbered. +fn migrate_control_store_to_current_schema(store_path: &Path) -> Result { if !store_path.exists() { return Ok(0); } @@ -2157,24 +2741,38 @@ fn migrate_transactions_to_current_schema(store_path: &Path) -> Result { .context("reading Idunn control snapshot for migration")? .into_iter() .filter(|envelope| { - envelope.r#type == DeploymentTransaction::TYPE - && envelope.schema_id.as_deref() == Some(DEPLOYMENT_TRANSACTION_SCHEMA_V2) + let schema = envelope.schema_id.as_deref(); + (envelope.r#type == DeploymentTransaction::TYPE + && matches!( + schema, + Some(DEPLOYMENT_TRANSACTION_SCHEMA_V2 | DEPLOYMENT_TRANSACTION_SCHEMA_V3) + )) + || (envelope.r#type == AdmittedGeneration::TYPE + && schema == Some(ADMITTED_GENERATION_SCHEMA_V2)) }) .collect::>(); let mut migrated = 0; for envelope in stale { - let value = read_transaction_record(&envelope)?; - let next = transaction_envelope(&value, value.updated_at_unix_millis)?; + let (record_type, key, mut next) = if envelope.r#type == DeploymentTransaction::TYPE { + let value = read_transaction_record(&envelope)?; + let next = transaction_envelope(&value, value.updated_at_unix_millis)?; + (DeploymentTransaction::TYPE, value.transaction_id, next) + } else { + let value = read_generation_record(&envelope)?; + let next = admitted_envelope(&value, value.admitted_at_unix_millis)?; + (AdmittedGeneration::TYPE, value.target, next) + }; + next.stored_at = envelope.stored_at.clone(); ensure!( store.compare_exchange( &[CultCacheExpectedEnvelope { - r#type: DeploymentTransaction::TYPE.into(), - key: value.transaction_id.clone(), + r#type: record_type.into(), + key, current: Some(envelope.clone()), }], &[next], )?, - "deployment transaction changed during schema migration" + "control record changed during schema migration" ); migrated += 1; } @@ -2280,17 +2878,61 @@ fn read_history_transactions(state_store: &Path) -> Vec { if !path.exists() { return Vec::new(); } - let Ok(envelopes) = SingleFileMessagePackBackingStore::new(&path).pull_all_read_only_snapshot() - else { - return Vec::new(); + let envelopes = match SingleFileMessagePackBackingStore::new(&path).pull_all_read_only_snapshot() + { + Ok(envelopes) => envelopes, + Err(error) => { + eprintln!( + "Idunn cannot read {}: {error:#}; every archived transaction is invisible \ + to status and to continuity backoff", + path.display() + ); + return Vec::new(); + } }; - envelopes + let (transactions, undecodable) = decode_history_transactions(envelopes); + if !undecodable.is_empty() { + for (key, error) in &undecodable { + eprintln!("Idunn history holds an undecodable transaction {key}: {error}"); + } + eprintln!( + "Idunn history: {} archived transaction(s) could not be decoded and are not counted \ + by status or continuity backoff", + undecodable.len() + ); + } + transactions +} + +/// Decode every archived transaction. An entry that fails is returned with its +/// key and reason instead of vanishing, so the reader can say how many records +/// its answer is missing. +/// +/// `LegacyDeploymentTransaction` decodes the v2 and v3 layouts. `history.cc` is +/// never migrated or pruned, so it dies only when history is pruned or +/// migrated, not at boot. +fn decode_history_transactions( + envelopes: Vec, +) -> (Vec, Vec<(String, String)>) { + let mut transactions = Vec::new(); + let mut undecodable = Vec::new(); + for envelope in envelopes .into_iter() .filter(|envelope| envelope.r#type == DeploymentTransaction::TYPE) - .filter_map(|envelope| { - rmp_serde::from_slice::(&envelope.payload).ok() - }) - .collect() + { + let decoded = match envelope.schema_id.as_deref() { + Some(DEPLOYMENT_TRANSACTION_SCHEMA_V2 | DEPLOYMENT_TRANSACTION_SCHEMA_V3) => { + lift_legacy_transaction(&envelope) + } + _ => rmp_serde::from_slice::(&envelope.payload) + .map_err(anyhow::Error::from), + }; + match decoded { + Ok(transaction) => transactions.push(transaction), + Err(error) => undecodable.push((envelope.key, format!("{error:#}"))), + } + } + (transactions, undecodable) } /// Consumed commands, read as leniently as their transactions. @@ -2528,7 +3170,7 @@ fn submit( .iter() .find_map(|transaction| match &transaction.completion { Some(TransactionCompletion::FailedBeforeFencing { error }) - | Some(TransactionCompletion::FailedAfterFencing { error }) => { + | Some(TransactionCompletion::FailedAfterFencing { error, .. }) => { Some(error.as_str()) } _ => None, @@ -2654,7 +3296,7 @@ fn derived_command_status(transactions: &[&DeploymentTransaction]) -> (&'static .iter() .find_map(|transaction| match &transaction.completion { Some(TransactionCompletion::FailedBeforeFencing { error }) - | Some(TransactionCompletion::FailedAfterFencing { error }) => Some(error.clone()), + | Some(TransactionCompletion::FailedAfterFencing { error, .. }) => Some(error.clone()), _ => None, }) { @@ -2738,12 +3380,24 @@ struct Engine { bootstrap_odin_authority: AdmittedOdinAuthority, source: GitSourceDriver, docker_runner: DockerRunnerDriver, - systemd_workload: SystemdTransientWorkloadDriver, + systemd_workload: Arc, host_actuators: Option, } impl Engine { fn open(options: RuntimeOptions) -> Result { + Self::open_with_systemd_workload( + options, + Arc::new(SystemdTransientWorkloadDriver::default()), + ) + } + + /// `open` with the systemd workload port supplied. It is the seam that + /// lets the phase engine run past Fencing without a systemd to talk to. + fn open_with_systemd_workload( + options: RuntimeOptions, + systemd_workload: Arc, + ) -> Result { let idunn_signer = open_service_identity_at::(&options.idunn_identity_store) .context("opening Idunn activation identity")?; @@ -2780,7 +3434,7 @@ impl Engine { bootstrap_odin_authority, source, docker_runner: DockerRunnerDriver::default(), - systemd_workload: SystemdTransientWorkloadDriver::default(), + systemd_workload, host_actuators, }) } @@ -2848,11 +3502,11 @@ impl Engine { } /// The workload driver the plan's binding declares. - fn workload_for(&self, plan: &CompiledDeploymentPlan) -> Result> { + fn workload_for(&self, plan: &CompiledDeploymentPlan) -> Result> { let (_, binding) = plan.parsed_inputs()?; Ok(match &binding.workload { - WorkloadBinding::SystemdTransient(_) => Box::new(self.systemd_workload.clone()), - WorkloadBinding::HostActuator(_) => Box::new(HostActuatorWorkloadDriver { + WorkloadBinding::SystemdTransient(_) => Arc::clone(&self.systemd_workload), + WorkloadBinding::HostActuator(_) => Arc::new(HostActuatorWorkloadDriver { access: self.host_access()?, }), }) @@ -2866,10 +3520,16 @@ impl Engine { } fn current_odin_authority(&self, snapshot: &ControlSnapshot) -> Result { - let authority = snapshot - .admitted_for("odin") - .map(|stored| stored.value.odin_authority.clone()) - .unwrap_or_else(|| self.bootstrap_odin_authority.clone()); + // The bootstrap key stands only until Odin itself is admitted. Once it + // is, its own generation names the authority; an admitted Odin that + // carries none has no authority to name, and falling back to the + // bootstrap key would let a stale key vouch for the Verse. + let authority = match snapshot.admitted_for("odin") { + None => self.bootstrap_odin_authority.clone(), + Some(stored) => stored.value.odin_authority.clone().with_context(|| { + "admitted Odin generation carries no Odin authority (route-proof readiness)" + })?, + }; authority.validate()?; Ok(authority) } @@ -2972,7 +3632,7 @@ impl Engine { } } } - if let Some(evidence) = &transaction.ready { + if let Some(evidence) = transaction.ready.as_ref().and_then(ReadinessEvidence::odin) { let authenticated = self.authenticate_topology_bytes( snapshot, transaction, @@ -2990,29 +3650,31 @@ impl Engine { let odin_authority = self.current_odin_authority(snapshot)?; for stored in &snapshot.admitted { let generation = &stored.value; + if generation.ready.class() == ReadinessClass::RouteProof { + continue; + } + let odin = generation.odin_receipts()?; let authority = self.runtime_authority_parts( &generation.plan, &generation.expected, &generation.activation, )?; let latest = authenticate_odin_runtime_topology_correlation( - &generation.latest_odin_observation.canonical_bytes, + &odin.latest.canonical_bytes, &authority, generation.leasing.lease_sha256(), &odin_authority.signer_public_key, - self.trusted_topology_context( - generation.latest_odin_observation.admitted_at_unix_millis, - ), + self.trusted_topology_context(odin.latest.admitted_at_unix_millis), )?; - validate_authenticated_evidence(&generation.latest_odin_observation, &latest)?; + validate_authenticated_evidence(odin.latest, &latest)?; let ready = authenticate_odin_runtime_topology_correlation( - &generation.ready.canonical_bytes, + &odin.ready.canonical_bytes, &authority, generation.leasing.lease_sha256(), &odin_authority.signer_public_key, - self.trusted_topology_context(generation.ready.admitted_at_unix_millis), + self.trusted_topology_context(odin.ready.admitted_at_unix_millis), )?; - validate_authenticated_evidence(&generation.ready, &ready)?; + validate_authenticated_evidence(odin.ready, &ready)?; ensure!( is_semantic_ready(&ready), "admitted generation Ready label is not exact semantic Ready" @@ -3038,10 +3700,12 @@ fn serve(options: RuntimeOptions) -> Result<()> { .with_context(|| format!("creating Idunn directory {}", directory.display()))?; } let _lock = ProcessLock::acquire(&options.state_store)?; - let migrated = migrate_transactions_to_current_schema(&options.state_store) - .context("migrating Idunn transactions to the current schema")?; + let migrated = migrate_control_store_to_current_schema(&options.state_store) + .context("migrating Idunn control records to the current schema")?; if migrated > 0 { - println!("migrated {migrated} transaction(s) to {DEPLOYMENT_TRANSACTION_SCHEMA}"); + println!( + "migrated {migrated} control record(s) to {DEPLOYMENT_TRANSACTION_SCHEMA} / {ADMITTED_GENERATION_SCHEMA}" + ); } ControlSnapshot::read(&options.state_store).context("validating all Idunn records")?; let engine = Engine::open(options)?; @@ -3664,38 +4328,19 @@ impl Engine { .context("routed admitted generation has no operator route binding")?; let driver = NginxRouteDriver::new(route_binding); - let membership_is_exact = - driver.observe_membership(¤t.value.expected, &observation.membership_sha256)?; let now = now_millis()?; - if membership_is_exact + if driver.observe_membership(¤t.value.expected, &observation.membership_sha256)? && route_observation_is_current( observation.observed_at_unix_millis, now, self.options.topology_maximum_age_millis, self.options.topology_maximum_future_skew_millis, ) - && current.value.route_repair_started_at_unix_millis.is_none() { return Ok(false); } - if current.value.route_repair_started_at_unix_millis.is_none() { - let mut next = current.value.clone(); - next.route_repair_started_at_unix_millis = Some(now); - next.validate()?; - ensure!( - SingleFileMessagePackBackingStore::new(&self.options.state_store) - .compare_exchange( - &[CultCacheExpectedEnvelope { - r#type: AdmittedGeneration::TYPE.into(), - key: current.value.target.clone(), - current: Some(current.envelope.clone()), - }], - &[admitted_envelope(&next, now)?], - )?, - "admitted generation changed before route repair intent CAS" - ); - return Ok(true); - } + // Actuates only when the fragment on disk differs from the admitted + // membership; an exact fragment makes this a no-op. driver .restore_admitted_membership(¤t.value.expected, &observation.membership_sha256)?; let authority = self.runtime_authority_parts( @@ -3747,6 +4392,10 @@ impl Engine { snapshot: &ControlSnapshot, current: &Stored, ) -> Result { + if current.value.ready.class() == ReadinessClass::RouteProof { + return Ok(false); + } + let odin = current.value.odin_receipts()?; let Some(received) = self.topology().receive( ¤t.value.target, ¤t.value.expected.canonical_sha256()?, @@ -3780,17 +4429,17 @@ impl Engine { }; let evidence = TopologyEvidence::from_authenticated(&authenticated, now)?; if !sequence_requires_admission( - Some(¤t.value.latest_odin_observation), + Some(odin.latest), snapshot.max_odin_sequence(¤t.value.target, &evidence.signer_identity_id), &evidence, )? { return Ok(false); } let mut next = current.value.clone(); - next.latest_odin_observation = evidence.clone(); + next.latest_odin_observation = Some(evidence.clone()); next.odin_publisher_sequence_cursor = evidence.publisher_sequence; if is_semantic_ready(&authenticated) { - next.ready = evidence; + next.ready = ReadinessEvidence::OdinCorrelated { evidence }; } next.validate()?; ensure!( @@ -3934,8 +4583,7 @@ impl Engine { "transaction plan", )?) })?; - next.phase = DeploymentPhase::Starting; - next.updated_at_unix_millis = now; + next.enter_phase(DeploymentPhase::Starting, now); next.last_error = None; replace_transaction(&self.options.state_store, current, &next) } @@ -4021,8 +4669,7 @@ impl Engine { }); } let mut next = current.value.clone(); - next.phase = DeploymentPhase::Warming; - next.updated_at_unix_millis = now_millis()?; + next.enter_phase(DeploymentPhase::Warming, now_millis()?); next.last_error = None; replace_transaction(&self.options.state_store, current, &next) } @@ -4482,7 +5129,7 @@ impl Engine { &admitted.value.latest_odin_observation, "sequence-admitted Ready evidence", )?; - if current.value.ready.as_ref() == Some(latest) { + if current.value.ready.as_ref().and_then(ReadinessEvidence::odin) == Some(latest) { ensure!(semantic_ready, "stored Ready receipt changed meaning"); } else if semantic_ready { let evidence = latest.clone(); @@ -4493,7 +5140,7 @@ impl Engine { authenticated, }; return self.persist_same_phase(&admitted, |next| { - next.ready = Some(evidence); + next.ready = Some(ReadinessEvidence::OdinCorrelated { evidence }); Ok(()) }); } else { @@ -4529,10 +5176,10 @@ impl Engine { &admitted.value.latest_odin_observation, "current route-admission topology evidence", )?; - if admitted.value.ready.as_ref() != Some(latest) { + if admitted.value.ready.as_ref().and_then(ReadinessEvidence::odin) != Some(latest) { let latest = latest.clone(); return self.persist_same_phase(&admitted, |next| { - next.ready = Some(latest); + next.ready = Some(ReadinessEvidence::OdinCorrelated { evidence: latest }); Ok(()) }); } @@ -4729,8 +5376,12 @@ impl Engine { let snapshot = ControlSnapshot::read(&self.options.state_store)?; let incumbent = self.exact_incumbent(&snapshot, &commit_current.value)?; let odin_authority = self.current_odin_authority(&snapshot)?; - let generation = - AdmittedGeneration::from_transaction(&commit_current.value, odin_authority, now)?; + let generation = AdmittedGeneration::from_transaction( + &commit_current.value, + odin_authority, + incumbent.map(|stored| &stored.value), + now, + )?; let post_commit_cleanup = PostCommitCleanup { incumbent: match incumbent { Some(incumbent) @@ -4755,8 +5406,7 @@ impl Engine { }, }; let mut complete = commit_current.value.clone(); - complete.phase = DeploymentPhase::Complete; - complete.updated_at_unix_millis = now; + complete.enter_phase(DeploymentPhase::Complete, now); complete.last_error = None; complete.completion = Some(TransactionCompletion::Admitted { generation_id: generation.generation_id.clone(), @@ -5595,7 +6245,10 @@ impl Engine { now: u64, require_current: bool, ) -> Result { - let evidence = required(&transaction.ready, "durable Ready evidence")?.clone(); + let evidence = required(&transaction.ready, "durable Ready evidence")? + .odin() + .context("durable Ready evidence is not an Odin receipt")? + .clone(); let snapshot = ControlSnapshot::read(&self.options.state_store)?; let current_lease = transaction .leasing @@ -5650,6 +6303,7 @@ impl Engine { snapshot: &ControlSnapshot, generation: &AdmittedGeneration, ) -> Result { + let odin = generation.odin_receipts()?; let authority = self.runtime_authority_parts( &generation.plan, &generation.expected, @@ -5658,13 +6312,13 @@ impl Engine { let odin_authority = self.current_odin_authority(snapshot)?; let current_lease = generation.leasing.lease_sha256(); let authenticated = authenticate_odin_runtime_topology_correlation( - &generation.ready.canonical_bytes, + &odin.ready.canonical_bytes, &authority, current_lease, &odin_authority.signer_public_key, - self.trusted_topology_context(generation.ready.admitted_at_unix_millis), + self.trusted_topology_context(odin.ready.admitted_at_unix_millis), )?; - validate_authenticated_evidence(&generation.ready, &authenticated)?; + validate_authenticated_evidence(odin.ready, &authenticated)?; ensure!( is_semantic_ready(&authenticated), "admitted provider's Ready receipt is not Ready at its admission time" @@ -5679,27 +6333,20 @@ impl Engine { // Odin. Both receipts are historical proofs; current workload health // is owned by continuity and route observation, not receipt age. let authenticated_latest = authenticate_odin_runtime_topology_correlation( - &generation.latest_odin_observation.canonical_bytes, + &odin.latest.canonical_bytes, &authority, current_lease, &odin_authority.signer_public_key, - self.trusted_topology_context( - generation - .latest_odin_observation - .admitted_at_unix_millis, - ), - )?; - validate_authenticated_evidence( - &generation.latest_odin_observation, - &authenticated_latest, + self.trusted_topology_context(odin.latest.admitted_at_unix_millis), )?; + validate_authenticated_evidence(odin.latest, &authenticated_latest)?; ensure!( is_semantic_ready(&authenticated_latest), "admitted provider's latest receipt is not Ready at its admission time" ); Ok(SequenceAdmittedReady { transaction_id: generation.transaction_id.clone(), - evidence: generation.ready.clone(), + evidence: odin.ready.clone(), expected: generation.expected.clone(), authenticated, }) @@ -5798,8 +6445,7 @@ impl Engine { "deployment phase transition is not adjacent" ); let mut next = current.value.clone(); - next.phase = next_phase; - next.updated_at_unix_millis = now_millis()?; + next.enter_phase(next_phase, now_millis()?); next.last_error = None; replace_transaction(&self.options.state_store, current, &next) } @@ -6020,11 +6666,11 @@ impl Engine { "post-fencing abort cleanup is incomplete" ); let mut next = current.value.clone(); - next.phase = DeploymentPhase::Complete; - next.updated_at_unix_millis = now_millis()?; + next.enter_phase(DeploymentPhase::Complete, now_millis()?); next.last_error = Some(abort.error.clone()); next.completion = Some(TransactionCompletion::FailedAfterFencing { error: abort.error.clone(), + recovery: TerminalRecovery::RestoreIncumbent, }); replace_transaction(&self.options.state_store, current, &next) } @@ -6092,8 +6738,7 @@ impl Engine { "pre-fencing abort cleanup is incomplete" ); let mut next = current.value.clone(); - next.phase = DeploymentPhase::Complete; - next.updated_at_unix_millis = now_millis()?; + next.enter_phase(DeploymentPhase::Complete, now_millis()?); next.last_error = Some(abort.error.clone()); next.completion = Some(TransactionCompletion::FailedBeforeFencing { error: abort.error.clone(), @@ -6633,7 +7278,10 @@ mod tests { if value.completion.is_some() { continue; } - let (Some(ready), Some(latest)) = (&value.ready, &value.latest_odin_observation) else { + let (Some(ready), Some(latest)) = ( + value.ready.as_ref().and_then(ReadinessEvidence::odin), + &value.latest_odin_observation, + ) else { continue; }; println!( @@ -6684,10 +7332,25 @@ mod tests { _temp: TempDir, engine: Engine, state_store: PathBuf, + odin_signer: ServiceIdentitySigner, + root: PathBuf, } impl EngineFixture { fn new() -> Result { + Self::build(None) + } + + /// An Engine whose systemd workload port is `workload`, so the phase + /// machine can run without systemd. This is the whole seam: nginx, + /// systemctl and the network are never reached on an unrouted, + /// stateless target, and the Odin evidence is signed by the key this + /// fixture enrolled. + fn with_workload(workload: Arc) -> Result { + Self::build(Some(workload)) + } + + fn build(workload: Option>) -> Result { let temp = TempDir::new()?; let root = temp.path(); std::fs::create_dir_all(root.join("identities"))?; @@ -6711,11 +7374,16 @@ mod tests { deployment_brake_operator_anchor: root.join("brake-anchor.cc"), ..RuntimeOptions::default() }; - let engine = Engine::open(options)?; + let engine = match workload { + Some(workload) => Engine::open_with_systemd_workload(options, workload)?, + None => Engine::open(options)?, + }; Ok(Self { + root: root.to_path_buf(), _temp: temp, engine, state_store, + odin_signer, }) } } @@ -7489,6 +8157,7 @@ mod tests { value .ready .as_ref() + .and_then(ReadinessEvidence::odin) .map(|evidence| evidence.publisher_sequence), value .latest_odin_observation @@ -7500,15 +8169,21 @@ mod tests { for stored in &snapshot.admitted { let value = &stored.value; println!( - "ADMITTED target={} generation={} tx={} admitted_at={} ready_seq={} ready_admitted_at={} latest_seq={} latest_admitted_at={} instance={} {}", + "ADMITTED target={} generation={} tx={} admitted_at={} ready_seq={:?} ready_admitted_at={:?} latest_seq={:?} latest_admitted_at={:?} instance={} {}", value.target, value.generation_id, value.transaction_id, value.admitted_at_unix_millis, - value.ready.publisher_sequence, - value.ready.admitted_at_unix_millis, - value.latest_odin_observation.publisher_sequence, - value.latest_odin_observation.admitted_at_unix_millis, + value.ready.odin().map(|evidence| evidence.publisher_sequence), + value.ready.odin().map(|evidence| evidence.admitted_at_unix_millis), + value + .latest_odin_observation + .as_ref() + .map(|evidence| evidence.publisher_sequence), + value + .latest_odin_observation + .as_ref() + .map(|evidence| evidence.admitted_at_unix_millis), value.activation.runtime_instance_id, value.workload.describe(), ); @@ -7822,6 +8497,7 @@ mod tests { abandoned.transactions[1].value.completion = Some(TransactionCompletion::FailedAfterFencing { error: "candidate died after the fence".into(), + recovery: TerminalRecovery::RestoreIncumbent, }); assert_eq!(abandoned.max_odin_sequence("odin", "odin-signer"), 0); Ok(()) @@ -7915,6 +8591,7 @@ mod tests { transaction.last_error = Some("candidate died after the fence".into()); transaction.completion = Some(TransactionCompletion::FailedAfterFencing { error: "candidate died after the fence".into(), + recovery: TerminalRecovery::RestoreIncumbent, }); // The evidence exists so that a target is released only once the // candidate's route, lease, process and projection are actually gone. @@ -7930,6 +8607,7 @@ mod tests { // The recorded error and the completion must name the same failure. transaction.completion = Some(TransactionCompletion::FailedAfterFencing { error: "a different story".into(), + recovery: TerminalRecovery::RestoreIncumbent, }); assert!(transaction.validate().is_err()); Ok(()) @@ -8329,6 +9007,1361 @@ mod tests { }) ); } + + // ---- v2/v3 control records lifted to the v3 generation / v4 transaction ---- + // + // The bytes under tests/fixtures/idunn-control-legacy were written by the + // encoder at Idunn 9001b58 (see the README there). Nothing below encodes a + // legacy record: the legacy layout is decoded from those bytes, and the + // lifted record is compared with what the decoded legacy record says. + + const FIXTURE_GENERATION: &str = + include_str!("../tests/fixtures/idunn-control-legacy/generation-with-receipts.hex"); + const FIXTURE_GENERATION_REPAIRING: &str = include_str!( + "../tests/fixtures/idunn-control-legacy/generation-route-repair-started.hex" + ); + const FIXTURE_TRANSACTIONS: [(&str, &str); 6] = [ + ( + "fencing", + include_str!("../tests/fixtures/idunn-control-legacy/transaction-fencing.hex"), + ), + ( + "leasing", + include_str!("../tests/fixtures/idunn-control-legacy/transaction-leasing.hex"), + ), + ( + "awaiting-ready", + include_str!("../tests/fixtures/idunn-control-legacy/transaction-awaiting-ready.hex"), + ), + ( + "routing", + include_str!("../tests/fixtures/idunn-control-legacy/transaction-routing.hex"), + ), + ( + "committing", + include_str!("../tests/fixtures/idunn-control-legacy/transaction-committing.hex"), + ), + ( + "failed-after-fencing", + include_str!( + "../tests/fixtures/idunn-control-legacy/transaction-failed-after-fencing.hex" + ), + ), + ]; + const FIXTURE_TRANSACTION_V2: &str = + include_str!("../tests/fixtures/idunn-control-legacy/transaction-committing-v2.hex"); + + fn fixture_envelope(text: &str, record_type: &str) -> Result { + let mut lines = text.lines(); + let schema = lines.next().context("fixture has no schema line")?; + let hex = lines.next().context("fixture has no payload line")?.trim(); + let payload = (0..hex.len()) + .step_by(2) + .map(|index| u8::from_str_radix(&hex[index..index + 2], 16)) + .collect::, _>>()?; + let key = if record_type == AdmittedGeneration::TYPE { + rmp_serde::from_slice::(&payload)?.target + } else { + rmp_serde::from_slice::(&payload)?.transaction_id + }; + Ok(CultCacheEnvelope { + key, + r#type: record_type.into(), + payload, + stored_at: rfc3339_millis(1_700_000_123_456)?, + schema_id: Some(schema.into()), + }) + } + + fn fixture_generation(text: &str) -> Result<(LegacyAdmittedGeneration, AdmittedGeneration)> { + let envelope = fixture_envelope(text, AdmittedGeneration::TYPE)?; + let legacy = rmp_serde::from_slice(&envelope.payload)?; + Ok((legacy, read_generation_record(&envelope)?)) + } + + fn fixture_transaction( + text: &str, + ) -> Result<(LegacyDeploymentTransaction, DeploymentTransaction)> { + let envelope = fixture_envelope(text, DeploymentTransaction::TYPE)?; + let legacy = rmp_serde::from_slice(&envelope.payload)?; + Ok((legacy, read_transaction_record(&envelope)?)) + } + + #[test] + fn a_v2_generation_lifts_to_the_decisions_it_encoded() -> Result<()> { + for text in [FIXTURE_GENERATION, FIXTURE_GENERATION_REPAIRING] { + let (legacy, lifted) = fixture_generation(text)?; + // Every receipt the old decisions read is the same receipt, now + // tagged Odin-correlated. + let odin = lifted.odin_receipts()?; + assert_eq!(odin.ready, &legacy.ready); + assert_eq!(odin.latest, &legacy.latest_odin_observation); + assert_eq!(lifted.odin_authority.as_ref(), Some(&legacy.odin_authority)); + assert_eq!( + lifted.odin_publisher_sequence_cursor, + legacy.odin_publisher_sequence_cursor + ); + assert_eq!(lifted.ready.class(), ReadinessClass::OdinCorrelated); + // The repair intent still decides whatever it decided. + assert_eq!( + lifted.route_repair_started_at_unix_millis, + legacy.route_repair_started_at_unix_millis + ); + assert_eq!(lifted.routing, legacy.routing); + assert_eq!(lifted.leasing, legacy.leasing); + assert_eq!(lifted.plan, legacy.plan); + assert_eq!(lifted.expected, legacy.expected); + assert_eq!(lifted.activation, legacy.activation); + assert_eq!(lifted.workload, legacy.workload); + assert_eq!(lifted.generation_id, legacy.generation_id); + // The new state starts empty and the plan is still a v2 plan. + assert_eq!(lifted.route_supervision, Some(RouteSupervisionState::default())); + assert_eq!(lifted.continuity_backoff, ContinuityBackoff::default()); + assert_eq!(lifted.plan.schema, crate::deployment_plan::COMPILED_DEPLOYMENT_PLAN_SCHEMA_V2); + assert_eq!( + lifted.plan.phase_deadlines(), + crate::deployment_plan::PhaseDeadlines::IDUNN_DEFAULTS + ); + } + let (_, repairing) = fixture_generation(FIXTURE_GENERATION_REPAIRING)?; + assert!(repairing.route_repair_started_at_unix_millis.is_some()); + let (_, plain) = fixture_generation(FIXTURE_GENERATION)?; + assert!(plain.route_repair_started_at_unix_millis.is_none()); + Ok(()) + } + + #[test] + fn v2_and_v3_transactions_lift_to_the_decisions_they_encoded() -> Result<()> { + let mut phases = Vec::new(); + for (name, text) in FIXTURE_TRANSACTIONS { + let (legacy, lifted) = fixture_transaction(text)?; + phases.push((name, lifted.phase)); + assert_eq!(lifted.schema_version, DEPLOYMENT_TRANSACTION_SCHEMA); + assert_eq!(lifted.phase, legacy.phase); + assert_eq!(lifted.completion, legacy.completion); + assert_eq!(lifted.plan, legacy.plan); + assert_eq!(lifted.expected, legacy.expected); + assert_eq!(lifted.leasing, legacy.leasing); + assert_eq!(lifted.fencing, legacy.fencing); + assert_eq!(lifted.routing, legacy.routing); + assert_eq!(lifted.warming, legacy.warming); + assert_eq!(lifted.latest_odin_observation, legacy.latest_odin_observation); + assert_eq!( + lifted.odin_publisher_sequence_cursor, + legacy.odin_publisher_sequence_cursor + ); + assert_eq!( + lifted.ready.as_ref().and_then(ReadinessEvidence::odin), + legacy.ready.as_ref() + ); + assert_eq!(lifted.phase_deadline, None); + assert_eq!(lifted.lease_adoption, None); + assert_eq!(lifted.owns_target_authority(), legacy.phase != DeploymentPhase::Complete); + } + assert_eq!( + phases.iter().map(|(_, phase)| *phase).collect::>(), + [ + DeploymentPhase::Fencing, + DeploymentPhase::Leasing, + DeploymentPhase::AwaitingReady, + DeploymentPhase::Routing, + DeploymentPhase::Committing, + DeploymentPhase::Complete, + ] + ); + + // The genuine v2 layout lifts to the same record as the v3 one. + let (_, from_v2) = fixture_transaction(FIXTURE_TRANSACTION_V2)?; + let (_, from_v3) = fixture_transaction(FIXTURE_TRANSACTIONS[4].1)?; + assert_eq!(from_v2, from_v3); + + // A terminal failure predating recovery names the recovery it always did. + let (_, failed) = fixture_transaction(FIXTURE_TRANSACTIONS[5].1)?; + assert!(matches!( + failed.completion, + Some(TransactionCompletion::FailedAfterFencing { + recovery: TerminalRecovery::RestoreIncumbent, + .. + }) + )); + assert!(failed.is_terminal()); + Ok(()) + } + + #[test] + fn the_boot_migration_rewrites_every_legacy_record_once() -> Result<()> { + // The fixtures were cut from one build, so their records share keys + // and each migrates in a store of its own. + let mut fixtures = vec![ + fixture_envelope(FIXTURE_GENERATION, AdmittedGeneration::TYPE)?, + fixture_envelope(FIXTURE_GENERATION_REPAIRING, AdmittedGeneration::TYPE)?, + fixture_envelope(FIXTURE_TRANSACTION_V2, DeploymentTransaction::TYPE)?, + ]; + for (_, text) in FIXTURE_TRANSACTIONS { + fixtures.push(fixture_envelope(text, DeploymentTransaction::TYPE)?); + } + for envelope in fixtures { + let temporary = tempfile::tempdir()?; + let path = temporary.path().join("control.cc"); + let store = SingleFileMessagePackBackingStore::new(&path); + assert!(store.compare_exchange( + &[CultCacheExpectedEnvelope { + r#type: envelope.r#type.clone(), + key: envelope.key.clone(), + current: None, + }], + std::slice::from_ref(&envelope), + )?); + let debug_of = |envelope: &CultCacheEnvelope| -> Result { + Ok(if envelope.r#type == AdmittedGeneration::TYPE { + format!("{:?}", read_generation_record(envelope)?) + } else { + format!("{:?}", read_transaction_record(envelope)?) + }) + }; + let before = debug_of(&envelope)?; + + assert_eq!(migrate_control_store_to_current_schema(&path)?, 1); + assert_eq!(migrate_control_store_to_current_schema(&path)?, 0); + + let after = store.pull_all_read_only_snapshot()?; + assert_eq!(after.len(), 1); + let expected_schema = if envelope.r#type == AdmittedGeneration::TYPE { + ADMITTED_GENERATION_SCHEMA + } else { + DEPLOYMENT_TRANSACTION_SCHEMA + }; + assert_eq!(after[0].schema_id.as_deref(), Some(expected_schema)); + assert_eq!(after[0].stored_at, envelope.stored_at); + // The rewritten record is canonical and means what the legacy one meant. + assert_eq!(debug_of(&after[0])?, before); + } + Ok(()) + } + + #[test] + fn history_still_reads_legacy_transactions() -> Result<()> { + let temporary = tempfile::tempdir()?; + let state_store = temporary.path().join("control.cc"); + let envelope = fixture_envelope(FIXTURE_TRANSACTIONS[5].1, DeploymentTransaction::TYPE)?; + SingleFileMessagePackBackingStore::new(&history_store_path(&state_store)) + .compare_exchange( + &[CultCacheExpectedEnvelope { + r#type: DeploymentTransaction::TYPE.into(), + key: envelope.key.clone(), + current: None, + }], + std::slice::from_ref(&envelope), + )?; + let archived = read_history_transactions(&state_store); + assert_eq!(archived.len(), 1); + assert_eq!(archived[0].transaction_id, envelope.key); + assert_eq!(archived[0].schema_version, DEPLOYMENT_TRANSACTION_SCHEMA); + Ok(()) + } + + #[test] + fn readiness_class_follows_the_expected_odin_dependency() -> Result<()> { + let (_, generation) = fixture_generation(FIXTURE_GENERATION)?; + let mut expected = generation.expected.clone(); + assert!(expected.dependencies.iter().any(|dependency| { + dependency.kind == "shared-infrastructure" + && dependency.capability == ODIN_RENDEZVOUS_CAPABILITY + })); + assert_eq!(ReadinessClass::of(&expected), ReadinessClass::OdinCorrelated); + for dependency in &mut expected.dependencies { + // Same capability, other kind: only the shared-infrastructure + // declaration makes a target Odin-correlated. + dependency.kind = "required".into(); + } + assert_eq!(ReadinessClass::of(&expected), ReadinessClass::RouteProof); + expected.dependencies.clear(); + assert_eq!(ReadinessClass::of(&expected), ReadinessClass::RouteProof); + Ok(()) + } + + fn route_proof_evidence() -> ReadinessEvidence { + let canonical_bytes = vec![7, 7, 7]; + ReadinessEvidence::RouteProof { + evidence: RuntimePresenceEvidence { + canonical_sha256: sha256_id(&canonical_bytes), + canonical_bytes, + message_id: "challenge-1".into(), + challenged_at_unix_millis: 10, + admitted_at_unix_millis: 11, + }, + } + } + + #[test] + fn route_proof_readiness_is_refused_for_a_target_that_declares_odin() -> Result<()> { + let (_, generation) = fixture_generation(FIXTURE_GENERATION)?; + let mut proof = generation.clone(); + proof.ready = route_proof_evidence(); + proof.latest_odin_observation = None; + proof.odin_authority = None; + // The fixture's Expected declares Odin, so route proof is not its class. + assert!(proof.validate().is_err()); + + // Mixed shapes are refused whatever the class. + let mut mixed = generation.clone(); + mixed.latest_odin_observation = None; + assert!(mixed.validate().is_err()); + let mut mixed = generation; + mixed.odin_authority = None; + assert!(mixed.validate().is_err()); + + let mut transaction = fixture_transaction(FIXTURE_TRANSACTIONS[3].1)?.1; + transaction.validate()?; + transaction.ready = Some(route_proof_evidence()); + assert!(transaction.validate().is_err()); + Ok(()) + } + + #[test] + fn route_supervision_state_exists_exactly_for_a_promoted_route() -> Result<()> { + let (_, generation) = fixture_generation(FIXTURE_GENERATION)?; + let mut missing = generation.clone(); + missing.route_supervision = None; + assert!(missing.validate().is_err()); + + let mut unrouted = generation; + unrouted.route_supervision = None; + unrouted.routing = RoutingEvidence::SkippedUnrouted; + // Unrouted while Expected still names a route: refused for that reason + // too, so the test above pins the supervision rule on its own. + assert!(unrouted.validate().is_err()); + Ok(()) + } + + #[test] + fn a_new_generation_inherits_actuation_and_backoff_but_not_observation() -> Result<()> { + let (_, mut incumbent) = fixture_generation(FIXTURE_GENERATION)?; + let mut state = RouteSupervisionState { + last_challenge_at_unix_millis: Some(5), + consecutive_failures: 4, + next_challenge_at_unix_millis: Some(9), + degraded_since_unix_millis: Some(6), + actuations: ActuationWindow { + window_started_at_unix_millis: 3, + count: 2, + }, + }; + incumbent.route_supervision = Some(state.clone()); + incumbent.continuity_backoff = ContinuityBackoff { + window_started_at_unix_millis: Some(1), + attempts: 2, + next_restart_at_unix_millis: Some(8), + }; + let committing = fixture_transaction(FIXTURE_TRANSACTIONS[4].1)?.1; + incumbent.odin_receipts()?; + let authority = incumbent + .odin_authority + .clone() + .context("fixture generation has no Odin authority")?; + let next = AdmittedGeneration::from_transaction( + &committing, + authority.clone(), + Some(&incumbent), + 1_700_000_200_000, + )?; + state = RouteSupervisionState { + actuations: state.actuations, + ..RouteSupervisionState::default() + }; + assert_eq!(next.route_supervision, Some(state)); + assert_eq!(next.continuity_backoff, incumbent.continuity_backoff); + + let first = AdmittedGeneration::from_transaction( + &committing, + authority, + None, + 1_700_000_200_000, + )?; + assert_eq!(first.route_supervision, Some(RouteSupervisionState::default())); + assert_eq!(first.continuity_backoff, ContinuityBackoff::default()); + Ok(()) + } + + #[test] + fn phase_deadlines_follow_the_plan_and_only_cover_post_fencing_phases() -> Result<()> { + let (_, generation) = fixture_generation(FIXTURE_GENERATION)?; + let plan = &generation.plan; + let defaults = plan.phase_deadlines(); + for (phase, seconds) in [ + (DeploymentPhase::Fencing, defaults.fencing_seconds), + (DeploymentPhase::Leasing, defaults.leasing_seconds), + (DeploymentPhase::AwaitingReady, defaults.awaiting_ready_seconds), + (DeploymentPhase::Routing, defaults.routing_seconds), + (DeploymentPhase::Committing, defaults.committing_seconds), + ] { + let deadline = PhaseDeadline::entering(phase, plan, 1_000).context("no deadline")?; + assert_eq!(deadline.phase, phase); + assert_eq!(deadline.entered_at_unix_millis, 1_000); + assert_eq!(deadline.deadline_at_unix_millis, 1_000 + u64::from(seconds) * 1000); + } + for phase in [ + DeploymentPhase::Sealing, + DeploymentPhase::Starting, + DeploymentPhase::Warming, + DeploymentPhase::Complete, + ] { + assert!(PhaseDeadline::entering(phase, plan, 1_000).is_none()); + } + Ok(()) + } + + #[test] + fn transition_stamps_the_deadline_of_the_phase_it_enters() -> Result<()> { + let world = EngineFixture::new()?; + // Routing, already holding the route receipt Committing requires. + let (_, mut transaction) = fixture_transaction(FIXTURE_TRANSACTIONS[3].1)?; + assert_eq!(transaction.phase, DeploymentPhase::Routing); + transaction.routing = fixture_transaction(FIXTURE_TRANSACTIONS[4].1)?.1.routing; + let envelope = transaction_envelope(&transaction, transaction.updated_at_unix_millis)?; + let command = command_envelope(&command(CommandKind::Continuity), 100)?; + assert!( + SingleFileMessagePackBackingStore::new(&world.state_store).compare_exchange( + &[ + CultCacheExpectedEnvelope { + r#type: DeploymentCommand::TYPE.into(), + key: command.key.clone(), + current: None, + }, + CultCacheExpectedEnvelope { + r#type: DeploymentTransaction::TYPE.into(), + key: transaction.transaction_id.clone(), + current: None, + }, + ], + &[command, envelope], + )? + ); + let stored = ControlSnapshot::read(&world.state_store)? + .transactions + .into_iter() + .next() + .context("stored transaction vanished")?; + world.engine.transition(&stored, DeploymentPhase::Committing)?; + let advanced = ControlSnapshot::read(&world.state_store)? + .transactions + .into_iter() + .next() + .context("advanced transaction vanished")?; + let deadline = advanced.value.phase_deadline.context("no deadline stamped")?; + assert_eq!(deadline.phase, DeploymentPhase::Committing); + assert_eq!( + deadline.deadline_at_unix_millis - deadline.entered_at_unix_millis, + u64::from(advanced.value.plan.as_ref().unwrap().phase_deadlines().committing_seconds) + * 1000 + ); + assert_eq!(deadline.entered_at_unix_millis, advanced.value.updated_at_unix_millis); + Ok(()) + } + + #[test] + fn a_deadline_must_describe_the_current_post_fencing_phase() -> Result<()> { + let (_, mut transaction) = fixture_transaction(FIXTURE_TRANSACTIONS[2].1)?; + let plan = transaction.plan.clone().unwrap(); + let now = transaction.updated_at_unix_millis; + transaction.phase_deadline = + PhaseDeadline::entering(DeploymentPhase::AwaitingReady, &plan, now); + transaction.validate()?; + let mut wrong_phase = transaction.clone(); + wrong_phase.phase_deadline = + PhaseDeadline::entering(DeploymentPhase::Routing, &plan, now); + assert!(wrong_phase.validate().is_err()); + let mut backwards = transaction.clone(); + backwards.phase_deadline.as_mut().unwrap().deadline_at_unix_millis = now; + assert!(backwards.validate().is_err()); + // Entry is not ordered against the wall-clock stamp of later writes. + let mut entered_after_the_stamp = transaction; + entered_after_the_stamp.phase_deadline = + PhaseDeadline::entering(DeploymentPhase::AwaitingReady, &plan, now + 1); + entered_after_the_stamp.validate()?; + Ok(()) + } + + // --------------------------------------------------------------------- + // The phase machine, driven by the real Engine past Fencing. + // --------------------------------------------------------------------- + + /// A workload port with no systemd behind it: observing a workload + /// returns what was observed, stopping and discarding succeed, and + /// anything that would launch a process refuses. + struct StillWorkload; + + impl WorkloadPort for StillWorkload { + fn install( + &self, + _: &CompiledDeploymentPlan, + _: &crate::drivers::MaterializedRelease, + ) -> Result { + bail!("StillWorkload launches nothing") + } + fn prepare_activation( + &self, + _: &CompiledDeploymentPlan, + _: &IdunnExpectedIncarnationRecord, + _: IdunnRuntimeActivationLaunch, + ) -> Result { + bail!("StillWorkload launches nothing") + } + fn start_prepared( + &self, + _: &CompiledDeploymentPlan, + _: &SealedRelease, + _: &crate::drivers::InstalledReleaseObservation, + _: &IdunnExpectedIncarnationRecord, + _: &IdunnRuntimeActivationRecord, + ) -> Result { + bail!("StillWorkload launches nothing") + } + fn discard_prepared( + &self, + _: &CompiledDeploymentPlan, + _: &IdunnExpectedIncarnationRecord, + _: &IdunnRuntimeActivationRecord, + ) -> Result<()> { + Ok(()) + } + fn observe( + &self, + _: &IdunnExpectedIncarnationRecord, + _: &IdunnRuntimeActivationRecord, + prior: &WorkloadObservation, + ) -> Result { + Ok(prior.clone()) + } + fn stop(&self, _: &WorkloadObservation) -> Result<()> { + Ok(()) + } + fn is_permanently_stopped(&self, _: &WorkloadObservation) -> Result { + Ok(false) + } + } + + /// A Continuity transaction for an unrouted, stateless target, sitting at + /// `phase` (Warming or later) with every earlier phase's evidence in place. The plan, sealed + /// release, Expected, activation and Warming evidence are the real + /// constructions; only the workload and isolation observations are + /// borrowed from a recorded transaction. Continuity is chosen because a + /// Deploy would need a frozen source and a signed brake record, which no + /// phase past Fencing reads. + fn transaction_at( + world: &EngineFixture, + phase: DeploymentPhase, + ) -> Result { + use crate::deployment_plan::tests::{ + BINDING, RECIPE, artifact_receipt, external_input_receipt, source, + }; + let provider = enroll_service_identity_at::( + &world.root.join("identities/provider.cc"), + )?; + let provider_anchor = world.root.join("identities/provider-anchor.cc"); + export_service_identity_trust_anchor(&provider, &provider_anchor)?; + + let (binding_head, binding_tail) = BINDING + .split_once("[route]") + .context("binding has no route table")?; + let binding = format!( + "{binding_head}[brakes]{}", + binding_tail + .split_once("[brakes]") + .context("binding has no brakes table")? + .1 + ) + .replace( + "/etc/gamecult/trust/service.cc", + &provider_anchor.display().to_string(), + ) + .replace("service-runtime-signer", &provider.entry().identity_id); + let recipe = RECIPE + .split("[[dependencies]]") + .next() + .context("recipe is empty")? + .replace("route_required = true", "route_required = false") + .replace( + r#"["GAMECULT_IDUNN_CANDIDATE_BIND", "GAMECULT_IDUNN_RUNTIME_BUNDLE"]"#, + r#"["GAMECULT_IDUNN_RUNTIME_BUNDLE"]"#, + ); + let plan = compile_deployment_plan( + recipe.as_bytes(), + binding.as_bytes(), + source(&recipe), + "service-incarnation-1", + None, + 110, + &[], + )?; + let release = SealedRelease::new( + &plan, + vec![artifact_receipt()], + vec![external_input_receipt()], + 120, + )?; + let expected = release.expected_projection(&plan)?; + assert!(!expected.write_lease_required && expected.route.is_none()); + + let now = now_millis()?; + let command = DeploymentCommand { + schema_version: DEPLOYMENT_COMMAND_SCHEMA.into(), + command_id: "continuity-service".into(), + kind: CommandKind::Continuity, + selector: "service".into(), + requested_by: "test".into(), + requested_at_unix_millis: 100, + }; + let mut transaction = DeploymentTransaction::new(&command, "service".into(), 0, None, now)?; + let activation = IdunnRuntimeActivationLaunch::issue( + &expected, + runtime_instance_id(&transaction.transaction_id)?, + now, + &world.engine.idunn_signer, + )? + .activation() + .clone(); + let mut workload = fixture_transaction(FIXTURE_TRANSACTIONS[0].1)? + .1 + .workload + .context("recorded transaction has no workload")?; + transaction.lifecycle_authorized_at_unix_millis = Some(now); + transaction.expected_publication_sha256 = Some(expected.canonical_sha256()?); + transaction.activation_publication_sha256 = Some(activation.canonical_sha256()?); + match &mut workload { + WorkloadObservation::Systemd(observed) => { + observed.runtime_instance_id = activation.runtime_instance_id.clone(); + } + WorkloadObservation::Host(_) => bail!("recorded workload is not a systemd unit"), + } + let recorded = fixture_transaction(FIXTURE_TRANSACTIONS[0].1)?.1; + transaction.isolation = recorded.isolation; + transaction.installed_release = Some(crate::drivers::InstalledReleaseObservation { + sealed_release_id: release.sealed_release_id.clone(), + root: PathBuf::from("/srv/service/releases/test"), + }); + transaction.sealed_release = Some(release); + transaction.expected = Some(expected); + transaction.activation = Some(activation); + transaction.workload = Some(workload); + transaction.plan = Some(plan); + // Odin's first word about the candidate, before it was Ready. + let warming = signed_correlation(world, &transaction, 4, false)?; + let authenticated = world.engine.authenticate_topology_bytes( + &ControlSnapshot::read(&world.state_store)?, + &transaction, + &warming, + None, + now, + )?; + transaction.warming = Some(WarmingEvidence::OdinTopology { + evidence: TopologyEvidence::from_authenticated(&authenticated, now)?, + }); + transaction.odin_publisher_sequence_cursor = 4; + transaction.enter_phase(phase, now); + transaction.validate()?; + + let store = SingleFileMessagePackBackingStore::new(&world.state_store); + assert!(store.compare_exchange( + &[ + CultCacheExpectedEnvelope { + r#type: DeploymentCommand::TYPE.into(), + key: command.command_id.clone(), + current: None, + }, + CultCacheExpectedEnvelope { + r#type: DeploymentTransaction::TYPE.into(), + key: transaction.transaction_id.clone(), + current: None, + }, + ], + &[ + command_envelope(&command, command.requested_at_unix_millis)?, + transaction_envelope(&transaction, now)?, + ], + )?); + Ok(transaction) + } + + /// Odin's correlation for the transaction's incarnation, signed by the key + /// the Engine trusts and stamped now. + fn signed_correlation( + world: &EngineFixture, + transaction: &DeploymentTransaction, + sequence: u64, + ready: bool, + ) -> Result> { + let expected = transaction.expected.as_ref().context("no Expected")?; + let activation = transaction.activation.as_ref().context("no activation")?; + let mut record = OdinRuntimeTopologyCorrelationRecord { + schema_version: cultnet_rs::ODIN_RUNTIME_TOPOLOGY_CORRELATION_SCHEMA.into(), + target: expected.target.clone(), + expected_projection_sha256: expected.canonical_sha256()?, + expected: true, + current_activation_sha256: Some(activation.canonical_sha256()?), + signed_presence_sha256: Some(sha256_id(b"presence")), + observed_presence_state: Some("active".into()), + observed_presence_publisher_sequence: Some(sequence), + observed_write_lease_sha256: None, + observed_capabilities: expected + .capabilities + .iter() + .map(|capability| cultnet_rs::GameCultRuntimeCapability { + capability: capability.capability.clone(), + schema: capability.schema.clone(), + compatibility: capability.compatibility.clone(), + capacity: 1, + }) + .collect(), + runtime_id: expected.runtime_id.clone(), + runtime_instance_id: Some(activation.runtime_instance_id.clone()), + present: true, + ready, + dependencies: Vec::new(), + disagreements: Vec::new(), + signer_identity_id: world.odin_signer.entry().identity_id.clone(), + publisher_sequence: sequence, + observed_at_unix_millis: now_millis()?, + signature_algorithm: "ed25519".into(), + signature: Vec::new(), + }; + record.signature = world + .odin_signer + .sign::(&record.unsigned_signature_payload()?) + .signature; + record.canonical_bytes() + } + + /// Odin publishes its Ready correlation for the transaction incarnation. + fn odin_reports_ready( + world: &EngineFixture, + transaction: &DeploymentTransaction, + sequence: u64, + ) -> Result<()> { + let expected = transaction.expected.as_ref().context("no Expected")?; + SingleFileMessagePackBackingStore::new(&world.engine.options.odin_correlation_store) + .insert_entry_if_absent(CultCacheEnvelope { + key: crate::drivers::incarnation_key_of( + &expected.target, + &expected.canonical_sha256()?, + ), + r#type: OdinRuntimeTopologyCorrelationRecord::TYPE.into(), + payload: signed_correlation(world, transaction, sequence, true)?, + stored_at: rfc3339_millis(now_millis()?)?, + schema_id: Some(cultnet_rs::ODIN_RUNTIME_TOPOLOGY_CORRELATION_SCHEMA.into()), + })?; + Ok(()) + } + + fn resident(world: &EngineFixture) -> Result> { + ControlSnapshot::read(&world.state_store)? + .transactions + .into_iter() + .next() + .context("the transaction left the live set") + } + + /// The transaction wherever it now lives: live, or archived once terminal. + fn latest(world: &EngineFixture) -> Result { + match resident(world) { + Ok(stored) => Ok(stored.value), + Err(_) => read_history_transactions(&world.state_store) + .into_iter() + .next() + .context("the transaction is in neither the live set nor history"), + } + } + + /// One engine step at a time until `stop` holds, recording each phase + /// entered and checking after every step that the deadline on the record + /// is exactly the current post-fencing phase's, and absent outside one. + fn drive( + world: &EngineFixture, + stop: impl Fn(&DeploymentTransaction) -> bool, + ) -> Result> { + let mut phases = Vec::new(); + for _ in 0..40 { + let Ok(current) = resident(world) else { + return Ok(phases); + }; + if stop(¤t.value) { + return Ok(phases); + } + world.engine.advance_transaction(¤t)?; + let after = latest(world)?; + match &after.phase_deadline { + Some(deadline) => assert_eq!(deadline.phase, after.phase), + None => assert!( + !(DeploymentPhase::Fencing..=DeploymentPhase::Committing) + .contains(&after.phase), + "a post-fencing record lost its deadline" + ), + } + if phases.last() != Some(&after.phase) { + phases.push(after.phase); + } + } + bail!("the transaction did not reach the stop condition in 40 steps") + } + + #[test] + fn an_admission_runs_from_fencing_to_complete_and_commits() -> Result<()> { + let world = EngineFixture::with_workload(Arc::new(StillWorkload))?; + let seeded = transaction_at(&world, DeploymentPhase::Fencing)?; + odin_reports_ready(&world, &seeded, 5)?; + + let phases = drive(&world, |transaction| { + transaction.phase == DeploymentPhase::Complete + })?; + assert_eq!( + phases, + [ + DeploymentPhase::Fencing, + DeploymentPhase::Leasing, + DeploymentPhase::AwaitingReady, + DeploymentPhase::Routing, + DeploymentPhase::Committing, + DeploymentPhase::Complete, + ] + ); + let finished = latest(&world)?; + assert_eq!(finished.phase_deadline, None); + assert!(matches!( + finished.completion, + Some(TransactionCompletion::Admitted { .. }) + )); + let snapshot = ControlSnapshot::read(&world.state_store)?; + let admitted = snapshot + .admitted_for("service") + .context("commit wrote no admitted generation")?; + assert_eq!(admitted.value.transaction_id, finished.transaction_id); + assert_eq!(Some(&admitted.value.expected), seeded.expected.as_ref()); + Ok(()) + } + + #[test] + fn a_pre_fence_abort_runs_to_complete_without_a_deadline() -> Result<()> { + let world = EngineFixture::with_workload(Arc::new(StillWorkload))?; + transaction_at(&world, DeploymentPhase::Warming)?; + let warming = resident(&world)?; + assert_eq!(warming.value.phase_deadline, None); + + world + .engine + .begin_pre_fencing_abort(&warming, anyhow!("candidate refused"))?; + drive(&world, |transaction| transaction.completion.is_some())?; + let finished = latest(&world)?; + assert_eq!(finished.phase, DeploymentPhase::Complete); + assert_eq!(finished.phase_deadline, None); + assert!(matches!( + finished.completion, + Some(TransactionCompletion::FailedBeforeFencing { .. }) + )); + assert!(finished.is_terminal()); + Ok(()) + } + + #[test] + fn a_post_fence_abort_runs_to_complete() -> Result<()> { + let world = EngineFixture::with_workload(Arc::new(StillWorkload))?; + let seeded = transaction_at(&world, DeploymentPhase::Fencing)?; + odin_reports_ready(&world, &seeded, 5)?; + drive(&world, |transaction| { + transaction.phase == DeploymentPhase::Routing + })?; + let routing = resident(&world)?; + assert!(routing.value.phase_deadline.is_some()); + + world + .engine + .begin_post_fencing_abort(&routing, anyhow!("candidate refused"))?; + drive(&world, |transaction| transaction.completion.is_some())?; + let finished = latest(&world)?; + assert_eq!(finished.phase, DeploymentPhase::Complete); + assert_eq!(finished.phase_deadline, None); + assert!(matches!( + finished.completion, + Some(TransactionCompletion::FailedAfterFencing { .. }) + )); + assert!( + ControlSnapshot::read(&world.state_store)? + .admitted_for("service") + .is_none(), + "an aborted candidate was admitted" + ); + Ok(()) + } + + #[test] + fn entering_a_phase_owns_the_deadline_and_a_stepped_clock_cannot_wedge_it() -> Result<()> { + let (_, mut transaction) = fixture_transaction(FIXTURE_TRANSACTIONS[4].1)?; + let plan = transaction.plan.clone().unwrap(); + let base = transaction.created_at_unix_millis; + transaction.enter_phase(DeploymentPhase::Routing, base + 1_000); + let deadline = transaction.phase_deadline.context("no deadline on entry")?; + assert_eq!(deadline.phase, DeploymentPhase::Routing); + assert_eq!( + deadline.deadline_at_unix_millis, + base + 1_000 + u64::from(plan.phase_deadlines().routing_seconds) * 1000 + ); + // A same-phase write after the wall clock stepped backwards is still a + // valid record: the deadline is fixed at entry, not ordered against + // later stamps, and neither is the creation time. + transaction.updated_at_unix_millis = deadline.entered_at_unix_millis - 1; + transaction.validate()?; + transaction.updated_at_unix_millis = base - 1; + transaction.validate()?; + transaction.enter_phase(DeploymentPhase::Committing, base + 2_000); + assert_eq!( + transaction.phase_deadline.unwrap().phase, + DeploymentPhase::Committing + ); + transaction.enter_phase(DeploymentPhase::Complete, base + 3_000); + assert_eq!(transaction.phase_deadline, None); + Ok(()) + } + + #[test] + fn an_undecodable_history_record_is_counted_and_never_dropped_silently() -> Result<()> { + let (finished, _) = terminal_transaction_with_command("ghostlight")?; + let good = transaction_envelope(&finished, finished.updated_at_unix_millis)?; + let mut torn = good.clone(); + torn.key = "tx-torn".into(); + // 0xc1 is msgpack's never-used byte: decodable by nothing. + torn.payload = vec![0xc1]; + let mut foreign = good.clone(); + foreign.key = "tx-foreign".into(); + foreign.schema_id = Some(DEPLOYMENT_TRANSACTION_SCHEMA_V3.into()); + foreign.payload = vec![0xc1]; + + let (decoded, undecodable) = + decode_history_transactions(vec![good, torn, foreign]); + assert_eq!(decoded, [finished]); + assert_eq!( + undecodable.iter().map(|(key, _)| key.as_str()).collect::>(), + ["tx-torn", "tx-foreign"] + ); + assert!(undecodable.iter().all(|(_, error)| !error.is_empty())); + Ok(()) + } + + /// The layout `IsolationEvidence` had before c848459 turned it into an + /// untagged Linux/Host enum. That commit claimed old records decode + /// unchanged; this is the check with the old shape itself. + #[test] + fn isolation_evidence_from_before_the_host_variant_still_decodes() -> Result<()> { + #[derive(Serialize)] + struct BeforeTheHostVariant { + candidate_uid: u32, + candidate_pid_namespace_id: u64, + candidate_mount_namespace_id: u64, + incumbent_uid: Option, + incumbent_pid_namespace_id: Option, + incumbent_mount_namespace_id: Option, + } + for incumbent in [None, Some(7)] { + let old = BeforeTheHostVariant { + candidate_uid: 61_000, + candidate_pid_namespace_id: 4_026_531_836, + candidate_mount_namespace_id: 4_026_531_841, + incumbent_uid: incumbent, + incumbent_pid_namespace_id: incumbent.map(|_| 8), + incumbent_mount_namespace_id: incumbent.map(|_| 9), + }; + for bytes in [rmp_serde::to_vec(&old)?, rmp_serde::to_vec_named(&old)?] { + let decoded: IsolationEvidence = rmp_serde::from_slice(&bytes)?; + let IsolationEvidence::Linux(linux) = decoded else { + bail!("an old Linux record decoded as a host record"); + }; + assert_eq!(linux.candidate_uid, 61_000); + assert_eq!(linux.incumbent_uid, incumbent); + } + } + Ok(()) + } + + #[test] + fn an_admitted_odin_without_odin_authority_is_refused_not_replaced_by_the_bootstrap_key() -> Result<()> { + let world = EngineFixture::new()?; + let empty = ControlSnapshot::read(&world.state_store)?; + assert_eq!( + world.engine.current_odin_authority(&empty)?, + world.engine.bootstrap_odin_authority + ); + + let (_, mut odin) = fixture_generation(FIXTURE_GENERATION)?; + odin.target = "odin".into(); + odin.odin_authority = Some(AdmittedOdinAuthority::from_anchor( + &world.odin_signer.trust_anchor()?, + )?); + let mut with_authority = ControlSnapshot::default(); + with_authority.admitted.push(Stored { + value: odin.clone(), + envelope: CultCacheEnvelope { + key: "odin".into(), + r#type: AdmittedGeneration::TYPE.into(), + payload: Vec::new(), + stored_at: "1970-01-01T00:00:00.100Z".into(), + schema_id: Some(ADMITTED_GENERATION_SCHEMA.into()), + }, + }); + assert_eq!( + world.engine.current_odin_authority(&with_authority)?, + odin.odin_authority.clone().unwrap() + ); + + odin.odin_authority = None; + let mut without = ControlSnapshot::default(); + without.admitted.push(Stored { + value: odin.clone(), + envelope: CultCacheEnvelope { + key: "odin".into(), + r#type: AdmittedGeneration::TYPE.into(), + payload: Vec::new(), + stored_at: "1970-01-01T00:00:00.100Z".into(), + schema_id: Some(ADMITTED_GENERATION_SCHEMA.into()), + }, + }); + let error = world + .engine + .current_odin_authority(&without) + .expect_err("a route-proof Odin must not fall back to the bootstrap key"); + assert!(format!("{error:#}").contains("no Odin authority"), "{error:#}"); + Ok(()) + } + + fn error_text(result: Result<()>) -> String { + format!("{:#}", result.expect_err("the record must be refused")) + } + + /// A route-proof generation from a real admission: the world's Expected + /// declares no Odin dependency, so route proof is its class. + fn route_proof_generation() -> Result { + let world = EngineFixture::with_workload(Arc::new(StillWorkload))?; + let seeded = transaction_at(&world, DeploymentPhase::Fencing)?; + odin_reports_ready(&world, &seeded, 5)?; + drive(&world, |transaction| { + transaction.phase == DeploymentPhase::Committing + })?; + let mut committing = resident(&world)?.value; + assert_eq!( + ReadinessClass::of(committing.expected.as_ref().unwrap()), + ReadinessClass::RouteProof + ); + committing.ready = Some(route_proof_evidence()); + committing.latest_odin_observation = None; + let generation = AdmittedGeneration::from_transaction( + &committing, + world.engine.bootstrap_odin_authority.clone(), + None, + now_millis()?, + )?; + generation.validate()?; + Ok(generation) + } + + #[test] + fn a_route_proof_generation_is_admitted_only_in_its_exact_shape() -> Result<()> { + let generation = route_proof_generation()?; + assert_eq!(generation.ready.class(), ReadinessClass::RouteProof); + assert!(generation.odin_authority.is_none()); + assert!(generation.latest_odin_observation.is_none()); + assert!(generation.odin_receipts().is_err()); + + // Route proof carries no Odin receipt and no Odin authority. + let mut with_receipt = generation.clone(); + with_receipt.latest_odin_observation = Some(topology(1, 1)); + assert!(with_receipt.validate().is_err()); + let mut with_authority = generation.clone(); + with_authority.odin_authority = Some(AdmittedOdinAuthority { + signer_identity_id: "odin-signer".into(), + signer_public_key: vec![1; 32], + }); + assert!(with_authority.validate().is_err()); + + // Its readiness evidence is checked by shape. + let ReadinessEvidence::RouteProof { evidence } = &generation.ready else { + bail!("not route proof"); + }; + let mut tampered = generation.clone(); + tampered.ready = ReadinessEvidence::RouteProof { + evidence: RuntimePresenceEvidence { + canonical_sha256: sha256_id(b"another"), + ..evidence.clone() + }, + }; + assert!(error_text(tampered.validate()).contains("runtime presence evidence")); + let mut untimed = generation.clone(); + untimed.ready = ReadinessEvidence::RouteProof { + evidence: RuntimePresenceEvidence { + admitted_at_unix_millis: evidence.challenged_at_unix_millis - 1, + ..evidence.clone() + }, + }; + assert!(error_text(untimed.validate()).contains("timeline")); + Ok(()) + } + + #[test] + fn odin_correlated_readiness_evidence_is_checked_by_shape() -> Result<()> { + let (_, generation) = fixture_generation(FIXTURE_GENERATION)?; + generation.validate()?; + let ReadinessEvidence::OdinCorrelated { evidence } = &generation.ready else { + bail!("fixture is not Odin-correlated"); + }; + for broken in [ + TopologyEvidence { + canonical_sha256: sha256_id(b"another"), + ..evidence.clone() + }, + TopologyEvidence { + publisher_sequence: 0, + ..evidence.clone() + }, + TopologyEvidence { + admitted_at_unix_millis: 0, + ..evidence.clone() + }, + ] { + let mut tampered = generation.clone(); + tampered.ready = ReadinessEvidence::OdinCorrelated { evidence: broken }; + assert!(tampered.validate().is_err()); + } + Ok(()) + } + + #[test] + fn lease_adoption_evidence_is_checked_by_shape_on_the_transaction() -> Result<()> { + let (_, transaction) = fixture_transaction(FIXTURE_TRANSACTIONS[2].1)?; + let adoption = LeaseAdoptionEvidence { + write_lease_sha256: sha256_id(b"lease"), + signed_presence_sha256: sha256_id(b"presence"), + source: AdoptionSource::Direct, + observed_at_unix_millis: 100, + }; + let refused = |change: fn(&mut LeaseAdoptionEvidence)| { + let mut adopting = transaction.clone(); + let mut evidence = adoption.clone(); + change(&mut evidence); + adopting.lease_adoption = Some(evidence); + error_text(adopting.validate()) + }; + assert!(refused(|evidence| evidence.write_lease_sha256.clear()) + .contains("adopted lease digest")); + assert!(refused(|evidence| evidence.signed_presence_sha256 = "no spaces allowed".into()) + .contains("presence digest")); + assert!(refused(|evidence| evidence.observed_at_unix_millis = 0) + .contains("no observation time")); + // Well-formed but naming no granted lease: the record is refused for + // that reason and no other. + assert!(refused(|_| {}).contains("does not name the granted lease")); + Ok(()) + } + + #[test] + fn route_supervision_and_continuity_backoff_are_checked_on_the_generation() -> Result<()> { + let (_, generation) = fixture_generation(FIXTURE_GENERATION)?; + generation.validate()?; + let supervised = |change: fn(&mut RouteSupervisionState)| { + let mut tampered = generation.clone(); + change(tampered.route_supervision.as_mut().unwrap()); + error_text(tampered.validate()) + }; + assert!(supervised(|state| state.degraded_since_unix_millis = Some(0)) + .contains("no start time")); + assert!(supervised(|state| state.actuations.count = 1) + .contains("count but no start")); + let mut degraded = generation.clone(); + let state = degraded.route_supervision.as_mut().unwrap(); + state.degraded_since_unix_millis = Some(5); + state.actuations = ActuationWindow { + window_started_at_unix_millis: 5, + count: 2, + }; + degraded.validate()?; + + let mut backoff = generation.clone(); + backoff.continuity_backoff.attempts = 2; + assert!(error_text(backoff.validate()).contains("attempts but no window")); + backoff.continuity_backoff.window_started_at_unix_millis = Some(5); + backoff.validate()?; + Ok(()) + } + + #[test] + fn max_odin_sequence_counts_admitted_generations_by_target_and_signer() -> Result<()> { + let (_, mut generation) = fixture_generation(FIXTURE_GENERATION)?; + let authority = generation.odin_authority.clone().context("no authority")?; + generation.odin_publisher_sequence_cursor = 88; + let target = generation.target.clone(); + let snapshot = ControlSnapshot { + commands: Vec::new(), + transactions: Vec::new(), + admitted: vec![Stored { + envelope: CultCacheEnvelope { + key: target.clone(), + r#type: AdmittedGeneration::TYPE.into(), + payload: Vec::new(), + stored_at: "1970-01-01T00:00:00.100Z".into(), + schema_id: Some(ADMITTED_GENERATION_SCHEMA.into()), + }, + value: generation, + }], + }; + assert_eq!(snapshot.max_odin_sequence(&target, &authority.signer_identity_id), 88); + assert_eq!(snapshot.max_odin_sequence(&target, "another-signer"), 0); + assert_eq!( + snapshot.max_odin_sequence("another-target", &authority.signer_identity_id), + 0 + ); + Ok(()) + } + + #[test] + fn a_store_holding_a_lifted_legacy_generation_reads_and_keeps_its_key_honest() -> Result<()> { + let temp = TempDir::new()?; + let store = temp.path().join("control.cc"); + let envelope = fixture_envelope(FIXTURE_GENERATION, AdmittedGeneration::TYPE)?; + let backing = SingleFileMessagePackBackingStore::new(&store); + backing.insert_entry_if_absent(envelope.clone())?; + + let snapshot = ControlSnapshot::read(&store)?; + assert_eq!(snapshot.admitted.len(), 1); + let lifted = &snapshot.admitted[0].value; + assert_eq!(lifted.target, envelope.key); + assert_eq!(lifted.ready.class(), ReadinessClass::OdinCorrelated); + assert!(snapshot.admitted_for(&envelope.key).is_some()); + + // The lifted record is held to the same key rule as a current one. + let other = temp.path().join("misfiled.cc"); + let mut misfiled = envelope; + misfiled.key = "not-its-target".into(); + SingleFileMessagePackBackingStore::new(&other).insert_entry_if_absent(misfiled)?; + assert!(error_text(ControlSnapshot::read(&other).map(|_| ())) + .contains("admitted generation key is not its target")); + Ok(()) + } + + /// Replace Odin's one correlation for the incarnation with a newer one. + fn odin_republishes( + world: &EngineFixture, + transaction: &DeploymentTransaction, + sequence: u64, + ) -> Result<()> { + let path = &world.engine.options.odin_correlation_store; + let store = SingleFileMessagePackBackingStore::new(path); + let existing = store.pull_all_read_only_snapshot()?; + assert!(store.delete_batch_if_unchanged(&existing)?); + odin_reports_ready(world, transaction, sequence) + } + + fn ready_sequence(transaction: &DeploymentTransaction) -> Option { + transaction + .ready + .as_ref() + .and_then(ReadinessEvidence::odin) + .map(|evidence| evidence.publisher_sequence) + } + + #[test] + fn a_newer_odin_reading_refreshes_the_receipt_before_awaiting_ready_or_routing_advance() + -> Result<()> { + let world = EngineFixture::with_workload(Arc::new(StillWorkload))?; + let seeded = transaction_at(&world, DeploymentPhase::Fencing)?; + odin_reports_ready(&world, &seeded, 5)?; + + // AwaitingReady: the receipt is written, then confirmed, then the + // phase advances only on a receipt equal to the latest reading. + drive(&world, |transaction| { + transaction.phase == DeploymentPhase::AwaitingReady + && ready_sequence(transaction) == Some(5) + })?; + odin_republishes(&world, &seeded, 6)?; + world.engine.advance_transaction(&resident(&world)?)?; // admits 6 + let admitted = resident(&world)?.value; + assert_eq!(admitted.phase, DeploymentPhase::AwaitingReady); + assert_eq!(admitted.latest_odin_observation.as_ref().unwrap().publisher_sequence, 6); + assert_eq!(ready_sequence(&admitted), Some(5)); + world.engine.advance_transaction(&resident(&world)?)?; // refreshes Ready to 6 + let refreshed = resident(&world)?.value; + assert_eq!(refreshed.phase, DeploymentPhase::AwaitingReady); + assert_eq!(ready_sequence(&refreshed), Some(6)); + world.engine.advance_transaction(&resident(&world)?)?; + assert_eq!(resident(&world)?.value.phase, DeploymentPhase::Routing); + + // Routing: route admission demands a receipt equal to the latest + // reading, so a newer one is adopted before anything is routed. + odin_republishes(&world, &seeded, 7)?; + world.engine.advance_transaction(&resident(&world)?)?; // admits 7 + assert_eq!(ready_sequence(&resident(&world)?.value), Some(6)); + world.engine.advance_transaction(&resident(&world)?)?; // refreshes Ready to 7 + let routing = resident(&world)?.value; + assert_eq!(routing.phase, DeploymentPhase::Routing); + assert_eq!(ready_sequence(&routing), Some(7)); + assert!(routing.routing.is_none()); + world.engine.advance_transaction(&resident(&world)?)?; + assert!(resident(&world)?.value.routing.is_some()); + Ok(()) + } + + #[test] + fn lease_adoption_names_only_the_granted_lease() -> Result<()> { + let lease = write_lease(); + let lease_sha256 = lease.canonical_sha256()?; + let adoption = LeaseAdoptionEvidence { + write_lease_sha256: lease_sha256.clone(), + signed_presence_sha256: sha256_id(b"adopting-presence"), + source: AdoptionSource::Direct, + observed_at_unix_millis: 100, + }; + adoption.validate_shape()?; + let granted = LeasingEvidence::Granted { + lease: lease.clone(), + lease_sha256: lease_sha256.clone(), + }; + assert!(adoption.names(&granted)); + // Prepared is not granted, stateless has nothing to adopt, and another + // lease's digest is not this lease. + assert!(!adoption.names(&LeasingEvidence::Prepared { + lease, + lease_sha256, + })); + assert!(!adoption.names(&LeasingEvidence::SkippedStateless)); + let mut other = adoption.clone(); + other.write_lease_sha256 = sha256_id(b"another-lease"); + assert!(!other.names(&granted)); + + // On a transaction, adoption without a granted lease is refused. + let (_, mut transaction) = fixture_transaction(FIXTURE_TRANSACTIONS[2].1)?; + transaction.lease_adoption = Some(adoption); + assert!(transaction.validate().is_err()); + Ok(()) + } + + #[test] + fn an_operator_required_recovery_must_say_why() -> Result<()> { + let (_, mut failed) = fixture_transaction(FIXTURE_TRANSACTIONS[5].1)?; + let Some(TransactionCompletion::FailedAfterFencing { recovery, .. }) = + failed.completion.as_mut() + else { + panic!("fixture is not a post-fencing failure") + }; + *recovery = TerminalRecovery::OperatorRequired { + reason: "adopted-lease".into(), + }; + failed.validate()?; + assert!(failed.is_terminal()); + let Some(TransactionCompletion::FailedAfterFencing { recovery, .. }) = + failed.completion.as_mut() + else { + unreachable!() + }; + *recovery = TerminalRecovery::OperatorRequired { + reason: String::new(), + }; + assert!(failed.validate().is_err()); + Ok(()) + } /// The persisted projection a continuity restart leaves behind, read at /// the file the daemon writes. struct ContinuityProjection { diff --git a/src/deployment.rs b/src/deployment.rs index 23ecac3..a67b4bc 100644 --- a/src/deployment.rs +++ b/src/deployment.rs @@ -275,6 +275,10 @@ pub struct OperatorBinding { pub process_write_lease: Option, pub brakes: BrakeBinding, pub rollout: RolloutBinding, + /// Optional per-phase deadline overrides; absent fields take Idunn's defaults + /// when the plan is compiled. + #[serde(default)] + pub deadlines: Option, pub placement: PlacementBinding, #[serde(default)] pub external_capabilities: Vec, @@ -709,6 +713,44 @@ pub struct RolloutBinding { pub retain_releases: u32, } +#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct DeadlineBinding { + #[serde(default)] + pub fencing_seconds: Option, + #[serde(default)] + pub leasing_seconds: Option, + #[serde(default)] + pub awaiting_ready_seconds: Option, + #[serde(default)] + pub routing_seconds: Option, + #[serde(default)] + pub committing_seconds: Option, +} + +/// Longest deadline a binding may declare: one day. +pub const MAXIMUM_DEADLINE_SECONDS: u32 = 86_400; + +impl DeadlineBinding { + fn validate(&self) -> Result<()> { + for (name, seconds) in [ + ("fencing", self.fencing_seconds), + ("leasing", self.leasing_seconds), + ("awaiting-ready", self.awaiting_ready_seconds), + ("routing", self.routing_seconds), + ("committing", self.committing_seconds), + ] { + if let Some(seconds) = seconds { + ensure!( + (1..=MAXIMUM_DEADLINE_SECONDS).contains(&seconds), + "{name} deadline must be between 1 and {MAXIMUM_DEADLINE_SECONDS} seconds" + ); + } + } + Ok(()) + } +} + #[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "kebab-case")] pub enum RolloutStrategy { @@ -1343,6 +1385,9 @@ impl OperatorBinding { /// The part of validation that does not depend on where the workload runs. fn validate_shared_tail(&self) -> Result<()> { + if let Some(deadlines) = &self.deadlines { + deadlines.validate()?; + } ensure!( self.rollout.retain_releases >= 2, "candidate rollout must retain at least current and prior releases" diff --git a/src/deployment_plan.rs b/src/deployment_plan.rs index c768657..d4b1cc4 100644 --- a/src/deployment_plan.rs +++ b/src/deployment_plan.rs @@ -12,13 +12,16 @@ use sha2::{Digest, Sha256}; use crate::control_plane::SequenceAdmittedReady; use crate::deployment::{ - CapabilityDependency, DependencyKind, ExternalCapabilityBinding, OperatorBinding, + CapabilityDependency, DeadlineBinding, DependencyKind, ExternalCapabilityBinding, OperatorBinding, ServiceTransport, SourceSelectionPolicy, StartupOrder, StateDeclaration, TargetDeclaration, capability_compatible, }; pub const SOURCE_SELECTION_FACTS_SCHEMA: &str = "idunn.source_selection_facts.v1"; -pub const COMPILED_DEPLOYMENT_PLAN_SCHEMA: &str = "idunn.compiled_deployment_plan.v2"; +pub const COMPILED_DEPLOYMENT_PLAN_SCHEMA: &str = "idunn.compiled_deployment_plan.v3"; +/// Plans sealed before phase deadlines existed. They keep their bytes, and so +/// their plan id; their deadlines are Idunn's defaults at read time. +pub const COMPILED_DEPLOYMENT_PLAN_SCHEMA_V2: &str = "idunn.compiled_deployment_plan.v2"; pub const SEALED_RELEASE_SCHEMA: &str = "idunn.sealed_release.v1"; #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] @@ -460,6 +463,89 @@ pub fn select_dependencies( .collect() } +/// Idunn's default duration for each post-fencing phase, in seconds. A binding +/// overrides any of them; the resolved values are frozen into the plan. +pub const DEFAULT_FENCING_DEADLINE_SECONDS: u32 = 120; +pub const DEFAULT_LEASING_DEADLINE_SECONDS: u32 = 120; +// Unsafe for streampixels-service (startup = "create-or-open-after-write-lease"): +// its Postgres migrations run inside AwaitingReady. B5 requires an explicit +// binding value for stateful targets instead of this default. +pub const DEFAULT_AWAITING_READY_DEADLINE_SECONDS: u32 = 300; +pub const DEFAULT_ROUTING_DEADLINE_SECONDS: u32 = 120; +pub const DEFAULT_COMMITTING_DEADLINE_SECONDS: u32 = 120; + +/// The resolved per-phase deadline durations a plan carries. Nothing reads +/// them at the cut that introduced them. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct PhaseDeadlines { + pub fencing_seconds: u32, + pub leasing_seconds: u32, + pub awaiting_ready_seconds: u32, + pub routing_seconds: u32, + pub committing_seconds: u32, +} + +impl PhaseDeadlines { + pub const IDUNN_DEFAULTS: Self = Self { + fencing_seconds: DEFAULT_FENCING_DEADLINE_SECONDS, + leasing_seconds: DEFAULT_LEASING_DEADLINE_SECONDS, + awaiting_ready_seconds: DEFAULT_AWAITING_READY_DEADLINE_SECONDS, + routing_seconds: DEFAULT_ROUTING_DEADLINE_SECONDS, + committing_seconds: DEFAULT_COMMITTING_DEADLINE_SECONDS, + }; + + /// Binding overrides over Idunn's defaults. + pub fn resolve(binding: Option<&DeadlineBinding>) -> Self { + let defaults = Self::IDUNN_DEFAULTS; + let Some(binding) = binding else { + return defaults; + }; + Self { + fencing_seconds: binding.fencing_seconds.unwrap_or(defaults.fencing_seconds), + leasing_seconds: binding.leasing_seconds.unwrap_or(defaults.leasing_seconds), + awaiting_ready_seconds: binding + .awaiting_ready_seconds + .unwrap_or(defaults.awaiting_ready_seconds), + routing_seconds: binding.routing_seconds.unwrap_or(defaults.routing_seconds), + committing_seconds: binding + .committing_seconds + .unwrap_or(defaults.committing_seconds), + } + } + + fn validate_against(&self, binding: &OperatorBinding) -> Result<()> { + let declared = binding.deadlines.clone().unwrap_or_default(); + for (name, frozen, declared) in [ + ("fencing", self.fencing_seconds, declared.fencing_seconds), + ("leasing", self.leasing_seconds, declared.leasing_seconds), + ( + "awaiting-ready", + self.awaiting_ready_seconds, + declared.awaiting_ready_seconds, + ), + ("routing", self.routing_seconds, declared.routing_seconds), + ( + "committing", + self.committing_seconds, + declared.committing_seconds, + ), + ] { + ensure!( + (1..=crate::deployment::MAXIMUM_DEADLINE_SECONDS).contains(&frozen), + "frozen {name} deadline is out of range" + ); + if let Some(declared) = declared { + ensure!( + frozen == declared, + "frozen {name} deadline differs from the binding" + ); + } + } + Ok(()) + } +} + /// Private Idunn control-plane state. This contains host binding details and is /// never an Odin/CultMesh projection. The shared CultNet Expected incarnation /// is the sanitized topology projection derived only after a release validates @@ -476,12 +562,17 @@ pub struct CompiledDeploymentPlan { pub binding_blob: Vec, pub dependencies: Vec, pub candidate_port: Option, + /// Present exactly on v3 plans. Skipped when absent so a v2 plan re-encodes + /// to its original bytes and keeps its plan id. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub deadlines: Option, } impl CompiledDeploymentPlan { pub fn validate(&self) -> Result<()> { ensure!( - self.schema == COMPILED_DEPLOYMENT_PLAN_SCHEMA, + self.schema == COMPILED_DEPLOYMENT_PLAN_SCHEMA + || self.schema == COMPILED_DEPLOYMENT_PLAN_SCHEMA_V2, "unsupported deployment-plan schema" ); require_sha256(&self.plan_id, "plan id")?; @@ -492,6 +583,11 @@ impl CompiledDeploymentPlan { ); let (declaration, binding) = self.parsed_inputs()?; self.source.validate_against(&binding)?; + match (&self.schema[..], &self.deadlines) { + (COMPILED_DEPLOYMENT_PLAN_SCHEMA, Some(deadlines)) => deadlines.validate_against(&binding)?, + (COMPILED_DEPLOYMENT_PLAN_SCHEMA_V2, None) => {} + _ => bail!("deployment plan deadlines differ from its schema"), + } ensure!( sha256_id(&self.recipe_blob) == self.source.recipe_blob_sha256, "selected recipe blob differs from the exact plan recipe bytes" @@ -527,6 +623,12 @@ impl CompiledDeploymentPlan { Ok(()) } + /// The deadline durations this plan runs under: frozen for v3, Idunn's + /// defaults for a v2 plan that predates them. + pub fn phase_deadlines(&self) -> PhaseDeadlines { + self.deadlines.unwrap_or(PhaseDeadlines::IDUNN_DEFAULTS) + } + pub(crate) fn parsed_inputs(&self) -> Result<(TargetDeclaration, OperatorBinding)> { let recipe_text = std::str::from_utf8(&self.recipe_blob) .context("stored deployment recipe is not UTF-8")?; @@ -589,6 +691,7 @@ pub(crate) fn compile_deployment_plan( binding_blob: binding_bytes.to_vec(), dependencies, candidate_port, + deadlines: Some(PhaseDeadlines::resolve(binding.deadlines.as_ref())), }; plan.plan_id = plan.recomputed_plan_id()?; plan.validate()?; @@ -998,7 +1101,7 @@ fn sha256_id(bytes: &[u8]) -> String { } #[cfg(test)] -mod tests { +pub(crate) mod tests { use super::*; use cultnet_rs::{ GameCultProviderHealthIdentity, GameCultRuntimeCapability, IdunnRuntimeActivationLaunch, @@ -1009,7 +1112,7 @@ mod tests { verify_runtime_authority, }; - const RECIPE: &str = r#" + pub(crate) const RECIPE: &str = r#" schema = "gamecult.idunn.target_declaration.v1" target = "service" source_stamp_environment = "SERVICE_BUILD_COMMIT" @@ -1072,7 +1175,7 @@ schema = "odin.verse-topology.v1" compatibility = "v1" "#; - const BINDING: &str = r#" + pub(crate) const BINDING: &str = r#" schema = "gamecult.idunn.operator_binding.v2" target = "service" @@ -1147,7 +1250,7 @@ nodes = ["yggdrasil"] format!("sha256-{}", char::from(byte).to_string().repeat(64)) } - fn source(recipe: &str) -> SourceSelectionFacts { + pub(crate) fn source(recipe: &str) -> SourceSelectionFacts { SourceSelectionFacts { schema: SOURCE_SELECTION_FACTS_SCHEMA.into(), origin: "https://github.com/GameCult/Service.git".into(), @@ -1287,7 +1390,7 @@ nodes = ["yggdrasil"] .unwrap() } - fn artifact_receipt() -> ArtifactReceipt { + pub(crate) fn artifact_receipt() -> ArtifactReceipt { ArtifactReceipt { artifact_id: "daemon".into(), destination: "service".into(), @@ -1297,7 +1400,7 @@ nodes = ["yggdrasil"] } } - fn external_input_receipt() -> ExternalInputMaterializationReceipt { + pub(crate) fn external_input_receipt() -> ExternalInputMaterializationReceipt { ExternalInputMaterializationReceipt { input_id: "toolchain-index".into(), url: "https://example.invalid/toolchain-index".into(), @@ -1594,4 +1697,92 @@ nodes = ["yggdrasil"] changed.external_inputs[0].size_bytes = 18; assert!(changed.validate_against(&plan).is_err()); } + + fn binding_with_deadlines(table: &str) -> String { + BINDING.replace("[placement]", &format!("{table}\n[placement]")) + } + + fn plan_under(binding: &str) -> Result { + let providers = [ready_odin_provider("odin", "odin-yggdrasil", 1)]; + compile_deployment_plan( + RECIPE.as_bytes(), + binding.as_bytes(), + source(RECIPE), + "service-incarnation-1", + Some(18001), + 110, + &providers, + ) + } + + #[test] + fn a_compiled_plan_freezes_idunn_default_deadlines() { + let plan = plan(); + assert_eq!(plan.schema, COMPILED_DEPLOYMENT_PLAN_SCHEMA); + assert_eq!(plan.deadlines, Some(PhaseDeadlines::IDUNN_DEFAULTS)); + assert_eq!(plan.phase_deadlines(), PhaseDeadlines::IDUNN_DEFAULTS); + plan.validate().unwrap(); + } + + #[test] + fn a_binding_overrides_only_the_deadlines_it_names() { + let binding = binding_with_deadlines("[deadlines]\nawaiting_ready_seconds = 45\n"); + let plan = plan_under(&binding).unwrap(); + let frozen = plan.phase_deadlines(); + assert_eq!(frozen.awaiting_ready_seconds, 45); + assert_eq!( + PhaseDeadlines { + awaiting_ready_seconds: DEFAULT_AWAITING_READY_DEADLINE_SECONDS, + ..frozen + }, + PhaseDeadlines::IDUNN_DEFAULTS + ); + } + + #[test] + fn deadline_bounds_and_unknown_phases_are_refused() { + for table in [ + "[deadlines]\nrouting_seconds = 0\n", + "[deadlines]\nrouting_seconds = 86401\n", + "[deadlines]\nwarming_seconds = 5\n", + ] { + assert!( + OperatorBinding::parse(&binding_with_deadlines(table)).is_err(), + "{table}" + ); + } + } + + #[test] + fn frozen_deadlines_must_agree_with_the_binding_and_the_plan_schema() { + let binding = binding_with_deadlines("[deadlines]\nrouting_seconds = 45\n"); + let sealed = |mut plan: CompiledDeploymentPlan| { + plan.plan_id = plan.recomputed_plan_id().unwrap(); + plan + }; + let honest = plan_under(&binding).unwrap(); + + let mut drifted = honest.clone(); + drifted.deadlines.as_mut().unwrap().routing_seconds = 46; + assert!(sealed(drifted).validate().is_err()); + + let mut absent = honest.clone(); + absent.deadlines = None; + assert!(sealed(absent).validate().is_err()); + + let mut v2_with_deadlines = honest.clone(); + v2_with_deadlines.schema = COMPILED_DEPLOYMENT_PLAN_SCHEMA_V2.into(); + assert!(sealed(v2_with_deadlines).validate().is_err()); + + // A plan sealed before deadlines existed keeps its nine-field encoding, + // so its plan id still holds, and it runs on Idunn's defaults. + let mut v2 = plan(); + v2.schema = COMPILED_DEPLOYMENT_PLAN_SCHEMA_V2.into(); + v2.deadlines = None; + let v2 = sealed(v2); + v2.validate().unwrap(); + assert_eq!(v2.phase_deadlines(), PhaseDeadlines::IDUNN_DEFAULTS); + assert_eq!(rmp_serde::to_vec(&v2).unwrap()[0], 0x99); + assert_eq!(rmp_serde::to_vec(&honest).unwrap()[0], 0x9a); + } } diff --git a/src/drivers.rs b/src/drivers.rs index fa45b8c..226906f 100644 --- a/src/drivers.rs +++ b/src/drivers.rs @@ -5387,6 +5387,8 @@ impl NginxRouteDriver { self.restore(preflight.incumbent_configuration.as_deref()) } + /// A fragment already equal to the admitted membership is left alone: no + /// write, no `nginx -t`, no firewall call, no reload. pub fn restore_admitted_membership( &self, expected: &IdunnExpectedIncarnationRecord, @@ -5397,10 +5399,11 @@ impl NginxRouteDriver { membership_sha256 == sha256_id(&rendered), "admitted route receipt does not describe the expected membership" ); - self.validate_candidate_in_private_mount(&rendered)?; - if self.current_configuration()?.as_deref() != Some(rendered.as_slice()) { - atomic_replace(&self.binding.config_path, &rendered)?; + if self.current_configuration()?.as_deref() == Some(rendered.as_slice()) { + return Ok(()); } + self.validate_candidate_in_private_mount(&rendered)?; + atomic_replace(&self.binding.config_path, &rendered)?; if let Err(reload) = self.admit_endpoint().and_then(|()| self.reload()) { return match self.write_fragment(None) { Ok(()) => Err(reload).context("reloading the exact admitted route membership"), @@ -10285,6 +10288,83 @@ mod tests { Ok(()) } + /// Observation observes: restoring a membership whose fragment is already + /// exact touches nothing, and drifted bytes are restored with one reload. + #[cfg(unix)] + #[test] + fn restoring_an_exact_admitted_membership_actuates_nothing_and_drift_reloads_once() + -> Result<()> { + use std::os::unix::fs::PermissionsExt; + + let temp = tempfile::tempdir()?; + let calls = temp.path().join("calls"); + let program = |name: &str| -> Result { + let path = temp.path().join(name); + fs::write( + &path, + format!("#!/bin/sh\necho \"{name} $*\" >> '{}'\nexit 0\n", calls.display()), + )?; + fs::set_permissions(&path, fs::Permissions::from_mode(0o755))?; + Ok(path) + }; + let config = temp.path().join("service.conf"); + let driver = NginxRouteDriver { + binding: RouteBinding { + driver: RouteDriver::NginxStreamTcp, + route_id: "service-route".into(), + stable_endpoint: "http://127.0.0.1:4103".into(), + private_host: "127.0.0.1".into(), + private_port_start: 4104, + private_port_end: 4109, + config_path: config.clone(), + reload_unit: "nginx.service".into(), + }, + nginx_program: program("nginx")?, + systemd_run_program: program("systemd-run")?, + systemctl_program: program("systemctl")?, + ufw_program: program("ufw")?, + preflight_root: temp.path().join("preflight"), + }; + let mut candidate = expected(); + candidate.route = Some(cultnet_rs::IdunnExpectedRoute { + route_id: "service-route".into(), + transport: "http".into(), + stable_endpoint: "http://127.0.0.1:4103".into(), + candidate_endpoint: "http://127.0.0.1:4104".into(), + }); + let rendered = driver.render(&candidate)?; + let membership_sha256 = sha256_id(&rendered); + let count = |prefix: &str| -> Result { + Ok(fs::read_to_string(&calls) + .unwrap_or_default() + .lines() + .filter(|line| line.starts_with(prefix)) + .count()) + }; + + fs::write(&config, &rendered)?; + let modified = fs::metadata(&config)?.modified()?; + driver.restore_admitted_membership(&candidate, &membership_sha256)?; + driver.restore_admitted_membership(&candidate, &membership_sha256)?; + assert!(!calls.exists(), "an exact fragment must run no program"); + assert!(!driver.preflight_root.exists()); + assert_eq!(fs::read(&config)?, rendered); + assert_eq!(fs::metadata(&config)?.modified()?, modified); + + fs::write(&config, b"drifted bytes\n")?; + driver.restore_admitted_membership(&candidate, &membership_sha256)?; + assert_eq!(fs::read(&config)?, rendered); + assert_eq!(count("systemctl reload")?, 1); + assert_eq!(count("systemd-run")?, 1); + assert_eq!(count("ufw allow")?, 1); + assert_eq!(count("nginx -t")?, 1); + + driver.restore_admitted_membership(&candidate, &membership_sha256)?; + assert_eq!(count("systemctl reload")?, 1, "restored bytes never reload again"); + assert_eq!(count("ufw")?, 1); + Ok(()) + } + #[test] fn an_empty_route_fragment_is_absence_not_a_membership() -> Result<()> { let temp = tempfile::tempdir()?; diff --git a/tests/fixtures/idunn-control-legacy/README.md b/tests/fixtures/idunn-control-legacy/README.md new file mode 100644 index 0000000..07086d7 --- /dev/null +++ b/tests/fixtures/idunn-control-legacy/README.md @@ -0,0 +1,24 @@ +# Legacy control-record wire fixtures + +Each `*.hex` file is two lines: the CultCache envelope `schema_id`, then the +record's MessagePack payload in hex. They are the exact bytes the encoder at +Idunn `9001b58` (the base of the F0 cut) wrote for records built through that +revision's own constructors: `DeploymentTransaction::new`, +`AdmittedGeneration::from_transaction`, `SealedRelease::new`, +`compile_deployment_plan`, and `rmp_serde::to_vec`. A throwaway test on a +scratch commit over `9001b58` printed them; it is not kept. + +Everything in them is synthetic: identities were enrolled fresh in a temporary +directory, the Odin receipts are placeholder bytes with correct digests, and +the plan is the `deployment_plan` test recipe. No byte comes from a live store. + +| File | Schema | What it is | +|---|---|---| +| `generation-with-receipts` | `idunn.admitted_generation.v2` | routed, stateless generation with Ready and latest Odin receipts | +| `generation-route-repair-started` | `idunn.admitted_generation.v2` | the same with `route_repair_started_at_unix_millis` set | +| `transaction-fencing` .. `transaction-committing` | `idunn.deployment_transaction.v3` | one continuity transaction in each post-fencing phase | +| `transaction-committing-v2` | `idunn.deployment_transaction.v2` | the Committing record in the v2 layout: the v3 tuple without key 34 (base code stops writing v2, so this one is the v3 encoding with its trailing nil slot dropped and the header count lowered) | +| `transaction-failed-after-fencing` | `idunn.deployment_transaction.v3` | terminal post-fencing failure with complete abort evidence | + +`control_plane.rs` decodes these through `LegacyDeploymentTransaction` and +`LegacyAdmittedGeneration`. The fixtures die with those structs. diff --git a/tests/fixtures/idunn-control-legacy/generation-route-repair-started.hex b/tests/fixtures/idunn-control-legacy/generation-route-repair-started.hex new file mode 100644 index 0000000..ac24691 --- /dev/null +++ b/tests/fixtures/idunn-control-legacy/generation-route-repair-started.hex @@ -0,0 +1,2 @@ +idunn.admitted_generation.v2 +dc0013bc6964756e6e2e61646d69747465645f67656e65726174696f6e2e7632a773657276696365d93267656e65726174696f6e2d74782d37636236616537392d323635302d346261322d623664392d643137333338643566393031af636f6e74696e756974792d74657374d92774782d37636236616537392d323635302d346261322d623664392d643137333338643566393031cf0000018bcfe6eea099d9216964756e6e2e636f6d70696c65645f6465706c6f796d656e745f706c616e2e7632d9477368613235362d64396364646465626366636362326366316261396164366239323566336666616237646561636332366661653631646138663236353861336139343039656232b5736572766963652d696e6361726e6174696f6e2d316e9bbf6964756e6e2e736f757263655f73656c656374696f6e5f66616374732e7631d92768747470733a2f2f6769746875622e636f6d2f47616d6543756c742f536572766963652e676974af726566732f68656164732f6d61696ed92832323232323232323232323232323232323232323232323232323232323232323232323232323232d92832323232323232323232323232323232323232323232323232323232323232323232323232323232d92833333333333333333333333333333333333333333333333333333333333333333333333333333333bc6465706c6f796d656e742f6964756e6e2f7265636970652e746f6d6cd9477368613235362d353962636334323766373939343035636134613531326232386138303637343435366661333134393732333631323830656130626332316363356532663635338091a87265662d6865616464dc058e0a736368656d61203d202267616d6563756c742e6964756e6e2e7461726765745f6465636c61726174696f6e2e7631220a746172676574203d202273657276696365220a736f757263655f7374616d705f656e7669726f6e6d656e74203d2022534552564943455f4255494c445f434f4d4d4954220a0a5b5b73746570735d5d0a6964203d20226275696c64220a7068617365203d20226275696c64220a72756e6e6572203d202272757374220a61726776203d205b22636172676f222c20226275696c64222c20222d2d6c6f636b6564225d0a0a5b5b65787465726e616c5f696e707574735d5d0a6964203d2022746f6f6c636861696e2d696e646578220a75726c203d202268747470733a2f2f6578616d706c652e696e76616c69642f746f6f6c636861696e2d696e646578220a736861323536203d202264646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464220a72756e6e6572203d202272757374220a64657374696e6174696f6e203d2022696e707574732f746f6f6c636861696e2d696e646578220a0a5b5b6172746966616374735d5d0a6964203d20226461656d6f6e220a736f757263655f6b696e64203d202272756e6e65722d6f7574707574220a72756e6e6572203d202272757374220a736f75726365203d20227461726765742f72656c656173652f73657276696365220a64657374696e6174696f6e203d202273657276696365220a65787065637465645f736861323536203d202263636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363220a65786563757461626c65203d20747275650a0a5b736572766963655d0a65786563757461626c655f6172746966616374203d20226461656d6f6e220a617267756d656e7473203d205b0a20207b206b696e64203d202262696e64696e67222c206e616d65203d202273746174655f726f6f7422207d2c0a5d0a7472616e73706f7274203d202268747470220a726f7574655f7265717569726564203d20747275650a72657175697265645f656e7669726f6e6d656e74203d205b2247414d4543554c545f4944554e4e5f43414e4449444154455f42494e44222c202247414d4543554c545f4944554e4e5f52554e54494d455f42554e444c45225d0a0a5b736572766963652e6865616c74685d0a636f6e7472616374203d2022736572766963652e6865616c7468220a0a5b73746174655d0a736368656d615f67656e65726174696f6e203d20227631220a0a5b5b73746174652e736c6f74735d5d0a6964203d202272756e74696d652d6361636865220a72656c61746976655f70617468203d202272756e74696d652d63616368652e6363220a6b696e64203d202263756c7463616368652d66696c65220a736368656d61203d2022736572766963652e72756e74696d652d63616368652e7631220a777269746572203d20226e6f6e65220a7265636f76657279203d202272656275696c6461626c65220a73746172747570203d20226f70656e2d61742d7374617274220a0a5b5b70726f76696465735d5d0a6361706162696c697479203d2022736572766963652e72756e74696d65220a736368656d61203d2022736572766963652e72756e74696d652e7631220a636f6d7061746962696c697479203d20227631220a0a5b5b646570656e64656e636965735d5d0a6b696e64203d20227368617265642d696e667261737472756374757265220a6361706162696c697479203d20226f64696e2e76657273652d72656e64657a766f7573220a736368656d61203d20226f64696e2e76657273652d746f706f6c6f67792e7631220a636f6d7061746962696c697479203d20227631220adc076e0a736368656d61203d202267616d6563756c742e6964756e6e2e6f70657261746f725f62696e64696e672e7632220a746172676574203d202273657276696365220a0a5b7265706f7369746f72795d0a6f726967696e203d202268747470733a2f2f6769746875622e636f6d2f47616d6543756c742f536572766963652e676974220a61646d69747465645f726566203d2022726566732f68656164732f6d61696e220a6d696e696d756d5f7265766973696f6e203d202231313131313131313131313131313131313131313131313131313131313131313131313131313131220a73656c656374696f6e203d20227265662d68656164220a636865636b6f7574203d20222f7372762f6275696c642f53657276696365220a7265636970655f70617468203d20226465706c6f796d656e742f6964756e6e2f7265636970652e746f6d6c220a0a5b72756e6e6572732e727573745d0a647269766572203d2022646f636b6572220a696d616765203d202272757374407368613235363a61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161220a75736572203d2022313030303a31303030220a6166666f7264616e636573203d205b22736f757263652d72656164222c202261727469666163742d7772697465225d0a616c6c6f7765645f70726f6772616d73203d205b22636172676f225d0a6e6574776f726b5f70726f66696c65203d20226275696c642d646570656e64656e63792d656772657373220a6d656d6f72795f6d6562696279746573203d20323034380a6370755f71756f74615f70657263656e74203d203230300a706964735f6c696d6974203d203531320a746d7066735f6d6562696279746573203d203531320a0a5b776f726b6c6f61645d0a647269766572203d202273797374656d642d7472616e7369656e74220a73746174655f67726f7570203d202273657276696365220a756e69745f707265666978203d20226964756e6e2d73657276696365220a72656c656173655f726f6f74203d20222f7372762f736572766963652f72656c6561736573220a73746174655f726f6f74203d20222f7661722f6c69622f67616d6563756c742f73657276696365220a72756e74696d655f726f6f74203d20222f72756e2f67616d6563756c742f6964756e6e2f73657276696365220a6e6574776f726b203d2022686f73742d70726976617465220a68617264656e696e67203d2022737472696374220a6d656d6f72795f6d6562696279746573203d20313032340a6370755f71756f74615f70657263656e74203d203130300a0a5b776f726b6c6f61642e617267756d656e745f62696e64696e67735d0a73746174655f726f6f74203d20222f7661722f6c69622f67616d6563756c742f73657276696365220a0a5b776f726b6c6f61642e7365637265745f66696c65735d0a47414d4543554c545f52554e54494d455f50524553454e43455f4944454e54495459203d20222f6574632f67616d6563756c742f736572766963652f72756e74696d652d70726573656e63652d6964656e746974792e6363220a0a5b72756e74696d655f6964656e746974795d0a72756e74696d655f6964203d2022736572766963652d79676764726173696c220a65787065637465645f7369676e65725f6964656e746974795f6964203d2022736572766963652d72756e74696d652d7369676e6572220a74727573745f616e63686f725f73746f7265203d20222f6574632f67616d6563756c742f74727573742f736572766963652e6363220a0a5b726f7574655d0a647269766572203d20226e67696e782d73747265616d2d746370220a726f7574655f6964203d202273657276696365220a737461626c655f656e64706f696e74203d2022687474703a2f2f3132372e302e302e313a3137393939220a707269766174655f686f7374203d20223132372e302e302e31220a707269766174655f706f72745f7374617274203d2031383030300a707269766174655f706f72745f656e64203d2031383030390a636f6e6669675f70617468203d20222f6574632f6e67696e782f6964756e6e2d73747265616d2d726f757465732f736572766963652e636f6e66220a72656c6f61645f756e6974203d20226e67696e782e73657276696365220a0a5b6272616b65735d0a6465706c6f796d656e745f73746f7265203d20222f7661722f6c69622f67616d6563756c742f6964756e6e2f736572766963652d6465706c6f796d656e742d6272616b652e6363220a6c6966656379636c655f73746f7265203d20222f7661722f6c69622f67616d6563756c742f6964756e6e2f736572766963652d6c6966656379636c652d6272616b652e6363220a0a5b726f6c6c6f75745d0a7374726174656779203d202263616e6469646174652d7468656e2d70726f6d6f7465220a647261696e5f7365636f6e6473203d2033300a72657461696e5f72656c6561736573203d20320a0a5b706c6163656d656e745d0a646573697265645f7265706c69636173203d20310a6e6f646573203d205b2279676764726173696c225d0a919296b57368617265642d696e667261737472756374757265b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b06265666f72652d70726f6d6f74696f6e97a46f64696e98ad6d616e616765642d7265616479a46f64696eb26f64696e2d696e6361726e6174696f6e2d31d9477368613235362d61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161d9477368613235362d65656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565d9477368613235362d63343263333331373863366539666534633435313162623563663962626461376431633138356536646330373064323234653463653431303538626338633238d9477368613235362d6137313730323730313265383236396235666636363961313135386466636236313764346463636230663963333633656631373738656561633230353332633907b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b57463703a2f2f31302e37372e302e313a3137383731cd465196b76964756e6e2e7365616c65645f72656c656173652e7631d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237d9477368613235362d643963646464656263666363623263663162613961643662393235663366666162376465616363323666616536316461386632363538613361393430396562329195a66461656d6f6ea773657276696365d9477368613235362d636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363632ac39196af746f6f6c636861696e2d696e646578d92768747470733a2f2f6578616d706c652e696e76616c69642f746f6f6c636861696e2d696e646578d9477368613235362d64646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464a472757374b6696e707574732f746f6f6c636861696e2d696e646578117892d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237bd2f7372762f736572766963652f72656c65617365732f63757272656e74dc0012bd6964756e6e2e65787065637465645f696e6361726e6174696f6e2e7632a773657276696365d9477368613235362d64396364646465626366636362326366316261396164366239323566336666616237646561636332366661653631646138663236353861336139343039656232b5736572766963652d696e6361726e6174696f6e2d31d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237bb6769746875622e636f6d2f47616d6543756c742f53657276696365d92832323232323232323232323232323232323232323232323232323232323232323232323232323232d9477368613235362d35396263633432376637393934303563613461353132623238613830363734343536666133313439373233363132383065613062633231636335653266363533b1736572766963652d79676764726173696cb6736572766963652d72756e74696d652d7369676e6572ae736572766963652e6865616c7468d9477368613235362d63636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363a27631d9477368613235362d32663837303134316366353638316566656332653234316364636435663731303831616539326162316535633534633839636438393666386335656236323731c294a773657276696365a468747470b6687474703a2f2f3132372e302e302e313a3137393939b6687474703a2f2f3132372e302e302e313a31383030319194af736572766963652e72756e74696d65b2736572766963652e72756e74696d652e7631a2763101919ab57368617265642d696e667261737472756374757265b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b06265666f72652d70726f6d6f74696f6ea46f64696eb36d616e616765642d696e6361726e6174696f6ed9477368613235362d63343263333331373863366539666534633435313162623563663962626461376431633138356536646330373064323234653463653431303538626338633238b57463703a2f2f31302e37372e302e313a31373837319abb6964756e6e2e72756e74696d655f61637469766174696f6e2e7632d9477368613235362d39613662663530353466616430306232343363323331386330333436303931333230343665643436356231356534636561666532613736623966663231313039b1736572766963652d79676764726173696cd9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262d94032363535323862353235386435353563356434646533383931303830363164383965663439616336306631373337626464656337316535333335643163623935c420c06afef8f66e6ec88c96c81ad6d74dbd9933738032f4d8069a46412380e2272dcf0000018bcfe567ecd94066346536393735326334333432363965323262306130346137623430613065336235386364343561383238376364303936383263313864326565366539376239a765643235353139c44046048cf77cc9f524da966e16a131edb34180f4ea8420f5f24a64fd53178e44988bef994d6df103a5f117470283d533e9d7e8245c4f9965f9a4c0a0114ed1c201dc0033b26964756e6e2d343234322e73657276696365af4964756e6e20746573742034323432af696e766f636174696f6e2d3432343201a465786563a6616c77617973ad636f6e74726f6c2d67726f7570c3a57534323432a57534323432a0a0a0c3c3a9696e76697369626c65a3706964c3a430303737a0a0cd10920194cd1092cd1092cd1092cd109294cd1092cd1092cd1092cd109291cd10920000000000c391010807b52f6f70742f746573742f62696e2f736572766963650101d9477368613235362d34626635313232663334343535346335336264653265626238636432623765336431363030616436333163333835613564376363653233633737383534353961d9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262a92f6f70742f74657374a92f72756e2f74657374d9477368613235362d6462633162346339303066666534386435373562356461356336333830343031323566363564623066653365323434393462373665613938363435376439383690d9477368613235362d30383466656430386239373861663464376431393661373434366138366235383030396536333662363131646231363231316236356139616164666632396335d9202f73797374656d2e736c6963652f6964756e6e2d343234322e73657276696365c090aa61637469766174696f6edc002001010101010101010101010101010101010101010101010101010101010101019091b1736b69707065642d73746174656c657373959140d9477368613235362d63333634316638353434643763303266333538306230376330663938383766306336613237666635616231643461336532396361663139376366633239396165ab6f64696e2d7369676e65722864959141d9477368613235362d35353961656164303832363464353739356433393039373138636464303561626434393537326538346665353535393065656633316138386130386664666664ab6f64696e2d7369676e6572296493a870726f6d6f74656495a773657276696365d9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262d9477368613235362d62663563663539653335363635323235333236386336303463626638646638636664623033613461306433326232376164313538653538313730396338306534d9477368613235362d34313266303131626462396566646138616137323036636364336333613438633637613131386164646161363266616436303463326236346664396163643063cf0000018bcfe6ee96cf0000018bcfe6ee9692d94038663736666430326265623133353233373733373632306361666530383234636138663937326438623332643134373762346336333430656139666634643762dc002048ccd7cc85cc8c14ccb8384dccbccc8fcc83ccbacca50f25ccb072ccc126cc9fccee0cccd660316f5bcccf5e6f172529cf0000018bcfe79e68 diff --git a/tests/fixtures/idunn-control-legacy/generation-with-receipts.hex b/tests/fixtures/idunn-control-legacy/generation-with-receipts.hex new file mode 100644 index 0000000..86b80ea --- /dev/null +++ b/tests/fixtures/idunn-control-legacy/generation-with-receipts.hex @@ -0,0 +1,2 @@ +idunn.admitted_generation.v2 +dc0013bc6964756e6e2e61646d69747465645f67656e65726174696f6e2e7632a773657276696365d93267656e65726174696f6e2d74782d37636236616537392d323635302d346261322d623664392d643137333338643566393031af636f6e74696e756974792d74657374d92774782d37636236616537392d323635302d346261322d623664392d643137333338643566393031cf0000018bcfe6eea099d9216964756e6e2e636f6d70696c65645f6465706c6f796d656e745f706c616e2e7632d9477368613235362d64396364646465626366636362326366316261396164366239323566336666616237646561636332366661653631646138663236353861336139343039656232b5736572766963652d696e6361726e6174696f6e2d316e9bbf6964756e6e2e736f757263655f73656c656374696f6e5f66616374732e7631d92768747470733a2f2f6769746875622e636f6d2f47616d6543756c742f536572766963652e676974af726566732f68656164732f6d61696ed92832323232323232323232323232323232323232323232323232323232323232323232323232323232d92832323232323232323232323232323232323232323232323232323232323232323232323232323232d92833333333333333333333333333333333333333333333333333333333333333333333333333333333bc6465706c6f796d656e742f6964756e6e2f7265636970652e746f6d6cd9477368613235362d353962636334323766373939343035636134613531326232386138303637343435366661333134393732333631323830656130626332316363356532663635338091a87265662d6865616464dc058e0a736368656d61203d202267616d6563756c742e6964756e6e2e7461726765745f6465636c61726174696f6e2e7631220a746172676574203d202273657276696365220a736f757263655f7374616d705f656e7669726f6e6d656e74203d2022534552564943455f4255494c445f434f4d4d4954220a0a5b5b73746570735d5d0a6964203d20226275696c64220a7068617365203d20226275696c64220a72756e6e6572203d202272757374220a61726776203d205b22636172676f222c20226275696c64222c20222d2d6c6f636b6564225d0a0a5b5b65787465726e616c5f696e707574735d5d0a6964203d2022746f6f6c636861696e2d696e646578220a75726c203d202268747470733a2f2f6578616d706c652e696e76616c69642f746f6f6c636861696e2d696e646578220a736861323536203d202264646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464220a72756e6e6572203d202272757374220a64657374696e6174696f6e203d2022696e707574732f746f6f6c636861696e2d696e646578220a0a5b5b6172746966616374735d5d0a6964203d20226461656d6f6e220a736f757263655f6b696e64203d202272756e6e65722d6f7574707574220a72756e6e6572203d202272757374220a736f75726365203d20227461726765742f72656c656173652f73657276696365220a64657374696e6174696f6e203d202273657276696365220a65787065637465645f736861323536203d202263636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363220a65786563757461626c65203d20747275650a0a5b736572766963655d0a65786563757461626c655f6172746966616374203d20226461656d6f6e220a617267756d656e7473203d205b0a20207b206b696e64203d202262696e64696e67222c206e616d65203d202273746174655f726f6f7422207d2c0a5d0a7472616e73706f7274203d202268747470220a726f7574655f7265717569726564203d20747275650a72657175697265645f656e7669726f6e6d656e74203d205b2247414d4543554c545f4944554e4e5f43414e4449444154455f42494e44222c202247414d4543554c545f4944554e4e5f52554e54494d455f42554e444c45225d0a0a5b736572766963652e6865616c74685d0a636f6e7472616374203d2022736572766963652e6865616c7468220a0a5b73746174655d0a736368656d615f67656e65726174696f6e203d20227631220a0a5b5b73746174652e736c6f74735d5d0a6964203d202272756e74696d652d6361636865220a72656c61746976655f70617468203d202272756e74696d652d63616368652e6363220a6b696e64203d202263756c7463616368652d66696c65220a736368656d61203d2022736572766963652e72756e74696d652d63616368652e7631220a777269746572203d20226e6f6e65220a7265636f76657279203d202272656275696c6461626c65220a73746172747570203d20226f70656e2d61742d7374617274220a0a5b5b70726f76696465735d5d0a6361706162696c697479203d2022736572766963652e72756e74696d65220a736368656d61203d2022736572766963652e72756e74696d652e7631220a636f6d7061746962696c697479203d20227631220a0a5b5b646570656e64656e636965735d5d0a6b696e64203d20227368617265642d696e667261737472756374757265220a6361706162696c697479203d20226f64696e2e76657273652d72656e64657a766f7573220a736368656d61203d20226f64696e2e76657273652d746f706f6c6f67792e7631220a636f6d7061746962696c697479203d20227631220adc076e0a736368656d61203d202267616d6563756c742e6964756e6e2e6f70657261746f725f62696e64696e672e7632220a746172676574203d202273657276696365220a0a5b7265706f7369746f72795d0a6f726967696e203d202268747470733a2f2f6769746875622e636f6d2f47616d6543756c742f536572766963652e676974220a61646d69747465645f726566203d2022726566732f68656164732f6d61696e220a6d696e696d756d5f7265766973696f6e203d202231313131313131313131313131313131313131313131313131313131313131313131313131313131220a73656c656374696f6e203d20227265662d68656164220a636865636b6f7574203d20222f7372762f6275696c642f53657276696365220a7265636970655f70617468203d20226465706c6f796d656e742f6964756e6e2f7265636970652e746f6d6c220a0a5b72756e6e6572732e727573745d0a647269766572203d2022646f636b6572220a696d616765203d202272757374407368613235363a61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161220a75736572203d2022313030303a31303030220a6166666f7264616e636573203d205b22736f757263652d72656164222c202261727469666163742d7772697465225d0a616c6c6f7765645f70726f6772616d73203d205b22636172676f225d0a6e6574776f726b5f70726f66696c65203d20226275696c642d646570656e64656e63792d656772657373220a6d656d6f72795f6d6562696279746573203d20323034380a6370755f71756f74615f70657263656e74203d203230300a706964735f6c696d6974203d203531320a746d7066735f6d6562696279746573203d203531320a0a5b776f726b6c6f61645d0a647269766572203d202273797374656d642d7472616e7369656e74220a73746174655f67726f7570203d202273657276696365220a756e69745f707265666978203d20226964756e6e2d73657276696365220a72656c656173655f726f6f74203d20222f7372762f736572766963652f72656c6561736573220a73746174655f726f6f74203d20222f7661722f6c69622f67616d6563756c742f73657276696365220a72756e74696d655f726f6f74203d20222f72756e2f67616d6563756c742f6964756e6e2f73657276696365220a6e6574776f726b203d2022686f73742d70726976617465220a68617264656e696e67203d2022737472696374220a6d656d6f72795f6d6562696279746573203d20313032340a6370755f71756f74615f70657263656e74203d203130300a0a5b776f726b6c6f61642e617267756d656e745f62696e64696e67735d0a73746174655f726f6f74203d20222f7661722f6c69622f67616d6563756c742f73657276696365220a0a5b776f726b6c6f61642e7365637265745f66696c65735d0a47414d4543554c545f52554e54494d455f50524553454e43455f4944454e54495459203d20222f6574632f67616d6563756c742f736572766963652f72756e74696d652d70726573656e63652d6964656e746974792e6363220a0a5b72756e74696d655f6964656e746974795d0a72756e74696d655f6964203d2022736572766963652d79676764726173696c220a65787065637465645f7369676e65725f6964656e746974795f6964203d2022736572766963652d72756e74696d652d7369676e6572220a74727573745f616e63686f725f73746f7265203d20222f6574632f67616d6563756c742f74727573742f736572766963652e6363220a0a5b726f7574655d0a647269766572203d20226e67696e782d73747265616d2d746370220a726f7574655f6964203d202273657276696365220a737461626c655f656e64706f696e74203d2022687474703a2f2f3132372e302e302e313a3137393939220a707269766174655f686f7374203d20223132372e302e302e31220a707269766174655f706f72745f7374617274203d2031383030300a707269766174655f706f72745f656e64203d2031383030390a636f6e6669675f70617468203d20222f6574632f6e67696e782f6964756e6e2d73747265616d2d726f757465732f736572766963652e636f6e66220a72656c6f61645f756e6974203d20226e67696e782e73657276696365220a0a5b6272616b65735d0a6465706c6f796d656e745f73746f7265203d20222f7661722f6c69622f67616d6563756c742f6964756e6e2f736572766963652d6465706c6f796d656e742d6272616b652e6363220a6c6966656379636c655f73746f7265203d20222f7661722f6c69622f67616d6563756c742f6964756e6e2f736572766963652d6c6966656379636c652d6272616b652e6363220a0a5b726f6c6c6f75745d0a7374726174656779203d202263616e6469646174652d7468656e2d70726f6d6f7465220a647261696e5f7365636f6e6473203d2033300a72657461696e5f72656c6561736573203d20320a0a5b706c6163656d656e745d0a646573697265645f7265706c69636173203d20310a6e6f646573203d205b2279676764726173696c225d0a919296b57368617265642d696e667261737472756374757265b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b06265666f72652d70726f6d6f74696f6e97a46f64696e98ad6d616e616765642d7265616479a46f64696eb26f64696e2d696e6361726e6174696f6e2d31d9477368613235362d61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161d9477368613235362d65656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565d9477368613235362d63343263333331373863366539666534633435313162623563663962626461376431633138356536646330373064323234653463653431303538626338633238d9477368613235362d6137313730323730313265383236396235666636363961313135386466636236313764346463636230663963333633656631373738656561633230353332633907b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b57463703a2f2f31302e37372e302e313a3137383731cd465196b76964756e6e2e7365616c65645f72656c656173652e7631d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237d9477368613235362d643963646464656263666363623263663162613961643662393235663366666162376465616363323666616536316461386632363538613361393430396562329195a66461656d6f6ea773657276696365d9477368613235362d636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363632ac39196af746f6f6c636861696e2d696e646578d92768747470733a2f2f6578616d706c652e696e76616c69642f746f6f6c636861696e2d696e646578d9477368613235362d64646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464a472757374b6696e707574732f746f6f6c636861696e2d696e646578117892d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237bd2f7372762f736572766963652f72656c65617365732f63757272656e74dc0012bd6964756e6e2e65787065637465645f696e6361726e6174696f6e2e7632a773657276696365d9477368613235362d64396364646465626366636362326366316261396164366239323566336666616237646561636332366661653631646138663236353861336139343039656232b5736572766963652d696e6361726e6174696f6e2d31d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237bb6769746875622e636f6d2f47616d6543756c742f53657276696365d92832323232323232323232323232323232323232323232323232323232323232323232323232323232d9477368613235362d35396263633432376637393934303563613461353132623238613830363734343536666133313439373233363132383065613062633231636335653266363533b1736572766963652d79676764726173696cb6736572766963652d72756e74696d652d7369676e6572ae736572766963652e6865616c7468d9477368613235362d63636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363a27631d9477368613235362d32663837303134316366353638316566656332653234316364636435663731303831616539326162316535633534633839636438393666386335656236323731c294a773657276696365a468747470b6687474703a2f2f3132372e302e302e313a3137393939b6687474703a2f2f3132372e302e302e313a31383030319194af736572766963652e72756e74696d65b2736572766963652e72756e74696d652e7631a2763101919ab57368617265642d696e667261737472756374757265b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b06265666f72652d70726f6d6f74696f6ea46f64696eb36d616e616765642d696e6361726e6174696f6ed9477368613235362d63343263333331373863366539666534633435313162623563663962626461376431633138356536646330373064323234653463653431303538626338633238b57463703a2f2f31302e37372e302e313a31373837319abb6964756e6e2e72756e74696d655f61637469766174696f6e2e7632d9477368613235362d39613662663530353466616430306232343363323331386330333436303931333230343665643436356231356534636561666532613736623966663231313039b1736572766963652d79676764726173696cd9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262d94032363535323862353235386435353563356434646533383931303830363164383965663439616336306631373337626464656337316535333335643163623935c420c06afef8f66e6ec88c96c81ad6d74dbd9933738032f4d8069a46412380e2272dcf0000018bcfe567ecd94066346536393735326334333432363965323262306130346137623430613065336235386364343561383238376364303936383263313864326565366539376239a765643235353139c44046048cf77cc9f524da966e16a131edb34180f4ea8420f5f24a64fd53178e44988bef994d6df103a5f117470283d533e9d7e8245c4f9965f9a4c0a0114ed1c201dc0033b26964756e6e2d343234322e73657276696365af4964756e6e20746573742034323432af696e766f636174696f6e2d3432343201a465786563a6616c77617973ad636f6e74726f6c2d67726f7570c3a57534323432a57534323432a0a0a0c3c3a9696e76697369626c65a3706964c3a430303737a0a0cd10920194cd1092cd1092cd1092cd109294cd1092cd1092cd1092cd109291cd10920000000000c391010807b52f6f70742f746573742f62696e2f736572766963650101d9477368613235362d34626635313232663334343535346335336264653265626238636432623765336431363030616436333163333835613564376363653233633737383534353961d9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262a92f6f70742f74657374a92f72756e2f74657374d9477368613235362d6462633162346339303066666534386435373562356461356336333830343031323566363564623066653365323434393462373665613938363435376439383690d9477368613235362d30383466656430386239373861663464376431393661373434366138366235383030396536333662363131646231363231316236356139616164666632396335d9202f73797374656d2e736c6963652f6964756e6e2d343234322e73657276696365c090aa61637469766174696f6edc002001010101010101010101010101010101010101010101010101010101010101019091b1736b69707065642d73746174656c657373959140d9477368613235362d63333634316638353434643763303266333538306230376330663938383766306336613237666635616231643461336532396361663139376366633239396165ab6f64696e2d7369676e65722864959141d9477368613235362d35353961656164303832363464353739356433393039373138636464303561626434393537326538346665353535393065656633316138386130386664666664ab6f64696e2d7369676e6572296493a870726f6d6f74656495a773657276696365d9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262d9477368613235362d62663563663539653335363635323235333236386336303463626638646638636664623033613461306433326232376164313538653538313730396338306534d9477368613235362d34313266303131626462396566646138616137323036636364336333613438633637613131386164646161363266616436303463326236346664396163643063cf0000018bcfe6ee96cf0000018bcfe6ee9692d94038663736666430326265623133353233373733373632306361666530383234636138663937326438623332643134373762346336333430656139666634643762dc002048ccd7cc85cc8c14ccb8384dccbccc8fcc83ccbacca50f25ccb072ccc126cc9fccee0cccd660316f5bcccf5e6f172529c0 diff --git a/tests/fixtures/idunn-control-legacy/transaction-awaiting-ready.hex b/tests/fixtures/idunn-control-legacy/transaction-awaiting-ready.hex new file mode 100644 index 0000000..760f6f4 --- /dev/null +++ b/tests/fixtures/idunn-control-legacy/transaction-awaiting-ready.hex @@ -0,0 +1,2 @@ +idunn.deployment_transaction.v3 +dc0023bf6964756e6e2e6465706c6f796d656e745f7472616e73616374696f6e2e7633d92774782d37636236616537392d323635302d346261322d623664392d643137333338643566393031af636f6e74696e756974792d74657374aa636f6e74696e75697479a77365727669636500ae6177616974696e672d7265616479cf0000018bcfe56800cf0000018bcfe6eea0c099d9216964756e6e2e636f6d70696c65645f6465706c6f796d656e745f706c616e2e7632d9477368613235362d64396364646465626366636362326366316261396164366239323566336666616237646561636332366661653631646138663236353861336139343039656232b5736572766963652d696e6361726e6174696f6e2d316e9bbf6964756e6e2e736f757263655f73656c656374696f6e5f66616374732e7631d92768747470733a2f2f6769746875622e636f6d2f47616d6543756c742f536572766963652e676974af726566732f68656164732f6d61696ed92832323232323232323232323232323232323232323232323232323232323232323232323232323232d92832323232323232323232323232323232323232323232323232323232323232323232323232323232d92833333333333333333333333333333333333333333333333333333333333333333333333333333333bc6465706c6f796d656e742f6964756e6e2f7265636970652e746f6d6cd9477368613235362d353962636334323766373939343035636134613531326232386138303637343435366661333134393732333631323830656130626332316363356532663635338091a87265662d6865616464dc058e0a736368656d61203d202267616d6563756c742e6964756e6e2e7461726765745f6465636c61726174696f6e2e7631220a746172676574203d202273657276696365220a736f757263655f7374616d705f656e7669726f6e6d656e74203d2022534552564943455f4255494c445f434f4d4d4954220a0a5b5b73746570735d5d0a6964203d20226275696c64220a7068617365203d20226275696c64220a72756e6e6572203d202272757374220a61726776203d205b22636172676f222c20226275696c64222c20222d2d6c6f636b6564225d0a0a5b5b65787465726e616c5f696e707574735d5d0a6964203d2022746f6f6c636861696e2d696e646578220a75726c203d202268747470733a2f2f6578616d706c652e696e76616c69642f746f6f6c636861696e2d696e646578220a736861323536203d202264646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464220a72756e6e6572203d202272757374220a64657374696e6174696f6e203d2022696e707574732f746f6f6c636861696e2d696e646578220a0a5b5b6172746966616374735d5d0a6964203d20226461656d6f6e220a736f757263655f6b696e64203d202272756e6e65722d6f7574707574220a72756e6e6572203d202272757374220a736f75726365203d20227461726765742f72656c656173652f73657276696365220a64657374696e6174696f6e203d202273657276696365220a65787065637465645f736861323536203d202263636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363220a65786563757461626c65203d20747275650a0a5b736572766963655d0a65786563757461626c655f6172746966616374203d20226461656d6f6e220a617267756d656e7473203d205b0a20207b206b696e64203d202262696e64696e67222c206e616d65203d202273746174655f726f6f7422207d2c0a5d0a7472616e73706f7274203d202268747470220a726f7574655f7265717569726564203d20747275650a72657175697265645f656e7669726f6e6d656e74203d205b2247414d4543554c545f4944554e4e5f43414e4449444154455f42494e44222c202247414d4543554c545f4944554e4e5f52554e54494d455f42554e444c45225d0a0a5b736572766963652e6865616c74685d0a636f6e7472616374203d2022736572766963652e6865616c7468220a0a5b73746174655d0a736368656d615f67656e65726174696f6e203d20227631220a0a5b5b73746174652e736c6f74735d5d0a6964203d202272756e74696d652d6361636865220a72656c61746976655f70617468203d202272756e74696d652d63616368652e6363220a6b696e64203d202263756c7463616368652d66696c65220a736368656d61203d2022736572766963652e72756e74696d652d63616368652e7631220a777269746572203d20226e6f6e65220a7265636f76657279203d202272656275696c6461626c65220a73746172747570203d20226f70656e2d61742d7374617274220a0a5b5b70726f76696465735d5d0a6361706162696c697479203d2022736572766963652e72756e74696d65220a736368656d61203d2022736572766963652e72756e74696d652e7631220a636f6d7061746962696c697479203d20227631220a0a5b5b646570656e64656e636965735d5d0a6b696e64203d20227368617265642d696e667261737472756374757265220a6361706162696c697479203d20226f64696e2e76657273652d72656e64657a766f7573220a736368656d61203d20226f64696e2e76657273652d746f706f6c6f67792e7631220a636f6d7061746962696c697479203d20227631220adc076e0a736368656d61203d202267616d6563756c742e6964756e6e2e6f70657261746f725f62696e64696e672e7632220a746172676574203d202273657276696365220a0a5b7265706f7369746f72795d0a6f726967696e203d202268747470733a2f2f6769746875622e636f6d2f47616d6543756c742f536572766963652e676974220a61646d69747465645f726566203d2022726566732f68656164732f6d61696e220a6d696e696d756d5f7265766973696f6e203d202231313131313131313131313131313131313131313131313131313131313131313131313131313131220a73656c656374696f6e203d20227265662d68656164220a636865636b6f7574203d20222f7372762f6275696c642f53657276696365220a7265636970655f70617468203d20226465706c6f796d656e742f6964756e6e2f7265636970652e746f6d6c220a0a5b72756e6e6572732e727573745d0a647269766572203d2022646f636b6572220a696d616765203d202272757374407368613235363a61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161220a75736572203d2022313030303a31303030220a6166666f7264616e636573203d205b22736f757263652d72656164222c202261727469666163742d7772697465225d0a616c6c6f7765645f70726f6772616d73203d205b22636172676f225d0a6e6574776f726b5f70726f66696c65203d20226275696c642d646570656e64656e63792d656772657373220a6d656d6f72795f6d6562696279746573203d20323034380a6370755f71756f74615f70657263656e74203d203230300a706964735f6c696d6974203d203531320a746d7066735f6d6562696279746573203d203531320a0a5b776f726b6c6f61645d0a647269766572203d202273797374656d642d7472616e7369656e74220a73746174655f67726f7570203d202273657276696365220a756e69745f707265666978203d20226964756e6e2d73657276696365220a72656c656173655f726f6f74203d20222f7372762f736572766963652f72656c6561736573220a73746174655f726f6f74203d20222f7661722f6c69622f67616d6563756c742f73657276696365220a72756e74696d655f726f6f74203d20222f72756e2f67616d6563756c742f6964756e6e2f73657276696365220a6e6574776f726b203d2022686f73742d70726976617465220a68617264656e696e67203d2022737472696374220a6d656d6f72795f6d6562696279746573203d20313032340a6370755f71756f74615f70657263656e74203d203130300a0a5b776f726b6c6f61642e617267756d656e745f62696e64696e67735d0a73746174655f726f6f74203d20222f7661722f6c69622f67616d6563756c742f73657276696365220a0a5b776f726b6c6f61642e7365637265745f66696c65735d0a47414d4543554c545f52554e54494d455f50524553454e43455f4944454e54495459203d20222f6574632f67616d6563756c742f736572766963652f72756e74696d652d70726573656e63652d6964656e746974792e6363220a0a5b72756e74696d655f6964656e746974795d0a72756e74696d655f6964203d2022736572766963652d79676764726173696c220a65787065637465645f7369676e65725f6964656e746974795f6964203d2022736572766963652d72756e74696d652d7369676e6572220a74727573745f616e63686f725f73746f7265203d20222f6574632f67616d6563756c742f74727573742f736572766963652e6363220a0a5b726f7574655d0a647269766572203d20226e67696e782d73747265616d2d746370220a726f7574655f6964203d202273657276696365220a737461626c655f656e64706f696e74203d2022687474703a2f2f3132372e302e302e313a3137393939220a707269766174655f686f7374203d20223132372e302e302e31220a707269766174655f706f72745f7374617274203d2031383030300a707269766174655f706f72745f656e64203d2031383030390a636f6e6669675f70617468203d20222f6574632f6e67696e782f6964756e6e2d73747265616d2d726f757465732f736572766963652e636f6e66220a72656c6f61645f756e6974203d20226e67696e782e73657276696365220a0a5b6272616b65735d0a6465706c6f796d656e745f73746f7265203d20222f7661722f6c69622f67616d6563756c742f6964756e6e2f736572766963652d6465706c6f796d656e742d6272616b652e6363220a6c6966656379636c655f73746f7265203d20222f7661722f6c69622f67616d6563756c742f6964756e6e2f736572766963652d6c6966656379636c652d6272616b652e6363220a0a5b726f6c6c6f75745d0a7374726174656779203d202263616e6469646174652d7468656e2d70726f6d6f7465220a647261696e5f7365636f6e6473203d2033300a72657461696e5f72656c6561736573203d20320a0a5b706c6163656d656e745d0a646573697265645f7265706c69636173203d20310a6e6f646573203d205b2279676764726173696c225d0a919296b57368617265642d696e667261737472756374757265b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b06265666f72652d70726f6d6f74696f6e97a46f64696e98ad6d616e616765642d7265616479a46f64696eb26f64696e2d696e6361726e6174696f6e2d31d9477368613235362d61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161d9477368613235362d65656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565d9477368613235362d63343263333331373863366539666534633435313162623563663962626461376431633138356536646330373064323234653463653431303538626338633238d9477368613235362d6137313730323730313265383236396235666636363961313135386466636236313764346463636230663963333633656631373738656561633230353332633907b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b57463703a2f2f31302e37372e302e313a3137383731cd4651c096b76964756e6e2e7365616c65645f72656c656173652e7631d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237d9477368613235362d643963646464656263666363623263663162613961643662393235663366666162376465616363323666616536316461386632363538613361393430396562329195a66461656d6f6ea773657276696365d9477368613235362d636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363632ac39196af746f6f6c636861696e2d696e646578d92768747470733a2f2f6578616d706c652e696e76616c69642f746f6f6c636861696e2d696e646578d9477368613235362d64646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464a472757374b6696e707574732f746f6f6c636861696e2d696e646578117892d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237bd2f7372762f736572766963652f72656c65617365732f63757272656e74dc0012bd6964756e6e2e65787065637465645f696e6361726e6174696f6e2e7632a773657276696365d9477368613235362d64396364646465626366636362326366316261396164366239323566336666616237646561636332366661653631646138663236353861336139343039656232b5736572766963652d696e6361726e6174696f6e2d31d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237bb6769746875622e636f6d2f47616d6543756c742f53657276696365d92832323232323232323232323232323232323232323232323232323232323232323232323232323232d9477368613235362d35396263633432376637393934303563613461353132623238613830363734343536666133313439373233363132383065613062633231636335653266363533b1736572766963652d79676764726173696cb6736572766963652d72756e74696d652d7369676e6572ae736572766963652e6865616c7468d9477368613235362d63636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363a27631d9477368613235362d32663837303134316366353638316566656332653234316364636435663731303831616539326162316535633534633839636438393666386335656236323731c294a773657276696365a468747470b6687474703a2f2f3132372e302e302e313a3137393939b6687474703a2f2f3132372e302e302e313a31383030319194af736572766963652e72756e74696d65b2736572766963652e72756e74696d652e7631a2763101919ab57368617265642d696e667261737472756374757265b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b06265666f72652d70726f6d6f74696f6ea46f64696eb36d616e616765642d696e6361726e6174696f6ed9477368613235362d63343263333331373863366539666534633435313162623563663962626461376431633138356536646330373064323234653463653431303538626338633238b57463703a2f2f31302e37372e302e313a3137383731d9477368613235362d39613662663530353466616430306232343363323331386330333436303931333230343665643436356231356534636561666532613736623966663231313039c0cf0000018bcfe568019abb6964756e6e2e72756e74696d655f61637469766174696f6e2e7632d9477368613235362d39613662663530353466616430306232343363323331386330333436303931333230343665643436356231356534636561666532613736623966663231313039b1736572766963652d79676764726173696cd9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262d94032363535323862353235386435353563356434646533383931303830363164383965663439616336306631373337626464656337316535333335643163623935c420c06afef8f66e6ec88c96c81ad6d74dbd9933738032f4d8069a46412380e2272dcf0000018bcfe567ecd94066346536393735326334333432363965323262306130346137623430613065336235386364343561383238376364303936383263313864326565366539376239a765643235353139c44046048cf77cc9f524da966e16a131edb34180f4ea8420f5f24a64fd53178e44988bef994d6df103a5f117470283d533e9d7e8245c4f9965f9a4c0a0114ed1c201dc0033b26964756e6e2d343234322e73657276696365af4964756e6e20746573742034323432af696e766f636174696f6e2d3432343201a465786563a6616c77617973ad636f6e74726f6c2d67726f7570c3a57534323432a57534323432a0a0a0c3c3a9696e76697369626c65a3706964c3a430303737a0a0cd10920194cd1092cd1092cd1092cd109294cd1092cd1092cd1092cd109291cd10920000000000c391010807b52f6f70742f746573742f62696e2f736572766963650101d9477368613235362d34626635313232663334343535346335336264653265626238636432623765336431363030616436333163333835613564376363653233633737383534353961d9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262a92f6f70742f74657374a92f72756e2f74657374d9477368613235362d6462633162346339303066666534386435373562356461356336333830343031323566363564623066653365323434393462373665613938363435376439383690d9477368613235362d30383466656430386239373861663464376431393661373434366138366235383030396536333662363131646231363231316236356139616164666632396335d9202f73797374656d2e736c6963652f6964756e6e2d343234322e73657276696365c090aa61637469766174696f6edc0020010101010101010101010101010101010101010101010101010101010101010190d9477368613235362d39623734636534306561326663636337623632613533363838363563653533303438316130643838653931336161396330313333666662633838353763313838959141d9477368613235362d35353961656164303832363464353739356433393039373138636464303561626434393537326538346665353535393065656633316138386130386664666664ab6f64696e2d7369676e6572296492ad6f64696e2d746f706f6c6f6779959139d9477368613235362d31393538316532376465376365643030666631636535306232303437653761353637633736623163626165626162653565663033663763333031376262356237ab6f64696e2d7369676e6572276496a773657276696365d9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262d9477368613235362d35643838303630666232646530386139663366346338313936623062633863663737653934333732373363346135386330653430303737666630316461306534c0c0c096cd10920708c0c0c091b1736b69707065642d73746174656c65737391b1736b69707065642d73746174656c657373c0c029c0c0c0c0c0 diff --git a/tests/fixtures/idunn-control-legacy/transaction-committing-v2.hex b/tests/fixtures/idunn-control-legacy/transaction-committing-v2.hex new file mode 100644 index 0000000..6846f72 --- /dev/null +++ b/tests/fixtures/idunn-control-legacy/transaction-committing-v2.hex @@ -0,0 +1,2 @@ +idunn.deployment_transaction.v2 +dc0022bf6964756e6e2e6465706c6f796d656e745f7472616e73616374696f6e2e7632d92774782d37636236616537392d323635302d346261322d623664392d643137333338643566393031af636f6e74696e756974792d74657374aa636f6e74696e75697479a77365727669636500aa636f6d6d697474696e67cf0000018bcfe56800cf0000018bcfe6eea0c099d9216964756e6e2e636f6d70696c65645f6465706c6f796d656e745f706c616e2e7632d9477368613235362d64396364646465626366636362326366316261396164366239323566336666616237646561636332366661653631646138663236353861336139343039656232b5736572766963652d696e6361726e6174696f6e2d316e9bbf6964756e6e2e736f757263655f73656c656374696f6e5f66616374732e7631d92768747470733a2f2f6769746875622e636f6d2f47616d6543756c742f536572766963652e676974af726566732f68656164732f6d61696ed92832323232323232323232323232323232323232323232323232323232323232323232323232323232d92832323232323232323232323232323232323232323232323232323232323232323232323232323232d92833333333333333333333333333333333333333333333333333333333333333333333333333333333bc6465706c6f796d656e742f6964756e6e2f7265636970652e746f6d6cd9477368613235362d353962636334323766373939343035636134613531326232386138303637343435366661333134393732333631323830656130626332316363356532663635338091a87265662d6865616464dc058e0a736368656d61203d202267616d6563756c742e6964756e6e2e7461726765745f6465636c61726174696f6e2e7631220a746172676574203d202273657276696365220a736f757263655f7374616d705f656e7669726f6e6d656e74203d2022534552564943455f4255494c445f434f4d4d4954220a0a5b5b73746570735d5d0a6964203d20226275696c64220a7068617365203d20226275696c64220a72756e6e6572203d202272757374220a61726776203d205b22636172676f222c20226275696c64222c20222d2d6c6f636b6564225d0a0a5b5b65787465726e616c5f696e707574735d5d0a6964203d2022746f6f6c636861696e2d696e646578220a75726c203d202268747470733a2f2f6578616d706c652e696e76616c69642f746f6f6c636861696e2d696e646578220a736861323536203d202264646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464220a72756e6e6572203d202272757374220a64657374696e6174696f6e203d2022696e707574732f746f6f6c636861696e2d696e646578220a0a5b5b6172746966616374735d5d0a6964203d20226461656d6f6e220a736f757263655f6b696e64203d202272756e6e65722d6f7574707574220a72756e6e6572203d202272757374220a736f75726365203d20227461726765742f72656c656173652f73657276696365220a64657374696e6174696f6e203d202273657276696365220a65787065637465645f736861323536203d202263636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363220a65786563757461626c65203d20747275650a0a5b736572766963655d0a65786563757461626c655f6172746966616374203d20226461656d6f6e220a617267756d656e7473203d205b0a20207b206b696e64203d202262696e64696e67222c206e616d65203d202273746174655f726f6f7422207d2c0a5d0a7472616e73706f7274203d202268747470220a726f7574655f7265717569726564203d20747275650a72657175697265645f656e7669726f6e6d656e74203d205b2247414d4543554c545f4944554e4e5f43414e4449444154455f42494e44222c202247414d4543554c545f4944554e4e5f52554e54494d455f42554e444c45225d0a0a5b736572766963652e6865616c74685d0a636f6e7472616374203d2022736572766963652e6865616c7468220a0a5b73746174655d0a736368656d615f67656e65726174696f6e203d20227631220a0a5b5b73746174652e736c6f74735d5d0a6964203d202272756e74696d652d6361636865220a72656c61746976655f70617468203d202272756e74696d652d63616368652e6363220a6b696e64203d202263756c7463616368652d66696c65220a736368656d61203d2022736572766963652e72756e74696d652d63616368652e7631220a777269746572203d20226e6f6e65220a7265636f76657279203d202272656275696c6461626c65220a73746172747570203d20226f70656e2d61742d7374617274220a0a5b5b70726f76696465735d5d0a6361706162696c697479203d2022736572766963652e72756e74696d65220a736368656d61203d2022736572766963652e72756e74696d652e7631220a636f6d7061746962696c697479203d20227631220a0a5b5b646570656e64656e636965735d5d0a6b696e64203d20227368617265642d696e667261737472756374757265220a6361706162696c697479203d20226f64696e2e76657273652d72656e64657a766f7573220a736368656d61203d20226f64696e2e76657273652d746f706f6c6f67792e7631220a636f6d7061746962696c697479203d20227631220adc076e0a736368656d61203d202267616d6563756c742e6964756e6e2e6f70657261746f725f62696e64696e672e7632220a746172676574203d202273657276696365220a0a5b7265706f7369746f72795d0a6f726967696e203d202268747470733a2f2f6769746875622e636f6d2f47616d6543756c742f536572766963652e676974220a61646d69747465645f726566203d2022726566732f68656164732f6d61696e220a6d696e696d756d5f7265766973696f6e203d202231313131313131313131313131313131313131313131313131313131313131313131313131313131220a73656c656374696f6e203d20227265662d68656164220a636865636b6f7574203d20222f7372762f6275696c642f53657276696365220a7265636970655f70617468203d20226465706c6f796d656e742f6964756e6e2f7265636970652e746f6d6c220a0a5b72756e6e6572732e727573745d0a647269766572203d2022646f636b6572220a696d616765203d202272757374407368613235363a61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161220a75736572203d2022313030303a31303030220a6166666f7264616e636573203d205b22736f757263652d72656164222c202261727469666163742d7772697465225d0a616c6c6f7765645f70726f6772616d73203d205b22636172676f225d0a6e6574776f726b5f70726f66696c65203d20226275696c642d646570656e64656e63792d656772657373220a6d656d6f72795f6d6562696279746573203d20323034380a6370755f71756f74615f70657263656e74203d203230300a706964735f6c696d6974203d203531320a746d7066735f6d6562696279746573203d203531320a0a5b776f726b6c6f61645d0a647269766572203d202273797374656d642d7472616e7369656e74220a73746174655f67726f7570203d202273657276696365220a756e69745f707265666978203d20226964756e6e2d73657276696365220a72656c656173655f726f6f74203d20222f7372762f736572766963652f72656c6561736573220a73746174655f726f6f74203d20222f7661722f6c69622f67616d6563756c742f73657276696365220a72756e74696d655f726f6f74203d20222f72756e2f67616d6563756c742f6964756e6e2f73657276696365220a6e6574776f726b203d2022686f73742d70726976617465220a68617264656e696e67203d2022737472696374220a6d656d6f72795f6d6562696279746573203d20313032340a6370755f71756f74615f70657263656e74203d203130300a0a5b776f726b6c6f61642e617267756d656e745f62696e64696e67735d0a73746174655f726f6f74203d20222f7661722f6c69622f67616d6563756c742f73657276696365220a0a5b776f726b6c6f61642e7365637265745f66696c65735d0a47414d4543554c545f52554e54494d455f50524553454e43455f4944454e54495459203d20222f6574632f67616d6563756c742f736572766963652f72756e74696d652d70726573656e63652d6964656e746974792e6363220a0a5b72756e74696d655f6964656e746974795d0a72756e74696d655f6964203d2022736572766963652d79676764726173696c220a65787065637465645f7369676e65725f6964656e746974795f6964203d2022736572766963652d72756e74696d652d7369676e6572220a74727573745f616e63686f725f73746f7265203d20222f6574632f67616d6563756c742f74727573742f736572766963652e6363220a0a5b726f7574655d0a647269766572203d20226e67696e782d73747265616d2d746370220a726f7574655f6964203d202273657276696365220a737461626c655f656e64706f696e74203d2022687474703a2f2f3132372e302e302e313a3137393939220a707269766174655f686f7374203d20223132372e302e302e31220a707269766174655f706f72745f7374617274203d2031383030300a707269766174655f706f72745f656e64203d2031383030390a636f6e6669675f70617468203d20222f6574632f6e67696e782f6964756e6e2d73747265616d2d726f757465732f736572766963652e636f6e66220a72656c6f61645f756e6974203d20226e67696e782e73657276696365220a0a5b6272616b65735d0a6465706c6f796d656e745f73746f7265203d20222f7661722f6c69622f67616d6563756c742f6964756e6e2f736572766963652d6465706c6f796d656e742d6272616b652e6363220a6c6966656379636c655f73746f7265203d20222f7661722f6c69622f67616d6563756c742f6964756e6e2f736572766963652d6c6966656379636c652d6272616b652e6363220a0a5b726f6c6c6f75745d0a7374726174656779203d202263616e6469646174652d7468656e2d70726f6d6f7465220a647261696e5f7365636f6e6473203d2033300a72657461696e5f72656c6561736573203d20320a0a5b706c6163656d656e745d0a646573697265645f7265706c69636173203d20310a6e6f646573203d205b2279676764726173696c225d0a919296b57368617265642d696e667261737472756374757265b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b06265666f72652d70726f6d6f74696f6e97a46f64696e98ad6d616e616765642d7265616479a46f64696eb26f64696e2d696e6361726e6174696f6e2d31d9477368613235362d61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161d9477368613235362d65656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565d9477368613235362d63343263333331373863366539666534633435313162623563663962626461376431633138356536646330373064323234653463653431303538626338633238d9477368613235362d6137313730323730313265383236396235666636363961313135386466636236313764346463636230663963333633656631373738656561633230353332633907b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b57463703a2f2f31302e37372e302e313a3137383731cd4651c096b76964756e6e2e7365616c65645f72656c656173652e7631d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237d9477368613235362d643963646464656263666363623263663162613961643662393235663366666162376465616363323666616536316461386632363538613361393430396562329195a66461656d6f6ea773657276696365d9477368613235362d636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363632ac39196af746f6f6c636861696e2d696e646578d92768747470733a2f2f6578616d706c652e696e76616c69642f746f6f6c636861696e2d696e646578d9477368613235362d64646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464a472757374b6696e707574732f746f6f6c636861696e2d696e646578117892d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237bd2f7372762f736572766963652f72656c65617365732f63757272656e74dc0012bd6964756e6e2e65787065637465645f696e6361726e6174696f6e2e7632a773657276696365d9477368613235362d64396364646465626366636362326366316261396164366239323566336666616237646561636332366661653631646138663236353861336139343039656232b5736572766963652d696e6361726e6174696f6e2d31d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237bb6769746875622e636f6d2f47616d6543756c742f53657276696365d92832323232323232323232323232323232323232323232323232323232323232323232323232323232d9477368613235362d35396263633432376637393934303563613461353132623238613830363734343536666133313439373233363132383065613062633231636335653266363533b1736572766963652d79676764726173696cb6736572766963652d72756e74696d652d7369676e6572ae736572766963652e6865616c7468d9477368613235362d63636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363a27631d9477368613235362d32663837303134316366353638316566656332653234316364636435663731303831616539326162316535633534633839636438393666386335656236323731c294a773657276696365a468747470b6687474703a2f2f3132372e302e302e313a3137393939b6687474703a2f2f3132372e302e302e313a31383030319194af736572766963652e72756e74696d65b2736572766963652e72756e74696d652e7631a2763101919ab57368617265642d696e667261737472756374757265b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b06265666f72652d70726f6d6f74696f6ea46f64696eb36d616e616765642d696e6361726e6174696f6ed9477368613235362d63343263333331373863366539666534633435313162623563663962626461376431633138356536646330373064323234653463653431303538626338633238b57463703a2f2f31302e37372e302e313a3137383731d9477368613235362d39613662663530353466616430306232343363323331386330333436303931333230343665643436356231356534636561666532613736623966663231313039c0cf0000018bcfe568019abb6964756e6e2e72756e74696d655f61637469766174696f6e2e7632d9477368613235362d39613662663530353466616430306232343363323331386330333436303931333230343665643436356231356534636561666532613736623966663231313039b1736572766963652d79676764726173696cd9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262d94032363535323862353235386435353563356434646533383931303830363164383965663439616336306631373337626464656337316535333335643163623935c420c06afef8f66e6ec88c96c81ad6d74dbd9933738032f4d8069a46412380e2272dcf0000018bcfe567ecd94066346536393735326334333432363965323262306130346137623430613065336235386364343561383238376364303936383263313864326565366539376239a765643235353139c44046048cf77cc9f524da966e16a131edb34180f4ea8420f5f24a64fd53178e44988bef994d6df103a5f117470283d533e9d7e8245c4f9965f9a4c0a0114ed1c201dc0033b26964756e6e2d343234322e73657276696365af4964756e6e20746573742034323432af696e766f636174696f6e2d3432343201a465786563a6616c77617973ad636f6e74726f6c2d67726f7570c3a57534323432a57534323432a0a0a0c3c3a9696e76697369626c65a3706964c3a430303737a0a0cd10920194cd1092cd1092cd1092cd109294cd1092cd1092cd1092cd109291cd10920000000000c391010807b52f6f70742f746573742f62696e2f736572766963650101d9477368613235362d34626635313232663334343535346335336264653265626238636432623765336431363030616436333163333835613564376363653233633737383534353961d9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262a92f6f70742f74657374a92f72756e2f74657374d9477368613235362d6462633162346339303066666534386435373562356461356336333830343031323566363564623066653365323434393462373665613938363435376439383690d9477368613235362d30383466656430386239373861663464376431393661373434366138366235383030396536333662363131646231363231316236356139616164666632396335d9202f73797374656d2e736c6963652f6964756e6e2d343234322e73657276696365c090aa61637469766174696f6edc0020010101010101010101010101010101010101010101010101010101010101010190d9477368613235362d39623734636534306561326663636337623632613533363838363563653533303438316130643838653931336161396330313333666662633838353763313838959141d9477368613235362d35353961656164303832363464353739356433393039373138636464303561626434393537326538346665353535393065656633316138386130386664666664ab6f64696e2d7369676e6572296492ad6f64696e2d746f706f6c6f6779959139d9477368613235362d31393538316532376465376365643030666631636535306232303437653761353637633736623163626165626162653565663033663763333031376262356237ab6f64696e2d7369676e6572276496a773657276696365d9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262d9477368613235362d35643838303630666232646530386139663366346338313936623062633863663737653934333732373363346135386330653430303737666630316461306534c0c0c096cd10920708c0c0c091b1736b69707065642d73746174656c65737391b1736b69707065642d73746174656c657373959140d9477368613235362d63333634316638353434643763303266333538306230376330663938383766306336613237666635616231643461336532396361663139376366633239396165ab6f64696e2d7369676e6572286493a870726f6d6f74656495a773657276696365d9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262d9477368613235362d62663563663539653335363635323235333236386336303463626638646638636664623033613461306433326232376164313538653538313730396338306534d9477368613235362d34313266303131626462396566646138616137323036636364336333613438633637613131386164646161363266616436303463326236346664396163643063cf0000018bcfe6ee96cf0000018bcfe6ee9629c0c0c0c0 diff --git a/tests/fixtures/idunn-control-legacy/transaction-committing.hex b/tests/fixtures/idunn-control-legacy/transaction-committing.hex new file mode 100644 index 0000000..36decd5 --- /dev/null +++ b/tests/fixtures/idunn-control-legacy/transaction-committing.hex @@ -0,0 +1,2 @@ +idunn.deployment_transaction.v3 +dc0023bf6964756e6e2e6465706c6f796d656e745f7472616e73616374696f6e2e7633d92774782d37636236616537392d323635302d346261322d623664392d643137333338643566393031af636f6e74696e756974792d74657374aa636f6e74696e75697479a77365727669636500aa636f6d6d697474696e67cf0000018bcfe56800cf0000018bcfe6eea0c099d9216964756e6e2e636f6d70696c65645f6465706c6f796d656e745f706c616e2e7632d9477368613235362d64396364646465626366636362326366316261396164366239323566336666616237646561636332366661653631646138663236353861336139343039656232b5736572766963652d696e6361726e6174696f6e2d316e9bbf6964756e6e2e736f757263655f73656c656374696f6e5f66616374732e7631d92768747470733a2f2f6769746875622e636f6d2f47616d6543756c742f536572766963652e676974af726566732f68656164732f6d61696ed92832323232323232323232323232323232323232323232323232323232323232323232323232323232d92832323232323232323232323232323232323232323232323232323232323232323232323232323232d92833333333333333333333333333333333333333333333333333333333333333333333333333333333bc6465706c6f796d656e742f6964756e6e2f7265636970652e746f6d6cd9477368613235362d353962636334323766373939343035636134613531326232386138303637343435366661333134393732333631323830656130626332316363356532663635338091a87265662d6865616464dc058e0a736368656d61203d202267616d6563756c742e6964756e6e2e7461726765745f6465636c61726174696f6e2e7631220a746172676574203d202273657276696365220a736f757263655f7374616d705f656e7669726f6e6d656e74203d2022534552564943455f4255494c445f434f4d4d4954220a0a5b5b73746570735d5d0a6964203d20226275696c64220a7068617365203d20226275696c64220a72756e6e6572203d202272757374220a61726776203d205b22636172676f222c20226275696c64222c20222d2d6c6f636b6564225d0a0a5b5b65787465726e616c5f696e707574735d5d0a6964203d2022746f6f6c636861696e2d696e646578220a75726c203d202268747470733a2f2f6578616d706c652e696e76616c69642f746f6f6c636861696e2d696e646578220a736861323536203d202264646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464220a72756e6e6572203d202272757374220a64657374696e6174696f6e203d2022696e707574732f746f6f6c636861696e2d696e646578220a0a5b5b6172746966616374735d5d0a6964203d20226461656d6f6e220a736f757263655f6b696e64203d202272756e6e65722d6f7574707574220a72756e6e6572203d202272757374220a736f75726365203d20227461726765742f72656c656173652f73657276696365220a64657374696e6174696f6e203d202273657276696365220a65787065637465645f736861323536203d202263636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363220a65786563757461626c65203d20747275650a0a5b736572766963655d0a65786563757461626c655f6172746966616374203d20226461656d6f6e220a617267756d656e7473203d205b0a20207b206b696e64203d202262696e64696e67222c206e616d65203d202273746174655f726f6f7422207d2c0a5d0a7472616e73706f7274203d202268747470220a726f7574655f7265717569726564203d20747275650a72657175697265645f656e7669726f6e6d656e74203d205b2247414d4543554c545f4944554e4e5f43414e4449444154455f42494e44222c202247414d4543554c545f4944554e4e5f52554e54494d455f42554e444c45225d0a0a5b736572766963652e6865616c74685d0a636f6e7472616374203d2022736572766963652e6865616c7468220a0a5b73746174655d0a736368656d615f67656e65726174696f6e203d20227631220a0a5b5b73746174652e736c6f74735d5d0a6964203d202272756e74696d652d6361636865220a72656c61746976655f70617468203d202272756e74696d652d63616368652e6363220a6b696e64203d202263756c7463616368652d66696c65220a736368656d61203d2022736572766963652e72756e74696d652d63616368652e7631220a777269746572203d20226e6f6e65220a7265636f76657279203d202272656275696c6461626c65220a73746172747570203d20226f70656e2d61742d7374617274220a0a5b5b70726f76696465735d5d0a6361706162696c697479203d2022736572766963652e72756e74696d65220a736368656d61203d2022736572766963652e72756e74696d652e7631220a636f6d7061746962696c697479203d20227631220a0a5b5b646570656e64656e636965735d5d0a6b696e64203d20227368617265642d696e667261737472756374757265220a6361706162696c697479203d20226f64696e2e76657273652d72656e64657a766f7573220a736368656d61203d20226f64696e2e76657273652d746f706f6c6f67792e7631220a636f6d7061746962696c697479203d20227631220adc076e0a736368656d61203d202267616d6563756c742e6964756e6e2e6f70657261746f725f62696e64696e672e7632220a746172676574203d202273657276696365220a0a5b7265706f7369746f72795d0a6f726967696e203d202268747470733a2f2f6769746875622e636f6d2f47616d6543756c742f536572766963652e676974220a61646d69747465645f726566203d2022726566732f68656164732f6d61696e220a6d696e696d756d5f7265766973696f6e203d202231313131313131313131313131313131313131313131313131313131313131313131313131313131220a73656c656374696f6e203d20227265662d68656164220a636865636b6f7574203d20222f7372762f6275696c642f53657276696365220a7265636970655f70617468203d20226465706c6f796d656e742f6964756e6e2f7265636970652e746f6d6c220a0a5b72756e6e6572732e727573745d0a647269766572203d2022646f636b6572220a696d616765203d202272757374407368613235363a61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161220a75736572203d2022313030303a31303030220a6166666f7264616e636573203d205b22736f757263652d72656164222c202261727469666163742d7772697465225d0a616c6c6f7765645f70726f6772616d73203d205b22636172676f225d0a6e6574776f726b5f70726f66696c65203d20226275696c642d646570656e64656e63792d656772657373220a6d656d6f72795f6d6562696279746573203d20323034380a6370755f71756f74615f70657263656e74203d203230300a706964735f6c696d6974203d203531320a746d7066735f6d6562696279746573203d203531320a0a5b776f726b6c6f61645d0a647269766572203d202273797374656d642d7472616e7369656e74220a73746174655f67726f7570203d202273657276696365220a756e69745f707265666978203d20226964756e6e2d73657276696365220a72656c656173655f726f6f74203d20222f7372762f736572766963652f72656c6561736573220a73746174655f726f6f74203d20222f7661722f6c69622f67616d6563756c742f73657276696365220a72756e74696d655f726f6f74203d20222f72756e2f67616d6563756c742f6964756e6e2f73657276696365220a6e6574776f726b203d2022686f73742d70726976617465220a68617264656e696e67203d2022737472696374220a6d656d6f72795f6d6562696279746573203d20313032340a6370755f71756f74615f70657263656e74203d203130300a0a5b776f726b6c6f61642e617267756d656e745f62696e64696e67735d0a73746174655f726f6f74203d20222f7661722f6c69622f67616d6563756c742f73657276696365220a0a5b776f726b6c6f61642e7365637265745f66696c65735d0a47414d4543554c545f52554e54494d455f50524553454e43455f4944454e54495459203d20222f6574632f67616d6563756c742f736572766963652f72756e74696d652d70726573656e63652d6964656e746974792e6363220a0a5b72756e74696d655f6964656e746974795d0a72756e74696d655f6964203d2022736572766963652d79676764726173696c220a65787065637465645f7369676e65725f6964656e746974795f6964203d2022736572766963652d72756e74696d652d7369676e6572220a74727573745f616e63686f725f73746f7265203d20222f6574632f67616d6563756c742f74727573742f736572766963652e6363220a0a5b726f7574655d0a647269766572203d20226e67696e782d73747265616d2d746370220a726f7574655f6964203d202273657276696365220a737461626c655f656e64706f696e74203d2022687474703a2f2f3132372e302e302e313a3137393939220a707269766174655f686f7374203d20223132372e302e302e31220a707269766174655f706f72745f7374617274203d2031383030300a707269766174655f706f72745f656e64203d2031383030390a636f6e6669675f70617468203d20222f6574632f6e67696e782f6964756e6e2d73747265616d2d726f757465732f736572766963652e636f6e66220a72656c6f61645f756e6974203d20226e67696e782e73657276696365220a0a5b6272616b65735d0a6465706c6f796d656e745f73746f7265203d20222f7661722f6c69622f67616d6563756c742f6964756e6e2f736572766963652d6465706c6f796d656e742d6272616b652e6363220a6c6966656379636c655f73746f7265203d20222f7661722f6c69622f67616d6563756c742f6964756e6e2f736572766963652d6c6966656379636c652d6272616b652e6363220a0a5b726f6c6c6f75745d0a7374726174656779203d202263616e6469646174652d7468656e2d70726f6d6f7465220a647261696e5f7365636f6e6473203d2033300a72657461696e5f72656c6561736573203d20320a0a5b706c6163656d656e745d0a646573697265645f7265706c69636173203d20310a6e6f646573203d205b2279676764726173696c225d0a919296b57368617265642d696e667261737472756374757265b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b06265666f72652d70726f6d6f74696f6e97a46f64696e98ad6d616e616765642d7265616479a46f64696eb26f64696e2d696e6361726e6174696f6e2d31d9477368613235362d61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161d9477368613235362d65656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565d9477368613235362d63343263333331373863366539666534633435313162623563663962626461376431633138356536646330373064323234653463653431303538626338633238d9477368613235362d6137313730323730313265383236396235666636363961313135386466636236313764346463636230663963333633656631373738656561633230353332633907b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b57463703a2f2f31302e37372e302e313a3137383731cd4651c096b76964756e6e2e7365616c65645f72656c656173652e7631d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237d9477368613235362d643963646464656263666363623263663162613961643662393235663366666162376465616363323666616536316461386632363538613361393430396562329195a66461656d6f6ea773657276696365d9477368613235362d636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363632ac39196af746f6f6c636861696e2d696e646578d92768747470733a2f2f6578616d706c652e696e76616c69642f746f6f6c636861696e2d696e646578d9477368613235362d64646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464a472757374b6696e707574732f746f6f6c636861696e2d696e646578117892d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237bd2f7372762f736572766963652f72656c65617365732f63757272656e74dc0012bd6964756e6e2e65787065637465645f696e6361726e6174696f6e2e7632a773657276696365d9477368613235362d64396364646465626366636362326366316261396164366239323566336666616237646561636332366661653631646138663236353861336139343039656232b5736572766963652d696e6361726e6174696f6e2d31d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237bb6769746875622e636f6d2f47616d6543756c742f53657276696365d92832323232323232323232323232323232323232323232323232323232323232323232323232323232d9477368613235362d35396263633432376637393934303563613461353132623238613830363734343536666133313439373233363132383065613062633231636335653266363533b1736572766963652d79676764726173696cb6736572766963652d72756e74696d652d7369676e6572ae736572766963652e6865616c7468d9477368613235362d63636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363a27631d9477368613235362d32663837303134316366353638316566656332653234316364636435663731303831616539326162316535633534633839636438393666386335656236323731c294a773657276696365a468747470b6687474703a2f2f3132372e302e302e313a3137393939b6687474703a2f2f3132372e302e302e313a31383030319194af736572766963652e72756e74696d65b2736572766963652e72756e74696d652e7631a2763101919ab57368617265642d696e667261737472756374757265b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b06265666f72652d70726f6d6f74696f6ea46f64696eb36d616e616765642d696e6361726e6174696f6ed9477368613235362d63343263333331373863366539666534633435313162623563663962626461376431633138356536646330373064323234653463653431303538626338633238b57463703a2f2f31302e37372e302e313a3137383731d9477368613235362d39613662663530353466616430306232343363323331386330333436303931333230343665643436356231356534636561666532613736623966663231313039c0cf0000018bcfe568019abb6964756e6e2e72756e74696d655f61637469766174696f6e2e7632d9477368613235362d39613662663530353466616430306232343363323331386330333436303931333230343665643436356231356534636561666532613736623966663231313039b1736572766963652d79676764726173696cd9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262d94032363535323862353235386435353563356434646533383931303830363164383965663439616336306631373337626464656337316535333335643163623935c420c06afef8f66e6ec88c96c81ad6d74dbd9933738032f4d8069a46412380e2272dcf0000018bcfe567ecd94066346536393735326334333432363965323262306130346137623430613065336235386364343561383238376364303936383263313864326565366539376239a765643235353139c44046048cf77cc9f524da966e16a131edb34180f4ea8420f5f24a64fd53178e44988bef994d6df103a5f117470283d533e9d7e8245c4f9965f9a4c0a0114ed1c201dc0033b26964756e6e2d343234322e73657276696365af4964756e6e20746573742034323432af696e766f636174696f6e2d3432343201a465786563a6616c77617973ad636f6e74726f6c2d67726f7570c3a57534323432a57534323432a0a0a0c3c3a9696e76697369626c65a3706964c3a430303737a0a0cd10920194cd1092cd1092cd1092cd109294cd1092cd1092cd1092cd109291cd10920000000000c391010807b52f6f70742f746573742f62696e2f736572766963650101d9477368613235362d34626635313232663334343535346335336264653265626238636432623765336431363030616436333163333835613564376363653233633737383534353961d9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262a92f6f70742f74657374a92f72756e2f74657374d9477368613235362d6462633162346339303066666534386435373562356461356336333830343031323566363564623066653365323434393462373665613938363435376439383690d9477368613235362d30383466656430386239373861663464376431393661373434366138366235383030396536333662363131646231363231316236356139616164666632396335d9202f73797374656d2e736c6963652f6964756e6e2d343234322e73657276696365c090aa61637469766174696f6edc0020010101010101010101010101010101010101010101010101010101010101010190d9477368613235362d39623734636534306561326663636337623632613533363838363563653533303438316130643838653931336161396330313333666662633838353763313838959141d9477368613235362d35353961656164303832363464353739356433393039373138636464303561626434393537326538346665353535393065656633316138386130386664666664ab6f64696e2d7369676e6572296492ad6f64696e2d746f706f6c6f6779959139d9477368613235362d31393538316532376465376365643030666631636535306232303437653761353637633736623163626165626162653565663033663763333031376262356237ab6f64696e2d7369676e6572276496a773657276696365d9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262d9477368613235362d35643838303630666232646530386139663366346338313936623062633863663737653934333732373363346135386330653430303737666630316461306534c0c0c096cd10920708c0c0c091b1736b69707065642d73746174656c65737391b1736b69707065642d73746174656c657373959140d9477368613235362d63333634316638353434643763303266333538306230376330663938383766306336613237666635616231643461336532396361663139376366633239396165ab6f64696e2d7369676e6572286493a870726f6d6f74656495a773657276696365d9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262d9477368613235362d62663563663539653335363635323235333236386336303463626638646638636664623033613461306433326232376164313538653538313730396338306534d9477368613235362d34313266303131626462396566646138616137323036636364336333613438633637613131386164646161363266616436303463326236346664396163643063cf0000018bcfe6ee96cf0000018bcfe6ee9629c0c0c0c0c0 diff --git a/tests/fixtures/idunn-control-legacy/transaction-failed-after-fencing.hex b/tests/fixtures/idunn-control-legacy/transaction-failed-after-fencing.hex new file mode 100644 index 0000000..9f7e75c --- /dev/null +++ b/tests/fixtures/idunn-control-legacy/transaction-failed-after-fencing.hex @@ -0,0 +1,2 @@ +idunn.deployment_transaction.v3 +dc0023bf6964756e6e2e6465706c6f796d656e745f7472616e73616374696f6e2e7633d92774782d37636236616537392d323635302d346261322d623664392d643137333338643566393031af636f6e74696e756974792d74657374aa636f6e74696e75697479a77365727669636500a8636f6d706c657465cf0000018bcfe56800cf0000018bcfe6eea0c099d9216964756e6e2e636f6d70696c65645f6465706c6f796d656e745f706c616e2e7632d9477368613235362d64396364646465626366636362326366316261396164366239323566336666616237646561636332366661653631646138663236353861336139343039656232b5736572766963652d696e6361726e6174696f6e2d316e9bbf6964756e6e2e736f757263655f73656c656374696f6e5f66616374732e7631d92768747470733a2f2f6769746875622e636f6d2f47616d6543756c742f536572766963652e676974af726566732f68656164732f6d61696ed92832323232323232323232323232323232323232323232323232323232323232323232323232323232d92832323232323232323232323232323232323232323232323232323232323232323232323232323232d92833333333333333333333333333333333333333333333333333333333333333333333333333333333bc6465706c6f796d656e742f6964756e6e2f7265636970652e746f6d6cd9477368613235362d353962636334323766373939343035636134613531326232386138303637343435366661333134393732333631323830656130626332316363356532663635338091a87265662d6865616464dc058e0a736368656d61203d202267616d6563756c742e6964756e6e2e7461726765745f6465636c61726174696f6e2e7631220a746172676574203d202273657276696365220a736f757263655f7374616d705f656e7669726f6e6d656e74203d2022534552564943455f4255494c445f434f4d4d4954220a0a5b5b73746570735d5d0a6964203d20226275696c64220a7068617365203d20226275696c64220a72756e6e6572203d202272757374220a61726776203d205b22636172676f222c20226275696c64222c20222d2d6c6f636b6564225d0a0a5b5b65787465726e616c5f696e707574735d5d0a6964203d2022746f6f6c636861696e2d696e646578220a75726c203d202268747470733a2f2f6578616d706c652e696e76616c69642f746f6f6c636861696e2d696e646578220a736861323536203d202264646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464220a72756e6e6572203d202272757374220a64657374696e6174696f6e203d2022696e707574732f746f6f6c636861696e2d696e646578220a0a5b5b6172746966616374735d5d0a6964203d20226461656d6f6e220a736f757263655f6b696e64203d202272756e6e65722d6f7574707574220a72756e6e6572203d202272757374220a736f75726365203d20227461726765742f72656c656173652f73657276696365220a64657374696e6174696f6e203d202273657276696365220a65787065637465645f736861323536203d202263636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363220a65786563757461626c65203d20747275650a0a5b736572766963655d0a65786563757461626c655f6172746966616374203d20226461656d6f6e220a617267756d656e7473203d205b0a20207b206b696e64203d202262696e64696e67222c206e616d65203d202273746174655f726f6f7422207d2c0a5d0a7472616e73706f7274203d202268747470220a726f7574655f7265717569726564203d20747275650a72657175697265645f656e7669726f6e6d656e74203d205b2247414d4543554c545f4944554e4e5f43414e4449444154455f42494e44222c202247414d4543554c545f4944554e4e5f52554e54494d455f42554e444c45225d0a0a5b736572766963652e6865616c74685d0a636f6e7472616374203d2022736572766963652e6865616c7468220a0a5b73746174655d0a736368656d615f67656e65726174696f6e203d20227631220a0a5b5b73746174652e736c6f74735d5d0a6964203d202272756e74696d652d6361636865220a72656c61746976655f70617468203d202272756e74696d652d63616368652e6363220a6b696e64203d202263756c7463616368652d66696c65220a736368656d61203d2022736572766963652e72756e74696d652d63616368652e7631220a777269746572203d20226e6f6e65220a7265636f76657279203d202272656275696c6461626c65220a73746172747570203d20226f70656e2d61742d7374617274220a0a5b5b70726f76696465735d5d0a6361706162696c697479203d2022736572766963652e72756e74696d65220a736368656d61203d2022736572766963652e72756e74696d652e7631220a636f6d7061746962696c697479203d20227631220a0a5b5b646570656e64656e636965735d5d0a6b696e64203d20227368617265642d696e667261737472756374757265220a6361706162696c697479203d20226f64696e2e76657273652d72656e64657a766f7573220a736368656d61203d20226f64696e2e76657273652d746f706f6c6f67792e7631220a636f6d7061746962696c697479203d20227631220adc076e0a736368656d61203d202267616d6563756c742e6964756e6e2e6f70657261746f725f62696e64696e672e7632220a746172676574203d202273657276696365220a0a5b7265706f7369746f72795d0a6f726967696e203d202268747470733a2f2f6769746875622e636f6d2f47616d6543756c742f536572766963652e676974220a61646d69747465645f726566203d2022726566732f68656164732f6d61696e220a6d696e696d756d5f7265766973696f6e203d202231313131313131313131313131313131313131313131313131313131313131313131313131313131220a73656c656374696f6e203d20227265662d68656164220a636865636b6f7574203d20222f7372762f6275696c642f53657276696365220a7265636970655f70617468203d20226465706c6f796d656e742f6964756e6e2f7265636970652e746f6d6c220a0a5b72756e6e6572732e727573745d0a647269766572203d2022646f636b6572220a696d616765203d202272757374407368613235363a61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161220a75736572203d2022313030303a31303030220a6166666f7264616e636573203d205b22736f757263652d72656164222c202261727469666163742d7772697465225d0a616c6c6f7765645f70726f6772616d73203d205b22636172676f225d0a6e6574776f726b5f70726f66696c65203d20226275696c642d646570656e64656e63792d656772657373220a6d656d6f72795f6d6562696279746573203d20323034380a6370755f71756f74615f70657263656e74203d203230300a706964735f6c696d6974203d203531320a746d7066735f6d6562696279746573203d203531320a0a5b776f726b6c6f61645d0a647269766572203d202273797374656d642d7472616e7369656e74220a73746174655f67726f7570203d202273657276696365220a756e69745f707265666978203d20226964756e6e2d73657276696365220a72656c656173655f726f6f74203d20222f7372762f736572766963652f72656c6561736573220a73746174655f726f6f74203d20222f7661722f6c69622f67616d6563756c742f73657276696365220a72756e74696d655f726f6f74203d20222f72756e2f67616d6563756c742f6964756e6e2f73657276696365220a6e6574776f726b203d2022686f73742d70726976617465220a68617264656e696e67203d2022737472696374220a6d656d6f72795f6d6562696279746573203d20313032340a6370755f71756f74615f70657263656e74203d203130300a0a5b776f726b6c6f61642e617267756d656e745f62696e64696e67735d0a73746174655f726f6f74203d20222f7661722f6c69622f67616d6563756c742f73657276696365220a0a5b776f726b6c6f61642e7365637265745f66696c65735d0a47414d4543554c545f52554e54494d455f50524553454e43455f4944454e54495459203d20222f6574632f67616d6563756c742f736572766963652f72756e74696d652d70726573656e63652d6964656e746974792e6363220a0a5b72756e74696d655f6964656e746974795d0a72756e74696d655f6964203d2022736572766963652d79676764726173696c220a65787065637465645f7369676e65725f6964656e746974795f6964203d2022736572766963652d72756e74696d652d7369676e6572220a74727573745f616e63686f725f73746f7265203d20222f6574632f67616d6563756c742f74727573742f736572766963652e6363220a0a5b726f7574655d0a647269766572203d20226e67696e782d73747265616d2d746370220a726f7574655f6964203d202273657276696365220a737461626c655f656e64706f696e74203d2022687474703a2f2f3132372e302e302e313a3137393939220a707269766174655f686f7374203d20223132372e302e302e31220a707269766174655f706f72745f7374617274203d2031383030300a707269766174655f706f72745f656e64203d2031383030390a636f6e6669675f70617468203d20222f6574632f6e67696e782f6964756e6e2d73747265616d2d726f757465732f736572766963652e636f6e66220a72656c6f61645f756e6974203d20226e67696e782e73657276696365220a0a5b6272616b65735d0a6465706c6f796d656e745f73746f7265203d20222f7661722f6c69622f67616d6563756c742f6964756e6e2f736572766963652d6465706c6f796d656e742d6272616b652e6363220a6c6966656379636c655f73746f7265203d20222f7661722f6c69622f67616d6563756c742f6964756e6e2f736572766963652d6c6966656379636c652d6272616b652e6363220a0a5b726f6c6c6f75745d0a7374726174656779203d202263616e6469646174652d7468656e2d70726f6d6f7465220a647261696e5f7365636f6e6473203d2033300a72657461696e5f72656c6561736573203d20320a0a5b706c6163656d656e745d0a646573697265645f7265706c69636173203d20310a6e6f646573203d205b2279676764726173696c225d0a919296b57368617265642d696e667261737472756374757265b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b06265666f72652d70726f6d6f74696f6e97a46f64696e98ad6d616e616765642d7265616479a46f64696eb26f64696e2d696e6361726e6174696f6e2d31d9477368613235362d61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161d9477368613235362d65656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565d9477368613235362d63343263333331373863366539666534633435313162623563663962626461376431633138356536646330373064323234653463653431303538626338633238d9477368613235362d6137313730323730313265383236396235666636363961313135386466636236313764346463636230663963333633656631373738656561633230353332633907b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b57463703a2f2f31302e37372e302e313a3137383731cd4651c096b76964756e6e2e7365616c65645f72656c656173652e7631d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237d9477368613235362d643963646464656263666363623263663162613961643662393235663366666162376465616363323666616536316461386632363538613361393430396562329195a66461656d6f6ea773657276696365d9477368613235362d636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363632ac39196af746f6f6c636861696e2d696e646578d92768747470733a2f2f6578616d706c652e696e76616c69642f746f6f6c636861696e2d696e646578d9477368613235362d64646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464a472757374b6696e707574732f746f6f6c636861696e2d696e646578117892d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237bd2f7372762f736572766963652f72656c65617365732f63757272656e74dc0012bd6964756e6e2e65787065637465645f696e6361726e6174696f6e2e7632a773657276696365d9477368613235362d64396364646465626366636362326366316261396164366239323566336666616237646561636332366661653631646138663236353861336139343039656232b5736572766963652d696e6361726e6174696f6e2d31d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237bb6769746875622e636f6d2f47616d6543756c742f53657276696365d92832323232323232323232323232323232323232323232323232323232323232323232323232323232d9477368613235362d35396263633432376637393934303563613461353132623238613830363734343536666133313439373233363132383065613062633231636335653266363533b1736572766963652d79676764726173696cb6736572766963652d72756e74696d652d7369676e6572ae736572766963652e6865616c7468d9477368613235362d63636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363a27631d9477368613235362d32663837303134316366353638316566656332653234316364636435663731303831616539326162316535633534633839636438393666386335656236323731c294a773657276696365a468747470b6687474703a2f2f3132372e302e302e313a3137393939b6687474703a2f2f3132372e302e302e313a31383030319194af736572766963652e72756e74696d65b2736572766963652e72756e74696d652e7631a2763101919ab57368617265642d696e667261737472756374757265b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b06265666f72652d70726f6d6f74696f6ea46f64696eb36d616e616765642d696e6361726e6174696f6ed9477368613235362d63343263333331373863366539666534633435313162623563663962626461376431633138356536646330373064323234653463653431303538626338633238b57463703a2f2f31302e37372e302e313a3137383731d9477368613235362d39613662663530353466616430306232343363323331386330333436303931333230343665643436356231356534636561666532613736623966663231313039c0cf0000018bcfe568019abb6964756e6e2e72756e74696d655f61637469766174696f6e2e7632d9477368613235362d39613662663530353466616430306232343363323331386330333436303931333230343665643436356231356534636561666532613736623966663231313039b1736572766963652d79676764726173696cd9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262d94032363535323862353235386435353563356434646533383931303830363164383965663439616336306631373337626464656337316535333335643163623935c420c06afef8f66e6ec88c96c81ad6d74dbd9933738032f4d8069a46412380e2272dcf0000018bcfe567ecd94066346536393735326334333432363965323262306130346137623430613065336235386364343561383238376364303936383263313864326565366539376239a765643235353139c44046048cf77cc9f524da966e16a131edb34180f4ea8420f5f24a64fd53178e44988bef994d6df103a5f117470283d533e9d7e8245c4f9965f9a4c0a0114ed1c201dc0033b26964756e6e2d343234322e73657276696365af4964756e6e20746573742034323432af696e766f636174696f6e2d3432343201a465786563a6616c77617973ad636f6e74726f6c2d67726f7570c3a57534323432a57534323432a0a0a0c3c3a9696e76697369626c65a3706964c3a430303737a0a0cd10920194cd1092cd1092cd1092cd109294cd1092cd1092cd1092cd109291cd10920000000000c391010807b52f6f70742f746573742f62696e2f736572766963650101d9477368613235362d34626635313232663334343535346335336264653265626238636432623765336431363030616436333163333835613564376363653233633737383534353961d9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262a92f6f70742f74657374a92f72756e2f74657374d9477368613235362d6462633162346339303066666534386435373562356461356336333830343031323566363564623066653365323434393462373665613938363435376439383690d9477368613235362d30383466656430386239373861663464376431393661373434366138366235383030396536333662363131646231363231316236356139616164666632396335d9202f73797374656d2e736c6963652f6964756e6e2d343234322e73657276696365c090aa61637469766174696f6edc0020010101010101010101010101010101010101010101010101010101010101010190d9477368613235362d39623734636534306561326663636337623632613533363838363563653533303438316130643838653931336161396330313333666662633838353763313838959141d9477368613235362d35353961656164303832363464353739356433393039373138636464303561626434393537326538346665353535393065656633316138386130386664666664ab6f64696e2d7369676e6572296492ad6f64696e2d746f706f6c6f6779959139d9477368613235362d31393538316532376465376365643030666631636535306232303437653761353637633736623163626165626162653565663033663763333031376262356237ab6f64696e2d7369676e6572276496a773657276696365d9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262d9477368613235362d35643838303630666232646530386139663366346338313936623062633863663737653934333732373363346135386330653430303737666630316461306534c0c0c096cd10920708c0c0c091b1736b69707065642d73746174656c657373c0c0c029c092b46661696c65642d61667465722d66656e63696e67bc63616e646964617465206e6576657220626563616d65207265616479c0c096bc63616e646964617465206e6576657220626563616d65207265616479a8636f6d706c657465a7736b6970706564a8636f6d706c657465a7736b6970706564a7736b6970706564 diff --git a/tests/fixtures/idunn-control-legacy/transaction-fencing.hex b/tests/fixtures/idunn-control-legacy/transaction-fencing.hex new file mode 100644 index 0000000..58d4765 --- /dev/null +++ b/tests/fixtures/idunn-control-legacy/transaction-fencing.hex @@ -0,0 +1,2 @@ +idunn.deployment_transaction.v3 +dc0023bf6964756e6e2e6465706c6f796d656e745f7472616e73616374696f6e2e7633d92774782d37636236616537392d323635302d346261322d623664392d643137333338643566393031af636f6e74696e756974792d74657374aa636f6e74696e75697479a77365727669636500a766656e63696e67cf0000018bcfe56800cf0000018bcfe6eea0c099d9216964756e6e2e636f6d70696c65645f6465706c6f796d656e745f706c616e2e7632d9477368613235362d64396364646465626366636362326366316261396164366239323566336666616237646561636332366661653631646138663236353861336139343039656232b5736572766963652d696e6361726e6174696f6e2d316e9bbf6964756e6e2e736f757263655f73656c656374696f6e5f66616374732e7631d92768747470733a2f2f6769746875622e636f6d2f47616d6543756c742f536572766963652e676974af726566732f68656164732f6d61696ed92832323232323232323232323232323232323232323232323232323232323232323232323232323232d92832323232323232323232323232323232323232323232323232323232323232323232323232323232d92833333333333333333333333333333333333333333333333333333333333333333333333333333333bc6465706c6f796d656e742f6964756e6e2f7265636970652e746f6d6cd9477368613235362d353962636334323766373939343035636134613531326232386138303637343435366661333134393732333631323830656130626332316363356532663635338091a87265662d6865616464dc058e0a736368656d61203d202267616d6563756c742e6964756e6e2e7461726765745f6465636c61726174696f6e2e7631220a746172676574203d202273657276696365220a736f757263655f7374616d705f656e7669726f6e6d656e74203d2022534552564943455f4255494c445f434f4d4d4954220a0a5b5b73746570735d5d0a6964203d20226275696c64220a7068617365203d20226275696c64220a72756e6e6572203d202272757374220a61726776203d205b22636172676f222c20226275696c64222c20222d2d6c6f636b6564225d0a0a5b5b65787465726e616c5f696e707574735d5d0a6964203d2022746f6f6c636861696e2d696e646578220a75726c203d202268747470733a2f2f6578616d706c652e696e76616c69642f746f6f6c636861696e2d696e646578220a736861323536203d202264646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464220a72756e6e6572203d202272757374220a64657374696e6174696f6e203d2022696e707574732f746f6f6c636861696e2d696e646578220a0a5b5b6172746966616374735d5d0a6964203d20226461656d6f6e220a736f757263655f6b696e64203d202272756e6e65722d6f7574707574220a72756e6e6572203d202272757374220a736f75726365203d20227461726765742f72656c656173652f73657276696365220a64657374696e6174696f6e203d202273657276696365220a65787065637465645f736861323536203d202263636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363220a65786563757461626c65203d20747275650a0a5b736572766963655d0a65786563757461626c655f6172746966616374203d20226461656d6f6e220a617267756d656e7473203d205b0a20207b206b696e64203d202262696e64696e67222c206e616d65203d202273746174655f726f6f7422207d2c0a5d0a7472616e73706f7274203d202268747470220a726f7574655f7265717569726564203d20747275650a72657175697265645f656e7669726f6e6d656e74203d205b2247414d4543554c545f4944554e4e5f43414e4449444154455f42494e44222c202247414d4543554c545f4944554e4e5f52554e54494d455f42554e444c45225d0a0a5b736572766963652e6865616c74685d0a636f6e7472616374203d2022736572766963652e6865616c7468220a0a5b73746174655d0a736368656d615f67656e65726174696f6e203d20227631220a0a5b5b73746174652e736c6f74735d5d0a6964203d202272756e74696d652d6361636865220a72656c61746976655f70617468203d202272756e74696d652d63616368652e6363220a6b696e64203d202263756c7463616368652d66696c65220a736368656d61203d2022736572766963652e72756e74696d652d63616368652e7631220a777269746572203d20226e6f6e65220a7265636f76657279203d202272656275696c6461626c65220a73746172747570203d20226f70656e2d61742d7374617274220a0a5b5b70726f76696465735d5d0a6361706162696c697479203d2022736572766963652e72756e74696d65220a736368656d61203d2022736572766963652e72756e74696d652e7631220a636f6d7061746962696c697479203d20227631220a0a5b5b646570656e64656e636965735d5d0a6b696e64203d20227368617265642d696e667261737472756374757265220a6361706162696c697479203d20226f64696e2e76657273652d72656e64657a766f7573220a736368656d61203d20226f64696e2e76657273652d746f706f6c6f67792e7631220a636f6d7061746962696c697479203d20227631220adc076e0a736368656d61203d202267616d6563756c742e6964756e6e2e6f70657261746f725f62696e64696e672e7632220a746172676574203d202273657276696365220a0a5b7265706f7369746f72795d0a6f726967696e203d202268747470733a2f2f6769746875622e636f6d2f47616d6543756c742f536572766963652e676974220a61646d69747465645f726566203d2022726566732f68656164732f6d61696e220a6d696e696d756d5f7265766973696f6e203d202231313131313131313131313131313131313131313131313131313131313131313131313131313131220a73656c656374696f6e203d20227265662d68656164220a636865636b6f7574203d20222f7372762f6275696c642f53657276696365220a7265636970655f70617468203d20226465706c6f796d656e742f6964756e6e2f7265636970652e746f6d6c220a0a5b72756e6e6572732e727573745d0a647269766572203d2022646f636b6572220a696d616765203d202272757374407368613235363a61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161220a75736572203d2022313030303a31303030220a6166666f7264616e636573203d205b22736f757263652d72656164222c202261727469666163742d7772697465225d0a616c6c6f7765645f70726f6772616d73203d205b22636172676f225d0a6e6574776f726b5f70726f66696c65203d20226275696c642d646570656e64656e63792d656772657373220a6d656d6f72795f6d6562696279746573203d20323034380a6370755f71756f74615f70657263656e74203d203230300a706964735f6c696d6974203d203531320a746d7066735f6d6562696279746573203d203531320a0a5b776f726b6c6f61645d0a647269766572203d202273797374656d642d7472616e7369656e74220a73746174655f67726f7570203d202273657276696365220a756e69745f707265666978203d20226964756e6e2d73657276696365220a72656c656173655f726f6f74203d20222f7372762f736572766963652f72656c6561736573220a73746174655f726f6f74203d20222f7661722f6c69622f67616d6563756c742f73657276696365220a72756e74696d655f726f6f74203d20222f72756e2f67616d6563756c742f6964756e6e2f73657276696365220a6e6574776f726b203d2022686f73742d70726976617465220a68617264656e696e67203d2022737472696374220a6d656d6f72795f6d6562696279746573203d20313032340a6370755f71756f74615f70657263656e74203d203130300a0a5b776f726b6c6f61642e617267756d656e745f62696e64696e67735d0a73746174655f726f6f74203d20222f7661722f6c69622f67616d6563756c742f73657276696365220a0a5b776f726b6c6f61642e7365637265745f66696c65735d0a47414d4543554c545f52554e54494d455f50524553454e43455f4944454e54495459203d20222f6574632f67616d6563756c742f736572766963652f72756e74696d652d70726573656e63652d6964656e746974792e6363220a0a5b72756e74696d655f6964656e746974795d0a72756e74696d655f6964203d2022736572766963652d79676764726173696c220a65787065637465645f7369676e65725f6964656e746974795f6964203d2022736572766963652d72756e74696d652d7369676e6572220a74727573745f616e63686f725f73746f7265203d20222f6574632f67616d6563756c742f74727573742f736572766963652e6363220a0a5b726f7574655d0a647269766572203d20226e67696e782d73747265616d2d746370220a726f7574655f6964203d202273657276696365220a737461626c655f656e64706f696e74203d2022687474703a2f2f3132372e302e302e313a3137393939220a707269766174655f686f7374203d20223132372e302e302e31220a707269766174655f706f72745f7374617274203d2031383030300a707269766174655f706f72745f656e64203d2031383030390a636f6e6669675f70617468203d20222f6574632f6e67696e782f6964756e6e2d73747265616d2d726f757465732f736572766963652e636f6e66220a72656c6f61645f756e6974203d20226e67696e782e73657276696365220a0a5b6272616b65735d0a6465706c6f796d656e745f73746f7265203d20222f7661722f6c69622f67616d6563756c742f6964756e6e2f736572766963652d6465706c6f796d656e742d6272616b652e6363220a6c6966656379636c655f73746f7265203d20222f7661722f6c69622f67616d6563756c742f6964756e6e2f736572766963652d6c6966656379636c652d6272616b652e6363220a0a5b726f6c6c6f75745d0a7374726174656779203d202263616e6469646174652d7468656e2d70726f6d6f7465220a647261696e5f7365636f6e6473203d2033300a72657461696e5f72656c6561736573203d20320a0a5b706c6163656d656e745d0a646573697265645f7265706c69636173203d20310a6e6f646573203d205b2279676764726173696c225d0a919296b57368617265642d696e667261737472756374757265b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b06265666f72652d70726f6d6f74696f6e97a46f64696e98ad6d616e616765642d7265616479a46f64696eb26f64696e2d696e6361726e6174696f6e2d31d9477368613235362d61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161d9477368613235362d65656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565d9477368613235362d63343263333331373863366539666534633435313162623563663962626461376431633138356536646330373064323234653463653431303538626338633238d9477368613235362d6137313730323730313265383236396235666636363961313135386466636236313764346463636230663963333633656631373738656561633230353332633907b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b57463703a2f2f31302e37372e302e313a3137383731cd4651c096b76964756e6e2e7365616c65645f72656c656173652e7631d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237d9477368613235362d643963646464656263666363623263663162613961643662393235663366666162376465616363323666616536316461386632363538613361393430396562329195a66461656d6f6ea773657276696365d9477368613235362d636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363632ac39196af746f6f6c636861696e2d696e646578d92768747470733a2f2f6578616d706c652e696e76616c69642f746f6f6c636861696e2d696e646578d9477368613235362d64646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464a472757374b6696e707574732f746f6f6c636861696e2d696e646578117892d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237bd2f7372762f736572766963652f72656c65617365732f63757272656e74dc0012bd6964756e6e2e65787065637465645f696e6361726e6174696f6e2e7632a773657276696365d9477368613235362d64396364646465626366636362326366316261396164366239323566336666616237646561636332366661653631646138663236353861336139343039656232b5736572766963652d696e6361726e6174696f6e2d31d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237bb6769746875622e636f6d2f47616d6543756c742f53657276696365d92832323232323232323232323232323232323232323232323232323232323232323232323232323232d9477368613235362d35396263633432376637393934303563613461353132623238613830363734343536666133313439373233363132383065613062633231636335653266363533b1736572766963652d79676764726173696cb6736572766963652d72756e74696d652d7369676e6572ae736572766963652e6865616c7468d9477368613235362d63636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363a27631d9477368613235362d32663837303134316366353638316566656332653234316364636435663731303831616539326162316535633534633839636438393666386335656236323731c294a773657276696365a468747470b6687474703a2f2f3132372e302e302e313a3137393939b6687474703a2f2f3132372e302e302e313a31383030319194af736572766963652e72756e74696d65b2736572766963652e72756e74696d652e7631a2763101919ab57368617265642d696e667261737472756374757265b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b06265666f72652d70726f6d6f74696f6ea46f64696eb36d616e616765642d696e6361726e6174696f6ed9477368613235362d63343263333331373863366539666534633435313162623563663962626461376431633138356536646330373064323234653463653431303538626338633238b57463703a2f2f31302e37372e302e313a3137383731d9477368613235362d39613662663530353466616430306232343363323331386330333436303931333230343665643436356231356534636561666532613736623966663231313039c0cf0000018bcfe568019abb6964756e6e2e72756e74696d655f61637469766174696f6e2e7632d9477368613235362d39613662663530353466616430306232343363323331386330333436303931333230343665643436356231356534636561666532613736623966663231313039b1736572766963652d79676764726173696cd9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262d94032363535323862353235386435353563356434646533383931303830363164383965663439616336306631373337626464656337316535333335643163623935c420c06afef8f66e6ec88c96c81ad6d74dbd9933738032f4d8069a46412380e2272dcf0000018bcfe567ecd94066346536393735326334333432363965323262306130346137623430613065336235386364343561383238376364303936383263313864326565366539376239a765643235353139c44046048cf77cc9f524da966e16a131edb34180f4ea8420f5f24a64fd53178e44988bef994d6df103a5f117470283d533e9d7e8245c4f9965f9a4c0a0114ed1c201dc0033b26964756e6e2d343234322e73657276696365af4964756e6e20746573742034323432af696e766f636174696f6e2d3432343201a465786563a6616c77617973ad636f6e74726f6c2d67726f7570c3a57534323432a57534323432a0a0a0c3c3a9696e76697369626c65a3706964c3a430303737a0a0cd10920194cd1092cd1092cd1092cd109294cd1092cd1092cd1092cd109291cd10920000000000c391010807b52f6f70742f746573742f62696e2f736572766963650101d9477368613235362d34626635313232663334343535346335336264653265626238636432623765336431363030616436333163333835613564376363653233633737383534353961d9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262a92f6f70742f74657374a92f72756e2f74657374d9477368613235362d6462633162346339303066666534386435373562356461356336333830343031323566363564623066653365323434393462373665613938363435376439383690d9477368613235362d30383466656430386239373861663464376431393661373434366138366235383030396536333662363131646231363231316236356139616164666632396335d9202f73797374656d2e736c6963652f6964756e6e2d343234322e73657276696365c090aa61637469766174696f6edc0020010101010101010101010101010101010101010101010101010101010101010190d9477368613235362d39623734636534306561326663636337623632613533363838363563653533303438316130643838653931336161396330313333666662633838353763313838959141d9477368613235362d35353961656164303832363464353739356433393039373138636464303561626434393537326538346665353535393065656633316138386130386664666664ab6f64696e2d7369676e6572296492ad6f64696e2d746f706f6c6f6779959139d9477368613235362d31393538316532376465376365643030666631636535306232303437653761353637633736623163626165626162653565663033663763333031376262356237ab6f64696e2d7369676e6572276496a773657276696365d9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262d9477368613235362d35643838303630666232646530386139663366346338313936623062633863663737653934333732373363346135386330653430303737666630316461306534c0c0c096cd10920708c0c0c0c0c0c0c029c0c0c0c0c0 diff --git a/tests/fixtures/idunn-control-legacy/transaction-leasing.hex b/tests/fixtures/idunn-control-legacy/transaction-leasing.hex new file mode 100644 index 0000000..2c3bd54 --- /dev/null +++ b/tests/fixtures/idunn-control-legacy/transaction-leasing.hex @@ -0,0 +1,2 @@ +idunn.deployment_transaction.v3 +dc0023bf6964756e6e2e6465706c6f796d656e745f7472616e73616374696f6e2e7633d92774782d37636236616537392d323635302d346261322d623664392d643137333338643566393031af636f6e74696e756974792d74657374aa636f6e74696e75697479a77365727669636500a76c656173696e67cf0000018bcfe56800cf0000018bcfe6eea0c099d9216964756e6e2e636f6d70696c65645f6465706c6f796d656e745f706c616e2e7632d9477368613235362d64396364646465626366636362326366316261396164366239323566336666616237646561636332366661653631646138663236353861336139343039656232b5736572766963652d696e6361726e6174696f6e2d316e9bbf6964756e6e2e736f757263655f73656c656374696f6e5f66616374732e7631d92768747470733a2f2f6769746875622e636f6d2f47616d6543756c742f536572766963652e676974af726566732f68656164732f6d61696ed92832323232323232323232323232323232323232323232323232323232323232323232323232323232d92832323232323232323232323232323232323232323232323232323232323232323232323232323232d92833333333333333333333333333333333333333333333333333333333333333333333333333333333bc6465706c6f796d656e742f6964756e6e2f7265636970652e746f6d6cd9477368613235362d353962636334323766373939343035636134613531326232386138303637343435366661333134393732333631323830656130626332316363356532663635338091a87265662d6865616464dc058e0a736368656d61203d202267616d6563756c742e6964756e6e2e7461726765745f6465636c61726174696f6e2e7631220a746172676574203d202273657276696365220a736f757263655f7374616d705f656e7669726f6e6d656e74203d2022534552564943455f4255494c445f434f4d4d4954220a0a5b5b73746570735d5d0a6964203d20226275696c64220a7068617365203d20226275696c64220a72756e6e6572203d202272757374220a61726776203d205b22636172676f222c20226275696c64222c20222d2d6c6f636b6564225d0a0a5b5b65787465726e616c5f696e707574735d5d0a6964203d2022746f6f6c636861696e2d696e646578220a75726c203d202268747470733a2f2f6578616d706c652e696e76616c69642f746f6f6c636861696e2d696e646578220a736861323536203d202264646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464220a72756e6e6572203d202272757374220a64657374696e6174696f6e203d2022696e707574732f746f6f6c636861696e2d696e646578220a0a5b5b6172746966616374735d5d0a6964203d20226461656d6f6e220a736f757263655f6b696e64203d202272756e6e65722d6f7574707574220a72756e6e6572203d202272757374220a736f75726365203d20227461726765742f72656c656173652f73657276696365220a64657374696e6174696f6e203d202273657276696365220a65787065637465645f736861323536203d202263636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363220a65786563757461626c65203d20747275650a0a5b736572766963655d0a65786563757461626c655f6172746966616374203d20226461656d6f6e220a617267756d656e7473203d205b0a20207b206b696e64203d202262696e64696e67222c206e616d65203d202273746174655f726f6f7422207d2c0a5d0a7472616e73706f7274203d202268747470220a726f7574655f7265717569726564203d20747275650a72657175697265645f656e7669726f6e6d656e74203d205b2247414d4543554c545f4944554e4e5f43414e4449444154455f42494e44222c202247414d4543554c545f4944554e4e5f52554e54494d455f42554e444c45225d0a0a5b736572766963652e6865616c74685d0a636f6e7472616374203d2022736572766963652e6865616c7468220a0a5b73746174655d0a736368656d615f67656e65726174696f6e203d20227631220a0a5b5b73746174652e736c6f74735d5d0a6964203d202272756e74696d652d6361636865220a72656c61746976655f70617468203d202272756e74696d652d63616368652e6363220a6b696e64203d202263756c7463616368652d66696c65220a736368656d61203d2022736572766963652e72756e74696d652d63616368652e7631220a777269746572203d20226e6f6e65220a7265636f76657279203d202272656275696c6461626c65220a73746172747570203d20226f70656e2d61742d7374617274220a0a5b5b70726f76696465735d5d0a6361706162696c697479203d2022736572766963652e72756e74696d65220a736368656d61203d2022736572766963652e72756e74696d652e7631220a636f6d7061746962696c697479203d20227631220a0a5b5b646570656e64656e636965735d5d0a6b696e64203d20227368617265642d696e667261737472756374757265220a6361706162696c697479203d20226f64696e2e76657273652d72656e64657a766f7573220a736368656d61203d20226f64696e2e76657273652d746f706f6c6f67792e7631220a636f6d7061746962696c697479203d20227631220adc076e0a736368656d61203d202267616d6563756c742e6964756e6e2e6f70657261746f725f62696e64696e672e7632220a746172676574203d202273657276696365220a0a5b7265706f7369746f72795d0a6f726967696e203d202268747470733a2f2f6769746875622e636f6d2f47616d6543756c742f536572766963652e676974220a61646d69747465645f726566203d2022726566732f68656164732f6d61696e220a6d696e696d756d5f7265766973696f6e203d202231313131313131313131313131313131313131313131313131313131313131313131313131313131220a73656c656374696f6e203d20227265662d68656164220a636865636b6f7574203d20222f7372762f6275696c642f53657276696365220a7265636970655f70617468203d20226465706c6f796d656e742f6964756e6e2f7265636970652e746f6d6c220a0a5b72756e6e6572732e727573745d0a647269766572203d2022646f636b6572220a696d616765203d202272757374407368613235363a61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161220a75736572203d2022313030303a31303030220a6166666f7264616e636573203d205b22736f757263652d72656164222c202261727469666163742d7772697465225d0a616c6c6f7765645f70726f6772616d73203d205b22636172676f225d0a6e6574776f726b5f70726f66696c65203d20226275696c642d646570656e64656e63792d656772657373220a6d656d6f72795f6d6562696279746573203d20323034380a6370755f71756f74615f70657263656e74203d203230300a706964735f6c696d6974203d203531320a746d7066735f6d6562696279746573203d203531320a0a5b776f726b6c6f61645d0a647269766572203d202273797374656d642d7472616e7369656e74220a73746174655f67726f7570203d202273657276696365220a756e69745f707265666978203d20226964756e6e2d73657276696365220a72656c656173655f726f6f74203d20222f7372762f736572766963652f72656c6561736573220a73746174655f726f6f74203d20222f7661722f6c69622f67616d6563756c742f73657276696365220a72756e74696d655f726f6f74203d20222f72756e2f67616d6563756c742f6964756e6e2f73657276696365220a6e6574776f726b203d2022686f73742d70726976617465220a68617264656e696e67203d2022737472696374220a6d656d6f72795f6d6562696279746573203d20313032340a6370755f71756f74615f70657263656e74203d203130300a0a5b776f726b6c6f61642e617267756d656e745f62696e64696e67735d0a73746174655f726f6f74203d20222f7661722f6c69622f67616d6563756c742f73657276696365220a0a5b776f726b6c6f61642e7365637265745f66696c65735d0a47414d4543554c545f52554e54494d455f50524553454e43455f4944454e54495459203d20222f6574632f67616d6563756c742f736572766963652f72756e74696d652d70726573656e63652d6964656e746974792e6363220a0a5b72756e74696d655f6964656e746974795d0a72756e74696d655f6964203d2022736572766963652d79676764726173696c220a65787065637465645f7369676e65725f6964656e746974795f6964203d2022736572766963652d72756e74696d652d7369676e6572220a74727573745f616e63686f725f73746f7265203d20222f6574632f67616d6563756c742f74727573742f736572766963652e6363220a0a5b726f7574655d0a647269766572203d20226e67696e782d73747265616d2d746370220a726f7574655f6964203d202273657276696365220a737461626c655f656e64706f696e74203d2022687474703a2f2f3132372e302e302e313a3137393939220a707269766174655f686f7374203d20223132372e302e302e31220a707269766174655f706f72745f7374617274203d2031383030300a707269766174655f706f72745f656e64203d2031383030390a636f6e6669675f70617468203d20222f6574632f6e67696e782f6964756e6e2d73747265616d2d726f757465732f736572766963652e636f6e66220a72656c6f61645f756e6974203d20226e67696e782e73657276696365220a0a5b6272616b65735d0a6465706c6f796d656e745f73746f7265203d20222f7661722f6c69622f67616d6563756c742f6964756e6e2f736572766963652d6465706c6f796d656e742d6272616b652e6363220a6c6966656379636c655f73746f7265203d20222f7661722f6c69622f67616d6563756c742f6964756e6e2f736572766963652d6c6966656379636c652d6272616b652e6363220a0a5b726f6c6c6f75745d0a7374726174656779203d202263616e6469646174652d7468656e2d70726f6d6f7465220a647261696e5f7365636f6e6473203d2033300a72657461696e5f72656c6561736573203d20320a0a5b706c6163656d656e745d0a646573697265645f7265706c69636173203d20310a6e6f646573203d205b2279676764726173696c225d0a919296b57368617265642d696e667261737472756374757265b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b06265666f72652d70726f6d6f74696f6e97a46f64696e98ad6d616e616765642d7265616479a46f64696eb26f64696e2d696e6361726e6174696f6e2d31d9477368613235362d61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161d9477368613235362d65656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565d9477368613235362d63343263333331373863366539666534633435313162623563663962626461376431633138356536646330373064323234653463653431303538626338633238d9477368613235362d6137313730323730313265383236396235666636363961313135386466636236313764346463636230663963333633656631373738656561633230353332633907b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b57463703a2f2f31302e37372e302e313a3137383731cd4651c096b76964756e6e2e7365616c65645f72656c656173652e7631d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237d9477368613235362d643963646464656263666363623263663162613961643662393235663366666162376465616363323666616536316461386632363538613361393430396562329195a66461656d6f6ea773657276696365d9477368613235362d636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363632ac39196af746f6f6c636861696e2d696e646578d92768747470733a2f2f6578616d706c652e696e76616c69642f746f6f6c636861696e2d696e646578d9477368613235362d64646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464a472757374b6696e707574732f746f6f6c636861696e2d696e646578117892d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237bd2f7372762f736572766963652f72656c65617365732f63757272656e74dc0012bd6964756e6e2e65787065637465645f696e6361726e6174696f6e2e7632a773657276696365d9477368613235362d64396364646465626366636362326366316261396164366239323566336666616237646561636332366661653631646138663236353861336139343039656232b5736572766963652d696e6361726e6174696f6e2d31d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237bb6769746875622e636f6d2f47616d6543756c742f53657276696365d92832323232323232323232323232323232323232323232323232323232323232323232323232323232d9477368613235362d35396263633432376637393934303563613461353132623238613830363734343536666133313439373233363132383065613062633231636335653266363533b1736572766963652d79676764726173696cb6736572766963652d72756e74696d652d7369676e6572ae736572766963652e6865616c7468d9477368613235362d63636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363a27631d9477368613235362d32663837303134316366353638316566656332653234316364636435663731303831616539326162316535633534633839636438393666386335656236323731c294a773657276696365a468747470b6687474703a2f2f3132372e302e302e313a3137393939b6687474703a2f2f3132372e302e302e313a31383030319194af736572766963652e72756e74696d65b2736572766963652e72756e74696d652e7631a2763101919ab57368617265642d696e667261737472756374757265b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b06265666f72652d70726f6d6f74696f6ea46f64696eb36d616e616765642d696e6361726e6174696f6ed9477368613235362d63343263333331373863366539666534633435313162623563663962626461376431633138356536646330373064323234653463653431303538626338633238b57463703a2f2f31302e37372e302e313a3137383731d9477368613235362d39613662663530353466616430306232343363323331386330333436303931333230343665643436356231356534636561666532613736623966663231313039c0cf0000018bcfe568019abb6964756e6e2e72756e74696d655f61637469766174696f6e2e7632d9477368613235362d39613662663530353466616430306232343363323331386330333436303931333230343665643436356231356534636561666532613736623966663231313039b1736572766963652d79676764726173696cd9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262d94032363535323862353235386435353563356434646533383931303830363164383965663439616336306631373337626464656337316535333335643163623935c420c06afef8f66e6ec88c96c81ad6d74dbd9933738032f4d8069a46412380e2272dcf0000018bcfe567ecd94066346536393735326334333432363965323262306130346137623430613065336235386364343561383238376364303936383263313864326565366539376239a765643235353139c44046048cf77cc9f524da966e16a131edb34180f4ea8420f5f24a64fd53178e44988bef994d6df103a5f117470283d533e9d7e8245c4f9965f9a4c0a0114ed1c201dc0033b26964756e6e2d343234322e73657276696365af4964756e6e20746573742034323432af696e766f636174696f6e2d3432343201a465786563a6616c77617973ad636f6e74726f6c2d67726f7570c3a57534323432a57534323432a0a0a0c3c3a9696e76697369626c65a3706964c3a430303737a0a0cd10920194cd1092cd1092cd1092cd109294cd1092cd1092cd1092cd109291cd10920000000000c391010807b52f6f70742f746573742f62696e2f736572766963650101d9477368613235362d34626635313232663334343535346335336264653265626238636432623765336431363030616436333163333835613564376363653233633737383534353961d9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262a92f6f70742f74657374a92f72756e2f74657374d9477368613235362d6462633162346339303066666534386435373562356461356336333830343031323566363564623066653365323434393462373665613938363435376439383690d9477368613235362d30383466656430386239373861663464376431393661373434366138366235383030396536333662363131646231363231316236356139616164666632396335d9202f73797374656d2e736c6963652f6964756e6e2d343234322e73657276696365c090aa61637469766174696f6edc0020010101010101010101010101010101010101010101010101010101010101010190d9477368613235362d39623734636534306561326663636337623632613533363838363563653533303438316130643838653931336161396330313333666662633838353763313838959141d9477368613235362d35353961656164303832363464353739356433393039373138636464303561626434393537326538346665353535393065656633316138386130386664666664ab6f64696e2d7369676e6572296492ad6f64696e2d746f706f6c6f6779959139d9477368613235362d31393538316532376465376365643030666631636535306232303437653761353637633736623163626165626162653565663033663763333031376262356237ab6f64696e2d7369676e6572276496a773657276696365d9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262d9477368613235362d35643838303630666232646530386139663366346338313936623062633863663737653934333732373363346135386330653430303737666630316461306534c0c0c096cd10920708c0c0c091b1736b69707065642d73746174656c657373c0c0c029c0c0c0c0c0 diff --git a/tests/fixtures/idunn-control-legacy/transaction-routing.hex b/tests/fixtures/idunn-control-legacy/transaction-routing.hex new file mode 100644 index 0000000..3245308 --- /dev/null +++ b/tests/fixtures/idunn-control-legacy/transaction-routing.hex @@ -0,0 +1,2 @@ +idunn.deployment_transaction.v3 +dc0023bf6964756e6e2e6465706c6f796d656e745f7472616e73616374696f6e2e7633d92774782d37636236616537392d323635302d346261322d623664392d643137333338643566393031af636f6e74696e756974792d74657374aa636f6e74696e75697479a77365727669636500a7726f7574696e67cf0000018bcfe56800cf0000018bcfe6eea0c099d9216964756e6e2e636f6d70696c65645f6465706c6f796d656e745f706c616e2e7632d9477368613235362d64396364646465626366636362326366316261396164366239323566336666616237646561636332366661653631646138663236353861336139343039656232b5736572766963652d696e6361726e6174696f6e2d316e9bbf6964756e6e2e736f757263655f73656c656374696f6e5f66616374732e7631d92768747470733a2f2f6769746875622e636f6d2f47616d6543756c742f536572766963652e676974af726566732f68656164732f6d61696ed92832323232323232323232323232323232323232323232323232323232323232323232323232323232d92832323232323232323232323232323232323232323232323232323232323232323232323232323232d92833333333333333333333333333333333333333333333333333333333333333333333333333333333bc6465706c6f796d656e742f6964756e6e2f7265636970652e746f6d6cd9477368613235362d353962636334323766373939343035636134613531326232386138303637343435366661333134393732333631323830656130626332316363356532663635338091a87265662d6865616464dc058e0a736368656d61203d202267616d6563756c742e6964756e6e2e7461726765745f6465636c61726174696f6e2e7631220a746172676574203d202273657276696365220a736f757263655f7374616d705f656e7669726f6e6d656e74203d2022534552564943455f4255494c445f434f4d4d4954220a0a5b5b73746570735d5d0a6964203d20226275696c64220a7068617365203d20226275696c64220a72756e6e6572203d202272757374220a61726776203d205b22636172676f222c20226275696c64222c20222d2d6c6f636b6564225d0a0a5b5b65787465726e616c5f696e707574735d5d0a6964203d2022746f6f6c636861696e2d696e646578220a75726c203d202268747470733a2f2f6578616d706c652e696e76616c69642f746f6f6c636861696e2d696e646578220a736861323536203d202264646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464220a72756e6e6572203d202272757374220a64657374696e6174696f6e203d2022696e707574732f746f6f6c636861696e2d696e646578220a0a5b5b6172746966616374735d5d0a6964203d20226461656d6f6e220a736f757263655f6b696e64203d202272756e6e65722d6f7574707574220a72756e6e6572203d202272757374220a736f75726365203d20227461726765742f72656c656173652f73657276696365220a64657374696e6174696f6e203d202273657276696365220a65787065637465645f736861323536203d202263636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363220a65786563757461626c65203d20747275650a0a5b736572766963655d0a65786563757461626c655f6172746966616374203d20226461656d6f6e220a617267756d656e7473203d205b0a20207b206b696e64203d202262696e64696e67222c206e616d65203d202273746174655f726f6f7422207d2c0a5d0a7472616e73706f7274203d202268747470220a726f7574655f7265717569726564203d20747275650a72657175697265645f656e7669726f6e6d656e74203d205b2247414d4543554c545f4944554e4e5f43414e4449444154455f42494e44222c202247414d4543554c545f4944554e4e5f52554e54494d455f42554e444c45225d0a0a5b736572766963652e6865616c74685d0a636f6e7472616374203d2022736572766963652e6865616c7468220a0a5b73746174655d0a736368656d615f67656e65726174696f6e203d20227631220a0a5b5b73746174652e736c6f74735d5d0a6964203d202272756e74696d652d6361636865220a72656c61746976655f70617468203d202272756e74696d652d63616368652e6363220a6b696e64203d202263756c7463616368652d66696c65220a736368656d61203d2022736572766963652e72756e74696d652d63616368652e7631220a777269746572203d20226e6f6e65220a7265636f76657279203d202272656275696c6461626c65220a73746172747570203d20226f70656e2d61742d7374617274220a0a5b5b70726f76696465735d5d0a6361706162696c697479203d2022736572766963652e72756e74696d65220a736368656d61203d2022736572766963652e72756e74696d652e7631220a636f6d7061746962696c697479203d20227631220a0a5b5b646570656e64656e636965735d5d0a6b696e64203d20227368617265642d696e667261737472756374757265220a6361706162696c697479203d20226f64696e2e76657273652d72656e64657a766f7573220a736368656d61203d20226f64696e2e76657273652d746f706f6c6f67792e7631220a636f6d7061746962696c697479203d20227631220adc076e0a736368656d61203d202267616d6563756c742e6964756e6e2e6f70657261746f725f62696e64696e672e7632220a746172676574203d202273657276696365220a0a5b7265706f7369746f72795d0a6f726967696e203d202268747470733a2f2f6769746875622e636f6d2f47616d6543756c742f536572766963652e676974220a61646d69747465645f726566203d2022726566732f68656164732f6d61696e220a6d696e696d756d5f7265766973696f6e203d202231313131313131313131313131313131313131313131313131313131313131313131313131313131220a73656c656374696f6e203d20227265662d68656164220a636865636b6f7574203d20222f7372762f6275696c642f53657276696365220a7265636970655f70617468203d20226465706c6f796d656e742f6964756e6e2f7265636970652e746f6d6c220a0a5b72756e6e6572732e727573745d0a647269766572203d2022646f636b6572220a696d616765203d202272757374407368613235363a61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161220a75736572203d2022313030303a31303030220a6166666f7264616e636573203d205b22736f757263652d72656164222c202261727469666163742d7772697465225d0a616c6c6f7765645f70726f6772616d73203d205b22636172676f225d0a6e6574776f726b5f70726f66696c65203d20226275696c642d646570656e64656e63792d656772657373220a6d656d6f72795f6d6562696279746573203d20323034380a6370755f71756f74615f70657263656e74203d203230300a706964735f6c696d6974203d203531320a746d7066735f6d6562696279746573203d203531320a0a5b776f726b6c6f61645d0a647269766572203d202273797374656d642d7472616e7369656e74220a73746174655f67726f7570203d202273657276696365220a756e69745f707265666978203d20226964756e6e2d73657276696365220a72656c656173655f726f6f74203d20222f7372762f736572766963652f72656c6561736573220a73746174655f726f6f74203d20222f7661722f6c69622f67616d6563756c742f73657276696365220a72756e74696d655f726f6f74203d20222f72756e2f67616d6563756c742f6964756e6e2f73657276696365220a6e6574776f726b203d2022686f73742d70726976617465220a68617264656e696e67203d2022737472696374220a6d656d6f72795f6d6562696279746573203d20313032340a6370755f71756f74615f70657263656e74203d203130300a0a5b776f726b6c6f61642e617267756d656e745f62696e64696e67735d0a73746174655f726f6f74203d20222f7661722f6c69622f67616d6563756c742f73657276696365220a0a5b776f726b6c6f61642e7365637265745f66696c65735d0a47414d4543554c545f52554e54494d455f50524553454e43455f4944454e54495459203d20222f6574632f67616d6563756c742f736572766963652f72756e74696d652d70726573656e63652d6964656e746974792e6363220a0a5b72756e74696d655f6964656e746974795d0a72756e74696d655f6964203d2022736572766963652d79676764726173696c220a65787065637465645f7369676e65725f6964656e746974795f6964203d2022736572766963652d72756e74696d652d7369676e6572220a74727573745f616e63686f725f73746f7265203d20222f6574632f67616d6563756c742f74727573742f736572766963652e6363220a0a5b726f7574655d0a647269766572203d20226e67696e782d73747265616d2d746370220a726f7574655f6964203d202273657276696365220a737461626c655f656e64706f696e74203d2022687474703a2f2f3132372e302e302e313a3137393939220a707269766174655f686f7374203d20223132372e302e302e31220a707269766174655f706f72745f7374617274203d2031383030300a707269766174655f706f72745f656e64203d2031383030390a636f6e6669675f70617468203d20222f6574632f6e67696e782f6964756e6e2d73747265616d2d726f757465732f736572766963652e636f6e66220a72656c6f61645f756e6974203d20226e67696e782e73657276696365220a0a5b6272616b65735d0a6465706c6f796d656e745f73746f7265203d20222f7661722f6c69622f67616d6563756c742f6964756e6e2f736572766963652d6465706c6f796d656e742d6272616b652e6363220a6c6966656379636c655f73746f7265203d20222f7661722f6c69622f67616d6563756c742f6964756e6e2f736572766963652d6c6966656379636c652d6272616b652e6363220a0a5b726f6c6c6f75745d0a7374726174656779203d202263616e6469646174652d7468656e2d70726f6d6f7465220a647261696e5f7365636f6e6473203d2033300a72657461696e5f72656c6561736573203d20320a0a5b706c6163656d656e745d0a646573697265645f7265706c69636173203d20310a6e6f646573203d205b2279676764726173696c225d0a919296b57368617265642d696e667261737472756374757265b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b06265666f72652d70726f6d6f74696f6e97a46f64696e98ad6d616e616765642d7265616479a46f64696eb26f64696e2d696e6361726e6174696f6e2d31d9477368613235362d61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161d9477368613235362d65656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565d9477368613235362d63343263333331373863366539666534633435313162623563663962626461376431633138356536646330373064323234653463653431303538626338633238d9477368613235362d6137313730323730313265383236396235666636363961313135386466636236313764346463636230663963333633656631373738656561633230353332633907b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b57463703a2f2f31302e37372e302e313a3137383731cd4651c096b76964756e6e2e7365616c65645f72656c656173652e7631d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237d9477368613235362d643963646464656263666363623263663162613961643662393235663366666162376465616363323666616536316461386632363538613361393430396562329195a66461656d6f6ea773657276696365d9477368613235362d636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363632ac39196af746f6f6c636861696e2d696e646578d92768747470733a2f2f6578616d706c652e696e76616c69642f746f6f6c636861696e2d696e646578d9477368613235362d64646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464a472757374b6696e707574732f746f6f6c636861696e2d696e646578117892d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237bd2f7372762f736572766963652f72656c65617365732f63757272656e74dc0012bd6964756e6e2e65787065637465645f696e6361726e6174696f6e2e7632a773657276696365d9477368613235362d64396364646465626366636362326366316261396164366239323566336666616237646561636332366661653631646138663236353861336139343039656232b5736572766963652d696e6361726e6174696f6e2d31d9477368613235362d35663738353165373634333366383261376562666431626232646234323065366263333263646263346536666538373563356633326461363434643535656237bb6769746875622e636f6d2f47616d6543756c742f53657276696365d92832323232323232323232323232323232323232323232323232323232323232323232323232323232d9477368613235362d35396263633432376637393934303563613461353132623238613830363734343536666133313439373233363132383065613062633231636335653266363533b1736572766963652d79676764726173696cb6736572766963652d72756e74696d652d7369676e6572ae736572766963652e6865616c7468d9477368613235362d63636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363a27631d9477368613235362d32663837303134316366353638316566656332653234316364636435663731303831616539326162316535633534633839636438393666386335656236323731c294a773657276696365a468747470b6687474703a2f2f3132372e302e302e313a3137393939b6687474703a2f2f3132372e302e302e313a31383030319194af736572766963652e72756e74696d65b2736572766963652e72756e74696d652e7631a2763101919ab57368617265642d696e667261737472756374757265b56f64696e2e76657273652d72656e64657a766f7573b66f64696e2e76657273652d746f706f6c6f67792e7631a2763101b06265666f72652d70726f6d6f74696f6ea46f64696eb36d616e616765642d696e6361726e6174696f6ed9477368613235362d63343263333331373863366539666534633435313162623563663962626461376431633138356536646330373064323234653463653431303538626338633238b57463703a2f2f31302e37372e302e313a3137383731d9477368613235362d39613662663530353466616430306232343363323331386330333436303931333230343665643436356231356534636561666532613736623966663231313039c0cf0000018bcfe568019abb6964756e6e2e72756e74696d655f61637469766174696f6e2e7632d9477368613235362d39613662663530353466616430306232343363323331386330333436303931333230343665643436356231356534636561666532613736623966663231313039b1736572766963652d79676764726173696cd9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262d94032363535323862353235386435353563356434646533383931303830363164383965663439616336306631373337626464656337316535333335643163623935c420c06afef8f66e6ec88c96c81ad6d74dbd9933738032f4d8069a46412380e2272dcf0000018bcfe567ecd94066346536393735326334333432363965323262306130346137623430613065336235386364343561383238376364303936383263313864326565366539376239a765643235353139c44046048cf77cc9f524da966e16a131edb34180f4ea8420f5f24a64fd53178e44988bef994d6df103a5f117470283d533e9d7e8245c4f9965f9a4c0a0114ed1c201dc0033b26964756e6e2d343234322e73657276696365af4964756e6e20746573742034323432af696e766f636174696f6e2d3432343201a465786563a6616c77617973ad636f6e74726f6c2d67726f7570c3a57534323432a57534323432a0a0a0c3c3a9696e76697369626c65a3706964c3a430303737a0a0cd10920194cd1092cd1092cd1092cd109294cd1092cd1092cd1092cd109291cd10920000000000c391010807b52f6f70742f746573742f62696e2f736572766963650101d9477368613235362d34626635313232663334343535346335336264653265626238636432623765336431363030616436333163333835613564376363653233633737383534353961d9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262a92f6f70742f74657374a92f72756e2f74657374d9477368613235362d6462633162346339303066666534386435373562356461356336333830343031323566363564623066653365323434393462373665613938363435376439383690d9477368613235362d30383466656430386239373861663464376431393661373434366138366235383030396536333662363131646231363231316236356139616164666632396335d9202f73797374656d2e736c6963652f6964756e6e2d343234322e73657276696365c090aa61637469766174696f6edc0020010101010101010101010101010101010101010101010101010101010101010190d9477368613235362d39623734636534306561326663636337623632613533363838363563653533303438316130643838653931336161396330313333666662633838353763313838959141d9477368613235362d35353961656164303832363464353739356433393039373138636464303561626434393537326538346665353535393065656633316138386130386664666664ab6f64696e2d7369676e6572296492ad6f64696e2d746f706f6c6f6779959139d9477368613235362d31393538316532376465376365643030666631636535306232303437653761353637633736623163626165626162653565663033663763333031376262356237ab6f64696e2d7369676e6572276496a773657276696365d9477368613235362d37316361633366396164336534346139333861343762623035653738306566366264396365303266396139636631333464643765363865396162323563663262d9477368613235362d35643838303630666232646530386139663366346338313936623062633863663737653934333732373363346135386330653430303737666630316461306534c0c0c096cd10920708c0c0c091b1736b69707065642d73746174656c65737391b1736b69707065642d73746174656c657373959140d9477368613235362d63333634316638353434643763303266333538306230376330663938383766306336613237666635616231643461336532396361663139376366633239396165ab6f64696e2d7369676e65722864c029c0c0c0c0c0