You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: neptune-core/src/util_types/proof_of_transfer/mod.rs
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,9 @@ pub fn claim_inputs(
46
46
}
47
47
/// add the outputs to the claim
48
48
///
49
-
/// `aocl_digest` part of `Claim` is not mandatory for proving per se, but a comfort facility so that if the prover have not communicated which AOCL instance (i.e. the block) had he used to make the argument, then a verifier
49
+
/// `aocl_digest` part of `Claim` is not needed for proving per se, but a comfort facility
50
+
/// so that if the prover have not communicated which AOCL instance (i.e. the block) had he
51
+
/// used to make the argument, then a verifier
50
52
/// could search the block by this `Digest` instead of trying all canonical blocks
51
53
pubfnclaim_outputs(
52
54
c:Claim,
@@ -357,8 +359,8 @@ pub async fn helper(
357
359
.ok_or(anyhow!("no canonical block with the given digest"))?;
// it's expected that a good prover pass the block digest along the argument & claim: let's imagine here that piece of data was lost and we have only required minimum
163
+
let aocl_digest = tasm_lib::prelude::Digest::try_from(&claim.output[10..15]).unwrap();
164
+
match bob
165
+
.gsl
166
+
.lock_async(|gs| {
167
+
futures::FutureExt::boxed(asyncmove{
168
+
letmut t = gs.chain.tip().clone();
169
+
debug!(
170
+
"{:?}| The height of the tip Bob starts traversing the chain from.",
171
+
t.header().height
172
+
);
173
+
174
+
while !t.header().height.is_genesis(){
175
+
if aocl_digest == t.mutator_set_accumulator_after().unwrap().aocl.bag_peaks(){
176
+
returnSome(t.hash());
177
+
}
178
+
179
+
t = gs
180
+
.chain
181
+
.archival_state()
182
+
.get_block(t.header().prev_block_digest)
183
+
.await
184
+
.unwrap()
185
+
.unwrap();
186
+
}
187
+
188
+
None
189
+
})
190
+
})
191
+
.await
192
+
{
193
+
Some(b) => {
194
+
tracing::trace!("{b}| Bob has the block of this digest which have the claimed AOCL")
195
+
}
196
+
None => panic!["Bob has no canonical `Block` of the claimed AOCL"],
0 commit comments