Whether the evidence's journal binding authenticates it against the authoritative stored operation (R2 proof, part of `pre_transition_evidence_proves`).
(
&self,
evidence: &PreTransitionEvidence,
working_copy: atomic_core::WorkingCopyId,
)
| 901 | /// authoritative stored operation (R2 proof, part of |
| 902 | /// `pre_transition_evidence_proves`). |
| 903 | fn journal_binding_proves( |
| 904 | &self, |
| 905 | evidence: &PreTransitionEvidence, |
| 906 | working_copy: atomic_core::WorkingCopyId, |
| 907 | ) -> bool { |
| 908 | let Some(hex) = &evidence.journal_operation else { |
| 909 | return false; |
| 910 | }; |
| 911 | let Some(operation_id) = OperationId::from_base32(hex.as_bytes()) else { |
| 912 | return false; |
| 913 | }; |
| 914 | let operation = match self.load_operation(operation_id) { |
| 915 | Ok(operation) => operation, |
| 916 | Err(_) => return false, |
| 917 | }; |
| 918 | let payload = operation.payload(); |
| 919 | let capture_actor = ActorRef::System { |
| 920 | name: PRE_TRANSITION_CAPTURE_ACTOR.to_string(), |
| 921 | }; |
| 922 | if payload.kind != OperationKind::Record |
| 923 | || payload.working_copy != Some(working_copy) |
| 924 | || payload.actor != capture_actor |
| 925 | { |
| 926 | return false; |
| 927 | } |
| 928 | let Ok(facts) = canonical_capture_facts(evidence) else { |
| 929 | return false; |
| 930 | }; |
| 931 | let facts_hash = atomic_core::Hash::of(&facts); |
| 932 | if !payload.evidence.contains(&facts_hash) { |
| 933 | return false; |
| 934 | } |
| 935 | // The journal record is authenticated only when the operation's |
| 936 | // verified receipt exists (append-only, content-addressed). |
| 937 | let receipts = match self.pristine.read_txn() { |
| 938 | Ok(txn) => match txn.get_effect_receipts(operation_id) { |
| 939 | Ok(receipts) => receipts, |
| 940 | Err(_) => return false, |
| 941 | }, |
| 942 | Err(_) => return false, |
| 943 | }; |
| 944 | super::operation::has_operation_verified_receipt(&receipts) |
| 945 | } |
| 946 | |
| 947 | // ── Entry-boundary capture (RFC §7.1 step 6) ───────────────────────── |
| 948 |
no test coverage detected