Skip to content

Commit

Permalink
Merge branch 'main' into feat/1731-code-coverage-in-Codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
count-sum authored Sep 13, 2024
2 parents 820c42c + 347f3af commit 94db7ee
Show file tree
Hide file tree
Showing 754 changed files with 59,518 additions and 23,219 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
*.ssz binary
*.ssz_snappy binary
*.png binary
*.cbor binary

prover/symbolic/testdata/**/*.cbor binary
prover/prover-assets/**/**/**/*.bin binary
prover/prover-assets/**/**/**/**/*.bin binary
prover/prover-assets/kzgsrs/* binary
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-nodejs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ inputs:
node-version:
description: 'The version of node to use'
required: true
default: '18.15.0'
default: '20.17.0'
pnpm-version:
description: 'The version of pnpm to use'
required: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/coordinator-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
uses: gradle/actions/setup-gradle@v3
- name: Build dist
run: |
./gradlew coordinator:app:shadowJar --no-daemon
./gradlew coordinator:app:distZip --no-daemon
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
Expand All @@ -69,7 +69,7 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
build-contexts: jar=./coordinator/app/build/libs/
build-contexts: zip=./coordinator/app/build/distributions/
file: ./coordinator/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/finalized-tag-updater-github-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Github Release for Finalized-Tag-Updater Besu Plugin
on:
workflow_call:
inputs:
version:
required: true
type: string

workflow_dispatch:
inputs:
version:
required: true
type: string
description: 'Release semantic version: e.g "1.0.0"'

jobs:
release:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

# Configure Gradle for optimal use in GiHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Clean
# ./gradlew clean is necessary because the build is cached
# and cause issues with JReleaser
run: ./gradlew clean

- name: Build
run: |
./gradlew :finalized-tag-updater:shadowJar -Pversion=v${{inputs.version}}
- name: Release to GitHub
uses: jreleaser/release-action@v2
with:
arguments: full-release --git-root-search --basedir=${{ github.workspace }}/finalized-tag-updater
env:
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN_RELEASE_ACCESS }}
JRELEASER_TAG_NAME: finalized-tag-updater-v${{inputs.version}}
JRELEASER_PROJECT_VERSION: '0.0.1'
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JRELEASER_GITHUB_USERNAME: ${{ github.actor }}
JRELEASER_GITHUB_EMAIL: ${{ github.actor }}@users.noreply.github.com

# Persist logs
- name: JReleaser release output
if: always()
uses: actions/upload-artifact@v4
with:
name: jreleaser-release
path: |
build/jreleaser/trace.log
build/jreleaser/output.properties
16 changes: 16 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
postman: ${{ steps.filter.outputs.postman }}
prover: ${{ steps.filter.outputs.prover }}
traces-api-facade: ${{ steps.filter.outputs.traces-api-facade }}
finalized-tag-updater: ${{ steps.filter.outputs.finalized-tag-updater }}
no-changes: ${{ steps.filter.outputs.coordinator == 'false' && steps.filter.outputs.postman == 'false' && steps.filter.outputs.prover == 'false' && steps.filter.outputs.traces-api-facade == 'false' }}
steps:
- name: Checkout
Expand Down Expand Up @@ -75,6 +76,10 @@ jobs:
- 'build.gradle'
- 'gradle.properties'
- 'settings.gradle'
finalized-tag-updater:
- 'finalized-tag-updater/**'
- '.github/workflows/main.yml'
- '.github/workflows/finalized-tag-updater-github-release.yml'
check-and-tag-images:
needs: [ store-image-name-and-tags, filter-commit-changes ]
Expand Down Expand Up @@ -109,6 +114,15 @@ jobs:
prover_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_prover }}
traces_api_facade_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_traces_api_facade }}
secrets: inherit

# Comment out the auto build and release step below as the plugin release should be
# by manual Github action for versioning control
# finalized-tag-updater-jar-build-release:
# needs: [ filter-commit-changes ]
# if: ${{ always() && needs.filter-commit-changes.outputs.finalized-tag-updater == 'true' }}
# uses: ./.github/workflows/finalized-tag-updater-github-release.yml
# with:
# version: '0.0.1'

testing:
needs: [ store-image-name-and-tags, filter-commit-changes, check-and-tag-images ]
Expand All @@ -119,8 +133,10 @@ jobs:
coordinator_changed: ${{ needs.filter-commit-changes.outputs.coordinator }}
postman_changed: ${{ needs.filter-commit-changes.outputs.postman }}
prover_changed: ${{ needs.filter-commit-changes.outputs.prover }}
traces_api_facade_changed: ${{ needs.filter-commit-changes.outputs.traces-api-facade }}
coordinator_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_coordinator }}
postman_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_postman }}
traces_api_facade_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_traces_api_facade }}
secrets: inherit

run-e2e-tests-geth-tracing:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/postman-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,4 @@ jobs:
cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache
cache-to: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache,mode=max
build-args: |
GITHUB_API_ACCESS_TOKEN=${{ secrets._GITHUB_TOKEN_RELEASE_ACCESS }}
NATIVE_LIBS_RELEASE_TAG=blob-libs-v1.0.1
1 change: 0 additions & 1 deletion .github/workflows/postman-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:

- name: Run tests and generate coverage report
env:
GITHUB_API_ACCESS_TOKEN: ${{ secrets._GITHUB_TOKEN_RELEASE_ACCESS }}
NATIVE_LIBS_RELEASE_TAG: blob-libs-v1.0.1
run: |
pnpm run -F ./ts-libs/linea-native-libs build;
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/reuse-run-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ jobs:
POSTMAN_TAG: ${{ inputs.commit_tag }}-${{ inputs.untested_tag_suffix }}
PROVER_TAG: ${{ inputs.commit_tag }}-${{ inputs.untested_tag_suffix }}
TRACES_API_TAG: ${{ inputs.commit_tag }}-${{ inputs.untested_tag_suffix }}
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN_RELEASE_ACCESS }}
outputs:
tests_outcome: ${{ steps.run_e2e_tests.outcome }}
runs-on: ubuntu-22.04-16core
runs-on: ubuntu-22.04
steps:
- name: Setup upterm session
if: ${{ inputs.e2e-tests-with-ssh }}
Expand Down Expand Up @@ -165,6 +166,7 @@ jobs:
docker logs postman --since 1h &>> docker_logs/postman.txt
docker logs traces-node --since 1h &>> docker_logs/traces-node.txt
docker logs traces-node-v2 --since 1h &>> docker_logs/traces-node-v2.txt
docker logs sequencer --since 1h &>> docker_logs/sequencer.txt
- name: Archive debug logs
uses: actions/upload-artifact@v4
if: ${{ failure() && inputs.e2e-tests-logs-dump }}
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@ on:
prover_changed:
required: true
type: string
traces_api_facade_changed:
required: true
type: string
coordinator_image_tagged:
required: true
type: string
postman_image_tagged:
required: true
type: string
traces_api_facade_image_tagged:
required: true
type: string
secrets:
DOCKERHUB_USERNAME:
required: true
Expand All @@ -37,10 +43,15 @@ jobs:

prover:
uses: ./.github/workflows/prover-testing.yml
if: ${{ inputs.prover_changed == 'true' }}
if: ${{ always() && inputs.prover_changed == 'true' }}
secrets: inherit

postman:
uses: ./.github/workflows/postman-testing.yml
if: ${{ always() && (inputs.postman_changed == 'true' || inputs.postman_image_tagged != 'true') }}
secrets: inherit

traces-api-facade:
uses: ./.github/workflows/traces-api-facade-testing.yml
if: ${{ always() && (inputs.traces_api_facade_changed == 'true' || inputs.traces_api_facade_image_tagged != 'true') }}
secrets: inherit
27 changes: 1 addition & 26 deletions .github/workflows/traces-api-facade-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,11 @@ on:
required: true
DOCKERHUB_TOKEN:
required: true
workflow_dispatch:
inputs:
coverage:
description: To generate test report
required: false
type: boolean
default: false

jobs:
build-and-publish:
runs-on: ubuntu-latest
name: Traces api build
name: Traces api facade build
env:
COMMIT_TAG: ${{ inputs.commit_tag }}
DEVELOP_TAG: ${{ inputs.develop_tag }}
Expand All @@ -55,24 +48,6 @@ jobs:
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Run tests with coverage
uses: nick-fields/retry@v2
if: ${{ inputs.coverage }}
with:
max_attempts: 2
retry_on: error
timeout_minutes: 20
command: |
./gradlew traces-api-facade:app:buildNeeded jacocoRootReport
- name: Run tests without coverage
uses: nick-fields/retry@v2
if: ${{ !inputs.coverage }}
with:
max_attempts: 2
retry_on: error
timeout_minutes: 20
command: |
./gradlew traces-api-facade:app:buildNeeded
- name: Build dist
run: |
./gradlew traces-api-facade:app:shadowJar
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/traces-api-facade-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: traces-api-facade-testing

on:
workflow_call:
secrets:
DOCKERHUB_USERNAME:
required: true
DOCKERHUB_TOKEN:
required: true
workflow_dispatch:
inputs:
coverage:
description: To generate test report
required: false
type: boolean
default: false

jobs:
run-tests:
runs-on: ubuntu-latest
name: Traces api facade tests
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Run tests with coverage
uses: nick-fields/retry@v2
if: ${{ inputs.coverage }}
with:
max_attempts: 2
retry_on: error
timeout_minutes: 20
command: |
./gradlew traces-api-facade:app:buildNeeded jacocoRootReport
- name: Run tests without coverage
uses: nick-fields/retry@v2
if: ${{ !inputs.coverage }}
with:
max_attempts: 2
retry_on: error
timeout_minutes: 20
command: |
./gradlew traces-api-facade:app:buildNeeded
21 changes: 20 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $(shell \
)
endef

npm-install:
pnpm-install:
pnpm install

docker-pull-develop:
Expand Down Expand Up @@ -48,10 +48,17 @@ start-whole-environment:
# docker compose -f docker/compose.yml -f docker/compose-local-dev.overrides.yml build prover
docker compose -f docker/compose.yml -f docker/compose-local-dev.overrides.yml --profile l1 --profile l2 up -d

start-whole-environment-with-finalized-tag-updater:
docker compose -f docker/compose.yml -f docker/compose-local-dev.overrides.yml -f docker/compose-local-dev-finalized-tag-updater.overrides.yml --profile l1 --profile l2 up -d

start-whole-environment-traces-v2:
mkdir -p tmp/local/traces/v2/conflated
docker compose -f docker/compose.yml -f docker/compose-local-dev-traces-v2.overrides.yml --profile l1 --profile l2 up -d

start-whole-environment-traces-v2-with-finalized-tag-updater:
mkdir -p tmp/local/traces/v2/conflated
docker compose -f docker/compose.yml -f docker/compose-local-dev-traces-v2.overrides.yml -f docker/compose-local-dev-finalized-tag-updater.overrides.yml --profile l1 --profile l2 up -d

pull-all-images:
docker compose -f docker/compose.yml -f docker/compose-local-dev-traces-v2.overrides.yml --profile l1 --profile l2 pull

Expand Down Expand Up @@ -117,6 +124,10 @@ fresh-start-all-traces-v2:
make clean-environment
make start-all-traces-v2

fresh-start-all-traces-v2-with-finalized-tag-updater:
make clean-environment
make start-all-traces-v2-with-finalized-tag-updater

start-all-smc-v4:
L1_GENESIS_TIME=$(get_future_time) make start-whole-environment
make deploy-contracts-v4
Expand All @@ -125,10 +136,18 @@ start-all:
L1_GENESIS_TIME=$(get_future_time) make start-whole-environment
make deploy-contracts

start-all-with-finalized-tag-updater:
L1_GENESIS_TIME=$(get_future_time) make start-whole-environment-with-finalized-tag-updater
make deploy-contracts

start-all-traces-v2:
L1_GENESIS_TIME=$(get_future_time) make start-whole-environment-traces-v2
make deploy-contracts

start-all-traces-v2-with-finalized-tag-updater:
L1_GENESIS_TIME=$(get_future_time) make start-whole-environment-traces-v2-with-finalized-tag-updater
make deploy-contracts

deploy-contracts-v4:
make compile-contracts
$(MAKE) -j2 deploy-linea-rollup-v4 deploy-l2messageservice
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Linea's stack is made up of multiple repositories, these include:
- [linea-sequencer](https://github.com/Consensys/linea-sequencer): A set of Linea-Besu plugins for the sequencer and RPC nodes
- [linea-tracer](https://github.com/Consensys/linea-tracer): Linea-Besu plugin which produces the traces that the constraint system applies and that serve as inputs to the prover
- [linea-constraints](https://github.com/Consensys/linea-constraints): Implementation of the constraint system from the specification
- [linea-specification](https://github.com/Consensys/linea-specification): Specification of the constraint system defining Linea's zk-EVM
- [linea-specification](https://github.com/Consensys/linea-specification): Specification of the constraint system defining Linea's zkEVM

Linea abstracts away the complexity of this technical architecture to allow developers to:

Expand Down
2 changes: 1 addition & 1 deletion bridge-ui/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ARG X_TAG
WORKDIR /app

ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED 1
ENV NEXT_TELEMETRY_DISABLED=1

USER node

Expand Down
2 changes: 1 addition & 1 deletion bridge-ui/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ sgr0 := $(shell tput sgr0)

.PHONY: dev
dev:
npm run dev
pnpm run dev
Loading

0 comments on commit 94db7ee

Please sign in to comment.