* ci(tests): use create-with-container for integration test deployment
Refactors the `sub-deploy-integration-tests-gcp.yml` workflow to launch the Zebra test container directly using `gcloud compute instances create-with-container`. This replaces the previous method of launching a `busybox` container and then using `docker run` via SSH.
Key changes include:
- Replaced `busybox` + `docker run` with `create-with-container` using the specific test image (`${{ vars.CI_IMAGE_NAME }}`).
- Removed separate "Format volume" and "Launch test" steps.
- Configured container environment variables and disk mounts directly via `gcloud` parameters.
- Reverted log checking and retrieval steps back to the SSH + `docker logs`/`docker wait` approach after experimenting with Cloud Logging, adapting them to find the container ID dynamically.
This aligns the instance creation part more closely with the `cd-deploy-nodes-gcp.yml` workflow and removes the indirection layer of the `busybox` container, while retaining the familiar SSH-based log monitoring.
* chore: fix
* fix(deploy): use trimmed image
* fix(deploy): use specific dynamic name
* fix: typo
* fix(deploy): do not double wait for logs
* fix: better deployment configurations
* chore: exit status handling to avoid false-positives
* Update .github/workflows/sub-deploy-integration-tests-gcp.yml
Co-authored-by: Arya <aryasolhi@gmail.com>
---------
Co-authored-by: Arya <aryasolhi@gmail.com>
- Pass empty disk_suffix when no input disk needed to skip disk search
- Fix job dependency handling when get-disk-name runs but finds no disk
- Use RUNNING_DB_VERSION for image naming instead of less reliable STATE_VERSION
- Add validation for version extraction in image creation step
Fixes sync-to-checkpoint test failing with "No branch disk found" error
when get-disk-name runs for state_version but no input disk is needed.
* updates book/../state-db-upgrades.md
* updates zebra-consensus with the changes from PR #9432 and minor test changes from #9295
* updates zebra-chain with the changes from PR #9432
* updates imports in zebra-rpc
* Merges and applies changes to zebra-state from PRs #9295 and #9432
* adds a TODO.
* minor update to zebra-rpc to use the new ReadResponse::AddressBalance type
* renames add_block_info db upgrade
* moves migration from `add_balance_received` to `block_info_and_address_received`
* replaces `write` with `write_batch`
* update disk format snapshots
* combines partial_transparent_balance_change() and partial_transparent_received_change()
* fixes typo
* Replaces redundant code with a call to `construct_column_families()`
* refactors `AddressBalanceLocation` and `AddressBalanceLocationChange` into a newtypes around a common inner type.
* fixes lints and doc compilation issue
* updates snapshots
* bumps the db format version to the next major version (27.0.0) instead of the next minor version (26.1.0)
* fixes clippy lint, minor cleanups
* fixes lint
* applies suggestions from code review
* fixes a mistake in `is_reusable_major_upgrade` where v26.0.0 is not a restorable db version
* Fixes an issue around marking an upgraded db format in the disk version file before completing migrations when reusing a previous major db format and restarting Zebrad before the migration is complete.
* Apply suggestions from code review
---------
Co-authored-by: Gustavo Valverde <gustavo@iterativo.do>
Pin lightwalletd container to v0.4.17 instead of using latest tag.
The latest version (v0.4.18) broke our lightwalletd integration tests,
causing CI pipeline failures.
Using pinned versions prevents unexpected test failures when upstream
dependencies change and gives us control over when to update and test
compatibility.
* Adds a `Nu6_1` variant to `NetworkUpgrade`
* updates CONSENSUS_BRANCH_IDS to include NU6.1 and NU7 when compiled with the `zebra-test` feature
* Update zebra-chain/src/parameters/network/testnet.rs
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
---------
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Add missing fork condition to build job in main CD workflow
- Fix inverted fork condition in patch-external workflow
- Resolves authentication errors when workflows run from forked repositories
* refactor(ci): remove larger runners to allow running on forks
* fix(ci): some tests can't run with normal runners
* fix(ci): use largest runner for crates build
* fix(ci): log runner being used
* fix(ci): use the corect variable reference
* fix(ci): use the same approach on all the jobs
* chore: use the same runner as before
* imp: single liner
* chore: reduce diff
---------
Co-authored-by: Conrado Gouvea <conrado@zfnd.org>
* fix(ci): Ensure release deployments run and improve script clarity
This addresses several issues in the CD workflow:
- Modifies the 'build' job to remove its dependency on 'get-disk-name'.
This allows the 'build' job and subsequently 'deploy-nodes' to run
during release events, as 'get-disk-name' is intentionally skipped
for releases.
- Updates the 'Create instance template' script in 'deploy-nodes' to
correctly handle disk parameters for release events. It now ensures
that release deployments attempt to use the existing persistent disk
(e.g., 'zebrad-cache-mainnet') for state continuity, rather than
relying on a dynamic cached image from the (skipped) 'get-disk-name' job.
- Refactors in-script comments within the 'deploy-nodes' job and moved them to the top, to avoid clutter in the script
* feat(ci): Implement stateful disk policy for release MIGs
This commit introduces a new step "Configure stateful disk policy for
release MIG" to the `deploy-nodes` job in the
`.github/workflows/cd-deploy-nodes-gcp.yml` workflow.
For `release` events, this step applies a stateful policy to the
Managed Instance Group (MIG) using the command:
`gcloud compute instance-groups managed set-stateful-policy`.
The policy is configured with
`--stateful-disk "device-name=zebrad-cache-${NETWORK},auto-delete=never"`.
This ensures that the specified data disk, which holds the Zebra node's
state, is preserved during instance recreations or updates within the MIG,
maintaining data persistence for production release deployments.
* Regroup imports in `.../tests/common/regtest.rs`
* Regroup imports in `.../methods/tests/prop.rs`
* Regroup imports in `.../get_block_template.rs`
* Regroup imports in `.../zip317.rs`
* Regroup imports in `.../get_blockchain_info.rs`
* Regroup imports in `.../types/get_raw_mempool.rs`
* Regroup imports in `.../types/transaction.rs`
* Regroup imports in `.../server/tests/vectors.rs`
* Regroup imports in `.../args.rs`
* Regroup imports in `.../main.rs`
* Regroup imports in `.../openapi-generator/main.rs`
* Regroup imports in `zebrad/src/commands/start.rs`
* Regroup imports in `.../tests/fake_peer_set.rs`
* Regroup imports in `.../components/miner.rs`
* Regroup imports in `.../tests/acceptance.rs`
* Regroup imports in `.../get_block_template.rs`
* Update changelog
* Update end of support
* Add release date
* Add breaking change description
* Add new PRs to changelog
* Add breaking change description to changelog
* Update list of PRs in changelog
* chore: Release
* Apply suggestions from code review
Co-authored-by: Arya <aryasolhi@gmail.com>
---------
Co-authored-by: Arya <aryasolhi@gmail.com>
* add size and time to getrawtransaction object
* fix annoying clippy lint about large enum variant
* add todo
* add TODO, remove TODO
Co-authored-by: Conrado Gouvea <conrado@zfnd.org>
---------
Co-authored-by: Conrado Gouvea <conrado@zfnd.org>
Tests in `sub-test-zebra-config.yml` were failing in some instances with exit code 137 (SIGKILL) or 139 (SIGSEGV) during the `docker stop` phase, even when the preceding log check (`grep`) succeeded. This occurred because zebrad sometimes doesn't shut down gracefully within the default docker stop timeout.
This change modifies the exit logic to return status 0 if the grep command passes, regardless of the exit code from `docker wait`. This aligns the step result with the actual test outcome determined by log analysis and mirrors the fix from PR #8107.
Ref: #7898
- Removed `latest_tag` and `tag_suffix` inputs from Docker build workflow, as those are no longer required.
- Split SHA tagging into PR and branch events for clarity.
- Removed tag event references and flavor customizations to prevent redundant tags.
- Updated comments for clarity on tag purposes.
Closes#7415
* Introduce Nu7
* Introduce Nu7 fo other crates of Zebra
* Fix of new_regtest call (as it additionally needs Nu7 arg now)
* Fix of new_regtest call (as it additionally needs Nu7 arg now) (2)
* Set Nu7 as a network update for testnet in zebra-chain network tests
* Fix serde names for NU7
* Update test snapshot in zebra-rpc to use NU7
* Copy Nu7-related changes from zsa-integration-state
* Uncomment zcash_unstable = nu7
* Fix Nu7 constants and add cfg(zcash_unstable ...) attribute according to PR #15 review comments
* Update network constant values according to PR #15 review comments
* Add zcash_unstable=nu6 Rust flag to .cargo/config.toml to use nu6 by default
* Add zcash_unstable = nu6 cfg in zebra-network/.../types.rs
* Fix nu7 activation heights in network_upgrade.rs (nu6 value + 1 does not work - causes a test failure)
* Add cfg for CURRENT_NETWORK_PROTOCOL_VERSION constant definition, add FIXMEs for a couple of Nu6 processing cases, add processing of Nu7
* Update get_blockchain_info@testnet_10.snap
* Update get_blockchain_info@mainnet_10.snap
* updated cfg flag
* remove `zcash_unstable` flag
* Remove testnet and mainnet NU7 activation heights, comment out consensus branch id and conversion to zcash primitives nu type
* Yep, it'll work after NU7
* Yep, the test should work fine after NU7
* Yep, it only needs to be a post-nu6 height.
* other fixes and cleanups
* Updates snapshots, removes unnecessary FIXMEs, fixes issues with bad merge conflict resolution
* fixes test hang when there are NUs defined without activation heights
* fixes test, applies suggestion from code review.
* Enable consensus branch ID for Nu7
---------
Co-authored-by: Dmitry Demin <dmitry@qed-it.com>
Co-authored-by: Arya <aryasolhi@gmail.com>
Co-authored-by: Marek <mail@marek.onl>
The `HistoryTree` type is intended for internal use within the node; it
should not be exposed via the ReadStateService response. Instead, this
response should simply include the hash needed for block template
construction.
* fix(ci): set `ZEBRA_CACHE_DIR` in full and checkpoint syncs
Updates the GitHub Actions workflows for GCP integration tests to explicitly set the ZEBRA_CACHE_DIR environment variable to `/home/zebra/.cache/zebra` for the following test jobs:
- regenerate-stateful-disks (Zebra checkpoint sync to mandatory checkpoint)
- test-full-sync (Zebra full sync to tip on Mainnet)
- test-full-sync-testnet (Zebra full sync to tip on Testnet)
The rationale for this change is to address permission issues encountered during tests that attempt to create or access a cached database directory. By setting ZEBRA_CACHE_DIR to a specific path within the user's home directory, we ensure that the test has the necessary write permissions to create and manage the cache directory, avoiding 'Permission denied (os error 13)' errors that occur when using default or system directories without adequate access rights.
* chore: fix typo