Replies: 1 comment 1 reply
-
For how the current I'm thinking more and more that we should just have a aunt pointer in all the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Proofs for leaves that get spend by transactions in a mempool need to be remembered in the pollard and we need the mempool entries to keep a reference to the proofs somehow. (e.g.: if a node wants to rebroadcast a tx it needs to be able to quickly access the proof)
I have been thinking about how to implement the proof references and it seems a bit tricky.
The tricky part is that proofs can change when the pollard is modified.
Idea 1: Use a pointer that points to the remembered leaf
polNode
.This does not quite work because we move leaves around by moving the hashes in the
polNode
but not the actualpolNode
. Also just having a reference to a leaf does not help that much, we would need pointers to the parents/aunts, to retrieve the entire proof.Idea 2: The pollard keeps a position map for remembered leaves
Keeping a position map (
hash->pos
) would work, the proofs could be requested from the pollard given the leaf hashes. The mempool entries then have to keep the leaf hashes as reference for the proofs.I kind of like the idea of pointers more since they feel less complex and better for performance than adding a position map to the pollard. But since the pointers don't quite work we probably have to use a position map.
Any ideas on how to make the pointers work? Or a totally different approach?
Beta Was this translation helpful? Give feedback.
All reactions