Closed arlolra closed 7 years ago
I'm not sure how do you think about this, but according to #50, and this statement
it makes the PAD more general, perhaps to be reused in other contexts
I imagine that merkletree
would have a Hasher
interface that exposes a HashID. Does this mean merkletree
should control what is the value of HashID
being included in AssociatedData
(even without #50, I guess)?
In the other hand, if we go this route, Hasher
and HashID
are probably parts of protocol
.
What I mean is HashID
is definitely a part and being used in PAD
but now it's still being used in PAD
but a part of protocol
. (Sorry for my bad expression). It feels like to have a conflict here.
Back to #120, I think your main concern is storing many copies of vrfPrivateKey
in memory / on disk, so should we just remove vrfPrivateKey
out of Policies
and keep Policies
in merkletree
(We could reuse a part of your code here). Does this make sense?
I started working on this a bit in c355ab1b.
It feels like to have a conflict here.
I see what you're saying, but it's not clear that everyone who uses the PAD would necessarily want to include the hash id as part of the chain.
We can definitely put this on the agenda for tomorrow :)
Ok, implemented AssociatedData
as an interface. Let me know what you think. We can discuss tomorrow as well, if preferred.
Merged in 29020d03.
See #120
This needs a sanity check.