teor
e74ff18708
refactor: Move the checkpoint list tests to their own file
2020-07-31 07:21:43 +10:00
teor
5b9703f95a
fix: Avoid creating a CheckpointVerifier if it is not needed
...
Also:
* make sure the checkpoints cover all pre-Sapling blocks
* do some minor refactoring to reduce duplicate code
2020-07-30 13:30:18 +10:00
teor
fbeae99328
fix: Only warn on unexpected high blocks
...
High blocks are expected when we restart with most of the chain in our
state.
Also downgrade the message from warn to info.
2020-07-30 13:30:18 +10:00
Alfredo Garcia
89ef08793b
delete file
2020-07-29 19:44:21 -07:00
Alfredo Garcia
617f1d80ef
move docs to zebra book
2020-07-29 19:44:21 -07:00
Alfredo Garcia
6297a7cd19
document zebrad enviroment variables
2020-07-29 19:44:21 -07:00
Henry de Valence
ef0b200b82
restore Zebras to part of the name, not a comment
2020-07-29 18:46:47 -07:00
Jack Grigg
d1e0e1abf5
fix: Broadcast a valid BIP 14 user agent
...
Closes ZcashFoundation/zebra#791 .
2020-07-29 15:49:14 -04:00
dependabot[bot]
ce7f3e6c01
build(deps): bump sled from 0.34.0 to 0.34.2
...
Bumps [sled](https://github.com/spacejam/sled ) from 0.34.0 to 0.34.2.
- [Release notes](https://github.com/spacejam/sled/releases )
- [Changelog](https://github.com/spacejam/sled/blob/master/CHANGELOG.md )
- [Commits](https://github.com/spacejam/sled/compare/v0.34...v0.34.2 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-07-29 12:27:39 -04:00
teor
050c46388f
fix: Open the endpoints after the config is loaded
...
We get the injected TokioComponent dependency before the config is
loaded, so we can't use it to open the endpoints.
And we can't define after_config, because we use derive(Component).
So we work around these issues by opening the endpoints manually,
from the application's after_config.
2020-07-29 16:03:52 +10:00
teor
6be0f8ed2f
fix: Warn if the listener port is for the wrong network
...
We'll fix the underlying defaults in #660 , with the rest of the
listeners.
2020-07-29 16:03:52 +10:00
teor
e7437cc551
feature: Get endpoint addresses from config
2020-07-29 16:03:52 +10:00
teor
11090dbf91
feature: Separate Mainnet and Testnet state
2020-07-29 01:45:19 -04:00
teor
be054906ef
fix: Stop calling zcash-cli twice in zebra-checkpoints
...
Also:
* stop capturing zcash-cli stderr
* check subprocess exit status
* require valid UTF-8 from zcash-cli
* refactor out some repeated code
2020-07-28 22:34:08 -04:00
teor
cf4840c74a
doc: Add docs to zebra-utils
...
And `deny(missing_docs)`.
2020-07-28 22:34:08 -04:00
teor
cf0fd043d4
feature: Update mainnet and testnet checkpoints
2020-07-28 22:27:49 -04:00
teor
536668f993
fix: allow(dead_code) on some protocol version functions
2020-07-28 22:10:20 -04:00
teor
0ef8e38266
fix: Tweak the RFC template
...
* replace references to "(Rust) language" with Zebra, Zcash or project as appropriate
* talk about impacts on the broader ecosystem
2020-07-29 11:32:24 +10:00
dependabot[bot]
9a8fe2109f
build(deps): bump pin-project from 0.4.22 to 0.4.23
...
Bumps [pin-project](https://github.com/taiki-e/pin-project ) from 0.4.22 to 0.4.23.
- [Release notes](https://github.com/taiki-e/pin-project/releases )
- [Changelog](https://github.com/taiki-e/pin-project/blob/master/CHANGELOG.md )
- [Commits](https://github.com/taiki-e/pin-project/compare/v0.4.22...v0.4.23 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-07-28 17:27:25 -04:00
Henry de Valence
7d0a3debb6
chain: ensure impl Deserialize for Amount validates data.
...
This uses serde's try_from attribute to run deserialized values through the
TryFrom impl. Also adds a test to make sure that validation actually does
happen.
2020-07-28 12:20:40 -07:00
Henry de Valence
238dec51dd
network: do not export Builder
...
This is used to construct the Codec, which is an internal type. The
export was added in 4dc307f2
.
2020-07-28 11:10:15 -07:00
teor
396d209638
feature: Add the MinimumDifficulty consensus parameter
2020-07-28 10:34:41 +10:00
Henry de Valence
04044be6d1
tower-batch: test fallback verification example.
2020-07-27 14:52:06 -07:00
teor
1e787aecb9
feature: Check the previous block height in BlockVerifier
...
This is a temporary busy-waiting fix.
2020-07-27 14:14:44 -04:00
teor
2b1e7162b1
feature: Set the testnet Canopy upgrade height
...
See ZIP 251 and zcash/zips#385 for details.
Closes #756 .
2020-07-27 14:03:14 -04:00
teor
993532b604
feature: Add a "Genesis" network upgrade
...
We can use this network upgrade to implement different consensus rules
and chain context handling for genesis blocks.
Part of the chain state design in #682 .
2020-07-27 14:03:14 -04:00
teor
5ece62f0a5
fix: Update comments for Heartwood's hashChainHistoryRoot
2020-07-27 14:00:56 -04:00
teor
12cbe410f2
fix: Hide warn-level logs in the zebra-consensus tests
...
Unless RUST_LOG is set.
2020-07-27 13:51:33 -04:00
teor
a60299d86c
fix: Change the default test log level to warn
2020-07-27 13:51:33 -04:00
teor
2d3926e800
fix: Replace a return with unreachable!
2020-07-27 13:49:11 -04:00
dependabot[bot]
842c69c60c
build(deps): bump serde_json from 1.0.56 to 1.0.57
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.56 to 1.0.57.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.56...v1.0.57 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-07-27 13:48:15 -04:00
Alfredo Garcia
5b3c6e4c6c
Port bash checkpoint scripts to zebra-checkpoints single rust binary ( #740 )
...
* make zebra-checkpoints
* fix LOOKAHEAD_LIMIT scope
* add a default cli path
* change doc usage text
* add tracing
* move MAX_CHECKPOINT_HEIGHT_GAP to zebra-consensus
* do byte_reverse_hex in a map
2020-07-25 17:53:00 +10:00
Henry de Valence
b59cfc49b7
sync: create requests sequentially to respect backpressure.
...
This seems like a better design on principle but also appears to give a much
nicer sawtooth pattern of queued blocks in the checkpointer and a much smoother
pattern of block requests.
2020-07-24 18:36:00 -04:00
Deirdre Connolly
0cd8b7e7bd
Rename pr.yml to ci.yml
2020-07-24 18:18:46 -04:00
Deirdre Connolly
e24cd5755b
Add a nicer human name to coverage job
2020-07-24 18:18:46 -04:00
Deirdre Connolly
4180a2731f
Turn off the CodeCov PR comment, metrics available in the checks results which link to codecov.io
2020-07-24 18:18:46 -04:00
Deirdre Connolly
bbc6fb82bf
Increase timeout on coverage job to 10mins, reorg config
2020-07-24 18:18:46 -04:00
Henry de Valence
4aa00ad216
Align crate versions and user-agent with NU numbers.
...
We had a brief discussion on discord and it seemed like we had consensus on the
following versioning policy:
* zebrad: match major version to NU version, so we will start by releasing
zebrad 3.0.0;
* zebra-* libraries: start by matching zebrad's version, then increment major
versions of each library as we need to make breaking changes (potentially
faster than the zebrad version, always respecting semver but making no
guarantees about the longevity of major releases).
This commit sets all of the crate versions to 3.0.0-alpha.0 -- the -alpha.0
marks it as a prerelease not subject to perfect adherence to compatibility
guarantees.
2020-07-24 11:46:37 -07:00
dependabot[bot]
f7c59c99b5
build(deps): bump tracing-subscriber from 0.2.8 to 0.2.9
...
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing ) from 0.2.8 to 0.2.9.
- [Release notes](https://github.com/tokio-rs/tracing/releases )
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.8...tracing-subscriber-0.2.9 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-07-24 14:31:44 -04:00
teor
2acfcf3a90
Make the CheckpointVerifier handle partial restarts ( #736 )
...
Also put generic bounds on the BlockVerifier struct,
so we get better compilation errors.
2020-07-24 11:47:48 +10:00
dependabot[bot]
80597087b3
build(deps): bump codecov/codecov-action from v1.0.11 to v1.0.12
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from v1.0.11 to v1.0.12.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Commits](https://github.com/codecov/codecov-action/compare/v1.0.11...07127fde53bc3ccd346d47ab2f14c390161ad108 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-07-23 18:48:04 -04:00
teor
77a1fefa1e
Download genesis ( #731 )
...
* feature: Add more CheckpointVerifier tracing
* fix: Download the genesis block
2020-07-23 10:56:52 -07:00
dependabot[bot]
e99e9653eb
build(deps): bump sled from 0.33.0 to 0.34.0 ( #735 )
...
Bumps [sled](https://github.com/spacejam/sled ) from 0.33.0 to 0.34.0.
- [Release notes](https://github.com/spacejam/sled/releases )
- [Changelog](https://github.com/spacejam/sled/blob/master/CHANGELOG.md )
- [Commits](https://github.com/spacejam/sled/compare/v0.33...v0.34 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-23 10:55:34 -07:00
dependabot[bot]
909b74a613
build(deps): bump tracing from 0.1.16 to 0.1.17 ( #734 )
...
Bumps [tracing](https://github.com/tokio-rs/tracing ) from 0.1.16 to 0.1.17.
- [Release notes](https://github.com/tokio-rs/tracing/releases )
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.16...tracing-0.1.17 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-23 10:54:56 -07:00
Jane Lusby
c1a1493159
use dirs crate for default location of state and config ( #714 )
...
* use dirs crate for default location of state and config
* panic if a path isn't specified for zebra-state
2020-07-23 21:12:20 +10:00
teor
132875198e
fix: Simplify ChainVerifier
2020-07-23 03:46:24 -04:00
teor
c95c825707
fix: Lookup the genesis hash based on the network
2020-07-23 03:46:24 -04:00
teor
41225660fb
doc: The genesis coinbase is the same in every network
2020-07-23 03:46:24 -04:00
teor
da09965a5f
feature: Get the current minimum protocol version
2020-07-23 15:52:18 +10:00
teor
0e0c36c010
fixup! feature: Add network upgrade activation heights
2020-07-23 15:52:18 +10:00