mirror of
https://github.com/vacp2p/linea-monorepo.git
synced 2026-01-09 04:08:01 -05:00
* feat: first commit for transaction exclusion api service * feat: removed debug logs and improved params error handling * fix: jacocoRootReport error * feat: improved json request param parsings * feat: added docker container and github workflow pipeline for transaction exclusion api * feat: added rejection stage in response and use txHash and rejectReason as primary key of tables * feat: separate database into read and write config and each with dedicated connection * fix: e2e testing error * feat: removed redundant commands in Makefile * feat: updated transaction exclusion api default image tag in compose file * feat: added metric and change param name from reasonMessage to reason * feat: added integration and unit tests and use reasonMessage for both request and response * fix: transaction-exclusion-api unit test * feat: added e2e tests and remove reasonMessage from get response and redundant codes * feat: updated README.md and removed abi file * feat: updated image version of transaction exclusion api service in compose file * feat: updated README and added more test cases * feat: updated transaction exclusion api default image tag in compose file * feat: decoupled transaction exclusion api from coordinator package * feat: removed unnecessary dependencies to prover client * feat: moved persistence:db package to jvm-libs * feat: removed migration file dir location config from transaction exclusion api * fix: db migration location for fee history integration test * changed db column name timestamp to reject_timestamp and add dto for ModuleOverflow to remove all jackson dependencies in core module * feat: rejected transaction dao and config refactoring * feat: removed repository service and using persistence retryer * feat: updated transaction exclusion api default image tag in compose file * feat: updated log and increase retry backoff delay to avoid repetitive error logs * feat: added support of list request on save method and added dto for RejectedTransaction * feat: revised gradle.build dependencies * feat: switch from shadow jar to zipped jar * feat: updated transaction exclusion api default image tag in compose file * feat: updated sql and tables and changes for PR comments * feat: improved log message for duplicate key error * feat: updated transaction exclusion api default image tag in compose file * feat: avoid redundant logs on periodic db cleanup * feat: revised request handlers plus better test assertions on insertion * fix: test case * feat: parse save method json request with jackson * feat: extracted db migrations from the coordinator and transaction-exclusion app * feat: decoupled coordinator modules from jvm-libs persistence db test module * feat: updated dockerfile of transaction-exclusion-api * feat: removed the find check before metric increment on save rejected transaction * feat: updated docker base image for tx-exclusion-api image buid and queryable window config * feat: skip migration scripts on read db instance * feat: updated more percise jvm-libs change filtering on transaction-exclusion-api * feat: updated coordinator config for geth node l2 gas pricing recipients * feat: update runners with specific version and removed the use of retry for transaction exclusion api testing * feat: add integration test for transaction exclusion app * feat: update local stack docker compose and workflow for transaction exclusion * feat: add e2e test for transaction exclusion * feat: skip the sequencer test in transaction exclusion e2e test * feat: revert sequencer config poa-block-txs-selection-max-time * feat: remove incorrect comment * feat: added explicitly assertion if tx exclusion is not defined and simplify the localStackPostgresDbOnly in build.gradle * feat: remove beforeAll in test suite with it.concurrent * feat: set coordinator config blob-compressor-version as V1_0_1 explicitly for traces-v2 * feat: update coordinator config test * feat: change default prefix not to be coordinator specific * feat: place persistence:db under jvm-libs:generic and fixed conflicts from latest main * fix: remove dependency to resolve circular dependency issue * test: switch from localStackPostgresDbOnlyComposeUp to localStackComposeUp * feat: replace GITHUB_SHA with github.event.pull_request.head.sha in computing commit tag * feat: update filter change file lists for transaction exclusion api
237 lines
12 KiB
YAML
237 lines
12 KiB
YAML
name: main
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
store-image-name-and-tags:
|
|
uses: ./.github/workflows/reuse-store-image-name-and-tags.yml
|
|
|
|
filter-commit-changes:
|
|
runs-on: [self-hosted, ubuntu-20.04, X64, small]
|
|
name: Filter commit changes
|
|
outputs:
|
|
coordinator: ${{ steps.filter.outputs.coordinator }}
|
|
postman: ${{ steps.filter.outputs.postman }}
|
|
prover: ${{ steps.filter.outputs.prover }}
|
|
traces-api-facade: ${{ steps.filter.outputs.traces-api-facade }}
|
|
transaction-exclusion-api: ${{ steps.filter.outputs.transaction-exclusion-api }}
|
|
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.filter.outputs.transaction-exclusion-api == 'false' }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Filter commit changes
|
|
uses: dorny/paths-filter@v3
|
|
id: filter
|
|
with:
|
|
base: ${{ github.ref }}
|
|
list-files: "json"
|
|
filters: |
|
|
coordinator:
|
|
- 'coordinator/**'
|
|
- 'testdata/**'
|
|
- 'buildSrc/**'
|
|
- 'jvm-libs/**'
|
|
- 'gradle/**'
|
|
- 'build.gradle'
|
|
- 'gradle.properties'
|
|
- 'settings.gradle'
|
|
- '.github/workflows/coordinator-*.yml'
|
|
- '.github/workflows/build-and-publish.yml'
|
|
- '.github/workflows/main.yml'
|
|
- '.github/workflows/reuse-*.yml'
|
|
- 'config/common/traces-limits-v1.toml'
|
|
- 'config/common/traces-limits-v2.toml'
|
|
- 'config/coordinator/**'
|
|
- 'e2e/**'
|
|
- 'docker/compose.yml'
|
|
- 'docker/compose-local-dev.overrides.yml'
|
|
- 'docker/compose-local-dev-traces-v2.overrides.yml'
|
|
postman:
|
|
- 'sdk/**'
|
|
- '.github/workflows/postman-*.yml'
|
|
- '.github/workflows/build-and-publish.yml'
|
|
- '.github/workflows/main.yml'
|
|
- '.github/workflows/reuse-*.yml'
|
|
prover:
|
|
- 'prover/**'
|
|
- '.github/workflows/prover-*.yml'
|
|
- '.github/workflows/build-and-publish.yml'
|
|
- '.github/workflows/main.yml'
|
|
- '.github/workflows/reuse-*.yml'
|
|
- 'constraints'
|
|
traces-api-facade:
|
|
- 'traces-api-facade/**'
|
|
- 'jvm-libs/linea/core/domain-models/**'
|
|
- 'jvm-libs/linea/core/traces/**'
|
|
- 'jvm-libs/linea/core/metrics/**'
|
|
- 'jvm-libs/generic/json-rpc/**'
|
|
- 'jvm-libs/generic/extensions/kotlin/**'
|
|
- 'jvm-libs/generic/extensions/futures/**'
|
|
- 'jvm-libs/generic/vertx-helper/**'
|
|
- 'jvm-libs/linea/metrics/**'
|
|
- 'config/common/traces-limits-v1.toml'
|
|
- '.github/workflows/traces-api-facade-*.yml'
|
|
- '.github/workflows/build-and-publish.yml'
|
|
- '.github/workflows/main.yml'
|
|
- '.github/workflows/reuse-*.yml'
|
|
- 'buildSrc/**'
|
|
- 'gradle/**'
|
|
- 'build.gradle'
|
|
- 'gradle.properties'
|
|
- 'settings.gradle'
|
|
transaction-exclusion-api:
|
|
- 'transaction-exclusion-api/**'
|
|
- 'jvm-libs/generic/extensions/futures/**'
|
|
- 'jvm-libs/generic/extensions/kotlin/**'
|
|
- 'jvm-libs/generic/json-rpc/**'
|
|
- 'jvm-libs/generic/persistence/**'
|
|
- 'jvm-libs/generic/vertx-helper/**'
|
|
- 'jvm-libs/linea/core/long-running-service/**'
|
|
- 'jvm-libs/linea/core/metrics/**'
|
|
- 'jvm-libs/linea/metrics/**'
|
|
- '.github/workflows/transaction-exclusion-api-*.yml'
|
|
- '.github/workflows/build-and-publish.yml'
|
|
- '.github/workflows/main.yml'
|
|
- '.github/workflows/reuse-*.yml'
|
|
- 'buildSrc/**'
|
|
- 'gradle/**'
|
|
- 'build.gradle'
|
|
- 'gradle.properties'
|
|
- 'settings.gradle'
|
|
finalized-tag-updater:
|
|
- 'jvm-libs/linea/core/long-running-service/**'
|
|
- 'jvm-libs/linea/web3j-extensions/**'
|
|
- 'jvm-libs/extensions/kotlin/**'
|
|
- 'jvm-libs/extensions/futures/**'
|
|
- '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 ]
|
|
uses: ./.github/workflows/reuse-check-images-tags-and-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 }}
|
|
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 }}
|
|
transaction_exclusion_api_changed: ${{ needs.filter-commit-changes.outputs.transaction-exclusion-api }}
|
|
secrets: inherit
|
|
|
|
manual-docker-build-and-e2e-tests:
|
|
runs-on: [self-hosted, ubuntu-20.04, X64, small]
|
|
needs: [ store-image-name-and-tags, filter-commit-changes, check-and-tag-images ]
|
|
environment: ${{ github.ref != 'refs/heads/main' && 'docker-build-and-e2e' || '' }}
|
|
steps:
|
|
- name: Deploy environment
|
|
run: |
|
|
echo "Build and e2e test environment deployed"
|
|
|
|
docker-build:
|
|
needs: [ store-image-name-and-tags, filter-commit-changes, check-and-tag-images, manual-docker-build-and-e2e-tests ]
|
|
uses: ./.github/workflows/build-and-publish.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 }}
|
|
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 }}
|
|
transaction_exclusion_api_changed: ${{ needs.filter-commit-changes.outputs.transaction-exclusion-api }}
|
|
coordinator_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_coordinator }}
|
|
postman_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_postman }}
|
|
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 }}
|
|
transaction_exclusion_api_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_transaction_exclusion_api }}
|
|
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 ]
|
|
if: ${{ always() && needs.filter-commit-changes.outputs.no-changes == 'false' }}
|
|
uses: ./.github/workflows/testing.yml
|
|
with:
|
|
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
|
|
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 }}
|
|
transaction_exclusion_api_changed: ${{ needs.filter-commit-changes.outputs.transaction-exclusion-api }}
|
|
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 }}
|
|
transaction_exclusion_api_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_transaction_exclusion_api }}
|
|
secrets: inherit
|
|
|
|
run-e2e-tests-geth-tracing:
|
|
needs: [ store-image-name-and-tags, docker-build, manual-docker-build-and-e2e-tests ]
|
|
if: ${{ always() && needs.docker-build.result == 'success' }}
|
|
concurrency:
|
|
group: run-e2e-tests-geth-tracing-${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
|
uses: ./.github/workflows/reuse-run-e2e-tests.yml
|
|
with:
|
|
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
|
|
untested_tag_suffix: ${{ needs.store-image-name-and-tags.outputs.untested_tag_suffix }}
|
|
tracing-engine: 'geth'
|
|
e2e-tests-logs-dump: true
|
|
secrets: inherit
|
|
|
|
run-e2e-tests:
|
|
needs: [ store-image-name-and-tags, docker-build, manual-docker-build-and-e2e-tests ]
|
|
if: ${{ always() && needs.docker-build.result == 'success' }}
|
|
concurrency:
|
|
group: run-e2e-tests-${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
|
uses: ./.github/workflows/reuse-run-e2e-tests.yml
|
|
with:
|
|
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
|
|
untested_tag_suffix: ${{ needs.store-image-name-and-tags.outputs.untested_tag_suffix }}
|
|
tracing-engine: 'besu'
|
|
e2e-tests-logs-dump: true
|
|
secrets: inherit
|
|
|
|
tag-after-run-tests-success:
|
|
needs: [ store-image-name-and-tags, testing, run-e2e-tests, run-e2e-tests-geth-tracing ]
|
|
if: ${{ always() && needs.testing.result == 'success' && needs.run-e2e-tests.outputs.tests_outcome == 'success' && needs.run-e2e-tests-geth-tracing.outputs.tests_outcome == 'success' }}
|
|
uses: ./.github/workflows/reuse-tag-without-untested-suffix.yml
|
|
with:
|
|
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_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_names: '["consensys/linea-coordinator", "consensys/linea-postman", "consensys/linea-prover", "consensys/linea-traces-api-facade", "consensys/linea-transaction-exclusion-api"]'
|
|
secrets: inherit
|
|
|
|
cleanup-deployments:
|
|
needs: [ run-e2e-tests, run-e2e-tests-geth-tracing ]
|
|
if: ${{ always() }}
|
|
runs-on: [self-hosted, ubuntu-20.04, X64, small]
|
|
steps:
|
|
- uses: strumwolf/delete-deployment-environment@v2
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
environment: docker-build-and-e2e
|
|
ref: ${{ github.ref_name }}
|
|
onlyRemoveDeployments: true
|