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
47d47bdd20
fcmp++: proof len from inputs *AND merkle tree depth
2024-08-14 11:42:30 -07:00
j-berman
ee19361ea0
Remove extra gcc install fixes windows build
2024-08-14 08:58:57 -07:00
j-berman
918befb0f5
new_leaf_tuples -> new_outputs
2024-08-13 09:25:43 -07:00
j-berman
67f5546d10
lmdb touchup && OutputsByUnlockBlock map -> unordered_map
2024-08-13 09:24: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
7389cb6bee
add missing files
2024-08-09 16:35:25 -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
9ad49189bb
link correct cncrypto and ringct_basic libs
2024-08-09 16:24:21 -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
8b12a335c6
fcmp++: implement iterative audit_tree function
...
- Recursion goes too deep
2024-08-08 19:26:08 -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
j-berman
d72f405cee
Revert DELETE_DB macro to original spot
2024-08-08 13:43:54 -07:00
j-berman
3a5cf70066
32-bit platform compatibility in Rust FFI (untested)
2024-08-08 13:38:45 -07:00
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