-
Notifications
You must be signed in to change notification settings - Fork 725
Sapling Foundations (Build System + ZIP32) #1553
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
Sapling Foundations (Build System + ZIP32) #1553
Conversation
11f1ed0 to
26d2071
Compare
|
Following the team call convo, moved PR target to master. |
18d8b75 to
cfed672
Compare
2b2c119 to
2480876
Compare
2480876 to
3bcd080
Compare
3bcd080 to
823f142
Compare
|
added a few new commits to flesh out issues with gitian builds and libc version requirements. #1770 was submitted as it's own PR as I felt is was a significant enough change to warrant a dedicated PR. |
|
Awesome! 🍺 |
|
Needs one last rebase, due to the changes in the CMakeLists from #1738 recently merged. The changes to the build system and the additions to the RPC interface should be documented. Though we'll certainly add a big section for the Sapling upgrade later, so just tagging "NeedsReleaseNotes" for now. |
Plus included a simple test calling a rust function and verifying the response.
Coming from c63c9f2.
…ies. Coming from a560c24d6b6557f549ac5a4d256169c4eb0683ae.
Coming from e6bbd84
This also adds `configure` time checking for the presence of libsodium and adds a config option `--disable-online-rust` that will prevent fetching dependent crates from crates.io (this is required for `depends` based builds such as gitian and TravisCI).
libsodium, rust (and cargo).
Also fetch and cache zk params.
Doing this avoids code duplication
This adds two methods of defining a custom zk params directory: 1. Runtime option `-paramsdir`, which functions exactly like `-datadir`. 2. Configure/Compile option `--with-params-dir` as a way to hard-code the zk params directory at compile time. The second method was added because our CI windows tests made the assumption that the test environment was windows, which it isn't, so it was trying to reference a path that doesn't exist.
Connected and corrected the flow to be able to upgrade any previous wallet version to the Sapling version (passing through the HD wallet upgrade first)
This is needed to address an issue with libsodium, no effect on other dependencies. Also pass `--disable-online-rust` to use the rust libs from depends, and remove the riscv64 target as rust builds currently fail for that arch.
We need to use our own rust packages that have been patched to remove a dependency on a glibc symbol that isn't available in our minimum supported glibc version.
This makes `explicit_bzero` compatible with our minimum required glibc version.
…dresses. Nee to be using the same 'shielded' convention everywhere.
1693841 to
c3e99fe
Compare
prevents potential artifacts
CMake will now fail if cargo or rustc cannot be found, as it should.
Added missing sodium library
Fuzzbawls
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 0e1ac93
random-zebra
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 0e1ac93 and merging... 🎉
22a5f4f GUI + wallet: upgrade to sapling wallet workflow. (furszy) 72834a1 Wallet: HD wallets (FEATURE_PRE_SPLIT_KEYPOOL) automatic upgraded to FEATURE_SAPLING. (furszy) Pull request description: HD wallets (`FEATURE_PRE_SPLIT_KEYPOOL`) automatic upgrade to `FEATURE_SAPLING` to support shielded functionality by default. This is an straightforward version bump because only the seed is needed to generate the sapling keys tree. More info in #1553. Plus added a version guard in the shielded addresses generation method, so pre-HD wallets show the proper error when they cannot generate shielded addresses (essentially, will notify the user that he/she needs to upgrade their wallet to support shielded operations). As an extra information, pre-HD wallets who upgrade to HD running v5, will automatically be upgraded to support sapling features. This was done in #1553 as well. ACKs for top commit: random-zebra: ACK 22a5f4f Fuzzbawls: ACK 22a5f4f Tree-SHA512: 7224457799fc9a7004048fdd0b2bdd13e74a39353fbc9e9e1316f74b9ab2f96d7b617866cdd06774351d20768255cb765640f09abdc4b6062e472a6e3ad684af
Foundational PR towards full Sapling integration. Covering, in a nutshell, the first two milestones:
1) "Build & depend/deterministic system configuration support".
Build system configuration basis for Sapling.
Rust, libsodium, librustzcash (Sapling rust library - up until version 0.2.0) + all of the needed crates dependencies (~34 libraries).
2) "Wallet: Sapling keys & addresses management. Generation/storage/encryption following ZIP32 derivation linked to wallet's BIP44 master seed".
New address format support, bech32 for Sapling payment addresses.
Sapling keys deterministic derivation from the wallet's master seed (same as regular/staking addresses. wallet's seed will restore PIVs and Shielded PIVs equally).
Sapling Keys/Addresses persistence on disk and encryption/decryption process connected to the wallet.
Support for extended full viewing key, incoming viewing key, outgoing viewing key and spending key (Further explanation here).
New/Updated RPC method calls added:
getnewshieldedaddress—> generating new bech32 Sapling address and adding it to the keystore encrypted/unencrypted.listsaplingaddresses—> listing wallet Sapling addresses.validateaddress→ covering Sapling addresses support.Test Coverage.
Sapling unit tests are under
/src/test/librust/directory.Sapling functional tests are under
/test/functional/directory following the new prefixsapling_**.py.NOTE:
Remember to fetch the params using the script in util/fetch-params.sh
— Next PR will cover the Sapling wallet transactions' management (commits history will not be as incremental as this foundational PR, needed to do it in this way because of the substantial amount of work in the build system area. Aiming to get us directly up-to-date with the latest work in the area).