JAR: JAM Axiomatic Reference

7.10. Preimages (§12.7)🔗

🔗def
Jar.integratePreimages (delta : Dict Jar.ServiceId Jar.ServiceAccount) (preimages : Jar.PreimagesExtrinsic) (t' : Jar.Timeslot) (opaqueData : Array (ByteArray × ByteArray) := #[]) : Dict Jar.ServiceId Jar.ServiceAccount × Array (ByteArray × ByteArray)
Jar.integratePreimages (delta : Dict Jar.ServiceId Jar.ServiceAccount) (preimages : Jar.PreimagesExtrinsic) (t' : Jar.Timeslot) (opaqueData : Array (ByteArray × ByteArray) := #[]) : Dict Jar.ServiceId Jar.ServiceAccount × Array (ByteArray × ByteArray)

δ‡ : Integrate preimage data into service accounts. GP eq (12.35–12.38). For each (service_id, preimage_data) in E_P:

  1. Hash the preimage data to get h = H(data)

  2. If the service has a solicitation for (h, |data|), store the preimage

  3. Expunge old preimage solicitations past D_EXPUNGE timeslots. Also accepts and returns opaque data so that preimage_info entries not promoted during accumulation can still be found and updated.