Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dydxprotocol/v4-chain
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: indexer/v3.0.2
Choose a base ref
...
head repository: dydxprotocol/v4-chain
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing 2,177 changed files with 264,966 additions and 40,046 deletions.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/default-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Default Template
about: Template to auto add v4-chain label
title: ''
labels: v4-chain
assignees: ''

---


115 changes: 114 additions & 1 deletion .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -13,11 +13,124 @@ pull_request_rules:
backport:
branches:
- release/protocol/v0.3.x
- name: backport to release/indexer/v1.x branch
conditions:
- base=main
- label=backport/indexer/v1.x
actions:
backport:
branches:
- release/indexer/v1.x
- name: backport to release/protocol/v1.x branch
conditions:
- base=main
- label=backport/protocol/v1.x
actions:
backport:
branches:
- release/protocol/v1.x
- release/protocol/v1.x
- name: backport to release/protocol/v2.x branch
conditions:
- base=main
- label=backport/protocol/v2.x
actions:
backport:
branches:
- release/protocol/v2.x
- name: backport to release/indexer/v3.x branch
conditions:
- base=main
- label=backport/indexer/v3.x
actions:
backport:
branches:
- release/indexer/v3.x
- name: backport to release/protocol/v3.x branch
conditions:
- base=main
- label=backport/protocol/v3.x
actions:
backport:
branches:
- release/protocol/v3.x
- name: backport to release/indexer/v4.x branch
conditions:
- base=main
- label=backport/indexer/v4.x
actions:
backport:
branches:
- release/indexer/v4.x
- name: backport to release/protocol/v4.x branch
conditions:
- base=main
- label=backport/protocol/v4.x
actions:
backport:
branches:
- release/protocol/v4.x
- name: backport to release/indexer/v5.x branch
conditions:
- base=main
- label=backport/indexer/v5.x
actions:
backport:
branches:
- release/indexer/v5.x
- name: backport to release/protocol/v5.x branch
conditions:
- base=main
- label=backport/protocol/v5.x
actions:
backport:
branches:
- release/protocol/v5.x
- name: backport to release/protocol/v5.1.x branch
conditions:
- base=main
- label=backport/protocol/v5.1.x
actions:
backport:
branches:
- release/protocol/v5.1.x
- name: backport to release/protocol/v5.2.x branch
conditions:
- base=main
- label=backport/protocol/v5.2.x
actions:
backport:
branches:
- release/protocol/v5.2.x
- name: backport to release/indexer/v6.x branch
conditions:
- base=main
- label=backport/indexer/v6.x
actions:
backport:
branches:
- release/indexer/v6.x
- name: backport to release/protocol/v6.x branch
conditions:
- base=main
- label=backport/protocol/v6.x
actions:
backport:
branches:
- release/protocol/v6.x
- name: backport to release/indexer/v7.x branch
conditions:
- base=main
- label=backport/indexer/v7.x
actions:
backport:
branches:
- release/indexer/v7.x
- name: backport to release/protocol/v7.x branch
conditions:
- base=main
- label=backport/protocol/v7.x
actions:
backport:
branches:
- release/protocol/v7.x

2 changes: 1 addition & 1 deletion .github/workflows/indexer-api-documentation-check.yml
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ on: # yamllint disable-line rule:truthy
push:
branches:
- main
- 'release/indexer/v0.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/indexer/v[0-9]+.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/indexer/v[0-9]+.x' # e.g. release/indexer/v1.x
paths:
- 'indexer/**'
4 changes: 2 additions & 2 deletions .github/workflows/indexer-build-and-push-dev-staging.yml
Original file line number Diff line number Diff line change
@@ -4,8 +4,8 @@ on: # yamllint disable-line rule:truthy
push:
branches:
- main
- 'release/[a-z]+/v0.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/[a-z]+/v[0-9]+.x' # e.g. release/indexer/v1.x
- 'release/indexer/v[0-9]+.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/indexer/v[0-9]+.x' # e.g. release/indexer/v1.x
# TODO(DEC-837): Customize github build and push to ECR by service with paths

jobs:
4 changes: 2 additions & 2 deletions .github/workflows/indexer-build-and-push-mainnet.yml
Original file line number Diff line number Diff line change
@@ -4,8 +4,8 @@ on: # yamllint disable-line rule:truthy
push:
branches:
- main
- 'release/[a-z]+/0.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/[a-z]+/v[0-9]+.x' # e.g. release/indexer/v1.x
- 'release/indexer/v[0-9]+.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/indexer/v[0-9]+.x' # e.g. release/indexer/v1.x
# TODO(DEC-837): Customize github build and push to ECR by service with paths

jobs:
4 changes: 2 additions & 2 deletions .github/workflows/indexer-build-and-push-testnet.yml
Original file line number Diff line number Diff line change
@@ -4,8 +4,8 @@ on: # yamllint disable-line rule:truthy
push:
branches:
- main
- 'release/[a-z]+/v0.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/[a-z]+/v[0-9]+.x' # e.g. release/indexer/v1.x
- 'release/indexer/v[0-9]+.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/indexer/v[0-9]+.x' # e.g. release/indexer/v1.x
# TODO(DEC-837): Customize github build and push to ECR by service with paths

jobs:
32 changes: 31 additions & 1 deletion .github/workflows/indexer-build-docker-image-check.yml
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ on: # yamllint disable-line rule:truthy
push:
branches:
- main
- 'release/indexer/v0.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/indexer/v[0-9]+.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/indexer/v[0-9]+.x' # e.g. release/indexer/v1.x
paths:
- 'indexer/**'
@@ -77,3 +77,33 @@ jobs:
DOCKER_BUILDKIT=1 docker build \
--platform amd64 \
-f Dockerfile.bazooka.remote .
check-build-auxo:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./indexer
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install pnpm
run:
npm install -g pnpm@6.34.0

- name: Build and install
run: |
pnpm install --loglevel warn --frozen-lockfile
pnpm run build:prod:all
- name: Build docker image for auxo
id: build-image
run: |
DOCKER_BUILDKIT=1 docker build \
--platform amd64 \
-f Dockerfile.auxo.remote .
2 changes: 1 addition & 1 deletion .github/workflows/indexer-build-test-coverage.yml
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ on: # yamllint disable-line rule:truthy
push:
branches:
- main
- 'release/indexer/v0.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/indexer/v[0-9]+.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/indexer/v[0-9]+.x' # e.g. release/indexer/v1.x
paths:
- 'indexer/**'
2 changes: 1 addition & 1 deletion .github/workflows/indexer-lint.yml
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ on: # yamllint disable-line rule:truthy
push:
branches:
- main
- 'release/indexer/v0.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/indexer/v[0-9]+.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/indexer/v[0-9]+.x' # e.g. release/indexer/v1.x
paths:
- 'indexer/**'
2 changes: 1 addition & 1 deletion .github/workflows/proto.yml
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ on: # yamllint disable-line rule:truthy
push:
branches:
- main
- 'release/protocol/v0.[0-9]+.x' # e.g. release/protocol/v0.1.x
- 'release/protocol/v[0-9]+.[0-9]+.x' # e.g. release/protocol/v0.1.x
- 'release/protocol/v[0-9]+.x' # e.g. release/protocol/v1.x
paths:
# Keep in sync with above
49 changes: 49 additions & 0 deletions .github/workflows/protocol-benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Protocol Benchmark
on: # yamllint disable-line rule:truthy
pull_request:
paths:
- 'protocol/**'
push:
branches:
- main
- 'release/protocol/v[0-9]+.[0-9]+.x' # e.g. release/protocol/v0.1.x
- 'release/protocol/v[0-9]+.x' # e.g. release/protocol/v1.x
paths:
- 'protocol/**'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
benchmark:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./protocol
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Setup Golang
uses: actions/setup-go@v3
with:
go-version: 1.22
- name: Prune Docker system to free up space
run: |
docker system prune -a --volumes -f
- name: Run Benchmarks
run: make benchmark | tee ./benchmark_output.txt
- name: Download previous benchmark data
uses: actions/cache@v4
with:
path: ./cache
key: ${{ runner.os }}-benchmark
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'go'
output-file-path: ./protocol/benchmark_output.txt
external-data-json-path: ./cache/benchmark-data.json
fail-on-alert: true
alert-threshold: '150%'
save-data-file: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
48 changes: 48 additions & 0 deletions .github/workflows/protocol-build-and-push-mainnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Protocol Build & Push Image to AWS ECR

on: # yamllint disable-line rule:truthy
pull_request:
branches:
- 'release/protocol/v[0-9]+.[0-9]+.x' # e.g. release/protocol/v0.1.x
- 'release/protocol/v[0-9]+.x' # e.g. release/protocol/v1.x
push:
branches:
- 'release/protocol/v[0-9]+.[0-9]+.x' # e.g. release/protocol/v0.1.x
- 'release/protocol/v[0-9]+.x' # e.g. release/protocol/v1.x

jobs:
build-and-push-mainnet:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./protocol
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: '0' # without this, ignite fails.

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_VALIDATOR_MAINNET }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_VALIDATOR_MAINNET }}
aws-region: ap-northeast-1

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Build, Tag, and Push the Image to Amazon ECR
id: build-image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: mainnet-full-node
run: |
make localnet-build-amd64
commit_hash=$(git rev-parse --short=7 HEAD)
docker build \
--platform amd64 \
-t $ECR_REGISTRY/$ECR_REPOSITORY:$commit_hash \
-f testing/mainnet/Dockerfile .
docker push $ECR_REGISTRY/$ECR_REPOSITORY --all-tags
4 changes: 2 additions & 2 deletions .github/workflows/protocol-build-and-push-snapshot.yml
Original file line number Diff line number Diff line change
@@ -4,8 +4,8 @@ on: # yamllint disable-line rule:truthy
push:
branches:
- main
- 'release/[a-z]+/v0.[0-9]+.x' # e.g. release/protocol/v0.1.x
- 'release/[a-z]+/v[0-9]+.x' # e.g. release/protocol/v1.x
- 'release/protocol/v[0-9]+.[0-9]+.x' # e.g. release/protocol/v0.1.x
- 'release/protocol/v[0-9]+.x' # e.g. release/protocol/v1.x

jobs:
build-and-push-snapshot-dev:
Loading