Renaming (#1)

* Update dependency graph generator to cargo-deps

* Renamed everything (pbtc|pzec) to zebra
This commit is contained in:
Deirdre Connolly 2019-06-17 03:25:49 -04:00 committed by GitHub
parent 0f6d26e048
commit 905c225996
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 6429 additions and 3120 deletions

8
CLI.md
View File

@ -1,12 +1,12 @@
# Command-line options
```
pzec 0.1.0
Parity Technologies <info@parity.io>
Parity Zcash client
zebra 0.1.0
Zcash Foundation
A consensus-compatible Zcash node client written in Rust.
USAGE:
pzec [FLAGS] [OPTIONS] [SUBCOMMAND]
zebra [FLAGS] [OPTIONS] [SUBCOMMAND]
FLAGS:
-h, --help Prints help information

52
Cargo.lock generated
View File

@ -1172,32 +1172,6 @@ dependencies = [
"getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "pzec"
version = "0.1.0"
dependencies = [
"app_dirs 1.2.1 (git+https://github.com/paritytech/app-dirs-rs)",
"chain 0.1.0",
"clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
"db 0.1.0",
"env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)",
"import 0.1.0",
"keys 0.1.0",
"libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"logs 0.1.0",
"message 0.1.0",
"miner 0.1.0",
"network 0.1.0",
"p2p 0.1.0",
"primitives 0.1.0",
"rpc 0.1.0",
"script 0.1.0",
"storage 0.1.0",
"sync 0.1.0",
"verification 0.1.0",
]
[[package]]
name = "quick-error"
version = "1.2.2"
@ -2131,6 +2105,32 @@ name = "yaml-rust"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "zebra"
version = "0.1.0"
dependencies = [
"app_dirs 1.2.1 (git+https://github.com/paritytech/app-dirs-rs)",
"chain 0.1.0",
"clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
"db 0.1.0",
"env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)",
"import 0.1.0",
"keys 0.1.0",
"libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"logs 0.1.0",
"message 0.1.0",
"miner 0.1.0",
"network 0.1.0",
"p2p 0.1.0",
"primitives 0.1.0",
"rpc 0.1.0",
"script 0.1.0",
"storage 0.1.0",
"sync 0.1.0",
"verification 0.1.0",
]
[metadata]
"checksum abstract-ns 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "2f451afbdf8ed8c8f8a98433055bb9a6b7a72aef4baff16227d2a43dd547f43b"
"checksum aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5"

View File

@ -1,9 +1,9 @@
[package]
name = "pzec"
name = "zebra"
version = "0.1.0"
license = "GPL-3.0"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Parity bitcoin client."
authors = ["Zcash Foundation"]
description = "A consensus-compatible Zcash node client written in Rust."
[dependencies]
app_dirs = { git = "https://github.com/paritytech/app-dirs-rs" }
@ -39,8 +39,8 @@ panic = 'abort'
debug = true
[[bin]]
path = "pzec/main.rs"
name = "pzec"
path = "zebra/main.rs"
name = "zebra"
[workspace]
members = [

View File

@ -1,8 +1,6 @@
# The Parity Zcash client.
# The Zcash Foundation Zcash client.
[![Build Status][travis-image]][travis-url] [![Snap Status](https://build.snapcraft.io/badge/paritytech/parity-bitcoin.svg)](https://build.snapcraft.io/user/paritytech/parity-bitcoin)
Gitter [![Gitter https://gitter.im/paritytech/parity-zcash](https://badges.gitter.im/paritytech/parity-zcash.svg)](https://gitter.im/paritytech/parity-zcash)
[![Build Status][travis-image]][travis-url]
## Blog: [Parity teams up with Zcash Foundation for Parity Zcash client](https://www.parity.io/parity-teams-up-with-zcash-foundation-for-parity-zcash-client/)
@ -24,13 +22,13 @@ Gitter [![Gitter https://gitter.im/paritytech/parity-zcash](https://badges.gitte
- [Internal Documentation](#internal-documentation)
[travis-image]: https://api.travis-ci.org/paritytech/parity-zcash.svg?branch=master
[travis-url]: https://travis-ci.org/paritytech/parity-zcash
[doc-url]: https://paritytech.github.io/parity-zcash/pzec/index.html
[travis-image]: https://api.travis-ci.org/ZcashFoundation/zebra.svg?branch=master
[travis-url]: https://travis-ci.org/ZcashFoundation/zebra
[doc-url]: https://zcashfoundation.github.io/zcashfoundation/zebra/index.html
## Installing from source
Installing `pzec` from source requires `rustc` and `cargo`.
Installing `zebra` from source requires `rustc` and `cargo`.
Minimal supported version is `rustc 1.23.0 (766bd11c8 2018-01-01)`
@ -63,31 +61,31 @@ sudo apt-get update
sudo apt-get install build-essential
```
#### Clone and build pzec
#### Clone and build zebra
Now let's clone `pzec` and enter it's directory:
Now let's clone `zebra` and enter it's directory:
```
git clone https://github.com/paritytech/parity-zcash
cd parity-zcash
git clone https://github.com/ZcashFoundation/zebra
cd zebra
# builds pzec in release mode
cargo build -p pzec --release
# builds zebra in release mode
cargo build -p zebra --release
```
`pzec` is now available at `./target/release/pzec`.
`zebra` is now available at `./target/release/zebra`.
## Installing the snap
In any of the [supported Linux distros](https://snapcraft.io/docs/core/install):
```
sudo snap install parity-zcash --edge
sudo snap install zebra --edge
```
## Running tests
`pzec` has internal unit tests and it conforms to external integration tests.
`zebra` has internal unit tests and it conforms to external integration tests.
#### Running unit tests
@ -99,24 +97,24 @@ cargo test --all
## Going online
By default parity connects to Zcash seednodes. Full list is [here](./pzec/seednodes.rs).
By default parity connects to Zcash seednodes. Full list is [here](./zebra/seednodes.rs).
To start syncing the main network, just start the client without any arguments:
```
./target/release/pzec
./target/release/zebra
```
To start syncing the testnet:
```
./target/release/pzec --testnet
./target/release/zebra --testnet
```
To not print any syncing progress add `--quiet` flag:
```
./target/release/pzec --quiet
./target/release/zebra --quiet
```
## Importing zcashd database
@ -127,18 +125,18 @@ 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"
./target/release/zebra 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"
./target/release/zebra --verification-level=none import "$ZCASH_DB/blocks"
```
## Command line interface
Full list of CLI options, which is available under `pzec --help`: see [here](CLI.md)
Full list of CLI options, which is available under `zebra --help`: see [here](CLI.md)
## Logging
@ -147,10 +145,10 @@ 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
RUST_LOG=verification=info ./target/release/zebra
```
`pzec` started with this environment variable will print all logs coming from `verification` module with verbosity `info` or higher. Available log levels are:
`zebra` started with this environment variable will print all logs coming from `verification` module with verbosity `info` or higher. Available log levels are:
- `error`
- `warn`
@ -161,15 +159,15 @@ RUST_LOG=verification=info ./target/release/pzec
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
RUST_LOG=sync=trace,p2p=trace,verification=trace,db=trace ./target/release/zebra
```
## Internal documentation
Once released, `pzec` documentation will be available [here][doc-url]. Meanwhile it's only possible to build it locally:
Once released, `zebra` documentation will be available [here][doc-url]. Meanwhile it's only possible to build it locally:
```
cd parity-zcash
cd zebra
./tools/doc.sh
open target/doc/pzec/index.html
open target/doc/zebra/index.html
```

View File

@ -258,7 +258,7 @@ mod tests {
// services set to 0, because we support nothing
from: "00000000000000000000000000000000000000007f000001208d".into(),
nonce: 0x3c76a409eb48a227,
user_agent: "pbtc".into(),
user_agent: "zebra".into(),
start_height: 0,
}, V70001 {
relay: true,

View File

@ -1,19 +1,19 @@
name: parity-bitcoin
name: zebra
version: git
summary: The Parity Bitcoin client
summary: A consensus-compatible Zcash node client written in Rust.
description: |
Bitcoin client written in Rust.
Zcash client written in Rust.
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: strict
apps:
parity-bitcoin:
command: pbtc
zebra:
command: zebra
plugs: [home, network, network-bind]
parts:
parity-bitcoin:
zebra:
source: .
plugin: rust
build-packages: [g++]

View File

@ -8,25 +8,25 @@ mkdir -p deb/usr/bin/
mkdir -p deb/DEBIAN
#create copyright, docs, compat
cp LICENSE deb/DEBIAN/copyright
echo "https://github.com/paritytech/parity-bitcoin/" >> deb/DEBIAN/docs
echo "https://github.com/ZcashFoundation/zebra/" >> deb/DEBIAN/docs
echo "8" >> deb/DEBIAN/compat
#create control file
control=deb/DEBIAN/control
echo "Package: pbtc" >> $control
echo "Package: zebra" >> $control
version=`grep -m 1 version Cargo.toml | awk '{print $3}' | tr -d '"' | tr -d "\n"`
echo "Version: $version" >> $control
echo "Source: pbtc" >> $control
echo "Source: zebra" >> $control
echo "Section: science" >> $control
echo "Priority: extra" >> $control
echo "Maintainer: Parity Technologies <devops@parity.io>" >> $control
echo "Maintainer: Zcash Foundation" >> $control
echo "Build-Depends: debhelper (>=9)" >> $control
echo "Standards-Version: 3.9.5" >> $control
echo "Homepage: https://parity.io" >> $control
echo "Vcs-Git: git://github.com/paritytech/parity-bitcoin.git" >> $control
echo "Vcs-Browser: https://github.com/paritytech/parity-bitcoin" >> $control
echo "Homepage: https://zfnd.org" >> $control
echo "Vcs-Git: git://github.com/ZcashFoundation/zebra.git" >> $control
echo "Vcs-Browser: https://github.com/ZcashFoundation/zebra" >> $control
echo "Architecture: $1" >> $control
echo "Depends: libssl1.0.0 (>=1.0.0)" >> $control
echo "Description: Bitcoin network client by Parity Technologies" >> $control
echo "Description: Zcash node client" >> $control
#build .deb package
exit

View File

@ -12,10 +12,10 @@ echo "https://github.com/paritytech/parity-bitcoin/" >> deb/DEBIAN/docs
echo "8" >> deb/DEBIAN/compat
#create control file
control=deb/DEBIAN/control
echo "Package: pbtc" >> $control
echo "Package: zebra" >> $control
version=`grep -m 1 version Cargo.toml | awk '{print $3}' | tr -d '"' | tr -d "\n"`
echo "Version: $version" >> $control
echo "Source: pbtc" >> $control
echo "Source: zebra" >> $control
echo "Section: science" >> $control
echo "Priority: extra" >> $control
echo "Maintainer: Parity Technologies <devops@parity.io>" >> $control

View File

@ -9,7 +9,7 @@ cargo doc --no-deps\
-p message\
-p miner\
-p network\
-p pzec\
-p zebra\
-p p2p\
-p primitives\
-p rpc\

View File

@ -1,6 +0,0 @@
#!/bin/bash
cd docker/hub
if [ "$1" == "latest" ]; then DOCKER_BUILD_TAG="beta-release"; fi
docker build --build-arg BUILD_TAG=$DOCKER_BUILD_TAG --no-cache=true --tag $2/pbtc-ubuntu:$1 .
docker push $2/pbtc-ubuntu:$1

View File

@ -1,23 +1,12 @@
#!/bin/bash
# Cargo graph does not work with cargo workspaces #33
# https://github.com/kbknapp/cargo-graph/issues/33
# so first we need to patch Cargo.toml and remove workspace
patch -R Cargo.toml tools/workspace.diff
cargo install cargo-deps
# Now let's rebuild Cargo.lock by telling cargo to update local package
cargo update -p pbtc
# And draw dependencies graph using cargo graph
cargo graph --build-shape box --build-line-style dashed > tools/graph.dot
# And draw dependencies graph using cargo deps
cargo deps > tools/graph.dot
# Let's fix graph ratio
patch tools/graph.dot tools/graph_ratio.diff
# Requires graphviz. If on macOS: 'brew install graphviz'
dot -Tsvg > tools/graph.svg tools/graph.dot
# Finally let's bring back old Cargo.toml file
patch Cargo.toml tools/workspace.diff
# Now let's revert Cargo.lock to previous state
cargo update -p pbtc

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 169 KiB

After

Width:  |  Height:  |  Size: 329 KiB

View File

@ -2,10 +2,10 @@ diff --git tools/graph.dot tools/graph.dot
index f842267..1a831d2 100644
--- tools/graph.dot
+++ tools/graph.dot
@@ -1,4 +1,6 @@
@@ -1,1 +1,3 @@
digraph dependencies {
+ ratio=1.0;
+ size="5,5";
N0[label="pbtc",shape=box];
N1[label="app_dirs",shape=box];
N2[label="bencher",shape=box];
n0 [label="abstract-ns"];
n1 [label="futures"];
n2 [label="quick-error"];

View File

@ -1,11 +0,0 @@
diff --git Cargo.toml Cargo.toml
index fca51d5..6a16dd6 100644
--- Cargo.toml
+++ Cargo.toml
@@ -24,3 +24,6 @@ import = { path = "import" }
[[bin]]
path = "pbtc/main.rs"
name = "pbtc"
+
+[workspace]
+members = ["bencher"]

View File

@ -1,7 +1,7 @@
name: pzec
name: zebra
version: "0.1.0"
author: Parity Technologies <info@parity.io>
about: Parity Zcash client
author: Zcash Foundation
about: A consensus-compatible Zcash node client written in Rust.
args:
- testnet:
long: testnet

View File

@ -46,7 +46,7 @@ impl BlockNotifier {
let err = system(c_command.as_ptr());
if err != 0 {
error!(target: "pzec", "Block notification command {} exited with error code {}", command, err);
error!(target: "zebra", "Block notification command {} exited with error code {}", command, err);
}
}
},
@ -55,7 +55,7 @@ impl BlockNotifier {
}
}
}
trace!(target: "pzec", "Block notification thread stopped");
trace!(target: "zebra", "Block notification thread stopped");
}
}

View File

@ -1,5 +1,3 @@
//! Parity bitcoin client.
#[macro_use]
extern crate clap;
#[macro_use]
@ -32,12 +30,12 @@ mod rpc_apis;
use app_dirs::AppInfo;
pub const APP_INFO: AppInfo = AppInfo { name: "pzec", author: "Parity" };
pub const APP_INFO: AppInfo = AppInfo { name: "zebra", author: "Zcash Foundation" };
pub const PROTOCOL_VERSION: u32 = 70_014;
pub const PROTOCOL_MINIMUM: u32 = 70_001;
pub const ZCASH_PROTOCOL_VERSION: u32 = 170_007;
pub const ZCASH_PROTOCOL_MINIMUM: u32 = 170_007;
pub const USER_AGENT: &'static str = "pzec";
pub const USER_AGENT: &'static str = "zebra";
pub const REGTEST_USER_AGENT: &'static str = "/Satoshi:0.12.1/";
pub const LOG_INFO: &'static str = "sync=info";