-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[WIP] Bootstrappable FCMP++ #9440
base: master
Are you sure you want to change the base?
Conversation
Rust 1.69 is being used within Monero for its LLVM/ld compatibility. There's no need to go newer and that may be simpler. |
In this case, newer is easier. Guix only supports the latest version of Rust (that it has available). This PR currently uses binutils 2.38, llvm 17.0.6. Will see if I run into problems with windows targets. |
Hey - I've seen that NDK task is unchecked, you can grab latest NDK patch from here: https://github.com/MrCyjaneK/monero_c/blob/master/patches/monero/0013-android-ndk-version-bump.patch and https://github.com/MrCyjaneK/monero_c/blob/master/patches/monero/0013-rename-arm-armv7a.patch it cointains some hacks - but hopefully will be useful. |
- If locked output migration step completes, then program exits while migration step to grow the tree is in progress, make sure the migration picks back up where it left off growing the tree. - Make sure db cursor gets set in all cases when renaming block infn table.
- Removing the sign bit from key images enables an optimization for fcmp's. - If an fcmp includes a key image with sign bit cleared,while the same key image with sign bit set exists in the chain already via a ring signature, then the fcmp would be a double spend attempt and the daemon must be able to detect and reject it. - In order for the daemon to detect such double spends, upon booting the daemon, we clear the sign bit from all key images already in the db. We also make sure that all key images held in memory by the pool have sign bit cleared as well. - Key images with sign bit cleared are a new type: `crypto::key_image_y`. The sign bit can be cleared via `crypto::key_image_to_y`. - The `_y` denotes that the encoded point is now the point's y coordinate. - In order to maintain backwards compatibility with current RPC consumers, the daemon keeps track of which key images have sign bit cleared and not, so that upon serving `spent_key_image_info::id_hash`, the daemon can re-construct the original key image and serve it to clients.
- plus slightly cleaner hash
Speeds up inverting many elems at once 95%+
Naming suggestion from @kayabaNerve
- Moved functions around in unit_tests/curve_trees.{h,cpp} to ease using the in-memory Global tree across tests - Introduced PathV1 struct, which is a path in the tree containing whole chunks at each layer - Implemented functions to get_path_at_leaf_idx and get_tree_root on in-memory Global tree
- Cleanly separate logic to set the hash_offset that we use when calling hash_trim and hash_grow from the logic used to determine which old child values we need from the tree - The core logic error was not properly setting the range of children needed from the tree when need_last_chunk_remaining_children is true. The fix makes sure to use the correct range, and to set hash_offset appropriately for eveery case. - In the case that get_next_layer_reduction doesn't actually need to do any hashing, only tell the caller to trim to boundary, the function now short-circuits and doesn't continue with hashing
- batch_start is the simplest function to use to resize db, since resizing requires no active txns. - batch_stop makes sure no active txns. - need to decrement txns before calling migrate() so that do_resize does not deadlock in wait_no_active_txns
d0fe0ba
to
e89ffb1
Compare
This is a WIP draft PR for reproducible release builds with Rust FFI.
Based on #9436 (FCMP++ integration) and #8929 (Bootstrappable builds).
Tools
Sub PRs
To-do (incomplete):
[1] = links against precompiled freebsd system libraries
[2] = links against precompiled libraries from the darwin SDK
[3] = built with a precompiled toolchain from the Android NDK (there is currently no way around this)
Guix
Changes to the build environment
Includes packages that are available in the guix container that we use to build Monero.
Changes to transitive build dependencies
Includes (transitive) build dependencies that are not included in the build environment.