Commit Graph

3305 Commits

Author SHA1 Message Date
teor 699c0625f3
fix(test/full-sync): ignore snapshot test file changes (#3756) 2022-03-06 21:22:46 -04:00
dependabot[bot] 26d6ef9aa0
build(deps): bump docker/login-action from 1.12.0 to 1.13.0 (#3570)
Bumps [docker/login-action](https://github.com/docker/login-action) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1.12.0...v1.13.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>

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-03-05 17:34:54 +00:00
Conrado Gouvea 2f6a48bed8
fix(tests): use TEST_FAKE_ACTIVATION_HEIGHTS at runtime and fix tests (#3749)
* fix: check TEST_FAKE_ACTIVATION_HEIGHTS at runtime

* fix(tests): add TEST_FAKE_ACTIVATION_HEIGHTS variable

This variable ensures the test is activated in the `test-fake-activation-heights` step

* fix(docker): do not run specific tests by default in entrypoint.sh

* fix(test): remove extra TEST_FULL_SYNC argument

* imp(timeout): wait for an average build time

Co-authored-by: Gustavo Valverde <gustavo@iterativo.do>
2022-03-05 13:32:46 -04:00
Deirdre Connolly 3238ddffa7 Extra $ 2022-03-04 16:40:19 -05:00
Deirdre Connolly f875742766 Fix CD 'Deploy mainnet nodes' job conditional 2022-03-04 16:40:19 -05:00
teor 4cb0f36ae5
doc(ci): explain the different ways .txt files are used (#3743) 2022-03-04 15:55:49 -04:00
Gustavo Valverde d9a0f9d657
fix(build, deployment): missing job key and timeout bump for build (#3744)
* fix: add missing job key

* fix(arm64): bump timeout to build without cache

* fix(deployment): apply changes made in 5004c4d3a1

* fix: remove uneeded condition

* refactor(tests):  make vm names refer the test name

This also adds a build step for full sync, as there won't be a reference image when using workflow_dispatch

* fix(deployment): testing depends on the built image
2022-03-04 15:55:32 -04:00
teor f6db32bcec
1. test(db): add snapshot tests for high-level block and transaction APIs (#3691)
* test(db): snapshot finalized tips

* test(db): snapshot block heights and hashes

* test(db): snapshot block data

* test(db): snapshot transaction hashes and data

* test(db): assert that blocks and transactions are in chain order

* clippy(db/test): cargo clippy --fix

* clippy(db/test): replace &Vec with &[_]
2022-03-04 15:55:11 -04:00
Gustavo Valverde 15949c8c37
refactor(test): decouple full sync from other tests (#3735)
* refactor(test): decouple full sync from other tests

As the full sync requires to be run just once and isolated, we're running this test in a separate workflow, after a PR has been approved.

* fix: revert to previous conditions in job regenerate-stateful-disks

* fix(condition): get disk sha if regeneration is not executed

* fix: typo

* Update .github/workflows/test-full-sync.yml

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

* fix(build): bump build time for arm64

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2022-03-04 08:12:22 +00:00
Gustavo Valverde c822f0ab0c
fix(build): arm64 add extra time when building from scratch (#3738) 2022-03-04 07:27:36 +00:00
teor ac662df179
fix(zebrad/ci): skip RPC conflict test when network tests are disabled (#3726) 2022-03-04 03:01:41 -04:00
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
Gustavo Valverde 5004c4d3a1
refactor(build): use OCI Image Format Specification for labels (#3728)
* refactor(build): use OCI Image Format Specification for labels

This should also fix when an image gets built multiple times using the cache, as each image differs in labels

* refactor(tags): use PR context sha and ref

Remove the needed of PR Head SHA and Ref, as those can cause conflict depending on how the branch name has been established
2022-03-04 02:33:29 -04:00
teor e7af51db3a
fix(deps): remove an outdated dependabot ignore rule (#3719)
We can use dependabot commands instead.
2022-03-03 13:04:25 +00:00
teor 9ce3a9a62f
fix(ci): check for adityapk00/lightwalletd behaviour in test harness (#3705)
* fix(ci): remove an unused trigger path

* doc(ci): explain lightwalletd trigger paths

* fix(test): check for adityapk00/lightwalletd behaviour in test harness

* fix(ci): work around buildx command error

* fix(ci): revert the workaround
2022-03-03 13:03:06 +00:00
teor 5cc7f46200
fix(codeowners): avoid multiple reviewer assignments (#3718)
Assign more code to the largest review team, to avoid multiple reviewer assignments.
2022-03-03 12:50:10 +00: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
Gustavo Valverde c176e2a423
feat(build): add arm64 support with cross-compilation (#3678)
* add(actions): lightwalletd continous integrations

* refactor(actions): build lightwalletd and reuse it in zebra

- Download lightwalletd source code
- Create a new Dockerfile for lightwalletd
- Use lightwalletd binary in Zebra's image
- Create a specific step to build/update lightwalletd
- Add lightwalletd integration test to the test suite
- Remove lightwalletd.yml, as it was harder to control

* refactor(docker): organize Dockerfiles and remove unused

Fixes: #3344

* feat(build): add arrm64 support

* fix(build): do not install google-compute-engine in arm64

This package is not available for this platform

* fix(build): do not build arm64 for tests

* fix(condition): indent for better visibility

* fix(condition): wrong use of operators
2022-03-03 00:39:41 +00:00
teor 30b5468f2f
fix(review): only assign one reviewer to general Rust reviews (#3708)
If we assign two teams, GitHub assigns two reviewers.
2022-03-02 23:07:20 +00:00
Gustavo Valverde dcbf8ba545
fix(build): use the right multistage target (#3700) 2022-03-02 16:53:12 +00:00
teor 6b31f5b454
fix(ci): update CI job path triggers (#3692)
* ci(test): re-run tests when snapshot data changes

* fix(ci): rebuild state when disk format changes

* fix(ci): rebuild rust docs when code or dependencies change

* doc(ci): explain why we run jobs when files change

Co-authored-by: Gustavo Valverde <gustavo@iterativo.do>
2022-03-02 14:23:05 +00:00
Gustavo Valverde db966f27fa
feat(actions)!: add full sync test (#3582)
* add(tests): full sync test

* fix(test): add build

* fix(deploy): escape double dashes '--' correctly

* fix(test): remove unexpected --no-capture arg

error: Found argument '--nocapture' which wasn't expected, or isn't valid in this context

* refactor(docker): use default executable as entrypoint

* refactor(startup): add a custom entrypoint

* fix(test): add missing TEST_FULL_SYNC variable

* test(timeout): use the biggest machine

* fix

* fix(deploy): use latest successful image

* typo

* refactor(docker): generate config file at startup

* revert(build): changes were made to docker

* fix(docker): send variables correctly to the entrypoint

* test different conf file approach

* fix(env): add RUN_TEST env variable

* ref: use previous approach

* fix(color): use environment variable

* fix(resources): use our normal machine size

* fix(ci): double CPU and RAM for full sync test

* fix(test): check for zebrad test output in the correct order

The mempool is only activated once, so we must check for that log first.
After mempool activation, the stop regex is logged at least once.
(It might be logged before as well, but we can't rely on that.)

When checking that the mempool didn't activate,
wait for the `zebrad` command to exit,
then check the entire log.

* fix(ci): run full sync test with full compiler optimisations

* fix(tests): reintroduce tests and run full sync on approval

* fix(tests): reduce the changelog

Co-authored-by: teor <teor@riseup.net>
2022-03-02 14:15:24 +00:00
Gustavo Valverde a0c451223f
feat(lightwalletd): add build and CI pipeline (#3657)
* add(actions): lightwalletd continous integrations

* refactor(actions): build lightwalletd and reuse it in zebra

- Download lightwalletd source code
- Create a new Dockerfile for lightwalletd
- Use lightwalletd binary in Zebra's image
- Create a specific step to build/update lightwalletd
- Add lightwalletd integration test to the test suite
- Remove lightwalletd.yml, as it was harder to control

* fix(build): remove extra port being exposed

* fix(lightwalletd): test should be after `--` in cargo test

* revert(lint): do not lint external code as it can be confusing

* fix(test): lightwalletd_integration test is not ignored

* docs(docker): clarify the addition of unused args

* refactor(docker): organize Dockerfiles and remove unused

Fixes: #3344

* fix(actions): activate workflows on correct path changes

* test

* revert previous commit

* feat(build): add arm64 support with cross-compilation (#3659)

* feat(build): add arrm64 support

* fix(build): do not install google-compute-engine in arm64

This package is not available for this platform

* fix(build): do not build arm64 for tests

* fix(changes): reduce changelog

* Revert "feat(build): add arm64 support with cross-compilation (#3659)"

This reverts commit 291e00c405.
2022-03-02 09:00:55 +00:00
teor d08b13da73
fix(zebrad/test): use the correct stop condition for the cached state tests (#3688) 2022-03-02 08:53:00 +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
teor 41d61a62f9
refactor(test): split lightwalletd test launch into separate methods (#3628)
* fix(test): only run lightwalletd test when the ZEBRA_TEST_LIGHTWALLETD env var is set

* fix(test): actually skip the test

* doc(zebrad): add some test TODOs

* doc(test): document zebrad-specific process launch methods

* refactor(zebrad): split lightwalletd launch into its own testing methods

* fix(zebrad/test): simplify file writing

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

* refactor(zebrad/test): rename argument variables

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

* lint(zebrad/tests): remove unused import

* fix(zebrad/test): restore SocketAddr import that was removed on main

* rustfmt

* fix(zebrad/test): update integration test to match adityapk00/lightwalletd behaviour

* rustfmt

Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-03-02 02:01:57 +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
Gustavo Valverde 061d7da67c
feat(codeowners): add code reviewers to the repository (#3677)
* feat(codeowners): add code owners in repository

* fix(path): recently split out crate

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

* fix(teams): use reviewers instead of owners name

* fix(teams): wrong team name

* docs: use correct default explanation

* fix(path): add extra paths to devops team

Co-authored-by: teor <teor@riseup.net>
2022-03-01 14:50:18 +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
dependabot[bot] a8a52125d0
build(deps): bump tj-actions/changed-files from 14.4 to 17.2 (#3667)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 14.4 to 17.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/v14.4...v17.2)

---
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>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-28 21:38:30 -04:00
teor f8a4021c07
refactor(state): split database access into modules by Zebra types (#3617)
Also split the genesis block check from the genesis note commitment trees.
2022-02-28 22:21:03 +00:00
teor 729535cf25
fix(test): check for zebrad test output in the correct order (#3643)
The mempool is only activated once, so we must check for that log first.
After mempool activation, the stop regex is logged at least once.
(It might be logged before as well, but we can't rely on that.)

When checking that the mempool didn't activate,
wait for the `zebrad` command to exit,
then check the entire log.
2022-02-25 23:36:20 +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
teor 4fc10e5257
5. refactor(state): split database writes into separate functions (#3607)
* fix(state): mark DiskWriteBatch as must_use

* doc(state): add TODOs for moving database reads to blocking threads

* doc(state): minor comment tweaks

* refactor(state): split write batch into block, transactions, chain history

* refactor(state): split out a genesis block write method

* refactor(state): just use the empty note commitment trees directly

* refactor(state): split transaction writes into transparent, nullifiers, trees

And change DiskWriteBatch methods to take `&mut self`.

* refactor(state): split chain value pool writes out of history writes

* refactor(state): combine note commitment trees into an agrument struct

* refactor(state): split history and note commitment updates

* refactor(state): calculate current tip height and remove that argument
2022-02-25 08:14:00 +00:00
teor 397ba1fef7
doc(state): explain how Zebra stays below Windows open file limits (#3590) 2022-02-24 06:23:21 +00:00
teor 957a150254
fix(test): only run lightwalletd test when the ZEBRA_TEST_LIGHTWALLETD env var is set (#3627)
* fix(test): only run lightwalletd test when the ZEBRA_TEST_LIGHTWALLETD env var is set

* fix(test): actually skip the test
2022-02-24 04:28:09 +00:00
Conrado Gouvea e75fe2c42f
include listing not-mentioned PRs and not-bumped crates in the release checklist (#3621) 2022-02-23 18:18:30 +00:00
teor 78a05bcaf0
test(lightwalletd): add a lightwalletd integration test (#3619)
* test(lightwalletd): add a lightwalletd integration test

* fix(lightwalletd): ignore the lightwalletd integration test by default
2022-02-23 11:52:30 +00:00
teor 970f88ffcb
doc(utils): simplify zebra-checkpoints summary (#3612)
* doc(utils): Simplify zebra-checkpoints summary

And fix some documentation mistakes.

* doc(utils): fix the install command
2022-02-23 02:22:21 +00:00
teor 6221256da4
security(rust): forbid non-ascii identifiers (#3615)
Rust supports non-ascii identifiers, but we don't use them in Zebra.

But similar non-ascii characters can be a security risk,
particularly when using some editors or GitHub reviews.
2022-02-23 02:22:12 +00:00
teor dd9ba1e5a3
fix(tests): use all available checkpoints in the full sync test (#3613)
This speeds up syncing so it fits within the GitHub actions time limit.

Also explicitly sets the checkpoint config in all the sync tests.
2022-02-23 02:20:52 +00:00
teor 22b8a6003c
3. refactor(state): move database reads and writes to a new zebra_db module (#3579)
* refactor(state): move disk_db reads to a new zebra_db module

* refactor(state): make finalized value pool method names consistent

* refactor(state): split database writes into the zebra_db module

* refactor(state): move the block batch method to DiskWriteBatch

* refactor(state): actually add the zebra_db module

Unfortunately, I've lost the interim changes to this file,
so this commit might be the only one that compiles.

* refactor(state): add a newly created file to the cached state CI job
2022-02-23 00:43:41 +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
teor 32017f992b
2. refactor(state): move all RocksDB API calls to the disk_db module (#3578)
* refactor(state): move RocksDB-specific initialization to a new module

* refactor(state): move RocksDB-specific shutdown to a new module

* refactor(state): temporarily allow RocksDB-specific reads and writes, without a new module

Unlike the last few commits, this one actually compiles.

* refactor(state): add a DiskWriteBatch wrapper for RocksDB writes

* refactor(state): move finalized state test methods to a test module
2022-02-22 12:59:44 +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
teor 7e585b09ab
fix(consensus): update Zebra's hard-coded blockchain checkpoint lists (#3606)
* doc(utils): remove trailing spaces

* fix(consensus): update Zebra's hard-coded checkpoint lists

This updates the checkpoint lists as at 2022-02-22:
- mainnet: to the latest finalized tip
- testnet: to the latest Canopy checkpoint,
  because we expect a NU5 testnet rollback

* doc(consensus): Add example commands to update the checkpoints
2022-02-22 05:53:44 -04:00
Deirdre Connolly 35f9b17710
fix(actions): run coverage collection when pushing to main (#3561)
* Run Coverage collection on main

Resolves #3533

* fix(coverage): just run coverage on specific file changes to main

Co-authored-by: Gustavo Valverde <gustavo@iterativo.do>
2022-02-22 09:48:00 +00: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
Conrado Gouvea b7b62af2f2
Document consensus rules from 4.6 Action Descriptions (#3549)
* docs: document consensus rules from 4.6 Action Descriptions

* Apply suggestions from code review

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

* Apply suggestions from code review

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

Co-authored-by: Marek <mail@marek.onl>
2022-02-21 23:49:32 +00:00