Commit Graph

622 Commits

Author SHA1 Message Date
Janito Vaqueiro Ferreira Filho ba8797e659
Implement `sendrawtransaction` RPC (#3685)
* Stub `sendrawtransaction` RPC method

Register the RPC method, and stub an implementation that currently just
panics. The method has a single `String` parameter with the hexadecimal
string of the raw transaction's bytes and returns a
`SentTransactionHash` wrapper type that's just a hexadecimal `String` of
the sent transaction's hash.

* Add mempool service instance to `RpcImpl`

Use a type parameter to represent the mempool service using the
interface defined by `zebra-node-services`.

* Update test vector to use a mock mempool service

Update the test to be compatible with the changes to `RpcImpl`. The mock
mempool service is expected to not be used during the test.

* Use a `tower::Buffer` for the mempool service

Make it simpler to send requests to the service in a concurrent manner.

* Return a `Future` from `send_raw_transaction`

Make the call asynchronous.

* Implement `sendrawtransaction` RPC

Deserialize the transaction and send it to be queued for verification
and subsequent inclusion in the mempool.

* Test if mempool receives sent raw transaction

Use a mock service as the mempool service and check that it receives a
sent raw transaction.

* Test using non-hexadecimal string parameter

The method should return an error.

* Test with bytes that fail deserialization

Check that the method returns an invalid parameters error if the input
can't be deserialized as a `Transaction`.

* Test if mempool errors are forwarded to caller

Mempool service errors should be sent back to the remote caller as
server errors.

* Test transactions rejected by the mempool service

Transactions that are rejected by the mempool service should result in
a server error being sent to the caller.

* Improve error message

Add the word "structurally" to make it clear that the issue is in the
transaction's deserialization.

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>

* Add note regarding missing `allowhighfees` param.

The parameter isn't supported yet because `lightwalletd` doesn't use it.

* Update the documentation to be consistent

Follow the convention adopted by the `get_info` RPC method.

* Remove mempool service usage line

It contained incomplete information that's not really necessary.

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>

* Fix formatting

`rustfmt` was not executed on the file for the previous commit because I
had edited it on GitHub.

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2022-03-04 03:00:24 -04:00
Alfredo Garcia 675fa3621d
tests(rpc): Add some RPC acceptance tests (#3641)
* tests(rpc): add an rpc endpoint test

* tests(rpc): add an rpc port conflict test

* tests(rpc): refactor some imports

* tests(rpc): fix failures, make test more complete

* tests(rpc): parse json response for better coverage

* tests(rpc): change request

* tests(rpc): wait until port is open in rpc_endpoint test

* tests(rpc): add a delay between launching 2 nodes

* tests(rpc): try 5 seconds

* refactor(rpc): open rpc server faster

* tests(rpc): extend `LAUNCH_DELAY` to 15 seconds

* fix(rpc): disable rpc_conflict test for windows

* fix(ci): skip the RPC tests if the network is disabled

* rustfmt

* fix(zebrad/test): test function return type

* tests(rpc): print server output in assert

* fix(rpc): fix acceptance test looking for string in `build` field

* fix(rpc): reduce the number of acceptable characters in version output

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-03-03 00:39:47 +00:00
teor 744aca9d45
7. test(database): snapshot raw RocksDB column family data (#3630)
* refactor(state): split database access into modules by Zebra types

Also split the genesis block check from the genesis note commitment trees.

* test(db): snapshot column family names

* fix(db): assert that the default column family is empty on open and close

* feat(test): apply `cargo insta` settings to all tests

* doc(db/test): improve test docs

* test(db): snapshot column family data for the empty state

* refactor(db/test): split out the raw database snapshot

* test(db): snapshot raw database for blocks 0-2

* test(db): initial serialized snapshot data for raw database

* test(db): tweak snapshot file names

* test(db): rename snapshots for consistency

* test(db): store empty column families in a single snapshot

* test(db): simplify snapshot files by combining empty snapshots

* doc(db/test): put comment in a better place

* refactor(db): fastmod assert_default_is_empty assert_default_cf_is_empty

* doc(test): explain when insta settings are needed

* fix(state/test): use the network to initialize the state

Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>

Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>
2022-03-02 02:44:39 +00:00
dependabot[bot] 30cc048166
build(deps): bump secp256k1 from 0.21.2 to 0.21.3 (#3632)
Bumps [secp256k1](https://github.com/rust-bitcoin/rust-secp256k1) from 0.21.2 to 0.21.3.
- [Release notes](https://github.com/rust-bitcoin/rust-secp256k1/releases)
- [Changelog](https://github.com/rust-bitcoin/rust-secp256k1/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-bitcoin/rust-secp256k1/commits)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-02 00:49:09 +00:00
Alfredo Garcia b3eb38d279
feature(rpc): add real data to `getinfo` method (#3660)
* feature(rpc): add getinfo subversion field and getinfo docs

* feature(rpc): add getinfo build field

* refactor(rpc): replace the lazy_static

* docs(rpc): fic typo, add link to zcashd ticket

* tests(rpc): add getinfo unit test

* docs(rpc): complete comment
2022-03-01 03:32:32 +00:00
Janito Vaqueiro Ferreira Filho c24ea1fc3f
Refactor to create a new `zebra-node-services` crate (#3648)
* Create new empty `zebra-node-services` crate

The goal is to store the mempool `Request` and `Response` types so that
the `zebra-rpc` crate can interface with the mempool service without
having to import `zebrad`.

* Move `Gossip` mempool type into new crate

It is required by the `Request` type, which will be moved next.

* Add documentation to `Gossip` variants

Avoid having to add an exception to allow undocumented code.

* Move `mempool::Request` type to new crate

The first part of the service interface definition. Usages have been
changed to refer to the new crate directly, and since this refactor is
still incomplete, some `mp` aliases are used in a few places to refer to
the old module.

* Create an `UnboxMempoolError` helper trait

Centralize some common code to extract and downcast boxed mempool
errors. The `mempool::Response` will need to contain a `BoxError`
instead of a `MempoolError` when it is moved to the
`zebra-node-services` crate, so this prepares the tests to be updated
with less changes.

* Use `UnboxMempoolError` in tests

Make the necessary changes so that the tests are ready to support a
`BoxError` in the `mempool::Response` type.

* Use `BoxError` in `mempool::Response`

Prepare it to be moved to the `zebra-node-services` crate.

* Move `mempool::Response` to `zebra-node-services`

Update usages to import from the new crate directly.

* Remove `mp` aliases for mempool component module

Use any internal types directly instead.

* Replace `tower::BoxService` with custom alias

Remove the dependency of `zebra-node-services` on `tower`.

* Move `Gossip` into a separate `sub-module`

Keep only the main `Request` and `Response` types in the `mempool`
module.

* Use `crate::BoxError` instead of `tower::BoxError`

Follow the existing convention.

* Add missing `gossip.rs` module file

It was missing from a previous refactor commit.
2022-02-25 21:43:21 +00:00
dependabot[bot] fc7ecfea3b
build(deps): bump semver from 1.0.5 to 1.0.6 (#3610)
Bumps [semver](https://github.com/dtolnay/semver) from 1.0.5 to 1.0.6.
- [Release notes](https://github.com/dtolnay/semver/releases)
- [Commits](https://github.com/dtolnay/semver/compare/1.0.5...1.0.6)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-22 22:18:16 +00:00
Alfredo Garcia 8e36686cc3
feature(rpc): add an rpc server to Zebra (#3589)
* feature(rpc): add an rpc component

* feat(rpc): add a stub for getblockchaininfo

This is the first RPC used by lightwalletd, so we need it for testing.

* fix(rpc): remove non-standard "jsonrpc: 1.0" from lightwalletd

* fix(rpc): re-enable default RPC security checks

* deps(rpc): remove not needed dependency

* fix(rpc): check if RPC task has stopped

* fix(rpc): reduce config by using Option

* fix(rpc): use tokio executor

* security(rpc): turn off rpc by default

* docs(rpc): update a TODO comment

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

* fix(rpc): blocking tasks

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

* rename(rpc): rpc.rs to methods.rs

* refactor(rpc): move the server to the zebra-rpc crate

* fix(rpc): clippy derive Default for RPC Config

* fix(dependencies): remove unused dependency features in zebra-rpc

We expect to use all the listed tokio features
to implement and test RPC methods.

* doc(rpc): fix testnet port, add security note

* fix(rpc): change Rust function names and update method doc TODOs

* fix(rpc): add "TODO" to fake RPC responses

* doc(rpc): update module docs

* fix(rpc): simplify server struct derives

* fix(rpc): simplify server code

* doc(rpc): explain how request fixes securely handle user-supplied data

* refactor(rpc): move the compatibility fix to a separate module

* fix(rpc): move the open log inside the spawn, and instrument it

* doc(rpc): fix toml format and provide a config example

Co-authored-by: teor <teor@riseup.net>
2022-02-22 08:26:29 -03:00
dependabot[bot] eaf0b6add4
build(deps): bump sha2 from 0.9.8 to 0.9.9 (#3585)
Bumps [sha2](https://github.com/RustCrypto/hashes) from 0.9.8 to 0.9.9.
- [Release notes](https://github.com/RustCrypto/hashes/releases)
- [Commits](https://github.com/RustCrypto/hashes/compare/sha2-v0.9.8...sha2-v0.9.9)

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

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-02-22 05:36:14 +00:00
Conrado Gouvea f6edcc4c92
replace unmantained multiset with mset (#3595)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-22 01:17:21 +00:00
Marek 2253f0121b
v1.0.0 beta.5 release (#3586)
* Increment the version numbers

* Use the new tag in `README.md` and `install.md`

* Update README.md

* Update CHANGELOG

* Add new PRs to the CHANGELOG
2022-02-21 14:29:34 +00:00
teor 2ec0ac62a4
fix(state): use the new `increase_nofile_limit` function from rlimit 0.7.0 (#3539)
Also:
- upgrades to rlimit 0.7.0
- updates types to match the breaking changes in rlimit
- deletes a manual implementation that was similar to `increase_nofile_limit`,
  but not as good on macOS and some BSDs

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-21 00:20:29 +00:00
dependabot[bot] 61041296fc
build(deps): bump tower from 0.4.11 to 0.4.12 (#3572)
Bumps [tower](https://github.com/tower-rs/tower) from 0.4.11 to 0.4.12.
- [Release notes](https://github.com/tower-rs/tower/releases)
- [Commits](https://github.com/tower-rs/tower/compare/tower-0.4.11...tower-0.4.12)

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

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-02-18 03:53:30 +00:00
teor 5c60528b84
fix(test): make full sync test more accurate (#3555)
* feat(log): log current height when logging sync progress

* fix(test): log the specific error when full sync tests fail

* doc(start): remove an obsolete TODO

We can't decrease this log level, because the tests rely on it.

* fix(test): wait until mempool activates in full sync tests

Changes the log message and log test so that the test only finishes
when the mempool has activated.

There is still a race condition here, between the log timer and
mempool activation. But it should be very rare, because the mempool
is activated immediately when `is_close_to_tip()` becomes true.

* fix(test): warn when Zebra stalls below the maximum checkpoint height

This also improves the full sync tests,
because the warning is checked before logging a successful sync.

* feat(log): warn when sync stalls downloading the genesis block

* fix(test): warn when the state hasn't committed a block for a long time

This also improves the full sync tests,
because the warning is checked before logging a successful sync.

* doc(test): update some sync acceptance test comments

* fix(log): use Display formatting to log chrono::Duration

Debug formatting is complicated and hard to read.

* fix(log): stop saying that we've activated the mempool without checking it

We're not checking if the mempool is active, so we can't say that.

* fix(log): minor tidying and TODOs

* fix(doc): fix a typo in the tests

* fix(log): explain the post-checkpoint blocks in progress warning calculations

* fix(doc): explain what could happen if we don't wait for extra blocks

* fix(log): add a percent symbol to a percent log

Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>

Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-18 02:00:24 +00:00
dependabot[bot] 036a4b4b09
build(deps): bump hyper from 0.14.16 to 0.14.17 (#3517)
Bumps [hyper](https://github.com/hyperium/hyper) from 0.14.16 to 0.14.17.
- [Release notes](https://github.com/hyperium/hyper/releases)
- [Changelog](https://github.com/hyperium/hyper/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/hyper/compare/v0.14.16...v0.14.17)

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

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-02-16 09:20:36 +00:00
dependabot[bot] 7c35e07c92
build(deps): bump rand from 0.8.4 to 0.8.5 (#3529)
Bumps [rand](https://github.com/rust-random/rand) from 0.8.4 to 0.8.5.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/compare/0.8.4...0.8.5)

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

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-02-16 07:50:55 +00:00
dependabot[bot] d9acbeecb6
build(deps): bump inferno from 0.10.11 to 0.10.12 (#3532)
Bumps [inferno](https://github.com/jonhoo/inferno) from 0.10.11 to 0.10.12.
- [Release notes](https://github.com/jonhoo/inferno/releases)
- [Changelog](https://github.com/jonhoo/inferno/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jonhoo/inferno/compare/v0.10.11...v0.10.12)

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

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-02-15 02:47:26 +00:00
dependabot[bot] b4d708089b
build(deps): bump serde_json from 1.0.78 to 1.0.79 (#3531)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.78 to 1.0.79.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.78...v1.0.79)

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

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-02-15 00:44:24 +00:00
teor 1ffb7a5cd0
fix(network): allow more inbound than outbound connections (#3527)
* fix(network): allow more inbound than outbound connections

* refactor(network): access constants using consistent paths

* fixup! fix(network): allow more inbound than outbound connections

* fixup! fixup! fix(network): allow more inbound than outbound connections

* refactor(network): convert to standard test module layout

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-14 16:00:31 +00:00
dependabot[bot] aa0fa2fd88
build(deps): bump tokio-util from 0.6.9 to 0.7.0 (#3518)
Bumps [tokio-util](https://github.com/tokio-rs/tokio) from 0.6.9 to 0.7.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/commits)

---
updated-dependencies:
- dependency-name: tokio-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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-02-14 03:51:25 +00:00
dependabot[bot] fc3cba24f8
Bump futures from 0.3.19 to 0.3.21 (#3472)
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.19 to 0.3.21.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.19...0.3.21)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-08 15:36:28 +00:00
dependabot[bot] 1a14baf8e7
Bump inferno from 0.10.10 to 0.10.11 (#3473)
Bumps [inferno](https://github.com/jonhoo/inferno) from 0.10.10 to 0.10.11.
- [Release notes](https://github.com/jonhoo/inferno/releases)
- [Changelog](https://github.com/jonhoo/inferno/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jonhoo/inferno/compare/v0.10.10...v0.10.11)

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

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-02-07 18:52:51 +00:00
dependabot[bot] 56c0237f68
Bump semver from 1.0.3 to 1.0.5 (#3474)
Bumps [semver](https://github.com/dtolnay/semver) from 1.0.3 to 1.0.5.
- [Release notes](https://github.com/dtolnay/semver/releases)
- [Commits](https://github.com/dtolnay/semver/compare/1.0.3...1.0.5)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-07 17:38:41 +00:00
dependabot[bot] 7b401ddeb0
Bump uint from 0.9.2 to 0.9.3 (#3468)
Bumps [uint](https://github.com/paritytech/parity-common) from 0.9.2 to 0.9.3.
- [Release notes](https://github.com/paritytech/parity-common/releases)
- [Commits](https://github.com/paritytech/parity-common/compare/uint-v0.9.2...uint-v0.9.3)

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

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-02-05 05:06:51 +00:00
dependabot[bot] 8939ddf3d8
Bump tokio from 1.15.0 to 1.16.1 (#3434)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.15.0 to 1.16.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.15.0...tokio-1.16.1)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-30 19:53:07 +00:00
dependabot[bot] ea01b92848
Bump vergen from 6.0.1 to 6.0.2 (#3433)
Bumps [vergen](https://github.com/rustyhorde/vergen) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/rustyhorde/vergen/releases)
- [Commits](https://github.com/rustyhorde/vergen/compare/6.0.1...6.0.2)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-28 21:54:50 +00:00
dependabot[bot] 188e440a96
Bump uint from 0.9.1 to 0.9.2 (#3435)
Bumps [uint](https://github.com/paritytech/parity-common) from 0.9.1 to 0.9.2.
- [Release notes](https://github.com/paritytech/parity-common/releases)
- [Commits](https://github.com/paritytech/parity-common/compare/uint-v0.9.1...uint-v0.9.2)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-28 21:40:01 +00:00
dependabot[bot] f00ced3283
Bump serde_json from 1.0.75 to 1.0.78 (#3389)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.75 to 1.0.78.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.75...v1.0.78)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-27 00:24:53 +00:00
Janito Vaqueiro Ferreira Filho f6de7faae1
Release v1.0.0 beta.4 (#3403)
* Updating zebra-test to v1.0.0-beta.4

* Updating tower-fallback to v0.2.16

* Updating tower-batch to v0.2.20

* Updating zebra-chain to v1.0.0-beta.4

* Updating zebra-script to v1.0.0-beta.4

* Updating zebra-network to v1.0.0-beta.4

* Updating zebra-state to v1.0.0-beta.4

* Updating zebra-consensus to v1.0.0-beta.4

* Updating zebra-utils to v1.0.0-beta.4

* Updating zebrad to v1.0.0-beta.4

* Update Cargo.lock with updated crate versions

* Add section for 1.0.0-beta.4 in the CHANGELOG

* Update CHANGELOG.md

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

* Update README.md

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

* Update book/src/user/install.md

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

* Update release description to mention Rust 2021

Update the changelog to mention that all crates now use Rust 2021
Edition.

* Elaborate on Section 3.6 documentation entry

Add the title of the section and mention that it's a section of the
Zcash protocol specification.

* Make changelog entries consistent

Use the same format for entries related to consensus rule documentation.

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

* Update README about validated consensus rules

Zebra now validates all documented consensus rules.

* Add changelog entry for newly merged PR

Describe the security fix in the changelog.

Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
Co-authored-by: teor <teor@riseup.net>
Co-authored-by: Marek <mail@marek.onl>
2022-01-26 21:39:41 +00:00
dependabot[bot] 709d75b5b9
Bump vergen from 6.0.0 to 6.0.1 (#3396)
Bumps [vergen](https://github.com/rustyhorde/vergen) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/rustyhorde/vergen/releases)
- [Commits](https://github.com/rustyhorde/vergen/compare/6.0.0...6.0.1)

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

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-01-26 01:07:52 +00:00
dependabot[bot] 49623ba862
Bump regex from 1.4.6 to 1.5.4 (#3354)
Bumps [regex](https://github.com/rust-lang/regex) from 1.4.6 to 1.5.4.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.4.6...1.5.4)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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-01-25 19:54:26 +00:00
teor 499ae89c80
T2. Add isolated Tor connection API, but don't enable it by default (#3303)
* Add arti as a zebra-network dependency

* Add a method for isolated anonymised Tor connections to a specific hostname

* Add tests for isolated tor connections

* Use a shared tor client instance for all isolated connections

* Silence a spurious tor warning in tests

* Make tor support optional, activate it via a new "tor" feature

* Extra Cargo.lock changes

* fastmod AsyncReadWrite PeerTransport zebra*

* Remove unnecessary PeerTransport generics

* Refactor common test code into a function

* Don't drop the stream until the end of the test

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-01-25 01:46:31 +00:00
teor 3cc896feaf
Make the zcash_script versions in Cargo.lock and Cargo.toml match (#3387) 2022-01-24 10:39:12 -03:00
Alfredo Garcia fb724d3b24
Update rocksdb (#3363)
* update rocksdb

* use merged commit as rev

Co-authored-by: Conrado Gouvea <conradoplg@gmail.com>

* retrigger gcp build

Co-authored-by: Conrado Gouvea <conradoplg@gmail.com>
Co-authored-by: Conrado Gouvea <conrado@zfnd.org>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-01-19 20:55:34 +00:00
dependabot[bot] 6f0c495416
Bump structopt from 0.3.25 to 0.3.26 (#3364)
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.25 to 0.3.26.
- [Release notes](https://github.com/TeXitoi/structopt/releases)
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.25...v0.3.26)

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

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-01-19 15:50:54 +00:00
dependabot[bot] 0db9eea4fa
Bump serde_json from 1.0.74 to 1.0.75 (#3353)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.74 to 1.0.75.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.74...v1.0.75)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-19 14:04:30 +00:00
teor 6c787dd188
T1. Fix isolated connection bugs, improve tests, upgrade dependencies (#3302)
* Make handshakes generic over AsyncRead + AsyncWrite

* Simplify connect_isolated using ServiceExt::map_err and BoxError

* Move isolated network tests to their own module

* Improve isolated TCP connection tests

* Add an in-memory connection test that uses AsyncReadWrite

* Support connect_isolated on testnet

* Add a wrapper function for isolated TCP connections to an IP address

* Run test tasks for a while, and clean up after them

* Upgrade Zebra dependencies to be compatible with arti, but don't add arti yet

* Fix deny.toml

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Conrado Gouvea <conrado@zfnd.org>
2022-01-14 19:34:59 +00:00
dependabot[bot] b3a487ccff
Bump inferno from 0.10.9 to 0.10.10 (#3331)
Bumps [inferno](https://github.com/jonhoo/inferno) from 0.10.9 to 0.10.10.
- [Release notes](https://github.com/jonhoo/inferno/releases)
- [Changelog](https://github.com/jonhoo/inferno/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jonhoo/inferno/commits)

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

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-01-14 15:54:50 +00:00
Janito Vaqueiro Ferreira Filho 51c6550602
Replace `tempdir` dependency with `tempfile` (#3337)
* Use `testdir()` instead of `TempDir::new()`

Reduce repeated code and make it easier to change from using `tempdir`
to use `tempfile` instead.

* Replace `tempdir` with `tempfile` in `zebrad`

Use `tempfile`'s `TempDir` instead.

* Use `tempdir()` instead of `TempDir::new()`

Reduce repeated code and make it easier to upgrade to `tempfile`.

* Use `tempfile` instead of `tempdir`

Replace obsoleted `tempdir` dependency with `tempfile`.

* Use `tempfile` instead of `tempdir`

Replace obsoleted `tempdir` dependency with `tempfile`.

* Update `Cargo.lock`

Update it now that `tempdir` has been replaced with `tempfile`.

* Remove `tempdir` from `deny.toml` exceptions

Ban duplicate versions of the `tempdir` dependency.

* Remove `inferno` from `deny.toml` exceptions

It apparently isn't needed anymore.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
2022-01-14 15:11:23 +00:00
dependabot[bot] 3ba0326c51
Bump secp256k1 from 0.20.3 to 0.21.2 (#3326)
Bumps [secp256k1](https://github.com/rust-bitcoin/rust-secp256k1) from 0.20.3 to 0.21.2.
- [Release notes](https://github.com/rust-bitcoin/rust-secp256k1/releases)
- [Changelog](https://github.com/rust-bitcoin/rust-secp256k1/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-bitcoin/rust-secp256k1/commits)

---
updated-dependencies:
- dependency-name: secp256k1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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-01-14 14:25:12 +00:00
dependabot[bot] f731c91e9b
Bump indexmap from 1.7.0 to 1.8.0 (#3335)
Bumps [indexmap](https://github.com/bluss/indexmap) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/bluss/indexmap/releases)
- [Changelog](https://github.com/bluss/indexmap/blob/master/RELEASES.rst)
- [Commits](https://github.com/bluss/indexmap/compare/1.7.0...1.8.0)

---
updated-dependencies:
- dependency-name: indexmap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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-01-14 13:42:43 +00:00
Deirdre Connolly e9c2125e7e
Upgrade to latest redjubjub commit, hasn't been published to crates.io yet (#3333)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-01-13 23:59:59 +00:00
teor d076b999f3
Fix syncer download order and add sync tests (#3168)
* Refactor so that RetryLimit::Future is std::marker::Sync

* Make the syncer future std::marker::Send by spawning tips futures

* Download synced blocks in chain order, not HashSet order

* Improve MockService failure messages

* Add closure-based responses to the MockService API

* Move MockChainTip to zebra-chain

* Add a MockChainTipSender type alias

* Support MockChainTip in ChainSync and its downloader

* Add syncer tests for obtain tips, extend tips, and wrong block hashes

* Add block too high tests for obtain tips and extend tips

* Add syncer tests for duplicate FindBlocks response hashes

* Allow longer request delays for mocked services in syncer tests
2022-01-11 14:11:35 -03:00
dependabot[bot] 9b127168eb
Bump serde from 1.0.132 to 1.0.133 (#3313)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.132 to 1.0.133.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.132...v1.0.133)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marek <mail@marek.onl>
2022-01-04 14:26:58 +00:00
dependabot[bot] 77a1c686c6
Bump serde_json from 1.0.73 to 1.0.74 (#3312)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.73 to 1.0.74.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.73...v1.0.74)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marek <mail@marek.onl>
2022-01-04 14:57:49 +01:00
dependabot[bot] 454897bc33
Bump inferno from 0.10.8 to 0.10.9 (#3268) 2022-01-03 13:42:35 +01:00
teor 534494f075
Upgrade zcash_proofs to get new derived traits (#3308) 2021-12-30 14:38:21 -03:00
dependabot[bot] a3cbca6245
Bump owo-colors from 3.1.1 to 3.2.0 (#3299)
Bumps [owo-colors](https://github.com/jam1garner/owo-colors) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/jam1garner/owo-colors/releases)
- [Commits](https://github.com/jam1garner/owo-colors/compare/v3.1.1...v3.2.0)

---
updated-dependencies:
- dependency-name: owo-colors
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-28 11:06:14 +10:00
dependabot[bot] 31b083ff27
Bump serde from 1.0.131 to 1.0.132 (#3259)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.131 to 1.0.132.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.131...v1.0.132)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-22 02:48:57 +00:00
Conrado Gouvea 074011eaad
Bump futures crates to 0.3.19 (#3276)
Co-authored-by: teor <teor@riseup.net>
2021-12-21 23:12:58 +00:00