ucanto
ucanto copied to clipboard
Ensure timely delegation
All proofs MUST contain time bounds equal to or broader than the UCAN being delegated. If the proof expires before the outer UCAN — or starts after it — the reader MUST treat the UCAN as invalid. Delegation inside of the time bound is called "timely delegation."
ucanto does not actually treat ucans with wider time bounds than it's proofs invalid, which is incorrect.
Task here is to update implementation to do what spec says and test case(s) to ensure it does so.
@Gozala at what point do you have in mind enforcing this? do you want to throw if trying to create a delegation with too-narrow of time bounds? Or should the creation of that delegation be possible, but you want to make sure the validator will catch it as invalid?
@Gozala at what point do you have in mind enforcing this? do you want to throw if trying to create a delegation with too-narrow of time bounds? Or should the creation of that delegation be possible, but you want to make sure the validator will catch it as invalid?
I was implying that validator should fail to validate such chains.
P.S.: Right now we don't enforce anything at delegation time, mostly because proofs could be CIDs, however adding some checks where possible had on my todo list for a while.