Skip to content

Commit

Permalink
Merge branch 'develop' into feat/zetaclient-london-gas
Browse files Browse the repository at this point in the history
  • Loading branch information
swift1337 committed Jun 27, 2024
2 parents 9ad5692 + ef8470c commit 3bc0394
Show file tree
Hide file tree
Showing 127 changed files with 2,679 additions and 696 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
fetch-depth: 0

- name: Set Version from the release title.
if: github.event_name != 'workflow_dispatch'
if: github.event_name == 'workflow_dispatch'
run: |
echo "GITHUB_TAG_MAJOR_VERSION=${{ github.event.release.name }}" >> $GITHUB_ENV
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
fetch-depth: 0

- name: Set Version from the release title.
if: github.event_name != 'workflow_dispatch'
if: github.event_name == 'workflow_dispatch'
run: |
echo "GITHUB_TAG_MAJOR_VERSION=${{ github.event.release.name }}" >> $GITHUB_ENV
Expand Down
90 changes: 89 additions & 1 deletion .github/workflows/execute_advanced_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
type: boolean
required: false
default: false
e2e-stateful-upgrade-test:
type: boolean
required: false
default: false
e2e-performance-test:
type: boolean
required: false
Expand All @@ -19,6 +23,10 @@ on:
type: boolean
required: false
default: false
e2e-stateful-data-test:
type: boolean
required: false
default: false
debug:
type: boolean
required: false
Expand Down Expand Up @@ -63,7 +71,7 @@ jobs:

e2e-upgrade-test:
if: ${{ github.event.inputs.e2e-upgrade-test == 'true' || github.event_name == 'schedule' }}
runs-on: buildjet-4vcpu-ubuntu-2204
runs-on: buildjet-16vcpu-ubuntu-2204
timeout-minutes: 120
steps:
- name: "Checkout Code"
Expand Down Expand Up @@ -92,6 +100,37 @@ jobs:
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_CI_ALERTS }}

e2e-stateful-upgrade-test:
if: ${{ github.event.inputs.e2e-stateful-upgrade-test == 'true' || github.event_name == 'schedule' }}
runs-on: buildjet-16vcpu-ubuntu-2204
timeout-minutes: 120
steps:
- name: "Checkout Code"
uses: actions/checkout@v4

- name: Start Test
run: make start-upgrade-import-mainnet-test

- name: Watch Test
run: |
container_id=$(docker ps --filter "ancestor=orchestrator:latest" --format "{{.ID}}")
docker logs -f "${container_id}" &
exit $(docker wait "${container_id}")
- name: Full Log Dump On Failure
if: failure()
run: |
make stop-localnet
- name: Notify Slack on Failure
if: failure() && github.event_name == 'schedule'
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_CI_ALERTS }}

e2e-upgrade-test-light:
if: ${{ github.event.inputs.e2e-upgrade-test-light == 'true' }}
runs-on: buildjet-4vcpu-ubuntu-2204
Expand All @@ -114,6 +153,15 @@ jobs:
run: |
make stop-localnet
- name: Notify Slack on Failure
if: failure() && github.event_name == 'schedule'
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_CI_ALERTS }}

e2e-performance-test:
if: ${{ github.event.inputs.e2e-performance-test == 'true' }}
runs-on: buildjet-4vcpu-ubuntu-2204
Expand All @@ -135,3 +183,43 @@ jobs:
if: failure()
run: |
make stop-localnet
- name: Notify Slack on Failure
if: failure() && github.event_name == 'schedule'
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_CI_ALERTS }}

e2e-stateful-data-test:
if: ${{ github.event.inputs.e2e-stateful-data-test == 'true' || github.event_name == 'schedule' }}
runs-on: buildjet-16vcpu-ubuntu-2204
timeout-minutes: 120
steps:
- name: "Checkout Code"
uses: actions/checkout@v4

- name: Start Test
run: make start-e2e-import-mainnet-test

- name: Watch Test
run: |
container_id=$(docker ps --filter "ancestor=orchestrator:latest" --format "{{.ID}}")
docker logs -f "${container_id}" &
exit $(docker wait "${container_id}")
- name: Full Log Dump On Failure
if: failure()
run: |
make stop-localnet
- name: Notify Slack on Failure
if: failure() && github.event_name == 'schedule'
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_CI_ALERTS }}
57 changes: 53 additions & 4 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,8 @@ jobs:
shell: bash
run: |
make start-e2e-admin-test
container_id=$(docker ps --filter "ancestor=orchestrator:latest" --format "{{.ID}}")
docker logs -f "${container_id}" & exit $(docker wait "${container_id}")
- name: Mark Job Complete Skipped
if: ${{ github.event.inputs.skip_checks == 'true' }}
Expand All @@ -377,7 +379,7 @@ jobs:
e2e-upgrade-test:
needs:
- check_branch
runs-on: buildjet-4vcpu-ubuntu-2204
runs-on: buildjet-16vcpu-ubuntu-2204
timeout-minutes: 120
steps:
- name: "Checkout Code"
Expand All @@ -388,7 +390,33 @@ jobs:
if: ${{ github.event.inputs.skip_checks != 'true' }}
shell: bash
run: |
make start-upgrade-test
make start-upgrade-import-mainnet-test
container_id=$(docker ps --filter "ancestor=orchestrator:latest" --format "{{.ID}}")
docker logs -f "${container_id}" & exit $(docker wait "${container_id}")
- name: Mark Job Complete Skipped
if: ${{ github.event.inputs.skip_checks == 'true' }}
shell: bash
run: |
echo "continue"
e2e-stateful-data-test:
needs:
- check_branch
runs-on: buildjet-16vcpu-ubuntu-2204
timeout-minutes: 120
steps:
- name: "Checkout Code"
if: ${{ github.event.inputs.skip_checks != 'true' }}
uses: actions/checkout@v3

- name: Execute stateful-data-test
if: ${{ github.event.inputs.skip_checks != 'true' }}
shell: bash
run: |
make start-e2e-import-mainnet-test
container_id=$(docker ps --filter "ancestor=orchestrator:latest" --format "{{.ID}}")
docker logs -f "${container_id}" & exit $(docker wait "${container_id}")
- name: Mark Job Complete Skipped
if: ${{ github.event.inputs.skip_checks == 'true' }}
Expand All @@ -397,6 +425,10 @@ jobs:
echo "continue"
publish-release:
permissions:
id-token: write
contents: write
attestations: write
if: ${{ github.event.inputs.skip_release == 'false' }}
needs:
- gosec
Expand All @@ -407,6 +439,7 @@ jobs:
- smoke-test
- build-test
- e2e-admin-tests
- e2e-stateful-data-test
- e2e-upgrade-test
- check_branch
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -466,18 +499,34 @@ jobs:
uses: softprops/action-gh-release@v1
with:
prerelease: true
token: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }}
token: ${{ secrets.GITHUB_TOKEN }}
body_path: ${{ github.workspace }}-CHANGELOG.txt
tag_name: ${{ env.GITHUB_TAG_MAJOR_VERSION }}

- name: Publish Release Files
env:
GITHUB_TOKEN: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_CURRENT_TAG: ${{ env.GITHUB_TAG_MAJOR_VERSION }}
run: |
touch .release-env
make release
- name: Artifact Attestations
id: attestation
uses: actions/attest-build-provenance@v1
with:
subject-path: |
dist/zetacored_**/*
dist/zetaclientd_**/*
dist/checksums.txt
- name: Upload Attestation Bundle
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
gh release upload ${{ env.GITHUB_TAG_MAJOR_VERSION }} ${{ steps.attestation.outputs.bundle-path }}
- name: Clean Up Workspace
if: always()
shell: bash
Expand Down
1 change: 0 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# - Add SBOMs
# - Add Docker Builds
# - SLSA - https://github.com/goreleaser/goreleaser-example-slsa-provenance
# - Add Code Signing

env:
- CGO_ENABLED=1
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile-localnet
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN go install cosmossdk.io/tools/cosmovisor/cmd/[email protected]
FROM golang:1.20.14-bookworm AS base-runtime

RUN apt update && \
apt install -yq jq curl tmux python3 openssh-server iputils-ping iproute2 && \
apt install -yq jq yq curl tmux python3 openssh-server iputils-ping iproute2 && \
rm -rf /var/lib/apt/lists/*

RUN ssh-keygen -A && \
Expand All @@ -46,6 +46,7 @@ ENV PATH /root/.zetacored/cosmovisor/current/bin/:/root/.zetaclientd/upgrades/cu
COPY contrib/localnet/scripts /root
COPY contrib/localnet/ssh_config /etc/ssh/ssh_config.d/localnet.conf
COPY contrib/localnet/zetacored /root/zetacored
COPY cmd/zetae2e/config/localnet.yml /root/config.yml

RUN chmod 755 /root/*.sh && \
chmod 644 /etc/ssh/ssh_config.d/localnet.conf
Expand Down
49 changes: 32 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,22 @@ mocks:
generate: proto-gen openapi specs typescript docs-zetacored mocks fmt
.PHONY: generate


###############################################################################
### E2E tests and localnet ###
### Localnet ###
###############################################################################
start-localnet: zetanode start-localnet-skip-build

start-localnet-skip-build:
@echo "--> Starting localnet"
export LOCALNET_MODE=setup-only && \
cd contrib/localnet/ && $(DOCKER) compose -f docker-compose.yml up -d

stop-localnet:
cd contrib/localnet/ && $(DOCKER) compose down --remove-orphans

###############################################################################
### E2E tests ###
###############################################################################

zetanode:
Expand Down Expand Up @@ -233,11 +247,21 @@ start-e2e-performance-test: zetanode
export E2E_ARGS="--test-performance" && \
cd contrib/localnet/ && $(DOCKER) compose -f docker-compose.yml up -d

start-e2e-import-mainnet-test: zetanode
@echo "--> Starting e2e import-data test"
export ZETACORED_IMPORT_GENESIS_DATA=true && \
export ZETACORED_START_PERIOD=15m && \
cd contrib/localnet/ && ./scripts/import-data.sh mainnet && $(DOCKER) compose -f docker-compose.yml up -d

start-stress-test: zetanode
@echo "--> Starting stress test"
cd contrib/localnet/ && $(DOCKER) compose -f docker-compose.yml -f docker-compose-stress.yml up -d

#TODO: replace OLD_VERSION with v16 tag once its available
###############################################################################
### Upgrade Tests ###
###############################################################################


zetanode-upgrade: zetanode
@echo "Building zetanode-upgrade"
$(DOCKER) build -t zetanode:old -f Dockerfile-localnet --target old-runtime --build-arg OLD_VERSION='release/v17' .
Expand All @@ -256,22 +280,13 @@ start-upgrade-test-light: zetanode-upgrade
export UPGRADE_HEIGHT=90 && \
cd contrib/localnet/ && $(DOCKER) compose -f docker-compose.yml -f docker-compose-upgrade.yml up -d

start-localnet: zetanode start-localnet-skip-build

start-localnet-skip-build:
@echo "--> Starting localnet"
export LOCALNET_MODE=setup-only && \
cd contrib/localnet/ && $(DOCKER) compose -f docker-compose.yml up -d

start-e2e-import-mainnet-test: zetanode
@echo "--> Starting e2e import-data test"
start-upgrade-import-mainnet-test: zetanode-upgrade
@echo "--> Starting import-data upgrade test"
export LOCALNET_MODE=upgrade && \
export ZETACORED_IMPORT_GENESIS_DATA=true && \
export ZETACORED_START_PERIOD=10m && \
cd contrib/localnet/ && ./scripts/import-data.sh mainnet && $(DOCKER) compose -f docker-compose.yml up -d

stop-localnet:
cd contrib/localnet/ && $(DOCKER) compose down --remove-orphans

export ZETACORED_START_PERIOD=15m && \
export UPGRADE_HEIGHT=225 && \
cd contrib/localnet/ && ./scripts/import-data.sh mainnet && $(DOCKER) compose -f docker-compose.yml -f docker-compose-upgrade.yml up -d
###############################################################################
### Monitoring ###
###############################################################################
Expand Down
9 changes: 8 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
* [2325](https://github.com/zeta-chain/node/pull/2325) - revert telemetry server changes
* [2339](https://github.com/zeta-chain/node/pull/2339) - add binaries related question to syncing issue form
* [2366](https://github.com/zeta-chain/node/pull/2366) - add migration script for adding authorizations table
* [2372](https://github.com/zeta-chain/node/pull/2372) - add queries for tss fund migration info

### Refactor

Expand Down Expand Up @@ -67,6 +68,7 @@
* [2329](https://github.com/zeta-chain/node/pull/2329) - fix TODOs in rpc unit tests
* [2342](https://github.com/zeta-chain/node/pull/2342) - extend rpc unit tests with testing extension to include synthetic ethereum txs
* [2299](https://github.com/zeta-chain/node/pull/2299) - add `zetae2e` command to deploy test contracts
* [2364](https://github.com/zeta-chain/node/pull/2364) - add stateful upgrade test
* [2360](https://github.com/zeta-chain/node/pull/2360) - add stateful e2e tests.
* [2349](https://github.com/zeta-chain/node/pull/2349) - add TestBitcoinDepositRefund and WithdrawBitcoinMultipleTimes E2E tests
* [2368](https://github.com/zeta-chain/node/pull/2368) - eliminate panic usage across testing suite
Expand All @@ -83,9 +85,10 @@
* [2256](https://github.com/zeta-chain/node/pull/2256) - fix rate limiter falsely included reverted non-withdraw cctxs
* [2327](https://github.com/zeta-chain/node/pull/2327) - partially cherry picked the fix to Bitcoin outbound dust amount
* [2362](https://github.com/zeta-chain/node/pull/2362) - set 1000 satoshis as minimum BTC amount that can be withdrawn from zEVM
* [2382](https://github.com/zeta-chain/node/pull/2382) - add tx input and gas in rpc methods for synthetic eth txs

### CI

* [2388](https://github.com/zeta-chain/node/pull/2388) - added GitHub attestations of binaries produced in the release workflow.
* [2285](https://github.com/zeta-chain/node/pull/2285) - added nightly EVM performance testing pipeline, modified localnet testing docker image to utilitze debian:bookworm, removed build-jet runners where applicable, removed deprecated/removed upgrade path testing pipeline
* [2268](https://github.com/zeta-chain/node/pull/2268) - updated the publish-release pipeline to utilize the Github Actions Ubuntu 20.04 Runners
* [2070](https://github.com/zeta-chain/node/pull/2070) - Added commands to build binaries from the working branch as a live full node rpc to test non-governance changes
Expand All @@ -96,6 +99,10 @@
* [2335](https://github.com/zeta-chain/node/pull/2335) - ci: updated the artillery report to publish to artillery cloud
* [2377](https://github.com/zeta-chain/node/pull/2377) - ci: adjusted sast-linters.yml to not scan itself, nor alert on removal of nosec.

### Documentation

* [2321](https://github.com/zeta-chain/node/pull/2321) - improve documentation for ZetaClient functions and packages

## v17.0.0

### Fixes
Expand Down
Loading

0 comments on commit 3bc0394

Please sign in to comment.