Skip to content

Commit

Permalink
Bump dependencies and release v0.1.8 (#41)
Browse files Browse the repository at this point in the history
* Bump dependencies

* Bump `bindgen`

* Remove zcashd subtree

* Squashed 'depend/zcash/' content from commit 35186b009

git-subtree-dir: depend/zcash
git-subtree-split: 35186b00928f3ba994f0e66bb234c412cbffc7b6

* Update to zcashd v5.3.0

* Make dependency versions match zcashd v5.3.0

* Update README for Orchard, and make dependency bumps clearer

* Add release 0.1.8 to the CHANGELOG

Co-authored-by: teor <teor@riseup.net>
  • Loading branch information
upbqdn and teor2345 committed Oct 30, 2022
1 parent 5266ac1 commit b4a8aa2
Show file tree
Hide file tree
Showing 397 changed files with 22,611 additions and 11,697 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased] - ReleaseDate

## [0.1.8] - 2022-10-31

### Changed
- Updated `depend/zcash` to version 5.3.0 which includes updated dependencies
- Updated `bindgen` to version 0.60.1

## [0.1.7] - 2022-08-31

### Changed
Expand Down
23 changes: 16 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,34 @@ path = "src/lib.rs"
external-secp = []

[dependencies]
# Must match depend/zcash/Cargo.toml
# All these dependencies must match the versions in:
# https://github.com/zcash/zcash/blob/<git subtree version>/Cargo.toml
blake2b_simd = "1"
cxx = { version = "=1.0.72", features = ["c++17"] }
cxx = { version = "=1.0.79", features = ["c++17"] }
libc = "0.2"
memuse = "0.2"
orchard = "0.2"
orchard = "0.3"
rand_core = "0.6"
tracing = "0.1"
zcash_encoding = "0.1"
zcash_note_encryption = "0.1"
zcash_primitives = { version = "0.7", features = ["transparent-inputs"] }
zcash_encoding = "0.2"
zcash_note_encryption = "0.2"
zcash_primitives = { version = "0.8.1", features = ["transparent-inputs"] }

[build-dependencies]
# The `bindgen` dependency should match the version used by zebra-state's `rocksdb` dependency in:
# https://github.com/ZcashFoundation/zebra/blob/main/zebra-state/Cargo.toml
bindgen = "0.60.1"

# These dependencies are shared with a lot of other Zebra dependencies,
# so they should be left at the minimum required versions.
# (They will automatically get upgraded as other libraries or Zebra upgrades.)
cc = { version = ">= 1.0.36", features = ["parallel"] }
cxx-gen = "0.7.73"
bindgen = "0.59"
syn = { version = "1.0.99", features = ["full", "printing"] }

[dev-dependencies]
# These dependencies are shared with a lot of other Zebra dependencies.
# (See above.)
rustc-serialize = "0.3"
hex = "0.4.2"
lazy_static = "1.4.0"
Expand Down
28 changes: 20 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,11 @@ using `bindgen` to generate Rust bindings, and compiling everything together
into a single library. Due to the way the `zcash_script` is written we unfortunately need
to include a lot of other stuff e.g. the orchard library.

Note that `zcash_script` (the C++ library/folder inside `zcash`) uses some Rust
FFI functions from `zcash`; and it also links to `librustzcash` which is written in Rust.
Therefore, when updating `zcash_script` (this crate), we need to make sure that shared dependencies
between all of those are the same versions (and are patched to the same revisions, if applicable).
To do that, check for versions in:
### Updating this crate

- `zcash/Cargo.toml` in the revision pointed to by this crate (also check for patches)
- `librustzcash/Cargo.toml` in the revision pointed to by `zcash` (also check for patches)
- `librustzcash/<crate>/Cargo.toml` in the revision pointed to by `zcash`
1. Update `depend/zcash` with the latest tagged version of `zcashd`
2. Update `Cargo.toml` versions to match the versions used by the latest tagged version of `zcashd`, and its dependencies
3. Publish a new release

### Updating `depend/zcash`

Expand All @@ -55,6 +51,22 @@ git rm depend/zcash/Cargo.toml
where `<ref>` is a reference to a branch, tag or commit (it should be a tag when preparing
a release, but it will be likely a branch or commit when testing).

### Updating `Cargo.toml`

Note that `zcash_script` (the C++ library/folder inside `zcash`) uses some Rust
FFI functions from `zcash`; and it also links to `librustzcash` which is written in Rust.
Therefore, when updating `zcash_script` (this crate), we need to make sure that shared dependencies
between all of those are the same versions (and are patched to the same revisions, if applicable).
To do that, check for versions in:

- `zcash/Cargo.toml` in the revision pointed to by this crate (also check for patches)
- `librustzcash/Cargo.toml` in the revision pointed to by `zcash` (also check for patches)
- `librustzcash/<crate>/Cargo.toml` in the revision pointed to by `zcash`
- `orchard/Cargo.toml` in the revision pointed to by `zcash` (also check for patches)

To double-check, you can use `cargo tree` or `cargo deny check bans` on Zebra,
once the `zcash_script`, `librustzcash`, and `orchard` versions have all been updated.

### Publishing New Releases

Releases for `zcash-script` are made with the help of [cargo release](https://github.com/sunng87/cargo-release).
Expand Down
14 changes: 14 additions & 0 deletions depend/zcash/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This configures basic cross-editor formatting.
#
# See https://editorconfig.org/ for more info, and to see if your editor
# requires a plugin to take advantage of it.

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
10 changes: 1 addition & 9 deletions depend/zcash/.github/workflows/audits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: install
args: --git https://github.com/mozilla/cargo-vet.git cargo-vet

# This is necessary because `cargo vet --locked` implies `cargo metadata --frozen`,
# preventing all network access.
- name: Ensure dependency sources are present
uses: actions-rs/cargo@v1
with:
command: fetch
args: --locked
args: cargo-vet

- name: Run cargo vet --locked
uses: actions-rs/cargo@v1
Expand Down
4 changes: 4 additions & 0 deletions depend/zcash/.github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ on:
branches:
- master

permissions: {}
jobs:
deploy:
permissions:
contents: write # to push pages branch (peaceiris/actions-gh-pages)

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
11 changes: 6 additions & 5 deletions depend/zcash/.github/workflows/lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: sudo python3 -m pip install yq

- name: Cargo patches
run: ./test/lint/lint-cargo-patches.sh
Expand Down Expand Up @@ -51,7 +53,6 @@ jobs:
- name: Shellcheck
run: ./test/lint/lint-shell.sh
if: always()
continue-on-error: true # Temporary until we get this passing

- name: Whitespace
run: ./test/lint/lint-whitespace.sh
Expand All @@ -74,19 +75,19 @@ jobs:
if: always()

rust-clippy:
name: Clippy (1.59.0)
name: Clippy (1.64.0)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.59.0
toolchain: 1.64.0
components: clippy
override: true
- name: Run clippy
uses: actions-rs/clippy-check@v1
with:
name: Clippy (1.59.0)
name: Clippy (1.64.0)
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets -- -D warnings

Expand All @@ -97,7 +98,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.59.0
toolchain: 1.64.0
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
Expand Down
132 changes: 132 additions & 0 deletions depend/zcash/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
*.tar.gz
*.deb
*.exe
src/bitcoin
src/zcashd
src/zcashd-wallet-tool
src/zcash-cli
src/zcash-gtest
src/zcash-inspect
src/zcash-tx
src/test/test_bitcoin
zcutil/bin/

*zcashTest.pk
*zcashTest.vk

# autoreconf
Makefile.in
aclocal.m4
autom4te.cache/
build-aux/config.guess
build-aux/config.sub
build-aux/depcomp
build-aux/install-sh
build-aux/ltmain.sh
build-aux/m4/libtool.m4
build-aux/m4/lt~obsolete.m4
build-aux/m4/ltoptions.m4
build-aux/m4/ltsugar.m4
build-aux/m4/ltversion.m4
build-aux/missing
build-aux/compile
build-aux/test-driver
config.log
config.status
configure
configure~
libtool
src/config/bitcoin-config.h
src/config/bitcoin-config.h.in
src/config/stamp-h1
share/setup.nsi
confdefs.h
conftest.cpp
conftest.err

cache/
venv-mnf/
src/univalue/gen

.deps
.dirstamp
.libs
.*.swp
*.*~*
*.bak
*.rej
*.orig
*.pyc
*.o
*.o.tmp
*.o-*
.zcash
*.a
*.lib
*.pb.cc
*.pb.h
.vscode

*.log
*.trs
*.dmg

*.json.h
*.raw.h

#libtool object files
*.lo
*.la

# Compilation
Makefile

# Rust
.cargo/.configured-for-*
.cargo/config
src/rust/gen/
target/

# Unit-tests
Makefile.test
src/test/buildenv.py

# Resources cpp
qrc_*.cpp

# Mac specific
.DS_Store
build

#lcov
*.gcno
*.gcda
/*.info
test_bitcoin.coverage/
zcash-gtest.coverage/
total.coverage/
coverage_percent.txt
afl-temp

#build tests
linux-coverage-build
linux-build
win32-build
qa/pull-tester/tests_config.py
qa/pull-tester/tests_config.ini
qa/cache/*

!src/leveldb*/Makefile

/doc/doxygen/

libzcash_script.pc

contrib/debian/files
contrib/debian/substvars

src/fuzzing/*/input
src/fuzzing/*/output
src/fuzz.cpp

.updatecheck-token
Loading

0 comments on commit b4a8aa2

Please sign in to comment.