Commit graph

17 commits

Author SHA1 Message Date
j-berman
513dae88dc small touchups 2024-09-17 11:23:28 -07:00
j-berman
21664f99b2 fcmp++: use fe * instead of vector<fe> + clean up 2024-09-17 11:23:28 -07:00
j-berman
330b82ff9a Fix build errs + warnings 2024-09-17 11:23:28 -07:00
j-berman
b2ea86235d fcmp++: use batch inversion when converting outputs to leaf tupels 2024-09-17 11:23:28 -07:00
j-berman
b055eb3f61 fcmp++: output may not be present in locked outputs table on remove
- If the output is invalid/unspendable, upon unlock it will be
deleted from the locked outputs table and then won't be used to
grow the tree. Upon reorg/pop blocks, the invalid output won't be
re-added to the locked outputs table upon trimming the tree. Thus,
it's possible for an invalid/unspendable output to not be present
in the locked outputs table upon remove.
2024-09-11 10:13:48 -07:00
j-berman
8fc87d72a2 fcmp++: multithreaded convert valid outputs into leaf tuples 2024-09-11 10:13:48 -07:00
j-berman
90164e3d6b fcmp++: multithreaded hashing children chunks into tree 2024-09-11 10:13:48 -07:00
j-berman
0a604a9786 fcmp++: Enable trimming to empty tree 2024-09-11 10:13:48 -07:00
j-berman
16ff6a9e68 fcmp++: trim tree when removing a block
- trim_tree now re-adds trimmed outputs back to the locked outputs
table. remove_output then deletes from the locked output table.
- Since outputs added to the tree in a specific block may have
originated from distinct younger blocks (thanks to distinct unlock
times), we need to store the 8 byte output_id in the leaves table
as well, so that in the event of a reorg, upon removing outputs
from the tree we can add them back to the locked outputs table
in the correct order.
2024-09-11 10:13:48 -07:00
j-berman
41b1985f63 Fix compile on arm-linux-androideabi (32-bit) using a newer NDK
- @tobtoht reported err with size_t -> uint64_t
- Also address some PR comments (@vtnerd namespace comment +
@boog900 freeing unallocated rust type)
- Some cleaning
2024-09-03 14:35:26 -07:00
j-berman
918befb0f5 new_leaf_tuples -> new_outputs 2024-08-13 09:25:43 -07:00
j-berman
83d56597e2 Clean lmbd impl
- Reverted back to storing output_id in locked_outputs table; it's
required to make sure outputs enter the tree in chain order I see
no other simple way.
- Removed unnecessary comments and db flags (MDB_APPENDDUP already
makes sure key/value doesn't already exist, and when inserting,
every global output id should be unique, so should never get that
error)
2024-08-10 02:20:55 -07:00
j-berman
6525df113c Don't store output_id in locked_outpust table, table stays ordered 2024-08-09 18:31:18 -07:00
j-berman
b6bcca9899 Remove ringct dep in fcmp_pp, impl in fcmp_pp_crypto 2024-08-09 16:29:31 -07:00
j-berman
f17db01250 fcmp++: store {output pubkey, commitment} in db, pre-torsion clear
- We must use the output pubkey to calculate key image generator I
- Since torsion cleared outputs can be spent via ring sig today,
if we torsion clear outputs **before** calculating I, then the key
image of torsioned outputs will be different when constructing
fcmp's, effectively enabling a double spend of torsioned outputs
via ring sig before fcmp's and again via fcmp.
- Storing {output pubkey, commitment} instead of {O.x,I.x,C.x} to
save 32 bytes per output.
2024-08-09 15:43:18 -07:00
j-berman
9f0dd859e6 fix clang compile errors 2024-08-08 14:55:49 -07:00
j-berman
d4847f649e Rename everything from fcmp* to fcmp_pp 2024-08-08 14:10:34 -07:00
Renamed from src/fcmp/curve_trees.cpp (Browse further)