j-berman
10c6c12b18
fcmp++: compilation fixes + misc. cleanup
...
- Removed call to hash_init_point in constructor
- Replaced global static CURVE_TREES_V1 with a smart pointer
- Don't need to link Rust static lib when including curve_trees.h
- leaves table doesn't need dupsort flags, all leaves should be
unique by key
- rename fcmp -> fcmp_pp
- return when 0 leaves passed into trim_tree
2024-08-08 13:31:21 -07:00
j-berman
edded7e6e3
fcmp++: Restart migration from where it leaves off
2024-08-08 13:01:04 -07:00
j-berman
5e76191afe
cleaner crypto for converting output to leaf tuple
2024-08-02 23:22:39 -07:00
j-berman
30fc80b33e
Don't copy when flattening leaves
2024-08-02 22:34:06 -07:00
j-berman
cbf6a5d618
Optimize conversion from output to leaf tuple
2024-08-02 22:32:03 -07:00
j-berman
b90cee8bab
Store {O,C} for each leaf tuple instead of {O.x,I.x,C.x}
...
- Can derive {O.x,I.x,C.x} from {O,C}
- Note: this slows down tests since they do the derivation both
on insertion into the tree, and when auditing the tree
- At the hard fork, we don't need to store {O,C} in the
output_amounts table anymore since that table will no longer be
useful
2024-08-02 10:28:13 -07:00
j-berman
34eafa85f3
Store points in the tree in compressed encoding (32 bytes)
2024-08-01 10:04:51 -07:00
j-berman
95114f9253
Use explicit code instead of macro in custom fcmp_pp serialization
...
It's slightly different than other usages of the macro, so figured
it makes sense to just write out the code to do what I expect it
to do
2024-07-31 23:15:08 -07:00
j-berman
e40c5bb0fc
fix json tagging in fcmp_pp serialization
2024-07-31 22:50:17 -07:00
j-berman
54d5d0d5c7
fcmp++: add support for new fcmp types in cryptonote::transaction
...
- Replace CLSAGs with a single fcmp_pp
- fcmp_pp is an opaque vector of bytes. The length of the vector
is calculated from the number of inputs on serialization (i.e. the
length is not serialized, only the raw bytes are serialized)
- Includes tests for binary serialization happy path and errors
2024-07-31 18:13:23 -07:00
Luke Parker
16a8ce3a45
Add * point from bytes
2024-07-29 03:40:44 -07:00
j-berman
729e31df74
include fcmp/curve_trees.h in db_lmdb.h
2024-07-29 03:40:44 -07:00
j-berman
c383087955
Instantiate m_curve_trees on BlockchainLMDB class in c'tor
2024-07-29 03:40:44 -07:00
j-berman
d36b6fe96f
resolve rebase to master issues
2024-07-29 03:40:44 -07:00
j-berman
420b4b6a78
Resolve cross-compile errors
...
uint64_t -> size_t where value is expected bounded to small value
2024-07-29 03:40:44 -07:00
j-berman
aadea07b51
Touch up merge for cross-compilation fixes
2024-07-29 03:40:44 -07:00
Luke Parker
23be5f6c28
Use a single target_link_libraries call
2024-07-29 03:40:44 -07:00
Luke Parker
1a44ceb905
Link additional libs on Windows (yet actually adding the relevant changes)
2024-07-29 03:40:44 -07:00
Luke Parker
16536f3d2b
Only provide dummy _Unwind_Resume on x86 Windows
2024-07-29 03:40:44 -07:00
Luke Parker
da9f101703
Abort on panic, fix 32-bit Windows undefined reference
2024-07-29 03:40:44 -07:00
Luke Parker
8eb3f29e68
Link additional libs on Windows
2024-07-29 03:40:44 -07:00
Luke Parker
c6327cc035
Correct in-tree code to Rust 1.69
2024-07-29 03:40:44 -07:00
Luke Parker
6d6a2e4bd2
Correct typo in MATCHES statement
2024-07-29 03:40:44 -07:00
Luke Parker
98569b0e7f
LTO off
...
Attempts to solve conflicts on armv7.
2024-07-29 03:40:44 -07:00
Luke Parker
170324ae68
Rust 1.69
2024-07-29 03:40:44 -07:00
Luke Parker
866473675c
Normalize x86-64 to x86_64
2024-07-29 03:40:44 -07:00
Luke Parker
5d6a7fd0b5
_x86_64 -> -x86_64
2024-07-29 03:40:44 -07:00
Luke Parker
38f1935020
Ubuntu 20.04, Rust 1.72
2024-07-29 03:40:44 -07:00
Luke Parker
0620be1f5a
Cross-compile from Ubuntu 22.04
...
LLVM 17 can't talk with binutils 2.34 for RISC-V specifically. This updates
binutils to 2.38.
Upstream issue is https://github.com/rust-lang/rust/issues/117101 .
2024-07-29 03:40:44 -07:00
Luke Parker
d69e6bda1c
Install Rust via the msys2 package on Windows (not the unavailable rustup)
2024-07-29 03:40:44 -07:00
Luke Parker
e5ed23208d
Use the armv7 HF Rust toolchain
2024-07-29 03:40:44 -07:00
Luke Parker
03679d1342
Install Rust when doing the Windows build
2024-07-29 03:40:44 -07:00
Luke Parker
8c47c0d282
Further match off RUST_ARCH, not ARCH_ID
2024-07-29 03:40:44 -07:00
Luke Parker
8b279a0666
i386 -> i686, riscv64 -> riscv64gc
...
Also includes most of what was intended for the prior commit.
2024-07-29 03:40:44 -07:00
Luke Parker
75faba1db6
Increase misc discrepancies in ARM ARCH spec which we support
2024-07-29 03:40:44 -07:00
Luke Parker
389274aee9
Correct path to the staticlib
2024-07-29 03:40:44 -07:00
Luke Parker
8b76958485
Rust cross compilation
2024-07-29 03:40:44 -07:00
j-berman
d6ca63618e
use void * to try to fix CResult
2024-07-29 03:40:44 -07:00
Luke Parker
af4de996cb
Use a pointer for the value in CResult
...
Some toolchains complained CResult was an incomplete type. This attempts to
resolve that.
Do not merge unless it actually fixes things.
2024-07-29 03:40:44 -07:00
j-berman
b585a7f408
Remove copy in get_tree_extension and better named funcs
2024-07-29 03:40:44 -07:00
j-berman
db12610d94
Remove leaves from locked leaves table upon insertion to tree
2024-07-29 03:40:44 -07:00
j-berman
93795b4c9d
Match output unlock time (fix off by 1)
2024-07-29 03:40:44 -07:00
j-berman
634e12e9ad
Guarantee insertion order into the tree using global output ID
...
- Leaves enter the tree in the block they unlock, in the order
they appear in the chain
2024-07-29 03:40:44 -07:00
j-berman
306488b690
Implemented growing the tree on sync + lots of cleaning
...
- validate output and commitment in tuple conversion function
- function to get_unlock_height from height in chain + unlock_time
- tx_outs_to_leaf_tuples function
- cleaned up trim impl (reduced num params in instructions and
conditional complexity)
- renamed locked_outputs table to locked_leaves (clearer tie to
merkle tree)
- size_t -> uint64_t for db compatibility across 32-bit and 64-bit
machines
- added hash_grow tests
2024-07-29 03:40:44 -07:00
j-berman
8a89c20f3b
lmdb migration to init curve trees tree from existing outputs
...
still rough
2024-07-29 03:40:44 -07:00
j-berman
f50ad5baac
trim_tree db impl + db test + some housekeeping
2024-07-29 03:40:44 -07:00
j-berman
42fd22c4ee
Better organization
2024-07-29 03:40:44 -07:00
j-berman
55caee9a10
Better tests for hash_trim
2024-07-29 03:40:44 -07:00
j-berman
4be2d7cf91
whitespace fixes
2024-07-29 03:40:44 -07:00
j-berman
5ddca0ce11
Implement and test trim_tree algo in memory
2024-07-29 03:40:44 -07:00