Skip to content

Commit

Permalink
Merge branch 'main' into add-full-sync-test
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavovalverde committed Mar 2, 2022
2 parents 794d3fe + a0c4512 commit 7582189
Show file tree
Hide file tree
Showing 88 changed files with 1,629 additions and 155 deletions.
45 changes: 45 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# this teams will be requested for review when someone opens a pull request.
* @ZcashFoundation/network-reviewers @ZcashFoundation/cryptographic-reviewers

# Network and Async Code
# To be reviewed by Teor, Janito, or Alfredo.
/tower-batch/ @ZcashFoundation/network-reviewers
/tower-fallback/ @ZcashFoundation/network-reviewers
/zebra-consensus/ @ZcashFoundation/network-reviewers
/zebra-network/ @ZcashFoundation/network-reviewers
/zebra-node-services/ @ZcashFoundation/network-reviewers
/zebra-state/ @ZcashFoundation/network-reviewers
/zebra-tests/src/mock_service.rs @ZcashFoundation/network-reviewers
/zebra-tests/src/service_extensions.rs @ZcashFoundation/network-reviewers
/zebra-tests/src/transcript.rs @ZcashFoundation/network-reviewers
/zebra-utils/ @ZcashFoundation/network-reviewers
/zebrad/src/commands/ @ZcashFoundation/network-reviewers
/zebrad/src/components/ @ZcashFoundation/network-reviewers

# Cryptographic Code
# To be reviewed by Deirdre, Conrado, or Marek.
/zebra-consensus/src/primitives/ @ZcashFoundation/cryptographic-reviewers
/zebra-chain/src/primitives/ @ZcashFoundation/cryptographic-reviewers
/zebra-chain/src/orchard/ @ZcashFoundation/cryptographic-reviewers
/zebra-chain/src/sapling/ @ZcashFoundation/cryptographic-reviewers
/zebra-chain/src/sprout/ @ZcashFoundation/cryptographic-reviewers
/zebra-chain/src/transparent/ @ZcashFoundation/cryptographic-reviewers
/zebra-chain/src/history_tree.rs @ZcashFoundation/cryptographic-reviewers
/zebra-chain/src/history_tree/ @ZcashFoundation/cryptographic-reviewers

# Devops Code
# To be reviewed by Gustavo, Deirdre, Teor, or Conrado.
/.github/ @ZcashFoundation/devops-reviewers
/docker/ @ZcashFoundation/devops-reviewers
cloudbuild.yaml @ZcashFoundation/devops-reviewers
codecov.yml @ZcashFoundation/devops-reviewers
.dockerignore @ZcashFoundation/devops-reviewers
codecov.yml @ZcashFoundation/devops-reviewers
firebase.json @ZcashFoundation/devops-reviewers
katex-header.html @ZcashFoundation/devops-reviewers

# Unsafe Code
# To be reviewed by Teor, Janito, Conrado, or Marek.
/zebra-script/ @ZcashFoundation/unsafe-rust-reviewers
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
with:
target: runtime
context: .
file: ./docker/Dockerfile.build
file: ./docker/Dockerfile
tags: |
${{ env.GAR_BASE }}/${{ env.GITHUB_HEAD_REF_SLUG_URL || env.GITHUB_REF_SLUG_URL }}:latest
${{ env.GAR_BASE }}/${{ env.GITHUB_HEAD_REF_SLUG_URL || env.GITHUB_REF_SLUG_URL }}:${{ env.GITHUB_SHA_SHORT }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/ci.patch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
- '**/Cargo.toml'
- '**/Cargo.lock'
- '**/deny.toml'
- 'docker/**'
- '.github/workflows/ci.yml'

jobs:
Expand Down
22 changes: 21 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
with:
target: tester
context: .
file: ./docker/Dockerfile.build
file: ./docker/Dockerfile
tags: |
${{ env.GAR_BASE }}/${{ env.IMAGE_NAME }}:latest
${{ env.GAR_BASE }}/${{ env.IMAGE_NAME }}:${{ env.GITHUB_EVENT_PULL_REQUEST_HEAD_SHA_SHORT || env.GITHUB_SHA_SHORT }}
Expand Down Expand Up @@ -157,6 +157,26 @@ jobs:
docker pull ${{ env.GAR_BASE }}/${{ env.IMAGE_NAME }}:${{ env.GITHUB_EVENT_PULL_REQUEST_HEAD_SHA_SHORT || env.GITHUB_SHA_SHORT }}
docker run -e ZEBRA_SKIP_IPV6_TESTS --name zebrad-tests -t ${{ env.GAR_BASE }}/${{ env.IMAGE_NAME }}:${{ env.GITHUB_EVENT_PULL_REQUEST_HEAD_SHA_SHORT || env.GITHUB_SHA_SHORT }} cargo test --locked --release --features enable-sentry --test acceptance sync_large_checkpoints_ -- --ignored
test-lightwalletd-integration:
name: Test integration with lightwalletd
runs-on: ubuntu-latest
needs: build
if: ${{ github.event.inputs.regenerate-disks != 'true' }}
steps:
- uses: actions/checkout@v2.4.0
with:
persist-credentials: false

- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v4

- name: Run tests with included lightwalletd binary
run: |
docker pull ${{ env.GAR_BASE }}/zebrad-test:${{ env.GITHUB_EVENT_PULL_REQUEST_HEAD_SHA_SHORT || env.GITHUB_SHA_SHORT }}
docker run -e ZEBRA_SKIP_IPV6_TESTS -e ZEBRA_TEST_LIGHTWALLETD --name zebrad-tests -t ${{ env.GAR_BASE }}/zebrad-test:${{ env.GITHUB_EVENT_PULL_REQUEST_HEAD_SHA_SHORT || env.GITHUB_SHA_SHORT }} cargo test --locked --release --features enable-sentry --test acceptance -- lightwalletd_integration
env:
ZEBRA_TEST_LIGHTWALLETD: '1'

regenerate-stateful-disks:
name: Regenerate stateful disks
runs-on: ubuntu-latest
Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/zcash-lightwalletd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: zcash-lightwalletd

on:
workflow_dispatch:
push:
branches:
- 'main'
paths:
- 'zebra-rpc/**'
- 'zebrad/tests/acceptance.rs'
- 'zebrad/src/config.rs'
- 'zebrad/src/commands/start.rs'
- 'docker/zcash-lightwalletd/Dockerfile'
- '.github/workflows/zcash-lightwalletd.yml'

env:
PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
GAR_BASE: us-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/zebra
GCR_BASE: gcr.io/${{ secrets.GCP_PROJECT_ID }}
IMAGE_NAME: lightwalletd

jobs:
build:
name: Build images
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2.4.0
with:
repository: adityapk00/lightwalletd
ref: 'master'
persist-credentials: false

- uses: actions/checkout@v2.4.0
with:
path: zebra
persist-credentials: false

- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v4

# Setup gcloud CLI
- name: Authenticate to Google Cloud
id: auth
uses: google-github-actions/auth@v0.6.0
with:
credentials_json: ${{ secrets.GOOGLE_CREDENTIALS }}

# Setup Docker Buildx to allow use of docker cache layers from GH
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to Google Artifact Registry
uses: docker/login-action@v1.12.0
with:
registry: us-docker.pkg.dev
username: _json_key
password: ${{ secrets.GOOGLE_CREDENTIALS }}

# Build and push image to Google Artifact Registry
- name: Build & push
id: docker_build
uses: docker/build-push-action@v2.9.0
with:
target: builder
context: .
file: ./zebra/docker/zcash-lightwalletd/Dockerfile
tags: |
${{ env.GAR_BASE }}/${{ env.IMAGE_NAME }}:latest
${{ env.GAR_BASE }}/${{ env.IMAGE_NAME }}:${{ env.GITHUB_SHA_SHORT }}
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
3 changes: 2 additions & 1 deletion .github/workflows/zcash-params.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- 'zebra-consensus/src/primitives/groth16/params.rs'
- 'zebra-consensus/src/chain.rs'
- 'zebrad/src/commands/start.rs'
- 'docker/zcash-params/Dockerfile'
- '.github/workflows/zcash-params.yml'

env:
Expand Down Expand Up @@ -57,7 +58,7 @@ jobs:
with:
target: builder
context: .
file: ./docker/Dockerfile.params
file: ./docker/zcash-params/Dockerfile
tags: |
${{ env.GAR_BASE }}/${{ env.IMAGE_NAME }}:latest
${{ env.GAR_BASE }}/${{ env.IMAGE_NAME }}:${{ env.GITHUB_SHA_SHORT }}
Expand Down
94 changes: 92 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docker/Dockerfile.build → docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ FROM builder AS tester
# Pre-download Zcash Sprout and Sapling parameters
# TODO: do not hardcode the user /root/ even though is a safe assumption
COPY --from=us-docker.pkg.dev/zealous-zebra/zebra/zcash-params /root/.zcash-params /root/.zcash-params
COPY --from=us-docker.pkg.dev/zealous-zebra/zebra/lightwalletd /lightwalletd /usr/local/bin

RUN cargo test --locked --release --features enable-sentry --workspace --no-run

Expand Down
Loading

0 comments on commit 7582189

Please sign in to comment.