teor
bbe4aa47ea
Fix whitespace for rustfmt
2020-10-26 13:49:48 -04:00
teor
2fa3d8a8f4
Add a comment explaining why block metrics follow validation
2020-10-26 13:49:48 -04:00
teor
f5a53d9dae
Update block metrics after async transaction verification
2020-10-26 13:49:48 -04:00
teor
60322c3d48
Test that the checkpoint list gap is correct
...
If we change the gap, but don't rebuild the lists, `zebrad` hangs with
weird errors.
2020-10-26 20:59:40 +10:00
teor
f9dc481934
Rebuild the checkpoint lists with smaller checkpoints
2020-10-26 20:59:40 +10:00
teor
20dfd04463
Reduce maximum checkpoint size in the Zebra code
...
The new limits are 400 blocks and 32 MB.
2020-10-26 20:59:40 +10:00
dependabot[bot]
ff51c2e0c0
build(deps): bump tracing-subscriber from 0.2.13 to 0.2.14
...
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing ) from 0.2.13 to 0.2.14.
- [Release notes](https://github.com/tokio-rs/tracing/releases )
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.13...tracing-subscriber-0.2.14 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-10-23 15:02:02 -04:00
teor
6dc95b1d6d
Revise the checkpoint verifier metrics ( #1195 )
...
* update continuous and processing.next metrics correctly
* remove duplicate metrics
* rename ambiguous metrics
2020-10-21 20:06:26 -07:00
Alfredo Garcia
21ad6ffc47
Reverse displayed endianness of transaction and block hashes ( #1171 )
...
* Reverse displayed endianness of transaction and block hashes
* fix zebra-checkpoints utility for new hash order
* Stop using "zebrad revhex" in zebrad-hash-lookup
* Rebuild checkpoint lists in new hash order
This change also adds additional checkpoints to the end of each list.
* Replace TransactionHash with transaction::Hash
This change should have been made in #905 , but we missed Debug impls
and some docs.
Co-authored-by: Ramana Venkata <vramana@users.noreply.github.com>
Co-authored-by: teor <teor@riseup.net>
2020-10-22 07:54:02 +10:00
Deirdre Connolly
9549e180c0
Allow dead_code on parameters for now
2020-10-20 11:16:22 -04:00
Deirdre Connolly
a7ef6f6a40
Allow dead_code for checkpoint::Verifier for now
2020-10-20 11:16:22 -04:00
Deirdre Connolly
e796132057
Allow dead_code for the transaction::Request for now (mempool)
2020-10-20 11:16:22 -04:00
Henry de Valence
eb43893de0
consensus: minimize API, clean docs
...
This reduces the API surface to the minimum required for functionality,
and cleans up module documentation. The stub mempool module is deleted
entirely, since it will need to be redone later anyways.
2020-10-20 11:16:22 -04:00
Henry de Valence
d4ce3eb054
consensus: improve docs
...
- remove no longer accurate documentation about transaction verifier;
- add description of the role of the crate.
2020-10-20 11:16:22 -04:00
Jane Lusby
c0aa1b477e
consensus: add #[source] attributes to chain errors
2020-10-20 11:16:22 -04:00
Jane Lusby
8a64c056fb
consensus: integrate block, transaction Verifiers
2020-10-20 11:16:22 -04:00
Jane Lusby
4a36c4485a
consensus: integrate script, transaction Verifiers
2020-10-20 11:16:22 -04:00
Henry de Valence
248c318906
consensus: sketch of transaction::Verifier
...
This squashes the previous sequence of commits to let us separate out
the structural skeleton (which unblocks other work and is not
consensus-critical) from the actual checks (which don't block other work
and are consensus-critical).
Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
2020-10-20 11:16:22 -04:00
Henry de Valence
9dc8d76d68
consensus: add stub groth16::Verifier
...
Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
2020-10-20 11:16:22 -04:00
Deirdre Connolly
97b6ba10cc
Use redjubjub crate exported from zebra-chain in the redjubjub::Verifier
2020-10-20 11:16:22 -04:00
teor
3da4fdb8db
Reword more errors
2020-10-15 08:31:18 +10:00
teor
c74a205ecf
Reword error message
...
Co-authored-by: Jane Lusby <jlusby42@gmail.com>
2020-10-15 08:31:18 +10:00
teor
e46df7ed5b
Tidy up a use list
2020-10-15 08:31:18 +10:00
teor
d09c310bbc
Add failure tests for difficulty is valid
2020-10-15 08:31:18 +10:00
teor
4076402536
Add failure tests for coinbase is valid
2020-10-15 08:31:18 +10:00
teor
9e5cd23e42
Test difficulty is valid for all block test vectors
2020-10-15 08:31:18 +10:00
teor
54efea96cd
Test coinbase is first for all block test vectors
2020-10-15 08:31:18 +10:00
teor
7ce3e2e43a
Test equihash solution for all block test vectors
2020-10-15 08:31:18 +10:00
teor
d241e0b3fc
Test block time validity for all block test vectors
2020-10-15 08:31:18 +10:00
teor
ea284a4d56
Rename a test function
2020-10-15 08:31:18 +10:00
teor
74d02a6f08
Keep block tests in the same order as check::*
2020-10-15 08:31:18 +10:00
teor
c3a8fd3894
Check PoWLimit for difficulty threshold
2020-10-15 08:31:18 +10:00
Jane Lusby
e05103323e
Implement Async Script Verification RFC ( #961 )
...
This commit begins the process of integrating `zcash_script` with the rest of the system for verifying scripts while syncing the block chain. It does so by adding the necessary support for looking up UTXOs from the state service and implements the first parts of the `script::Verifier` for looking up the necessary UTXOs in the state and then generating the necessary call to `zcash_script` to verify the script itself.
Co-authored-by: teor <teor@riseup.net>
2020-10-14 14:06:32 -07:00
teor
40c745e540
Keep check.rs functions in alphabetical order
2020-10-13 08:11:11 +10:00
teor
4e952a3930
Swap subsidy_is_valid argument order
...
This change makes the function consistent with the other check::*
functions.
2020-10-13 08:11:11 +10:00
teor
3fad3cf3af
Rename functions to subsidy_is_valid*
...
To match the other check::* functions.
Automated commit, created using the script:
sed -i 's/subsidy_is_correct/subsidy_is_valid/' \
$(grep -r subsidy_is_correct zebra* | cut -d: -f1 | sort -u)
2020-10-13 08:11:11 +10:00
teor
407962b864
Rename any remaining is_time_valid_at instances
...
Automated search and replace, using the script:
sed -i 's/is_time_valid_at/time_is_valid_at/' \
$(grep -r is_time_valid_at zebra* | cut -d: -f1 | sort -u)
2020-10-13 08:11:11 +10:00
teor
d504232720
Apply error and span suggestions
...
Co-authored-by: Jane Lusby <jlusby42@gmail.com>
2020-10-13 08:11:11 +10:00
teor
244066f6d9
Add a hash debug-level span for block verification
2020-10-13 08:11:11 +10:00
teor
c4630cd1f5
Improve error messages for header.time validation
2020-10-13 08:11:11 +10:00
teor
4953282005
Move difficulty threshold checks into their own function
2020-10-13 08:11:11 +10:00
teor
77e227dfe4
Fix some function docs and parameter names
2020-10-13 08:11:11 +10:00
Alfredo Garcia
c0a14ecc8c
move genesis parameters to zebra-chain ( #1151 )
2020-10-12 14:08:23 -07:00
Alfredo Garcia
c93f0b3a2e
Block Subsidy and Founders Reward Amounts ( #1051 )
...
* add general and founders reward subsidy modules
* validate founders reward
* Use funding streams after Canopy on testnet
ZIP-1014 only applies to mainnet, where Canopy is at the first halving.
On testnet, Canopy is before the first halving, and the dev fund rules
apply from Canopy. (See ZIP-214.)
Co-authored-by: teor <teor@riseup.net>
Co-authored-by: Jane Lusby <jlusby42@gmail.com>
* pass all test vectors through current subsidy validation
* Add testnet and halving subsidy tests
* add subsidy validation error tests
* rename block validation methods
* add network to block verifier
* add amount operators
* Implement Ord, Eq, and Hash for Amount
* Implement Add<Height> for Height
And make the existing Height operators do range checks.
* Apply operator suggestions
Co-authored-by: Jane Lusby <jlusby42@gmail.com>
2020-10-13 06:54:48 +10:00
Jane Lusby
eaf5473efc
Add verification and state tracing events and spans ( #1131 )
2020-10-09 19:05:09 +10:00
dependabot[bot]
76e7e3d714
build(deps): bump tracing-subscriber from 0.2.12 to 0.2.13
...
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing ) from 0.2.12 to 0.2.13.
- [Release notes](https://github.com/tokio-rs/tracing/releases )
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.12...tracing-subscriber-0.2.13 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-10-08 15:09:32 -04:00
dependabot[bot]
1b7bf61f96
build(deps): bump thiserror from 1.0.20 to 1.0.21
...
Bumps [thiserror](https://github.com/dtolnay/thiserror ) from 1.0.20 to 1.0.21.
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.20...1.0.21 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-10-07 18:25:33 -04:00
dependabot[bot]
08f363e1cb
build(deps): bump futures from 0.3.5 to 0.3.6
...
Bumps [futures](https://github.com/rust-lang/futures-rs ) from 0.3.5 to 0.3.6.
- [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.5...0.3.6 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-10-06 16:54:08 -04:00
dependabot[bot]
1d742d0658
build(deps): bump futures-util from 0.3.5 to 0.3.6
...
Bumps [futures-util](https://github.com/rust-lang/futures-rs ) from 0.3.5 to 0.3.6.
- [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.5...0.3.6 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-10-06 05:32:21 -04:00
dependabot[bot]
b5ecafa7bc
build(deps): bump chrono from 0.4.18 to 0.4.19
...
Bumps [chrono](https://github.com/chronotope/chrono ) from 0.4.18 to 0.4.19.
- [Release notes](https://github.com/chronotope/chrono/releases )
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md )
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.18...v0.4.19 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-10-01 15:09:10 -04:00