Giter Site home page Giter Site logo

parity-zcash's Introduction

The Parity Zcash client.

THIS IS UNMAINTAINED HISTORICAL SOFTWARE

Build Status Snap Status

Gitter Gitter https://gitter.im/paritytech/parity-zcash

Installing from source

Installing pzec from source requires rustc and cargo.

Minimal supported version is rustc 1.23.0 (766bd11c8 2018-01-01)

Install rustc and cargo

Both rustc and cargo are a part of rust tool-chain.

An easy way to install the stable binaries for Linux and Mac is to run this in your shell:

curl https://sh.rustup.rs -sSf | sh

Windows binaries can be downloaded from rust-lang website.

Install C and C++ compilers

You will need the cc and gcc compilers to build some of the dependencies.

On macOS

build-essential is a Debian package. On macOS you will need to make sure you have Xcode installed. If you already have Homebrew installed, you probably also already have the Xcode tools installed as well. If not, you can run the command below:

xcode-select --install

On Linux

sudo apt-get update
sudo apt-get install build-essential

Clone and build pzec

Now let's clone pzec and enter it's directory:

git clone https://github.com/paritytech/parity-zcash
cd parity-zcash

# builds pzec in release mode
cargo build -p pzec --release

pzec is now available at ./target/release/pzec.

Installing the snap

In any of the supported Linux distros:

sudo snap install parity-zcash --edge

Running tests

pzec has internal unit tests and it conforms to external integration tests.

Running unit tests

Assuming that repository is already cloned, we can run unit tests with this command:

cargo test --all

Going online

By default parity connects to Zcash seednodes. Full list is here.

To start syncing the main network, just start the client without any arguments:

./target/release/pzec

To start syncing the testnet:

./target/release/pzec --testnet

To not print any syncing progress add --quiet flag:

./target/release/pzec --quiet

Importing zcashd database

It it is possible to import existing zcashd database:

# where $ZCASH_DB is path to your zcashd database. By default:
# on macOS: "/Users/user/Library/Application Support/Zcash"
# on Linux: "~/.zcash"
./target/release/pzec import "$ZCASH_DB/blocks"

By default, import verifies the imported blocks. You can disable this, by adding the --verification-level=none option.

./target/release/pzec --verification-level=none import "$ZCASH_DB/blocks"

Command line interface

Full list of CLI options, which is available under pzec --help: see here

Logging

This is a section only for developers and power users.

You can enable detailed client logging by setting the environment variable RUST_LOG, e.g.,

RUST_LOG=verification=info ./target/release/pzec

pzec started with this environment variable will print all logs coming from verification module with verbosity info or higher. Available log levels are:

  • error
  • warn
  • info
  • debug
  • trace

It's also possible to start logging from multiple modules in the same time:

RUST_LOG=sync=trace,p2p=trace,verification=trace,db=trace ./target/release/pzec

Internal documentation

Once released, pzec documentation will be available here. Meanwhile it's only possible to build it locally:

cd parity-zcash
./tools/doc.sh
open target/doc/pzec/index.html

parity-zcash's People

Contributors

5chdn avatar arkpar avatar chevdor avatar chritchens avatar dconnolly avatar debris avatar dependabot-preview[bot] avatar ecliptik avatar evandandrea avatar gavofyork avatar general-beck avatar gguoss avatar gtklocker avatar i1skn avatar jeandudey avatar korczis avatar melvillian avatar nicolasochem avatar nikvolf avatar pierre-l avatar pmespresso avatar rex4539 avatar rphmeier avatar soc1c avatar sorpaas avatar sunhuachuang avatar svyatonik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

parity-zcash's Issues

Cannot read block

I tried importing twice and both times it fails here.

2019-04-11 05:07:31  INFO sync Imported 248000 blocks
Cannot read block

Warn on missing docs everywhere

Also, actually add missing docs as the result.

Also, deny warnings on the CI (but it does not work well with cargo workspaces atm).

Very short test chain

  • regtest-like short chain which covers all (or most) key consensus features
  • to be served as an integration test
  • is fed directly to sync/import code
  • maybe shared between implementations (@kaplannie ?)
  • state-machine-like of acceptance evaluation

Disconnect multiple peers during sync

As first mentioned in #95, it appears that valid peers are disconnected, after reporting one of several types of errors.
Sequences of disconnect messages 24 hours apart show all the peers in the covered range (1-7 and 4561-4570) erroring out.
Moreover, multiple consecutive peers are blamed for causing the very same error, which is a virtual impossibility, like disconnect of 2&3. All other disconnects shown, groups of peers 5-7 and 4561- (except 4562 and 4566) are blamed for the very same error.

2019-04-18 10:17:57 UTC WARN sync Disconnecting from peer#1 due to DoS: Provided wrong block 0000000003f9a4833161d37c1f31ef1a0b71ea8a3e2e9fa721bfcf046e1aab45
2019-04-18 10:18:05 UTC WARN sync Previous header of the first header from peer#2 `headers` message is unknown. First: 0003eb875fc001da4a57de8465f68a2730c24ca086f37c6f14780ac9ee3ea3d5. Previous: 00052461a5006c2e3b74ce48992a08695607912d5604c3eb8da25749b0900444
2019-04-18 10:18:05 UTC WARN sync Disconnecting from peer#2 due to misbehavior: Too many failures.
2019-04-18 10:18:06 UTC WARN sync Previous header of the first header from peer#3 `headers` message is unknown. First: 00000000027e2c0327c34a234ea8998eaf150717d6e72e0c713307df65817d20. Previous: 00000000022f316560ddbfe7c0ac819a5f3a4f476c70bb5e0fd77a6fafb86d6b
2019-04-18 10:18:06 UTC WARN sync Disconnecting from peer#3 due to misbehavior: Too many failures.
2019-04-18 10:18:07 UTC WARN sync Previous header of the first header from peer#4 `headers` message is unknown. First: 00000000027e2c0327c34a234ea8998eaf150717d6e72e0c713307df65817d20. Previous: 00000000022f316560ddbfe7c0ac819a5f3a4f476c70bb5e0fd77a6fafb86d6b
2019-04-18 10:18:07 UTC WARN sync Disconnecting from peer#4 due to misbehavior: Too many failures.
2019-04-18 10:18:36 UTC WARN sync Disconnecting from peer#6 due to misbehavior: Provided after dead-end block 0000000001e75867923b1993eeb5e623547537f02d42bfa39aae968ba96b3255
2019-04-18 10:18:36 UTC WARN sync Disconnecting from peer#5 due to misbehavior: Provided after dead-end block 0000000001e75867923b1993eeb5e623547537f02d42bfa39aae968ba96b3255
2019-04-18 10:18:46 UTC WARN sync Disconnecting from peer#7 due to misbehavior: Provided after dead-end block 0000000001e75867923b1993eeb5e623547537f02d42bfa39aae968ba96b3255
2019-04-19 09:52:57 UTC WARN sync Disconnecting from peer#4561 due to misbehavior: Provided after dead-end block 0000000001e75867923b1993eeb5e623547537f02d42bfa39aae968ba96b3255
2019-04-19 09:53:05 UTC WARN sync Disconnecting from peer#4562 due to misbehavior: Got 'headers' message without known blocks
2019-04-19 09:55:18 UTC WARN sync Disconnecting from peer#4563 due to misbehavior: Provided after dead-end block 0000000001e75867923b1993eeb5e623547537f02d42bfa39aae968ba96b3255
2019-04-19 09:59:35 UTC WARN sync Disconnecting from peer#4564 due to misbehavior: Provided after dead-end block 0000000001e75867923b1993eeb5e623547537f02d42bfa39aae968ba96b3255
2019-04-19 09:59:36 UTC WARN sync Disconnecting from peer#4565 due to misbehavior: Provided after dead-end block 0000000001e75867923b1993eeb5e623547537f02d42bfa39aae968ba96b3255
2019-04-19 10:00:35 UTC WARN sync Disconnecting from peer#4566 due to misbehavior: Got 'headers' message without known blocks
2019-04-19 10:00:46 UTC WARN sync Disconnecting from peer#4567 due to misbehavior: Provided after dead-end block 0000000001e75867923b1993eeb5e623547537f02d42bfa39aae968ba96b3255
2019-04-19 10:00:47 UTC WARN sync Disconnecting from peer#4568 due to misbehavior: Provided after dead-end block 0000000001e75867923b1993eeb5e623547537f02d42bfa39aae968ba96b3255
2019-04-19 10:19:36 UTC WARN sync Disconnecting from peer#4569 due to misbehavior: Provided after dead-end block 0000000001e75867923b1993eeb5e623547537f02d42bfa39aae968ba96b3255
2019-04-19 10:26:45 UTC WARN sync Disconnecting from peer#4570 due to misbehavior: Provided after dead-end block 0000000001e75867923b1993eeb5e623547537f02d42bfa39aae968ba96b3255

Thread 'Heavy verification' panicked

2019-05-24 13:39:03  INFO sync Processed 3 blocks in 65.38 seconds (0.05 blk/s).	Peers: 10 (act: 0, idl: 10, bad: 0).	Chain: [sch:3040 > req:0 > vfy:1127 > db:533648]
thread 'Heavy verification' panicked at 'internal error: entered unreachable code: Trying to re-verify known block: 0000000000bc082bfee78ba6f8b88215e6a2c1c9ed8afeab1ca6efd1801fa91f', verification/src/chain_verifier.rs:56:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:70
             at src/libstd/sys_common/backtrace.rs:58
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:200
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:215
   4: <std::panicking::begin_panic::PanicPayload<A> as core::panic::BoxMeUp>::get
             at src/libstd/panicking.rs:478
   5: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:385
   6: std::panicking::try::do_call
             at src/libstd/panicking.rs:340
Abort trap: 6

Equihash optimization

In BTC/BCH header verification is an instant operation (details). In Zcash it involves equihash solution check (details). And equihash verification requires 2^9 calls of Blake2b::hash.

So here are some problems with our implementation:

  1. our equihash verification makes a lot of allocations - seems like it we could avoid (most of) those;
  2. (should be ported to pbtc, probably) header verification occurs synchronously, under sync lock here. Since now it isn't instant, it would be better to move it out of lock;
  3. (should be ported to pbtc, probably) header verification actually occurs twice - once when we see new header for first time (on_headers) and then again as a part of block verification. Since now it isn't instant, it would be better to call it only once for every block we have seen.

Cannot append block: Verification("Transaction(1, Signature(0, EvalFalse))")

2019-04-11 22:11:00  TRACE import::blk Opening blk file: "/Users/rex/Library/Application Support/Zcash/blocks/blk00129.dat"
2019-04-11 22:22:58  INFO sync Imported 413000 blocks
2019-04-11 22:40:55  INFO sync Imported 414000 blocks
2019-04-11 23:00:30  INFO sync Imported 415000 blocks
2019-04-11 23:19:04  INFO sync Imported 416000 blocks
2019-04-11 23:36:06  INFO sync Imported 417000 blocks
2019-04-11 23:53:53  INFO sync Imported 418000 blocks
2019-04-12 00:14:09  INFO sync Imported 419000 blocks
Cannot append block: Verification("Transaction(1, Signature(0, EvalFalse))")

https://www.dropbox.com/s/v3uk6lo9y99ll4z/blk00129.dat?dl=0

Update rocksdb cache distribution

cfg.set_cache(Some(COL_TRANSACTIONS), total_cache / 4);
cfg.set_cache(Some(COL_TRANSACTIONS_META), total_cache / 4);
cfg.set_cache(Some(COL_BLOCK_HEADERS), total_cache / 4);
cfg.set_cache(Some(COL_BLOCK_HASHES), total_cache / 12);
cfg.set_cache(Some(COL_BLOCK_TRANSACTIONS), total_cache / 12);
cfg.set_cache(Some(COL_BLOCK_NUMBERS), total_cache / 12);

this seems outdated

Update reference to jsonrpc-derive

Multiple trailing parameters PR is merged. So either wait until jsonrpc-derive is published, or refer to master' commit. The syntax is slightly different from what we have now => need some changes in pzec.

Finally - delete https://github.com/paritytech/jsonrpc/tree/pzec_dependency_multiple_trailing_args branch

RPC methods meta issue

  • BlockChain:
    • getbestblockhash;
    • getblockcount;
    • getblockhash;
    • getdifficulty - currently returns difficulty of the best block. Should calculate difficulty for next block. TODO: check pbtc;
    • getblock - update response with ZCash-specific fields;
    • gettxout - check if we need non-transparent addresses for this;
    • gettxoutsetinfo - not implemented in pbtc.
  • Miner:
    • getblocktemplate - update with ZCash-specific fields (finalsaplingroot).
  • Network:
    • addnode;
    • getaddednodeinfo;
    • getconnectioncount.
  • Raw:
    • sendrawtransaction;
    • createrawtransaction - update with ZCash-specific fields + addresses;
    • decoderawtransaction - not implemented in pbtc.
    • getrawtransaction - not implemented in pbtc.

Getting weird 'headers' messages when syncing over network

I'm getting something like that:

2019-03-20 14:17:13  WARN sync Previous header of the first header from peer#7 `headers` message is unknown. First: 0003eb875fc001da4a57de8465f68a2730c24ca086f37c6f14780ac9ee3ea3d5. Previous: 00052461a5006c2e3b74ce48992a08695607912d5604c3eb8da25749b0900444
2019-03-20 14:17:13  WARN sync Previous header of the first header from peer#8 `headers` message is unknown. First: 0003eb875fc001da4a57de8465f68a2730c24ca086f37c6f14780ac9ee3ea3d5. Previous: 00052461a5006c2e3b74ce48992a08695607912d5604c3eb8da25749b0900444
2019-03-20 14:17:13  WARN sync Previous header of the first header from peer#7 `headers` message is unknown. First: 0003eb875fc001da4a57de8465f68a2730c24ca086f37c6f14780ac9ee3ea3d5. Previous: 00052461a5006c2e3b74ce48992a08695607912d5604c3eb8da25749b0900444
2019-03-20 14:17:14  WARN sync Previous header of the first header from peer#6 `headers` message is unknown. First: 0003eb875fc001da4a57de8465f68a2730c24ca086f37c6f14780ac9ee3ea3d5. Previous: 00052461a5006c2e3b74ce48992a08695607912d5604c3eb8da25749b0900444
2019-03-20 14:17:14  WARN sync Previous header of the first header from peer#7 `headers` message is unknown. First: 0003eb875fc001da4a57de8465f68a2730c24ca086f37c6f14780ac9ee3ea3d5. Previous: 00052461a5006c2e3b74ce48992a08695607912d5604c3eb8da25749b0900444
2019-03-20 14:17:14  WARN sync Previous header of the first header from peer#7 `headers` message is unknown. First: 0003eb875fc001da4a57de8465f68a2730c24ca086f37c6f14780ac9ee3ea3d5. Previous: 00052461a5006c2e3b74ce48992a08695607912d5604c3eb8da25749b0900444
2019-03-20 14:17:14  WARN sync Previous header of the first header from peer#8 `headers` message is unknown. First: 0003eb875fc001da4a57de8465f68a2730c24ca086f37c6f14780ac9ee3ea3d5. Previous: 00052461a5006c2e3b74ce48992a08695607912d5604c3eb8da25749b0900444

too often, when trying to sync with the network. There's no block with this hash in Zcash, ZClassic or BTC.

Node subver identifies as bcore

zcash-cli getpeerinfo gives the pzec client a subver of bcore e.g.

{
  "id": 84527,
  "addr": "206.189.139.212:46042",
  "addrlocal": "[::159.65.71.195]:8233",
  "services": "0000000000000001",
  "lastsend": 1557844858,
  "lastrecv": 1557844850,
  "bytessent": 2212871574,
  "bytesrecv": 5923029,
  "conntime": 1557113877,
  "timeoffset": 0,
  "pingtime": 0.218735,
  "version": 170007,
  "subver": "bcore",
  "inbound": true,
  "startingheight": 0,
  "banscore": 0,
  "synced_headers": 532051,
  "synced_blocks": 532051,
  "inflight": [],
  "whitelisted": false
}

Presumably, this is a earlier Bitcoin reference that can be updated to be pzec specific? Defined here:

pub const USER_AGENT: &'static str = "bcore";

Unexpected RPC ports used

Might be too early to give feedback and this might be deliberate at this stage but... I was just playing with this and it's using the default Bitcoin RPC ports. I know you can override this but it is an unexpected default.

Examining the ports it's listening on it is 18332 for the RPC whereas it is expected to be 18232. I also tested mainnet and it's listening on 8332 rather than 8232.

Is there a roadmap or task list?

I'd love to help with development. Is there a roadmap or task list that clearly defines steps needed to keep the client up to date?

Attempted to Leave Type `linked_hashmap::Node<_>` Uninitialized

When I follow the build instructions and run the executable, I get the following panic. This is on Ubuntu 21.04 with Rust 1.58.

thread 'main' panicked at 'attempted to leave type `linked_hash_map::Node<primitives::hash::H256, db::kv::transaction::KeyState<chain::block_header::BlockHeader>>` uninitialized, which is invalid', /home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/linked-hash-map-0.4.2/src/lib.rs:174:52
stack backtrace:
   0: rust_begin_unwind
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:498:5
   1: core::panicking::panic_fmt
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/panicking.rs:107:14
   2: core::panicking::panic
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/panicking.rs:48:5
   3: core::mem::uninitialized
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/mem/mod.rs:676:9
   4: linked_hash_map::LinkedHashMap<K,V,S>::ensure_guard_node
             at /home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/linked-hash-map-0.4.2/src/lib.rs:174:52
   5: linked_hash_map::LinkedHashMap<K,V,S>::insert
             at /home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/linked-hash-map-0.4.2/src/lib.rs:305:9
   6: lru_cache::LruCache<K,V,S>::insert
             at /home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/lru-cache-0.1.1/src/lib.rs:119:23
   7: <db::kv::cachedb::CacheDatabase<T> as db::kv::db::KeyValueDatabase>::write
             at ./db/src/kv/cachedb.rs:27:6
   8: db::block_chain_db::BlockChainDatabase<T>::insert
             at ./db/src/block_chain_db.rs:306:3
   9: <db::block_chain_db::BlockChainDatabase<T> as storage::block_chain::BlockChain>::insert
             at ./db/src/block_chain_db.rs:684:3
  10: pzec::util::init_db
             at ./pzec/util.rs:34:4
  11: pzec::commands::start::start
             at ./pzec/commands/start.rs:87:2
  12: pzec::run
             at ./pzec/main.rs:71:8
  13: pzec::main
             at ./pzec/main.rs:48:20
  14: core::ops::function::FnOnce::call_once
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/ops/function.rs:227:5

Multiple errors on sync

I have finally imported the blockchain :)

Now, when I run pzec, I see multiple errors.

2019-04-17 06:36:30  WARN sync Disconnecting from peer#1 due to misbehavior: Got 'headers' message without known blocks
2019-04-17 06:36:30  WARN sync Last peer was marked as non-useful. Moving to saturated state.
2019-04-17 06:36:39  WARN sync Last peer was marked as non-useful. Moving to saturated state.
2019-04-17 06:36:39  WARN sync Disconnecting from peer#4 due to misbehavior: Got 'headers' message without known blocks
2019-04-17 06:36:39  WARN sync Last peer was marked as non-useful. Moving to saturated state.
2019-04-17 06:36:49  WARN sync Failed to get requested block from peer#3 in 5.68 seconds.
2019-04-17 06:36:49  WARN sync Too many failures for peer#3. Excluding from synchronization.
2019-04-17 06:36:49  WARN sync Disconnecting from peer#3 due to misbehavior: Too many failures.
2019-04-17 06:36:49  WARN sync Too many header failures for peer#3. Excluding from synchronization.
2019-04-17 06:36:50  WARN sync Previous header of the first header from peer#6 `headers` message is unknown. First: 0003eb875fc001da4a57de8465f68a2730c24ca086f37c6f14780ac9ee3ea3d5. Previous: 00052461a5006c2e3b74ce48992a08695607912d5604c3eb8da25749b0900444
2019-04-17 06:36:50  WARN sync Disconnecting from peer#6 due to misbehavior: Too many failures.
2019-04-17 06:36:50  WARN sync Previous header of the first header from peer#7 `headers` message is unknown. First: 0004b371c02c41c61c189ce04ac147220daf796e9a60ce90cfee31e5a71dda2d. Previous: 0007104ccda289427919efc39dc9e4d499804b7bebc22df55f8b834301260602
2019-04-17 06:36:50  WARN sync Disconnecting from peer#7 due to misbehavior: Too many failures.
2019-04-17 06:37:23  WARN sync Disconnecting from peer#12 due to misbehavior: Error verifying header 001bb0d07e628cccfbf2998d27bf18bd0463a44b64bba5664ef786fa17bd5170 from `headers`: "Pow"
2019-04-17 06:37:31  WARN sync Previous header of the first header from peer#14 `headers` message is unknown. First: 0003eb875fc001da4a57de8465f68a2730c24ca086f37c6f14780ac9ee3ea3d5. Previous: 00052461a5006c2e3b74ce48992a08695607912d5604c3eb8da25749b0900444
2019-04-17 06:37:31  WARN sync Disconnecting from peer#14 due to misbehavior: Too many failures.
2019-04-17 06:37:40  WARN sync Previous header of the first header from peer#15 `headers` message is unknown. First: 0003eb875fc001da4a57de8465f68a2730c24ca086f37c6f14780ac9ee3ea3d5. Previous: 00052461a5006c2e3b74ce48992a08695607912d5604c3eb8da25749b0900444
2019-04-17 06:37:40  WARN sync Disconnecting from peer#15 due to misbehavior: Too many failures.
2019-04-17 06:37:44  INFO sync Processed 120 blocks in 61.15 seconds (1.96 blk/s).	Peers: 6 (act: 6, idl: 0, bad: 1).	Chain: [sch:84 > req:0 > vfy:1064 > db:515558]
2019-04-17 06:37:49  WARN sync Too many header failures for peer#13. Excluding from synchronization.
2019-04-17 06:37:49  WARN sync Disconnecting from peer#13 due to misbehavior: Too many header failures.
2019-04-17 06:37:50  WARN sync Previous header of the first header from peer#16 `headers` message is unknown. First: 0003eb875fc001da4a57de8465f68a2730c24ca086f37c6f14780ac9ee3ea3d5. Previous: 00052461a5006c2e3b74ce48992a08695607912d5604c3eb8da25749b0900444
2019-04-17 06:37:50  WARN sync Disconnecting from peer#16 due to misbehavior: Too many failures.
2019-04-17 06:37:51  WARN sync Previous header of the first header from peer#19 `headers` message is unknown. First: 0003eb875fc001da4a57de8465f68a2730c24ca086f37c6f14780ac9ee3ea3d5. Previous: 00052461a5006c2e3b74ce48992a08695607912d5604c3eb8da25749b0900444
2019-04-17 06:37:51  WARN sync Disconnecting from peer#19 due to misbehavior: Too many failures.
2019-04-17 06:37:51  WARN sync Previous header of the first header from peer#18 `headers` message is unknown. First: 0003eb875fc001da4a57de8465f68a2730c24ca086f37c6f14780ac9ee3ea3d5. Previous: 00052461a5006c2e3b74ce48992a08695607912d5604c3eb8da25749b0900444
2019-04-17 06:37:51  WARN sync Disconnecting from peer#18 due to misbehavior: Too many failures.
2019-04-17 06:37:51  WARN sync Previous header of the first header from peer#17 `headers` message is unknown. First: 0003eb875fc001da4a57de8465f68a2730c24ca086f37c6f14780ac9ee3ea3d5. Previous: 00052461a5006c2e3b74ce48992a08695607912d5604c3eb8da25749b0900444
2019-04-17 06:37:51  WARN sync Disconnecting from peer#17 due to misbehavior: Too many failures.
2019-04-17 06:38:00  WARN sync Previous header of the first header from peer#21 `headers` message is unknown. First: 0003eb875fc001da4a57de8465f68a2730c24ca086f37c6f14780ac9ee3ea3d5. Previous: 00052461a5006c2e3b74ce48992a08695607912d5604c3eb8da25749b0900444
2019-04-17 06:38:00  WARN sync Disconnecting from peer#21 due to misbehavior: Too many failures.
2019-04-17 06:38:00  WARN sync Previous header of the first header from peer#20 `headers` message is unknown. First: 0003eb875fc001da4a57de8465f68a2730c24ca086f37c6f14780ac9ee3ea3d5. Previous: 00052461a5006c2e3b74ce48992a08695607912d5604c3eb8da25749b0900444
2019-04-17 06:38:00  WARN sync Disconnecting from peer#20 due to misbehavior: Too many failures.
2019-04-17 06:38:00  WARN sync Previous header of the first header from peer#22 `headers` message is unknown. First: 0003eb875fc001da4a57de8465f68a2730c24ca086f37c6f14780ac9ee3ea3d5. Previous: 00052461a5006c2e3b74ce48992a08695607912d5604c3eb8da25749b0900444
2019-04-17 06:38:00  WARN sync Disconnecting from peer#22 due to misbehavior: Too many failures.
2019-04-17 06:38:20  WARN sync Previous header of the first header from peer#25 `headers` message is unknown. First: 0003eb875fc001da4a57de8465f68a2730c24ca086f37c6f14780ac9ee3ea3d5. Previous: 00052461a5006c2e3b74ce48992a08695607912d5604c3eb8da25749b0900444
2019-04-17 06:38:20  WARN sync Disconnecting from peer#25 due to misbehavior: Too many failures.
2019-04-17 06:38:20  WARN sync Previous header of the first header from peer#24 `headers` message is unknown. First: 0003eb875fc001da4a57de8465f68a2730c24ca086f37c6f14780ac9ee3ea3d5. Previous: 00052461a5006c2e3b74ce48992a08695607912d5604c3eb8da25749b0900444
2019-04-17 06:38:20  WARN sync Disconnecting from peer#24 due to misbehavior: Too many failures.
2019-04-17 06:38:20  WARN sync Disconnecting from peer#26 due to misbehavior: Provided after dead-end block 001bb0d07e628cccfbf2998d27bf18bd0463a44b64bba5664ef786fa17bd5170
2019-04-17 06:38:30  WARN sync Previous header of the first header from peer#28 `headers` message is unknown. First: 0003eb875fc001da4a57de8465f68a2730c24ca086f37c6f14780ac9ee3ea3d5. Previous: 00052461a5006c2e3b74ce48992a08695607912d5604c3eb8da25749b0900444
2019-04-17 06:38:30  WARN sync Disconnecting from peer#28 due to misbehavior: Too many failures.
2019-04-17 06:38:44  INFO sync Switched to saturated state.	Chain: [sch:0 > req:0 > vfy:1027 > db:515679]
2019-04-17 06:39:09  WARN sync Disconnecting from peer#30 due to misbehavior: Got 'headers' message without known blocks
2019-04-17 06:39:09  WARN sync Last peer was marked as non-useful. Moving to saturated state.
2019-04-17 06:41:10  WARN sync Disconnecting from peer#32 due to misbehavior: Got 'headers' message without known blocks
2019-04-17 06:41:10  WARN sync Last peer was marked as non-useful. Moving to saturated state.

Is this normal?

Thread panic at block 14b054be76b515b12efcfdfd6e5d6bfe39988f937f48768c61e5c01600000000

git @ b0ebed0

Reproducibility: always

Steps:
pzec import /Zcash/blocks

What happened:

...
2019-03-11 01:29:15  INFO sync Imported 230000 blocks
2019-03-11 01:30:40  INFO sync Imported 231000 blocks
2019-03-11 01:32:00  INFO sync Imported 232000 blocks
2019-03-11 01:33:44  INFO sync Imported 233000 blocks
2019-03-11 01:35:39  INFO sync Imported 234000 blocks
2019-03-11 01:37:24  INFO sync Imported 235000 blocks
thread 'main' panicked at 'Corrupted database - no sprout root for block 14b054be76b515b12efcfdfd6e5d6bfe39988f937f48768c61e5c01600000000', src/libcore/option.rs:1008:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:71
             at src/libstd/sys_common/backtrace.rs:59
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:211
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:227
   4: <std::panicking::begin_panic::PanicPayload<A> as core::panic::BoxMeUp>::get
             at src/libstd/panicking.rs:491
   5: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:398
   6: std::panicking::try::do_call
             at src/libstd/panicking.rs:325
   7: core::ptr::real_drop_in_place
             at src/libcore/panicking.rs:95
   8: <T as core::any::Any>::get_type_id
             at src/libcore/option.rs:1008
Abort trap: 6

Expected result:
All blocks are imported.

Verification meta issue

Meta-issue to synchronize verification rules development. High-level list of what needs to be done + current status:

  • Block pre-verification (verify_block.rs): completed;
  • Header pre-verification (verify_header.rs): completed (with local equihash impl);
  • Transaction pre-verification (verify_transaction.rs): completed, except for zk-SNARKs verification;
  • Block verification (accept_block.rs): in-progress, needs check, detailed list:
    • finalized transactions;
    • BIP34;
    • founders reward.
  • Header verification (accept_header.rs): in-progress, needs check, detailed list:
    • work required;
    • timestamp;
    • version.
  • Transaction verification (accept_transaction.rs): in-progress, needs check, detailed list:
    • version, version group if && flags checks;
    • drop expired transactions;
    • size limits;
    • SignatureHash (probably take from SegWit?);
    • join split - related checks;
    • sapling - related checks;
    • sigops checks;
    • coinbase-related checks (maturity, protected, ...);
    • script checks;
    • money range checks;
  • check && disable/enable verification-related BIPs / ZIPs

no peers for the testnet

❯ RUST_LOG=info RUST_BACKTRACE=1 ./target/release/pzec --testnet 
2019-10-07 16:02:13  INFO p2p::p2p Inbound connections: (0/10)
2019-10-07 16:02:13  INFO p2p::p2p Outbound connections: (0/10)
2019-10-07 16:02:23  INFO p2p::p2p Inbound connections: (0/10)
2019-10-07 16:02:23  INFO p2p::p2p Outbound connections: (0/10)
2019-10-07 16:02:33  INFO p2p::p2p Inbound connections: (0/10)
2019-10-07 16:02:33  INFO p2p::p2p Outbound connections: (0/10)
2019-10-07 16:02:43  INFO p2p::p2p Inbound connections: (0/10)
2019-10-07 16:02:43  INFO p2p::p2p Outbound connections: (0/10)
2019-10-07 16:02:53  INFO p2p::p2p Inbound connections: (0/10)
2019-10-07 16:02:53  INFO p2p::p2p Outbound connections: (0/10)
2019-10-07 16:03:03  INFO p2p::p2p Inbound connections: (0/10)
2019-10-07 16:03:03  INFO p2p::p2p Outbound connections: (0/10)
2019-10-07 16:03:13  INFO p2p::p2p Inbound connections: (0/10)
2019-10-07 16:03:13  INFO p2p::p2p Outbound connections: (0/10)
2019-10-07 16:03:23  INFO p2p::p2p Inbound connections: (0/10)
2019-10-07 16:03:23  INFO p2p::p2p Outbound connections: (0/10)
2019-10-07 16:03:33  INFO p2p::p2p Inbound connections: (0/10)
2019-10-07 16:03:33  INFO p2p::p2p Outbound connections: (0/10)
~/.opt/parity-zcash master 1m 42s
❯ git log -n 1
commit 0f6d26e048a56260b77400fc31986e405947e717 (HEAD -> master, origin/master, origin/HEAD)
Merge: 94bd4a31 9e791e3d
Author: Deirdre Connolly <[email protected]>
Date:   Mon Jun 10 20:38:44 2019 -0400

    Merge pull request #132 from dconnolly/dependabot/cargo/slab-0.4.2
    
    Bump slab from 0.4.1 to 0.4.2

Verification Panicked

RUST_LOG=verification=debug ./target/release/pzec
during sync crashed with a message:

thread 'Heavy verification' panicked at 'internal error: entered unreachable code', verification/src/chain_verifier.rs:56:5

match block_origin {
    BlockOrigin::KnownBlock => {
            // there should be no known blocks at this point
            unreachable!();
    },

Ubuntu 16.04, rustc 1.34.0, git pull from April 17

Output log attached, running another test, with more tracing enabled, so far no crash.
pzec.out17.gz

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.