* Avoid manual handling of previous sapling trees by using iterator windows instead
* Avoid manual sapling subtree index handling by comparing prev and current subtree indexes instead
* Simplify adding notes by using the exact number of remaining notes
* Simplify by skipping the first block, because it can't complete a subtree
* Re-use existing tree update code
* Apply the sapling changes to orchard subtree updates
* add a reverse database column family iterator function
* Make skipping the lowest tree independent of iteration order
* Move new subtree checks into the iterator, rename to end_height
* Split subtree calculation into a new method
* Split the calculate and write methods
* Quickly check the first subtree before running the full upgrade
* Do the quick checks every time Zebra runs, and refactor slow check error handling
* Do quick checks for orchard as well
* Make orchard tree upgrade match sapling upgrade code
* Upgrade subtrees in reverse height order
* Bump the database patch version so the upgrade runs again
* Reset previous subtree upgrade data before doing this one
* Add extra checks to subtree calculation to diagnose errors
* Use correct heights for subtrees completed at the end of a block
* Add even more checks to diagnose issues
* Instrument upgrade methods to improve diagnostics
* Prevent modification of re-used trees
* Debug with subtree positions as well
* Fix an off-by-one error with completed subtrees
* Fix typos and confusing comments
Co-authored-by: Marek <mail@marek.onl>
* Fix mistaken previous tree handling and end tree comments
* Remove unnecessary subtraction in remaining leaves calc
* Log heights when assertions fail
* Fix new subtree detection filter
* Move new subtree check into a method, cleanup unused code
* Remove redundant assertions
* Wait for subtree upgrade before testing RPCs
* Fix subtree search in quick check
* Temporarily upgrade subtrees in forward height order
* Clarify some comments
* Fix missing test imports
* Fix subtree logging
* Add a comment about a potential hang with future upgrades
* Fix zebrad var ownership
* Log more info when add_subtrees.rs fails
* cargo fmt --all
* Fix unrelated clippy::unnecessary_unwrap
* cargo clippy --fix --all-features --all-targets; cargo fmt --all
* Stop the quick check depending on tree de-duplication
* Refactor waiting for the upgrade into functions
* Wait for state upgrades whenever the cached state is updated
* Wait for the testnet upgrade in the right place
* Fix unused variable
* Fix a subtree detection bug and comments
* Remove an early reference to reverse direction
* Stop skipping subtrees completed at the end of blocks
* Actually fix new subtree code
* Upgrade subtrees in reverse height order
Reverts "Temporarily upgrade subtrees in forward height order"
This reverts commit a9558be214.
* Bump the database patch version to re-run the upgrade (for testing)
* Revert "Remove an early reference to reverse direction"
This reverts commit c206404377.
---------
Co-authored-by: Marek <mail@marek.onl>
* add fixed test vectors for `z_getsubtreesbyindex`
* change to snapshots
* add test to docker
* remove assert lines from snapshots
* add more tests
* change test description
* change test name
* run both tests together
* wait for state version update in test
* Run one test at a time to avoid state locking issues
---------
Co-authored-by: teor <teor@riseup.net>
Use `trap '' PIPE` as a command in the pipeline might exit early and we want the script to continue executing, as using `grep --max-count=1` might exit after finding the first match, causing a broken pipe error with `tee`.
This is being combined with `set -o pipefail` to have strict error handling and we want the script to fail if any command in the pipeline fails.
* Add instructions for changing crate owners
* Explain new owner invites
* Remove duplicate `cargo login` instructions from the release checklist
* Remove owners as well
* Missing log line
* imp(doc): add missing Docker variables and examples
* imp(doc): segment environment variables by role
* imp(doc): use code instead of strong styling for variables
* chore: review fixes
* fix(doc): use a better example for advanced usage
* Avoid manual handling of previous sapling trees by using iterator windows instead
* Avoid manual sapling subtree index handling by comparing prev and current subtree indexes instead
* Simplify adding notes by using the exact number of remaining notes
* Simplify by skipping the first block, because it can't complete a subtree
* Re-use existing tree update code
* Apply the sapling changes to orchard subtree updates
* add a reverse database column family iterator function
* Make skipping the lowest tree independent of iteration order
* Move new subtree checks into the iterator, rename to end_height
* Split subtree calculation into a new method
* Split the calculate and write methods
* Quickly check the first subtree before running the full upgrade
* Do the quick checks every time Zebra runs, and refactor slow check error handling
* Do quick checks for orchard as well
* Make orchard tree upgrade match sapling upgrade code
* Upgrade subtrees in reverse height order
* Bump the database patch version so the upgrade runs again
* Reset previous subtree upgrade data before doing this one
* Add extra checks to subtree calculation to diagnose errors
* Use correct heights for subtrees completed at the end of a block
* Add even more checks to diagnose issues
* Instrument upgrade methods to improve diagnostics
* Prevent modification of re-used trees
* Debug with subtree positions as well
* Fix an off-by-one error with completed subtrees
* Fix typos and confusing comments
Co-authored-by: Marek <mail@marek.onl>
* Fix mistaken previous tree handling and end tree comments
* Remove unnecessary subtraction in remaining leaves calc
* Log heights when assertions fail
* Fix new subtree detection filter
* Move new subtree check into a method, cleanup unused code
* Remove redundant assertions
* Wait for subtree upgrade before testing RPCs
* Fix subtree search in quick check
* Temporarily upgrade subtrees in forward height order
* Clarify some comments
* Fix missing test imports
* Fix subtree logging
* Add a comment about a potential hang with future upgrades
* Fix zebrad var ownership
* Log more info when add_subtrees.rs fails
* cargo fmt --all
* Fix unrelated clippy::unnecessary_unwrap
* cargo clippy --fix --all-features --all-targets; cargo fmt --all
* Stop the quick check depending on tree de-duplication
* Refactor waiting for the upgrade into functions
* Wait for state upgrades whenever the cached state is updated
* Wait for the testnet upgrade in the right place
* Fix unused variable
* Fix a subtree detection bug and comments
* Remove an early reference to reverse direction
* Stop skipping subtrees completed at the end of blocks
* Actually fix new subtree code
---------
Co-authored-by: Marek <mail@marek.onl>
* Update links in Tracing section
* Move Sentry to Tracing section
* Refactor the section on features in `README.md`
- I tried to keep only the most relevant features for users.
- I tried using links that lead to the most descriptive pages.
These changes are subjective.
* Remove the networking section from `README.md`
The network requirements are well documented in section System
Requirements in the Zebra book. The readme already points to this
section in a link in section Getting Started.
The motivation for this change is to keep the readme short.
* Update README.md
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
---------
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
* update docs for new lightwalletd version used in Zebra
* update some asserts
* add `RUST_LOG` to docker `entrypoint.sh` file
* clarify zecwallet-cli is untested with zcash/lightwalletd fork in the book
* revert entrypoint rust log changes
* remove sleep
* revert doc changes
* change formatting in expected output
* try sleep now that CI is working
* try sending more transactions
* remove tests with failures
* remove newline
* feat(ci): add self-hosted runners for long tests
* fix(workflow): use correct runner name
* test: add runner to more jobs
* fix: remove custom packages which are not available in self-hosted runner
This step was mostly required as we did SSH several times during PR, Queue and Push to `main`, but this hasn been reduced considerably.
* Revert "fix: remove custom packages which are not available in self-hosted runner"
This reverts commit 5b5d5464fe.
* fix: do not generate a public key
* fix: install `openssh`in new Ubuntu image
* fix: update OS before installing
* fix: allow silent install
* ref(workflow): use a single job for sync tests
* ref(workflow): use a single job for setup and launch
* fix: apply review recommendations
* chore: comment removal
* obtain lightwalletd from the logs
* revert #7332
* temporarily stop checking that the update sync has a good cached state
* Revert "temporarily stop checking that the update sync has a good cached state"
This reverts commit 0fb10938d9.
* add `save_to_disk` to workflow
* Fix lightwalletd height_grep_text for ECC fork
* Add a TODO about blocking the async executor
---------
Co-authored-by: teor <teor@riseup.net>
* Add lightwalletd's protobuf types
* Don't explicitly derive `Eq` for enums
I got bitten by this bug: https://github.com/tokio-rs/prost/issues/332
when I added the enum `ShieldedProtocol` to the file `service.proto`.
The problem is that `prost` implicitly derives `Eq` for enums, so
deriving it explicitly via `type_attribute` causes a conflict. Lukily,
there is another method `message_attribute` that operates only on
messages and not enums.
* Test the `z_getsubtreesbyindex` RPC
* Fix a typo
* Add test vectors
* Refactor some comments for subtrees
* Update docs about single subtree APIs
* Fix method rename in tree.rs
---------
Co-authored-by: teor <teor@riseup.net>