-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat] Utreexo: adding new item to the accumulator #167 #190
[feat] Utreexo: adding new item to the accumulator #167 #190
Conversation
Jeanmichel7
commented
Sep 13, 2024
•
edited
Loading
edited
- Resolves [feat] Utreexo: adding new item to the accumulator #167
- follows contribution guide
- code change includes tests
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
ok because we have to remove it from the cache when we delete an utxo |
@Jeanmichel7 cache is a separate task #164 you don't need to implement that |
f1f9d00
to
bfdf99b
Compare
@m-kus @maciejka @TAdev0 I wonder if the type we want to add to the utreexo accumulator isn't just the hash of the output (without the cached field)? The OutPoint is only useful for validate and delete the utxos available in the accumulator provided in a transaction's input. Did I understand correctly? I didn't know how to test the logic of the accumulator, so I tried to use a dict which is very close to the basic algo to compare the diff. |
We need the entire outpoint because we rely on extra fields like block height/time and iscoinbase for finality checks. If this data is not in a leaf or cache it is unconstrained, ie you can provide arbitrary values and the program won’t be able to tell |
bfdf99b
to
dffa071
Compare
So we assume that when we add an OutPoint, the cache in data is always set to true? otherwise it could create 2hash for the same UTXO? |
It’s a bit more complex, but we’ll get there gradually. Generally we want to ensure two things:
When we handle a transaction input there might be two cases:
For every output we construct the outpoint and either put it in the cache or mark for addition. In the end we do batch inclusion verification/removal, the add all the new leaves. |
resolves #167 doesnt work when its not in the first comment @Jeanmichel7 can you add it on the first comment of the issue? so that it links your PR to the issue , and it will also automatically close the issue once merged |
87a90b0
to
cbcd31b
Compare
daf51a3
to
6020672
Compare
LGTM |