Skip to content

Commit

Permalink
Update mirror
Browse files Browse the repository at this point in the history
  • Loading branch information
bradbown committed May 10, 2024
1 parent 5f0850d commit 87afddd
Show file tree
Hide file tree
Showing 3,025 changed files with 986,321 additions and 15,973 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
16 changes: 16 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
root: true,
env: {
node: true,
browser: false,
es2022: true,
},
ignorePatterns: ["dist", "coverage"],
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "prettier"],
parserOptions: {
ecmaVersion: 12,
sourceType: "module",
},
};
12 changes: 4 additions & 8 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,9 @@
*.gz binary
*.ssz binary
*.ssz_snappy binary
*.png binary

prover/docker/setup/full/proving_key.bin binary
prover/docker/setup/full/verifying_key.bin binary
prover/docker/setup/full/circuit.bin binary
prover/docker/setup/full/sample-proof.bin binary
prover/prover-assets/**/**/**/*.bin binary
prover/prover-assets/**/**/**/**/*.bin binary
prover/prover-assets/kzgsrs/* binary

prover/docker/setup/light/proving_key.bin binary
prover/docker/setup/light/verifying_key.bin binary
prover/docker/setup/light/circuit.bin binary
prover/docker/setup/light/sample-proof.bin binary
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.
/contracts/contracts/ @Consensys/linea-contract-team
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug report
about: File a bug report
title: 'Short and factual title summarizing the bug.'
labels: Bug
assignees: ''
---

_Remenber not to put too much unhelpful information or too little important information, be specific._

## Impact
__environment [Testnet/Mainnet]__

__an user is impacted [Y/N], if yes type of user: [External/Internal]__

## Describe the bug
### Steps to Reproduce
_A bug that we can't reproduce is hard to resolve, to ensure the bug is fixed in a timely manner, it is crucial to indicate how to reproduce it. If the bug can't be reproduced, give specific details on how it happened._

Steps to reproduce the bug:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

### Actual result
Evidence of the bug including log extracts, screen shot, wallet addresses, Tx hash, ...

### Expected result
A clear and concise description of what you expected to happen.

_Remember that an issue without proper labels and without assignee is unlikely to get prioritized -> contact the team or the product owner to get it included in the plan._
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Feature request
about: File a feature request
title: ''
assignees: ''

---

## Description
Write a clear and concise description of what you want to happen. Add any considered drawbacks.

## Motivation
This section should indicate what value we are receiving from it.

## Tasks
- [ ] Medium-level task that needs to be implemented for this feature request to be considered complete.

## Acceptance criteria
- [ ] List tests that need to be implemented or checks to consider this task completed.

## Risks
- [ ] These are risks that may prevent completion of the task as well as areas to pay special attention to

## Remember to
- [ ] Add the `documentation` label in case there is an impact on the documentation
- [ ] Add `priority` and `team` labels
- [ ] Add Task for updating the Runbook or adding/updating existing metrics and alerts.
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/operational_task_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: Operational Task Template
about: Use this template for creating new tasks in linea/zkevm
title: ''
labels: ''
assignees: ''

---

## Problem Statement
- Contains some manner of action item.
- Contains the service the action pertains to
- Network scope: Select those that apply, or select All
- [ ] All
- [ ] Mainnet
- [ ] Testnet - Goerli
- [ ] Testnet - Sepolia
- [ ] Devnet

## Background and Context
- May not be relevant for all tickets?
- Include diagrams/visual aids
- Links to other tickets or tasks, Slack links/conversations
- Helpful to avoid the X/Y problem , https://xyproblem.info/ - https://en.wikipedia.org/wiki/XY_problem

## Desired Solution
- If a solution is not specified, then create a SPIKE ticket to find the solution first, before creating this ticket
- Known solution or end goal provided here, steps to perform
- Applying a Runbook if specified, link to Runbook provided here

## Acceptance Criteria
- Must be clear goal, change X to Y. If scope needs to adjust, create a new ticket
- Example: Change A to B, then scope changes to include another set of services to change C to D; this should be a different ticket and not added on to this one.
- Inter-reference tickets using the Dependencies feature

## Ensure to labeled appropriately:

- [ ] 1 Team associated (Example Operations)
- [ ] 1 Priority associated (Example P2: Medium)
7 changes: 7 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This PR implements issue(s) #

### Checklist

* [ ] I wrote new tests for my new core changes.
* [ ] I have successfully ran tests, style checker and build against my new changes locally.
* [ ] I have informed the team of any breaking changes if there are any.
109 changes: 109 additions & 0 deletions .github/workflows/all-tools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: All tools CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
changes:
runs-on: ubuntu-latest
name: Filter commit changes
outputs:
all-tools: ${{ steps.filter.outputs.all-tools }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Filter commit changes
uses: dorny/paths-filter@v2
id: filter
with:
base: ${{ github.ref }}
list-files: "json"
filters: |
all-tools:
- 'operations/**'
- '.github/workflows/all-tools.yml'
- '.github/workflows/reuse-*.yml'
store_image_name_and_tags:
uses: ./.github/workflows/reuse-store-image-name-and-tags.yml
with:
image_name: consensys/linea-alltools

check_image_tags_exist:
needs: [ changes, store_image_name_and_tags ]
if: ${{ needs.changes.outputs.all-tools == 'false' }}
uses: ./.github/workflows/reuse-check-image-tags-exist.yml
with:
last_commit_tag: ${{ needs.store_image_name_and_tags.outputs.last_commit_tag }}
common_ancestor_tag: ${{ needs.store_image_name_and_tags.outputs.common_ancestor_tag }}
image_name: ${{ needs.store_image_name_and_tags.outputs.image_name }}
secrets: inherit

all-tools-tag-only:
needs: [ changes, store_image_name_and_tags, check_image_tags_exist ]
if: ${{ github.event_name != 'pull_request' && needs.changes.outputs.all-tools == 'false' }}
uses: ./.github/workflows/reuse-image-tag-push.yml
with:
commit_tag: ${{ needs.store_image_name_and_tags.outputs.commit_tag }}
last_commit_tag: ${{ needs.store_image_name_and_tags.outputs.last_commit_tag }}
common_ancestor_tag: ${{ needs.store_image_name_and_tags.outputs.common_ancestor_tag }}
develop_tag: ${{ needs.store_image_name_and_tags.outputs.develop_tag }}
untested_tag_suffix: ${{ needs.store_image_name_and_tags.outputs.untested_tag_suffix }}
image_name: ${{ needs.store_image_name_and_tags.outputs.image_name }}
last_commit_tag_exists: ${{ needs.check_image_tags_exist.outputs.last_commit_tag_exists }}
common_ancestor_commit_tag_exists: ${{ needs.check_image_tags_exist.outputs.common_ancestor_commit_tag_exists }}
secrets: inherit

build-and-publish:
needs: [ changes, store_image_name_and_tags, all-tools-tag-only ]
if: ${{ always() && (needs.changes.outputs.all-tools == 'true' || needs.all-tools-tag-only.result != 'success' || needs.all-tools-tag-only.outputs.image_tagged != 'true') }}
runs-on: ubuntu-22.04
env:
COMMIT_TAG: ${{ needs.store_image_name_and_tags.outputs.commit_tag }}
DEVELOP_TAG: ${{ needs.store_image_name_and_tags.outputs.develop_tag }}
IMAGE_NAME: ${{ needs.store_image_name_and_tags.outputs.image_name }}
name: All tools build and push
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.SELF_GITHUB_SSH_KEY }}
submodules: true
persist-credentials: false
- uses: pnpm/action-setup@v3
with:
version: 9
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Note: Building arm* images on QEMU emulator can get extremely slow
# when downloading large packages with npm / yarn. Arm* based docker
# images are not necessarily needed as we run amd64 machines for most
# cases. We can later set up self-hosted arm64 github runners if we
# want arm* based images back.
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# with:
# platforms: 'arm64,arm'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Show the "version" build argument
run: |
echo "We inject the commit tag in the docker image ${{ env.COMMIT_TAG }}"
echo COMMIT_TAG=${{ env.COMMIT_TAG }} >> $GITHUB_ENV
- name: Build and push all tools image
uses: docker/build-push-action@v5
with:
context: .
file: ./operations/Dockerfile
platforms: linux/amd64
# Note: Build amd64 image only
# platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: |
${{ env.IMAGE_NAME }}:${{ env.COMMIT_TAG }}
54 changes: 54 additions & 0 deletions .github/workflows/bridge-ui-e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Run Bridge UI E2E Tests

on:
pull_request:
branches:
- main
paths:
- 'bridge-ui/**'
push:
branches:
- main
paths:
- 'bridge-ui/**'

jobs:
run-e2e-tests:
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./bridge-ui

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}

- uses: actions/setup-node@v4
with:
node-version: 18.15.0
cache: 'npm'
cache-dependency-path: bridge-ui/package-lock.json

- name: Install dependencies
run: npm ci

- name: Install puppeteer dependencies
run: sudo apt update && sudo apt install -y libgconf-2-4 libatk1.0-0 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libgbm-dev libnss3-dev libxss-dev libasound2

- name: Install chrome
run: node ./node_modules/puppeteer/install.mjs

- name: Build Bridge UI
run: npm run build
env:
NEXT_PUBLIC_WALLET_CONNECT_ID: ${{ secrets.PUBLIC_WALLET_CONNECT_ID }}
NEXT_PUBLIC_INFURA_ID: ${{ secrets.PUBLIC_BRIDGE_UI_INFURA_ID }}

- name: Run tests
run: npm test
env:
E2E_TEST_PRIVATE_KEY: ${{ secrets.BRIDGE_UI_E2E_TESTS_PRIVATE_KEY }}
63 changes: 63 additions & 0 deletions .github/workflows/bridge-ui-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Bridge UI Build and Publish

on:
pull_request:
branches:
- main
paths:
- 'bridge-ui/**'
push:
branches:
- main
paths:
- 'bridge-ui/**'

jobs:
publish:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || (github.event_name == 'pull_request' && github.event.pull_request.draft == false)

defaults:
run:
working-directory: ./bridge-ui

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

- name: Get version from package.json
id: package-version
uses: martinbeentjes/npm-get-version-action@master
with:
path: ./bridge-ui

- name: Set Docker Tag
id: docker-tag
run: echo "DOCKER_TAG=${GITHUB_SHA:0:7}-$(date +%s)-bridge-ui-${{ steps.package-version.outputs.current-version }}" | tee $GITHUB_ENV

- name: Login to Docker Repository
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- # Setting up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Docker Image Build and Publish
id: docker-build-publish
uses: docker/build-push-action@v4
with:
context: ./bridge-ui
push: true
tags: consensys/linea-bridge-ui:${{ env.DOCKER_TAG }}
# Env file dedicated for dev
build-args: |
ENV_FILE=.env.production
NEXT_PUBLIC_WALLET_CONNECT_ID=${{ secrets.PUBLIC_WALLET_CONNECT_ID }}
NEXT_PUBLIC_INFURA_ID=${{ secrets.PUBLIC_BRIDGE_UI_INFURA_ID }}
env:
NEXT_PUBLIC_WALLET_CONNECT_ID: ${{ secrets.PUBLIC_WALLET_CONNECT_ID }}
NEXT_PUBLIC_INFURA_ID: ${{ secrets.PUBLIC_BRIDGE_UI_INFURA_ID }}
Loading

0 comments on commit 87afddd

Please sign in to comment.