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
returnErr(anyhow!("The current hash chain for chain id {} has configured commitments for sequence numbers greater than the current on-chain sequence number. Are the commitments configured correctly?",&chain_id));
let offset = commitment.original_commitment_sequence_number.try_into()?;
246
-
offsets.push(offset);
247
-
248
-
let pebble_hash_chain = PebbleHashChain::from_config(
249
-
secret,
250
-
chain_id,
251
-
provider,
252
-
&chain_config.contract_addr,
253
-
&commitment.seed,
254
-
commitment.chain_length,
255
-
chain_sample_interval,
256
-
)
257
-
.map_err(|e| anyhow!("Failed to create hash chain: {}", e))?;
258
-
hash_chains.push(pebble_hash_chain);
259
-
}
260
-
261
-
let chain_state = HashChainState{
262
-
offsets,
263
-
hash_chains,
264
-
};
265
-
266
-
if chain_state.reveal(provider_info.original_commitment_sequence_number)?
267
-
!= provider_info.original_commitment
268
-
{
269
-
returnErr(anyhow!("The root of the generated hash chain for chain id {} does not match the commitment. Are the secret and chain length configured correctly?",&chain_id));
270
-
}else{
271
-
tracing::info!("Root of chain id {} matches commitment",&chain_id);
0 commit comments