Commit Graph

3988 Commits

Author SHA1 Message Date
teor f31609e411
change(state): Add block channel metrics, in preparation for block fork metrics (#5327)
* Add minimum queued block height to metrics

* Add metrics to sent block cache

* Add metrics for the last sent finalized height

* Refactor sent metrics

* Add new block channel metrics to a grafana dashboard
2022-10-20 20:02:58 +00:00
Gustavo Valverde 65e9822c43
docs(release): add information on how we tag and release (#5392)
* draft

* docs(release): add information on how we tag and release

* docs(release): remove outdated document

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

* Remove rough draft analysis of alternatives

Co-authored-by: teor <teor@riseup.net>
2022-10-19 19:31:28 +00:00
Gustavo Valverde dae1d92b01
ci(sync): only run the `lightwalletd` full sync on the `main` branch (#5393)
* ci(sync): only run the `lightwalletd` full sync on the `main` branch

Previous behavior:
In PR #5164, we made lightwalletd sync all the way to the tip in its full
sync test.

This increases that test's time from 1 hour to 4 hours, which makes the CI
we run on each PR change increase from 3 hours to 6 hours.

Expected behavior:
Run the lightwalletd full sync just on `main` or if a state disk for the
actual version is not found.

Solution:
Add the `github.event_name == 'push' && github.ref_name == 'main'` condition
to the `lightwalletd-full-sync` test.

Fixes #5316

* Allow lwd full syncs to be triggered manually (#5400)

* Limit checkpoint and lwd full sync concurrency

* Add a patch job for lightwalletd-full-sync

Co-authored-by: teor <teor@riseup.net>
2022-10-19 12:01:26 +00:00
Alfredo Garcia d81a5fc576
feat(rpc): introduce `getblocktemplate-rpcs` feature (#5357)
* introduce `getblocktemplate-rpcs` feature

* reorder imports

* highlight the problem

* add docs

* add additional empty state test

* add snapshot test

* remove getblocktemplate trait

* use `cfg-if`

* leave server as it was

* add a missing space to the docs

* fix typo in test

Co-authored-by: Arya <aryasolhi@gmail.com>

* suggestion for introduce `getblocktemplate-rpcs` feature (#5418)

* adds minimal new object for the get block template methods

* updated TODO comment

Co-authored-by: Arya <aryasolhi@gmail.com>
2022-10-19 12:01:13 +00:00
dependabot[bot] c1bebead3a
build(deps): bump inferno from 0.11.10 to 0.11.11 (#5415)
Bumps [inferno](https://github.com/jonhoo/inferno) from 0.11.10 to 0.11.11.
- [Release notes](https://github.com/jonhoo/inferno/releases)
- [Changelog](https://github.com/jonhoo/inferno/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jonhoo/inferno/compare/v0.11.10...v0.11.11)

---
updated-dependencies:
- dependency-name: inferno
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-19 10:41:48 +00:00
dependabot[bot] 267db7f956
build(deps): bump docker/metadata-action from 4.0.1 to 4.1.1 (#5417)
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4.0.1 to 4.1.1.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](https://github.com/docker/metadata-action/compare/v4.0.1...v4.1.1)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-18 22:15:31 +00:00
Marek 1f4bc0da0c
Remove `arrayvec` and `itoa` from `skip-tree` (#5410)
We recently updated `inferno`, and running
```bash
cargo deny --all-features check bans
```
started producing the following warnings:
```
   ┌─ .../zebra/deny.toml:89:5
   │
89 │     { name = "arrayvec", version = "=0.4.12" },
   │     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no crate matched these criteria

warning[B010]: skip tree root was not found in the dependency graph
   ┌─ .../zebra/deny.toml:90:5
   │
90 │     { name = "itoa", version = "=0.4.8" },
   │     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no crate matched these criteria

bans ok
```

The warning means we don't need to list the `arrayvec` and `itoa`
dependencies in the `skip-tree` section, so this commit removes them.
2022-10-18 22:15:20 +00:00
dependabot[bot] 3cbf8dafaf
build(deps): bump google-github-actions/auth from 0.8.2 to 0.8.3 (#5413)
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 0.8.2 to 0.8.3.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v0.8.2...v0.8.3)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-17 21:54:05 +00:00
dependabot[bot] 4a70354d9e
build(deps): bump tj-actions/changed-files from 32.1.0 to 32.1.2 (#5414)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 32.1.0 to 32.1.2.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v32.1.0...v32.1.2)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-17 21:53:55 +00:00
dependabot[bot] b0685be139
build(deps): bump tj-actions/changed-files from 32.0.0 to 32.1.0 (#5403)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 32.0.0 to 32.1.0.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v32.0.0...v32.1.0)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-16 12:34:43 +00:00
dependabot[bot] 291b85d8ec
build(deps): bump google-github-actions/auth from 0.8.1 to 0.8.2 (#5404)
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 0.8.1 to 0.8.2.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v0.8.1...v0.8.2)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-16 12:34:36 +00:00
Gustavo Valverde 25b46ea0ec
ci(disk): use an official GCP image on CI VMs for disk auto-resizing, make CI & CD disks 300GB (#5371)
* Revert "ci(ssh): connect using `ssh-compute` action by Google (#5330)"

This reverts commit b366d6e7bb.

* ci(ssh): use sudo for docker commands if user is not root

* ci(ssh): specify the service account to connect with

* ci(ssh): increase the Google Cloud instance sshd connection limit

* chore: add a new line at the end of the script

* chore: update our VM image to bullseye

* chore: fix `tj-actions/changed-files` file comparison

* ci(disk): use an official image on CI VMs for disk auto-resizing

Previous behavior:
We've presented issues in the past with resizing as the device is busy,
for example:

```
e2fsck: Cannot continue, aborting.
/dev/sdb is in use.
```

Expected behavior:
We've been manually resizing the disk as this task was not being done
automatically, but having an official Public Image from GCP would make
this easier (automatic) and it also integrates better with other GCP
services

Configuration differences: https://cloud.google.com/compute/docs/images/os-details#notable-difference-debian

Solution:
- Use `debian-11` from the official public images https://cloud.google.com/compute/docs/images/os-details#debian
- Remove the manual disk resizing from the pipeline

* ci: increase VM disk size to fit future cached states sizes

Some GCP disk images are 160 GB, which means they could get to the current
200 GB size soon.
2022-10-16 08:01:59 -04:00
dependabot[bot] a524816e14
build(deps): bump actions/github-script from 6.3.2 to 6.3.3 (#5409)
Bumps [actions/github-script](https://github.com/actions/github-script) from 6.3.2 to 6.3.3.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v6.3.2...v6.3.3)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-14 20:22:59 +00:00
teor fd517ee4a7
Make timeouts shorter to reduce full sync times (#5397) 2022-10-14 20:20:24 +00:00
teor 7daffb572a
chore(clippy): Fix clippy cast and closure warnings (#5378)
* Fix clippy cast and closure warnings

* Silence incorrect lints in Clippy 1.64

* Use correct clippy syntax

Co-authored-by: Marek <mail@marek.onl>

* Disable an incorrect Clippy 1.64 lint

* Disable lint on the correct code

* Try another place

Co-authored-by: Marek <mail@marek.onl>
2022-10-14 08:53:40 +00:00
dependabot[bot] ff8360122d
build(deps): bump tokio-stream from 0.1.10 to 0.1.11 (#5380)
Bumps [tokio-stream](https://github.com/tokio-rs/tokio) from 0.1.10 to 0.1.11.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-stream-0.1.10...tokio-stream-0.1.11)

---
updated-dependencies:
- dependency-name: tokio-stream
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-14 02:04:40 +00:00
Arya 1cfbe64039
fix(test): resolve a timing issue in fake_peer_set setup (#5398)
* waits for the chain tip update if setup adds mempool transactions and adds match arm for Response::Nil to MempoolTransactionIds request

* updates other match statements checking MempoolTransactionIds requests

* removes wait for chain tip update and waits for AdvertiseBlock earlier instead
2022-10-13 13:34:40 +00:00
dependabot[bot] c8b95ed877
build(deps): bump tracing from 0.1.36 to 0.1.37 (#5363)
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.36 to 0.1.37.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.36...tracing-0.1.37)

---
updated-dependencies:
- dependency-name: tracing
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-10-13 06:46:27 +00:00
dependabot[bot] 8646a03e03
build(deps): bump actions/github-script from 6.3.1 to 6.3.2 (#5387)
Bumps [actions/github-script](https://github.com/actions/github-script) from 6.3.1 to 6.3.2.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v6.3.1...v6.3.2)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-12 19:32:55 +00:00
dependabot[bot] b991f9feb7
build(deps): bump docker/build-push-action from 3.1.1 to 3.2.0 (#5389)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3.1.1...v3.2.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-12 19:32:48 +00:00
dependabot[bot] 8e5425f06a
build(deps): bump tracing-subscriber from 0.3.15 to 0.3.16 (#5364)
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.3.15 to 0.3.16.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.3.15...tracing-subscriber-0.3.16)

---
updated-dependencies:
- dependency-name: tracing-subscriber
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-10-12 18:12:43 +00:00
dependabot[bot] 393fcd018c
build(deps): bump serde_json from 1.0.85 to 1.0.86 (#5369)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.85 to 1.0.86.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.85...v1.0.86)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-10-12 18:12:32 +00:00
dependabot[bot] 1f1487e1a6
build(deps): bump inferno from 0.11.9 to 0.11.10 (#5381)
Bumps [inferno](https://github.com/jonhoo/inferno) from 0.11.9 to 0.11.10.
- [Release notes](https://github.com/jonhoo/inferno/releases)
- [Changelog](https://github.com/jonhoo/inferno/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jonhoo/inferno/compare/v0.11.9...v0.11.10)

---
updated-dependencies:
- dependency-name: inferno
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-12 18:12:16 +00:00
dependabot[bot] dbf7aae5b9
build(deps): bump docker/login-action from 2.0.0 to 2.1.0 (#5388)
Bumps [docker/login-action](https://github.com/docker/login-action) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2.0.0...v2.1.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-12 18:12:06 +00:00
Arya a4cb835e12
Release Zebra 1.0.0-rc.0 (#5383)
* Increment Zebra versions

* Initial draft changelog

* Add blog post to the release checklist

* Say "user testing"

Co-authored-by: teor <teor@riseup.net>
2022-10-12 01:17:55 +00:00
Arya a28350e742
change(state): Write non-finalized blocks to the state in a separate thread, to avoid network and RPC hangs (#5257)
* Add a new block commit task and channels, that don't do anything yet

* Add last_block_hash_sent to the state service, to avoid database accesses

* Update last_block_hash_sent regardless of commit errors

* Rename a field to StateService.max_queued_finalized_height

* Commit finalized blocks to the state in a separate task

* Check for panics in the block write task

* Wait for the block commit task in tests, and check for errors

* Always run a proptest that sleeps once

* Add extra debugging to state shutdowns

* Work around a RocksDB shutdown bug

* Close the finalized block channel when we're finished with it

* Only reset state queue once per error

* Update some TODOs

* Add a module doc comment

* Drop channels and check for closed channels in the block commit task

* Close state channels and tasks on drop

* Remove some duplicate fields across StateService and ReadStateService

* Try tweaking the shutdown steps

* Update and clarify some comments

* Clarify another comment

* Don't try to cancel RocksDB background work on drop

* Fix up some comments

* Remove some duplicate code

* Remove redundant workarounds for shutdown issues

* Remode a redundant channel close in the block commit task

* Remove a mistaken `!force` shutdown condition

* Remove duplicate force-shutdown code and explain it better

* Improve RPC error logging

* Wait for chain tip updates in the RPC tests

* Wait 2 seconds for chain tip updates before skipping them

* Remove an unnecessary block_in_place()

* Fix some test error messages that were changed by earlier fixes

* Expand some comments, fix typos

Co-authored-by: Marek <mail@marek.onl>

* Actually drop children of failed blocks

* Explain why we drop descendants of failed blocks

* Clarify a comment

* Wait for chain tip updates in a failing test on macOS

* Clean duplicate finalized blocks when the non-finalized state activates

* Send an error when receiving a duplicate finalized block

* Update checkpoint block behaviour, document its consensus rule

* Wait for chain tip changes in inbound_block_height_lookahead_limit test

* Wait for the genesis block to commit in the fake peer set mempool tests

* Disable unreliable mempool verification check in the send transaction test

* Appease rustfmt

* Use clear_finalized_block_queue() everywhere that blocks are dropped

* Document how Finalized and NonFinalized clones are different

* sends non-finalized blocks to the block write task

* passes ZebraDb to commit_new_chain, commit_block, and no_duplicates_in_finalized_chain instead of FinalizedState

* Update zebra-state/src/service/write.rs

Co-authored-by: teor <teor@riseup.net>

* updates comments, renames send_process_queued, other minor cleanup

* update assert_block_can_be_validated comment

* removes `mem` field from StateService

* removes `disk` field from StateService and updates block_iter to use `ZebraDb` instead of the finalized state

* updates tests that use the disk to use read_service.db instead

* moves best_tip to a read fn and returns finalized & non-finalized states from setup instead of the state service

* changes `contextual_validity` to get the network from the finalized_state instead of another param

* swaps out StateService with FinalizedState and NonFinalizedState in tests

* adds NotReadyToBeCommitted error and returns it from validate_and_commit when a blocks parent hash is not in any chain

* removes NonFinalizedWriteCmd and calls, moves update_latest_channels above rsp_tx.send

* makes parent_errors_map an indexmap

* clears non-finalized block queue when the receiver is dropped and when the StateService is being dropped

* sends non-finalized blocks to the block write task

* passes ZebraDb to commit_new_chain, commit_block, and no_duplicates_in_finalized_chain instead of FinalizedState

* updates comments, renames send_process_queued, other minor cleanup

* Update zebra-state/src/service/write.rs

Co-authored-by: teor <teor@riseup.net>

* update assert_block_can_be_validated comment

* removes `mem` field from StateService

* removes `disk` field from StateService and updates block_iter to use `ZebraDb` instead of the finalized state

* updates tests that use the disk to use read_service.db instead

* moves best_tip to a read fn and returns finalized & non-finalized states from setup instead of the state service

* changes `contextual_validity` to get the network from the finalized_state instead of another param

* swaps out StateService with FinalizedState and NonFinalizedState in tests

* adds NotReadyToBeCommitted error and returns it from validate_and_commit when a blocks parent hash is not in any chain

* removes NonFinalizedWriteCmd and calls, moves update_latest_channels above rsp_tx.send

* makes parent_errors_map an indexmap

* clears non-finalized block queue when the receiver is dropped and when the StateService is being dropped

* removes duplicate field definitions on StateService that were a result of a bad merge

* update NotReadyToBeCommitted error message

* Appear rustfmt

* Fix doc links

* Rename a function to initial_contextual_validity()

* Do error tasks on Err, and success tasks on Ok

* Simplify parent_error_map truncation

* Rewrite best_tip() to use tip()

* Rename latest_mem() to latest_non_finalized_state()

```sh
fastmod latest_mem latest_non_finalized_state zebra*
cargo fmt --all
```

* Simplify latest_non_finalized_state() using a new WatchReceiver API

* Expand some error messages

* Send the result after updating the channels, and document why

* wait for chain_tip_update before cancelling download in mempool_cancel_mined

* adds `sent_non_finalized_block_hashes` field to StateService

* adds batched sent_hash insertions and checks sent hashes in queue_and_commit_non_finalized before adding a block to the queue

* check that the `curr_buf` in SentHashes is not empty before pushing it to the `sent_bufs`

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

* Fix rustfmt

* Check for finalized block heights using zs_contains()

* adds known_utxos field to SentHashes

* updates comment on SentHashes.add method

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

* return early when there's a duplicate hash in QueuedBlocks.queue instead of panicking

* Make finalized UTXOs near the final checkpoint available for full block verification

* Replace a checkpoint height literal with the actual config

* Update mainnet and testnet checkpoints - 7 October 2022

* Fix some state service init arguments

* Allow more lookahead in the downloader, but less lookahead in the syncer

* Add the latest config to the tests, and fix the latest config check

* Increase the number of finalized blocks checked for non-finalized block UTXO spends

* fix(log): reduce verbose logs for block commits (#5348)

* Remove some verbose block write channel logs

* Only warn about tracing endpoint if the address is actually set

* Use CloneError instead of formatting a non-cloneable error

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Increase block verify timeout

* Work around a known block timeout bug by using a shorter timeout

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: Marek <mail@marek.onl>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-10-11 19:25:45 +00:00
teor 036a982fba
Update mainnet and testnet checkpoints - 7 October 2022 (#5360) 2022-10-11 10:29:27 +00:00
Gustavo Valverde 658fbd923a
ci(ssh): revert using `ssh-compute` action & increase sshd connection limit (#5367)
* Revert "ci(ssh): connect using `ssh-compute` action by Google (#5330)"

This reverts commit b366d6e7bb.

* ci(ssh): use sudo for docker commands if user is not root

* ci(ssh): specify the service account to connect with

* ci(ssh): increase the Google Cloud instance sshd connection limit

* chore: add a new line at the end of the script

* chore: update our VM image to bullseye

* chore: fix `tj-actions/changed-files` file comparison
2022-10-11 00:11:49 +00:00
dependabot[bot] 3bc8f0971f
build(deps): bump reviewdog/action-actionlint from 1.32.0 to 1.33.0 (#5368)
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.32.0 to 1.33.0.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.32.0...v1.33.0)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-10 19:12:50 +00:00
teor ee0edef857
Require Rust 1.63 in the README (#5359) 2022-10-07 01:20:49 +00:00
Arya de3640ddcc
adds zebra book's CI/CD docs to the sidebar (#5355) 2022-10-06 20:15:16 +00:00
dependabot[bot] 1d43a8bb8d
build(deps): bump tj-actions/changed-files from 29.0.7 to 32.0.0 (#5354)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 29.0.7 to 32.0.0.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v29.0.7...v32.0.0)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-06 20:15:08 +00:00
teor 6507230a0d
Fix the location of clippy::bool_to_int_with_if (#5350) 2022-10-06 20:00:18 +00:00
Arya 7207f9d732
waits for tip change after each commit call to the state-service in mempool_cancel_mined (#5347) 2022-10-06 10:36:42 +00:00
teor 1ec632a493
fix(docker): Add edge tag to Docker images, document when latest tag will appear (#5312)
* Add latest and edge tags to Docker images

* Document how latest tag actually works

* Try a different syntax for is_default_branch

* Try again

* One last try

* Revert changes that don't work

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-10-06 10:36:31 +00:00
Alfredo Garcia 1937b6cdc0
fix(test): Wait for zebrad and lightwalletd to reach the tip in tests, to improve test coverage (#5164)
* Add RPC timing to zcash-rpc-diff

* Use transaction hash index for verbose block requests, rather than block data

* check if we are at tip for lightwallet wallet tests

* move function

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

* Combine the lightwalletd sync and gRPC test APIs

* Rewrite the gRPC and full sync tests for the new APIs

* Make zebra_rpc_address optional because only some tests need it

* Check for the zebrad RPC port to open in the right place

* Do the quick lightwalletd integration tests first in the sequential test function

* Ignore the lightwalletd cached state env var in tests that don't want it

* Don't replace the state path in RPC tests

* Enable IO (and timers) on the tip check tokio runtime

* Stop waiting for sync if either waiter thread errors or panics

* Try to speed up slow lightwalletd full syncs

* Don't wait for the tip in send transaction tests, and try to speed up full lightwalletd syncs

* Remove redundant is_lightwalletd_finished store

Co-authored-by: Arya <aryasolhi@gmail.com>

* Fix unused variable error

* Actually create the lightwalletd cached state

* Fix lwd cache check logic

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: Arya <aryasolhi@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-10-06 04:12:27 +00:00
teor 8a5708c217
fix(test): Add a timeout to the non_blocking_logger test (#5325)
* Add a timeout to the non_blocking_logger test

* Make rustfmt happy

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-10-05 21:45:18 +00:00
dependabot[bot] 58b0ed1d85
build(deps): bump actions/checkout from 3.0.2 to 3.1.0 (#5329)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.2 to 3.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.0.2...v3.1.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-10-05 21:45:06 +00:00
teor fd63d33f11
change(doc): Update README and release checklist for the release candidate (#5314)
* Add a Docker run command to the README

* Update the README with some user-relevant release candidate goals

* Update the release template for the release candidate

* Fix beta crate explanation

* Be more specific about what "this PR" means

* Update docker command for latest tag changes

* Update README Docker command based on tag changes

* Make Zebra release versions more vague in README.md

Co-authored-by: Pili Guerra <mpguerra@users.noreply.github.com>

* Move build instructions to build section

Co-authored-by: Pili Guerra <mpguerra@users.noreply.github.com>

* Add newlines to separate heading and paragraphs

* Remove extra newline

* Add a note for a future command update

* Remove manual build check, it doesn't have tier 1 support

Co-authored-by: Pili Guerra <mpguerra@users.noreply.github.com>
2022-10-05 12:46:10 +00:00
Gustavo Valverde b366d6e7bb
ci(ssh): connect using `ssh-compute` action by Google (#5330)
* refactor(ssh): connect using `ssh-compute` action by Google

Previous behavior:
From time to time SSH connections to deployed VMs fails with the following
error: `kex_exchange_identification: Connection closed by remote host`

This was still happening after implementing https://github.com/ZcashFoundation/zebra/pull/5292

Excpected behavior:
Ensure we're not creating SSH key pairs on the fly to improve our connections
guarantees

Solution:
- Enable the Cloud Identity-Aware Proxy API in GCP
- Create a firewall rule to enable connections from IAP
- Grant the required IAM permissions to enable IAP TCP forwarding
- Generate an SSH keys pair and set a private key as an input param
- Set the GitHub Action SA to have authorized ssh connection to the VMs
- Implement the `google-github-actions/ssh-compute` action to connect

* fix(ssh): id `compute-ssh` cannot be used more than once within the same scope

* fix(ci): try to enclose commands to override parsing issues

* tmp: remove ssh_args

* fix(action): secrets must be inherited to be used

* tmp: validate command enclosing fixes executin

* fix(ssh): ssh_args are not implemented correctly

* fix(ssh): login with the root user

* fix(privelege): uso sudo with docker commands

* tmp: add sudo

* fix(ssh): use sudo for all docker commands

* fix(ssh): add missing `sudo` commands

* fix(ssh): get sync height from ssh stdout

* fix(height): get the height correctly
2022-10-05 09:02:40 +00:00
Gustavo Valverde a4189857fd
ci(lint): do not fail linter on `push` events (#5331)
Previous behavior:
The following error was causing an exit 1 in GitHub Actions when a pushing
to the `main` branch

```
Error: Similar commit hashes detected: previous sha is equivalent to the
current sha
```

Expeceted behavior:
Allow the linter to run succesfully even if the previous SHA has no files
changed

Solution:
Add `fetch-depth: 2` to retrieve the preceding commit
2022-10-04 19:00:44 +00:00
teor 9f6a1fdef0
Update yanked versions of aes (orchard), ed25519 (tor), and quick-xml (flamegraph) (#5308) 2022-10-04 07:31:39 +00:00
Arya 59d647cfa1
wait for chain_tip_update before cancelling download in mempool_cancel_mined (#5322) 2022-10-04 02:52:03 +00:00
teor cea622307a
Allow more time between thread CPU slices in db_init_outside_future_executor (#5310) 2022-10-04 02:51:53 +00:00
teor 469c471d92
Use correct TOML syntax in Docker zebrad.toml (#5320) 2022-10-04 02:51:43 +00:00
teor 4e40730120
fix(clippy): Allow a clippy::bool_to_int_with_if (#5300)
* Allow a clippy::bool_to_int_with_if

* Also allow unknown lints

* Fix typo
2022-10-03 23:43:33 +00:00
teor f71bb74951
fix(docker): Make default command work in docker images, disable optional listener ports (#5313)
* Disable optional listener ports so the default config is secure

* Fix Zebra config file path in Dockerfile
2022-10-03 17:50:27 +00:00
dependabot[bot] 6767f31e48
build(deps): bump reviewdog/action-actionlint from 1.31.0 to 1.32.0 (#5318)
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.31.0 to 1.32.0.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.31.0...v1.32.0)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-03 17:50:17 +00:00
dependabot[bot] d8f803a826
build(deps): bump actions/github-script from 6.3.0 to 6.3.1 (#5317)
Bumps [actions/github-script](https://github.com/actions/github-script) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v6.3.0...v6.3.1)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-03 17:50:10 +00:00
Marek 1f4a1b4c4c
fix(ci): Reduce false positives for the `C-trivial` label (#5309)
* Reduce false positives for the `C-trivial` label

* Delete `zebra-utils` entry

Co-authored-by: teor <teor@riseup.net>

Co-authored-by: teor <teor@riseup.net>
2022-10-03 01:45:23 +00:00