Skip to content

Commit

Permalink
Merge branch 'main' into remove_proposer_permission_check_after_mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik authored May 8, 2024
2 parents 2bdd165 + f888e25 commit b55faca
Show file tree
Hide file tree
Showing 227 changed files with 54,635 additions and 7,838 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/close-inactive-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v5
- uses: actions/stale@v9
with:
days-before-issue-stale: 30
days-before-issue-close: 7
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/eventindexer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
go-version: 1.21.0
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
uses: golangci/golangci-lint-action@v6
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/guardianproverhealthcheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
go-version: 1.21.0
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
uses: golangci/golangci-lint-action@v6
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/protocol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,23 @@ jobs:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly-2cb875799419c907cc3709e586ece2559e6b340e
uses: foundry-rs/[email protected]

- name: Install pnpm dependencies
uses: ./.github/actions/install-pnpm-dependencies

- name: Check formatting
working-directory: ./packages/protocol
run: forge fmt --check

- name: Unit tests
working-directory: ./packages/protocol
run: pnpm clean && pnpm test

- name: Generate contract layout table
- name: Format solidity && update contract layout table
working-directory: ./packages/protocol
run: pnpm layout
run: pnpm layout && forge fmt

- name: Commit contract layout table
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Add contract layout table"
commit_message: "forge fmt & update contract layout table"

- name: Generate genesis
working-directory: ./packages/protocol
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/relayer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
go-version: 1.21.0
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
uses: golangci/golangci-lint-action@v6
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest
Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/taiko-client-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: "Push docker image to GAR"

on:
push:
branches: [main]
tags:
- "taiko-client-v*"
paths:
- "packages/taiko-client/**"

jobs:
push-docker-image:
name: Build and push docker image
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Login to GAR
uses: docker/login-action@v2
with:
registry: us-docker.pkg.dev
username: _json_key
password: ${{ secrets.GAR_JSON_KEY }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
us-docker.pkg.dev/evmchain/images/taiko-client
tags: |
type=ref,event=branch
type=ref,event=pr
type=ref,event=tag
type=sha
- name: Cache Go build
uses: actions/cache@v4
with:
enableCrossOsArchive: true
path: |
go-build-platforms
key: ${{ runner.os }}-go_build-platforms
restore-keys: |
${{ runner.os }}-go_build-platforms
- name: Inject cache into docker
uses: reproducible-containers/[email protected]
with:
cache-map: |
{
"go-build-platforms": "/root/.cache/go-build"
}
skip-extraction: ${{ steps.cache.outputs.cache-hit }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
64 changes: 64 additions & 0 deletions .github/workflows/taiko-client-swagger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Swagger

on:
push:
branches:
- main
paths:
- "packages/taiko-client/**"

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
name: Swagger autogen docs
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21
cache: true

- name: install swag cli
run: go install github.com/swaggo/swag/cmd/swag@latest

- name: swag init
working-directory: packages/taiko-client
run: ./scripts/gen_swagger_json.sh

deploy:
if: ${{ always() }}
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
name: github pages deploy swagger docs
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v2

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: "packages/taiko-client"

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
60 changes: 60 additions & 0 deletions .github/workflows/taiko-client-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: "CI"

on:
push:
branches: [main]
paths:
- "packages/taiko-client/**"
pull_request:
paths:
- "packages/taiko-client/**"

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21
cache: true

- name: Lint
working-directory: packages/taiko-client
run: make lint

integration_tests:
name: Integration tests
runs-on: ubuntu-latest

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v4

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21
cache: true

- name: Install pnpm dependencies
uses: ./.github/actions/install-pnpm-dependencies

- name: Test
working-directory: packages/taiko-client
run: make test

- name: Codecov.io
uses: codecov/codecov-action@v3
with:
files: packages/taiko-client/coverage.out
1 change: 1 addition & 0 deletions .github/workflows/validate-pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
protocol
relayer
taikoon
taiko-client
supplementary-contracts
requireScope: true
subjectPattern: ^(?![A-Z])(?!.*\btypo\b).+$ # Require lowercase PR title and prohibit word "typo"
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,6 @@ __pycache__/
.vscode/launch.json
packages/protocol/config.js
.vercel

# Idea
.idea/
3 changes: 2 additions & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"packages/guardian-prover-health-check": "0.1.0",
"packages/guardian-prover-health-check-ui": "0.1.0",
"packages/protocol": "1.4.0",
"packages/relayer": "0.12.0"
"packages/relayer": "0.12.0",
"packages/taiko-client": "0.22.0"
}
6 changes: 6 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@
# False positives
extend-ignore-identifiers-re = [
"QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
"TGE",
"tge",
]

[files]
extend-exclude = [
"*.png",
"*.svg",
"go.mod",
"CHANGELOG.md",
"packages/protocol/audit/code4rena-2024-03-taiko-final-report.md",
"packages/protocol/contracts/automata-attestation/**",
"packages/protocol/contracts/thirdparty/**",
"packages/protocol/contracts/compiled/**",
# TODO: fix typos and remove these
"packages/taiko-client/**",
]
Loading

0 comments on commit b55faca

Please sign in to comment.