Files
linea-monorepo/docker/compose-local-dev-traces-v2.overrides.yml
jonesho fad0db4fc6 3822 rejected transaction api service (#101)
* 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
2024-10-22 15:50:44 +08:00

122 lines
5.2 KiB
YAML

# to use this file run
# docker compose -f compose.yml -f compose-local-dev-traces-v2.overrides.yml --profile l2 --profile l1 up
services:
sequencer:
environment:
JAVA_OPTS: -XX:+UnlockExperimentalVMOptions -XX:-UseG1GC -XX:+UseZGC
volumes:
- ../config/common/traces-limits-besu-v2.toml:/var/lib/besu/traces-limits.toml:ro
l2-node-besu:
environment:
JAVA_OPTS: -XX:+UnlockExperimentalVMOptions -XX:-UseG1GC -XX:+UseZGC
volumes:
- ../config/common/traces-limits-besu-v2.toml:/var/lib/besu/traces-limits.toml:ro
linea-besu-sequencer-plugin-downloader:
command: [ "sh", "/file-downloader.sh", "https://github.com/Consensys/linea-sequencer/releases/download/v0.8.0-rc4.1/linea-sequencer-v0.8.0-rc4.1.jar", "/linea-besu-sequencer" ]
traces-node:
command: ['echo', 'forced exit as replaced by traces-node-v2']
traces-api:
command: ['echo', 'forced exit as replaced by traces-node-v2']
traces-node-v2:
hostname: traces-node-v2
container_name: traces-node-v2
image: consensys/linea-besu:24.9-delivery32
profiles: [ "l2", "l2-bc", "debug" ]
depends_on:
traces-node-v2-plugin-downloader:
condition: service_completed_successfully
sequencer:
condition: service_healthy
ports:
- "8745:8545"
- "8746:8546"
- "8750:8550"
- "8751:8548"
- "30308:30303"
healthcheck:
test: [ "CMD-SHELL", "bash -c \"[ -f /tmp/pid ]\"" ]
interval: 1s
timeout: 1s
retries: 120
restart: "no"
environment:
JAVA_OPTS: -XX:+UnlockExperimentalVMOptions -XX:-UseG1GC -XX:+UseZGC
LOG4J_CONFIGURATION_FILE: /var/lib/besu/log4j.xml
entrypoint:
- /bin/bash
- -c
- |
/opt/besu/bin/besu \
--config-file=/var/lib/besu/traces-node-v2.config.toml \
--genesis-file=/var/lib/besu/genesis.json \
--bootnodes=enode://14408801a444dafc44afbccce2eb755f902aed3b5743fed787b3c790e021fef28b8c827ed896aa4e8fb46e22bd67c39f994a73768b4b382f8597b0d44370e15d@11.11.11.101:30303
volumes:
- ./config/traces-node-v2/traces-node-v2-config.toml:/var/lib/besu/traces-node-v2.config.toml:ro
- ./config/traces-node-v2/log4j.xml:/var/lib/besu/log4j.xml:ro
- ./config/linea-local-dev-genesis-PoA-besu.json/:/var/lib/besu/genesis.json:ro
- ../tmp/traces-node-v2/plugins:/opt/besu/plugins/
- ../tmp/local/:/data/:rw
networks:
linea:
ipv4_address: 11.11.11.115
prover:
command: ['echo', 'forced exit as replaced by prover-v3']
prover-v3: # prover compatible with the traces from zkbesu
container_name: prover-v3
hostname: prover-v3
image: consensys/linea-prover:${PROVER_TAG:-bba9677}
platform: linux/amd64
# to avoid spinning up on CI for now
profiles: [ "l2" ]
environment:
GOMAXPROCS: 16
CONFIG_FILE: "/opt/linea/prover/config.toml"
GOMEMLIMIT: "10GiB"
WORKER_ID: prover-i1 # keep this prover- to mimic prod env prover-aggregation-91
volumes:
- ../tmp/local/:/data/
- logs:/logs
- ./config/prover/v3/prover-config.toml:/opt/linea/prover/config.toml:ro
- ../prover/prover-assets:/opt/linea/prover/prover-assets:ro
networks:
linea:
ipv4_address: 11.11.11.109
traces-node-v2-plugin-downloader:
image: busybox:1.36.1
# profiles: ["l2", "l2-bc"] this works locally but breakes on CI, maybe Docker compose version issue
command: [ "sh", "/file-downloader.sh", "https://github.com/Consensys/linea-tracer/releases/download/v0.8.0-rc3/linea-tracer-v0.8.0-rc3.jar", "/traces-node-v2" ]
volumes:
- ./scripts/file-downloader.sh:/file-downloader.sh:ro
- ../tmp/traces-node-v2/plugins:/traces-node-v2/
coordinator:
# ./gradlew :coordinator:app:shadowJar
# docker build coordinator --build-context=jar=./coordinator/app/build/libs/ -t local/linea-coordinator:latest
# image: local/linea-coordinator:latest
command: [ 'java', '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005','-Dvertx.configurationFile=/var/lib/coordinator/vertx-options.json', '-Dlog4j2.configurationFile=/var/lib/coordinator/log4j2-dev.xml', '-jar', 'libs/coordinator.jar', '--traces-limits-v2', 'config/traces-limits-v2.toml', '--smart-contract-errors', 'config/smart-contract-errors.toml', '--gas-price-cap-time-of-day-multipliers', 'config/gas-price-cap-time-of-day-multipliers.toml', 'config/coordinator-docker.config.toml', 'config/coordinator-docker-traces-v2-override.config.toml' ]
# command: ['echo', 'forced exit to run coordinator in debug mode in IntelliJ']
ports:
# Attach the IDE's remote java debugger to localhost:5005 to debug coordinator
- "5005:5005"
volumes:
- ../config/common/traces-limits-v2.toml:/opt/consensys/linea/coordinator/config/traces-limits-v2.toml:ro
- ../config/coordinator/coordinator-docker-traces-v2-override.config.toml:/opt/consensys/linea/coordinator/config/coordinator-docker-traces-v2-override.config.toml:ro
- ../tmp/local/:/data/
zkbesu-shomei:
environment:
JAVA_OPTS: -XX:+UnlockExperimentalVMOptions -XX:-UseG1GC -XX:+UseZGC
l1-el-node:
environment:
JAVA_OPTS: -XX:+UnlockExperimentalVMOptions -XX:-UseG1GC -XX:+UseZGC