Skip to content

Commit

Permalink
chore: Initial commit
Browse files Browse the repository at this point in the history
Co-authored-by: Franklin Delehelle <franklin.delehelle@odena.eu>
Co-authored-by: Alexandre Belling <alexandrebelling8@gmail.com>
Co-authored-by: Pedro Novais <jpvnovais@gmail.com>
Co-authored-by: Roman Vaseev <4833306+Filter94@users.noreply.github.com>
Co-authored-by: Bradley Bown <bradbown@googlemail.com>
Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com>
Co-authored-by: Nikolai Golub <nikolai.golub@consensys.net>
Co-authored-by: The Dark Jester <thedarkjester@users.noreply.github.com>
Co-authored-by: jonesho <81145364+jonesho@users.noreply.github.com>
Co-authored-by: Gaurav Ahuja <gauravahuja9@gmail.com>
Co-authored-by: Azam Soleimanian <49027816+Soleimani193@users.noreply.github.com>
Co-authored-by: Andrei A <andrei.alexandru@consensys.net>
Co-authored-by: Arijit Dutta <37040536+arijitdutta67@users.noreply.github.com>
Co-authored-by: Gautam Botrel <gautam.botrel@gmail.com>
Co-authored-by: Ivo Kubjas <ivo.kubjas@consensys.net>
Co-authored-by: gusiri <dreamerty@postech.ac.kr>
Co-authored-by: FlorianHuc <florian.huc@gmail.com>
Co-authored-by: Arya Tabaie <arya.pourtabatabaie@gmail.com>
Co-authored-by: Julink <julien.fontanel@consensys.net>
Co-authored-by: Bogdan Ursu <bogdanursuoffice@gmail.com>
Co-authored-by: Jakub Trąd <jakubtrad@gmail.com>
Co-authored-by: Alessandro Sforzin <alessandro.sforzin@consensys.net>
Co-authored-by: Olivier Bégassat <olivier.begassat.cours@gmail.com>
Co-authored-by: Steve Huang <97596526+stevehuangc7s@users.noreply.github.com>
Co-authored-by: bkolad <blazejkolad@gmail.com>
Co-authored-by: fadyabuhatoum1 <139905934+fadyabuhatoum1@users.noreply.github.com>
Co-authored-by: Blas Rodriguez Irizar <rodrigblas@gmail.com>
Co-authored-by: Eduardo Andrade <eduardofandrade@gmail.com>
Co-authored-by: Ivo Kubjas <tsimmm@gmail.com>
Co-authored-by: Ludcour <ludovic.courcelas@consensys.net>
Co-authored-by: m4sterbunny <harrie.bickle@consensys.net>
Co-authored-by: Alex Panayi <145478258+alexandrospanayi@users.noreply.github.com>
Co-authored-by: Diana Borbe - ConsenSys <diana.borbe@consensys.net>
Co-authored-by: ThomasPiellard <thomas.piellard@gmail.com>
  • Loading branch information
0 parents commit a001342
Show file tree
Hide file tree
Showing 2,702 changed files with 695,073 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# top-most EditorConfig file
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
max_line_length=120
insert_final_newline = true
trim_trailing_whitespace = true

[*.go]
indent_style = tab
indent_size = tab

# line bellow should be like "[*.{kt,kts}]" if your editor adds spaces, it will break...
# https://github.com/pinterest/ktlint#intellij-idea-editorconfig-autoformat-issue
# [*.{kt,kts}]
# possible values: number (e.g. 2), "unset" (makes ktlint ignore indentation completely)
# indent_size=2
# insert_final_newline=true # true (recommended) / false
# possible values: number (e.g. 120) (package name, imports & comments are ignored), "off"
# it's automatically set to 100 on `ktlint --android ...` (per Android Kotlin Style Guide)
# max_line_length=120
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",
},
};
24 changes: 24 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Set the default behavior, in case people don't have core.autocrlf set.
* text eol=lf

/gradlew -text
*.md -text
*.jar -text
*.bat -text
*.pcap binary
*.blocks binary
*.dll binary
*.dylib binary
*.so binary
*.gz binary
*.ssz binary
*.ssz_snappy binary
*.png binary

prover/prover-assets/**/**/**/*.bin binary
prover/prover-assets/**/**/**/**/*.bin binary
prover/prover-assets/kzgsrs/* 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)
52 changes: 52 additions & 0 deletions .github/actions/check-image-tags-exist/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: 'Check image tags exist'

description: 'Check if the image tags exist'
inputs:
last_commit_tag:
description: 'The tag of the last commit image'
required: true
common_ancestor_tag:
description: 'The tag of the common ancestor commit image'
required: true
image_name:
description: 'The name of the image to check'
required: true
docker_username:
description: 'The username to login to Docker Hub'
required: true
docker_password:
description: 'The password to login to Docker Hub'
required: true
outputs:
last_commit_tag_exists:
description: 'Whether the last commit image tag exists'
value: ${{ steps.last_commit_image_exists.outputs.last_commit_tag_exists }}
common_ancestor_commit_tag_exists:
description: 'Whether the common ancestor commit image tag exists'
value: ${{ steps.ancestor_commit_image_exists.outputs.common_ancestor_commit_tag_exists }}

runs:
using: 'composite'
steps:
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ inputs.docker_username }}
password: ${{ inputs.docker_password }}
- name: Check last commit image tag exists
id: last_commit_image_exists
shell: bash
continue-on-error: true
run: |
echo last_commit_tag_exists=$(docker pull ${{ inputs.image_name }}:${{ inputs.last_commit_tag }} > /dev/null ; echo $?) >> $GITHUB_OUTPUT
- name: Check ancestor commit image tag exists
shell: bash
id: ancestor_commit_image_exists
continue-on-error: true
run: |
echo common_ancestor_commit_tag_exists=$(docker pull ${{ inputs.image_name }}:${{ inputs.common_ancestor_tag }} > /dev/null ; echo $?) >> $GITHUB_OUTPUT
- name: Show outputs
shell: bash
run: |
echo "last_commit_tag_exists: ${{ steps.last_commit_image_exists.outputs.last_commit_tag_exists }}"
echo "common_ancestor_commit_tag_exists: ${{ steps.ancestor_commit_image_exists.outputs.common_ancestor_commit_tag_exists }}"
78 changes: 78 additions & 0 deletions .github/actions/image-tag-and-push/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Image tag and push
description: Tag and push a Docker image

inputs:
commit_tag:
description: 'The tag of the commit image'
required: true
last_commit_tag:
description: 'The tag of the last commit image'
required: true
common_ancestor_tag:
description: 'The tag of the common ancestor commit image'
required: true
develop_tag:
description: 'The tag of the develop image'
required: true
untested_tag_suffix:
description: 'The suffix to add to untested images'
required: true
image_name:
description: 'The name of the image to tag and push'
required: true
last_commit_tag_exists:
description: 'Whether the last commit image tag exists'
required: true
common_ancestor_commit_tag_exists:
description: 'Whether the common ancestor commit image tag exists'
required: true
docker_username:
description: 'The username to login to Docker Hub'
required: true
docker_password:
description: 'The password to login to Docker Hub'
required: true

outputs:
image_tagged:
description: 'Whether the image was tagged'
value: ${{ steps.set-output.outputs.image_tagged }}

runs:
using: 'composite'
steps:
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ inputs.docker_username }}
password: ${{ inputs.docker_password }}
- name: Initialize IMAGE_TAGGED value
shell: bash
run: |
echo IMAGE_TAGGED=false >> $GITHUB_ENV
- name: Tag Docker image with last commit tag with the commit hash plus w/o "untested" suffix
shell: bash
if: ${{ inputs.last_commit_tag != '0000000' && inputs.last_commit_tag_exists == '0' }}
run: |
docker buildx imagetools create --tag ${{ inputs.image_name }}:${{ inputs.commit_tag }} ${{ inputs.image_name }}:${{ inputs.last_commit_tag }}
docker buildx imagetools create --tag ${{ inputs.image_name }}:${{ inputs.commit_tag }}-${{ inputs.untested_tag_suffix }} ${{ inputs.image_name }}:${{ inputs.last_commit_tag }}
echo IMAGE_TAGGED=true >> $GITHUB_ENV
- name: Tag Docker image with common ancestor commit tag with the commit hash plus w/o "untested" suffix
shell: bash
if: ${{ inputs.last_commit_tag == '0000000' && inputs.common_ancestor_commit_tag_exists == '0' }}
run: |
docker buildx imagetools create --tag ${{ inputs.image_name }}:${{ inputs.commit_tag }} ${{ inputs.image_name }}:${{ inputs.common_ancestor_tag }}
docker buildx imagetools create --tag ${{ inputs.image_name }}:${{ inputs.commit_tag }}-${{ inputs.untested_tag_suffix }} ${{ inputs.image_name }}:${{ inputs.common_ancestor_tag }}
echo IMAGE_TAGGED=true >> $GITHUB_ENV
- name: Tag Docker image with develop if on main branch
shell: bash
if: ${{ github.ref == 'refs/heads/main' && inputs.last_commit_tag_exists == '0' }}
run: |
docker buildx imagetools create --tag ${{ inputs.image_name }}:${{ inputs.develop_tag }} ${{ inputs.image_name }}:${{ inputs.last_commit_tag }}
echo IMAGE_TAGGED=true >> $GITHUB_ENV
- name: Set output from environment variable
shell: bash
id: set-output
run: |
echo "image_tagged=$IMAGE_TAGGED" >> $GITHUB_OUTPUT
32 changes: 32 additions & 0 deletions .github/actions/setup-nodejs/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 'Setup nodes'
description: 'Setup nodejs'

inputs:
node-version:
description: 'The version of node to use'
required: true
default: '18.15.0'
pnpm-version:
description: 'The version of pnpm to use'
required: true
default: '9.1.1'
pnpm-install-options:
description: 'The options to pass to pnpm install'
required: true
default: '--frozen-lockfile --prefer-offline --ignore-scripts'

runs:
using: 'composite'
steps:
- uses: pnpm/action-setup@v4
with:
version: ${{ inputs.pnpm-version }}

- uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
cache: 'pnpm'

- name: Npm install
run: pnpm i ${{ inputs.pnpm-install-options }}
shell: bash
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.
Loading

0 comments on commit a001342

Please sign in to comment.