Generated proofs should contain the associated root hash to solve them from the same epoch guaranteed
slawlor opened this issue · comments
Sean Lawlor commented
In the current system, it's 2 calls to generate a root hash and a proof. This means that between proof generation and root-hash generation it's possible the epoch is advanced meaning the root hash no longer applies to the associated proof that was just generated.
A work-around for this is
- Get the epoch
- Generate the proof
- Get the root hash, using
Directory::get_root_hash_safe
which will err if the epoch changed - Try again
But ideally we'd avoid this by having the proof generations just return the EpochHash
as an additional result.