From 46d1869602faf39966c813e586dadb916544137e Mon Sep 17 00:00:00 2001 From: grapebaba <281165273@qq.com> Date: Mon, 13 Nov 2023 18:28:15 +0800 Subject: [PATCH] feat:add op tx type Signed-off-by: grapebaba <281165273@qq.com> --- .circleci/config.yml | 21 ++++++++++++------- .github/workflows/checks.yml | 6 +++--- .github/workflows/codeql.yml | 6 +++--- .github/workflows/dco-merge-group.yml | 2 +- .github/workflows/dco.yml | 2 +- .../workflows/gradle-wrapper-validation.yml | 2 +- .github/workflows/pr-checklist-on-open.yml | 4 ++-- .github/workflows/release.yml | 2 +- .github/workflows/repolinter.yml | 4 +++- .github/workflows/sonarcloud.yml | 2 +- .../besu/datatypes/TransactionType.java | 5 ++++- .../eth/transactions/PendingTransaction.java | 1 + .../src/reference-test/external-resources | 2 +- 13 files changed, 35 insertions(+), 24 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c044ed85083..3c37fa2f830 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,6 +43,11 @@ executors: image: ubuntu-2204:2022.10.2 resource_class: xlarge + med_machine_executor: + machine: #https://circleci.com/developer/machine/image/ubuntu-2204 + image: ubuntu-2204:2022.10.2 + resource_class: medium + trivy_executor: docker: - image: docker:stable-git @@ -107,7 +112,7 @@ commands: jobs: assemble: - executor: besu_executor_xl + executor: besu_executor_med steps: - prepare - run: @@ -176,7 +181,7 @@ jobs: done unitTests: - executor: besu_executor_xl + executor: besu_executor_med steps: - prepare - attach_workspace: @@ -189,7 +194,7 @@ jobs: - capture_test_results integrationTests: - executor: xl_machine_executor + executor: med_machine_executor steps: - prepare - attach_workspace: @@ -205,7 +210,7 @@ jobs: - capture_test_results referenceTests: - executor: besu_executor_xl + executor: besu_executor_med steps: - prepare - attach_workspace: @@ -220,7 +225,7 @@ jobs: acceptanceTests: parallelism: 4 - executor: xl_machine_executor + executor: med_machine_executor steps: - prepare - attach_workspace: @@ -242,7 +247,7 @@ jobs: acceptanceTestsCliqueBft: parallelism: 6 - executor: xl_machine_executor + executor: med_machine_executor steps: - prepare - attach_workspace: @@ -264,7 +269,7 @@ jobs: acceptanceTestsPrivacy: parallelism: 6 - executor: xl_machine_executor + executor: med_machine_executor steps: - prepare - attach_workspace: @@ -286,7 +291,7 @@ jobs: acceptanceTestsPermissioning: parallelism: 6 - executor: xl_machine_executor + executor: med_machine_executor steps: - prepare - attach_workspace: diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 9fdae30a99b..bb8f30bedf7 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -1,13 +1,13 @@ name: checks on: push: - branches: [ main ] + branches: [ release-23.10.x, main ] pull_request: workflow_dispatch: jobs: spotless: - runs-on: [besu-research-ubuntu-16] + runs-on: ubuntu-latest if: ${{ github.actor != 'dependabot[bot]' }} steps: - name: Checkout Repo @@ -21,7 +21,7 @@ jobs: - name: spotless run: ./gradlew --no-daemon --parallel clean spotlessCheck javadoc_17: - runs-on: [besu-research-ubuntu-8] + runs-on: ubuntu-latest if: ${{ github.actor != 'dependabot[bot]' }} steps: - name: Checkout Repo diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 100be39e0df..b2d27a98192 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -13,9 +13,9 @@ name: "CodeQL" on: push: - branches: [ main ] + branches: [ release-23.10.x, main ] pull_request: - branches: [ main ] + branches: [ release-23.10.x, main ] paths-ignore: - '**/*.json' - '**/*.md' @@ -24,7 +24,7 @@ on: jobs: analyze: name: Analyze - runs-on: [besu-research-ubuntu-16] + runs-on: ubuntu-latest permissions: actions: read contents: read diff --git a/.github/workflows/dco-merge-group.yml b/.github/workflows/dco-merge-group.yml index fee29b6c5d7..d47a16a6ccb 100644 --- a/.github/workflows/dco-merge-group.yml +++ b/.github/workflows/dco-merge-group.yml @@ -4,7 +4,7 @@ on: jobs: dco: - runs-on: [besu-research-ubuntu-8] + runs-on: ubuntu-latest if: ${{ github.actor != 'dependabot[bot]' }} steps: - run: echo "This DCO job runs on merge_queue event and doesn't check PR contents" diff --git a/.github/workflows/dco.yml b/.github/workflows/dco.yml index 5fa9931c77a..4e5e70e18e6 100644 --- a/.github/workflows/dco.yml +++ b/.github/workflows/dco.yml @@ -5,7 +5,7 @@ on: jobs: dco: - runs-on: [besu-research-ubuntu-8] + runs-on: ubuntu-latest if: ${{ github.actor != 'dependabot[bot]' }} steps: - run: echo "This DCO job runs on pull_request event and workflow_dispatch" diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml index 2be77e8c2ea..24a1c4ff4e8 100644 --- a/.github/workflows/gradle-wrapper-validation.yml +++ b/.github/workflows/gradle-wrapper-validation.yml @@ -5,7 +5,7 @@ on: [push, pull_request] jobs: validation: name: "Gradle Wrapper Validation" - runs-on: [besu-research-ubuntu-8] + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: gradle/wrapper-validation-action@v1 diff --git a/.github/workflows/pr-checklist-on-open.yml b/.github/workflows/pr-checklist-on-open.yml index 3a4d4342c58..b8ac94efaef 100644 --- a/.github/workflows/pr-checklist-on-open.yml +++ b/.github/workflows/pr-checklist-on-open.yml @@ -2,11 +2,11 @@ name: "comment on pr with checklist" on: pull_request_target: types: [ opened ] - branches: [ main ] + branches: [ release-23.10.x, main ] jobs: checklist: name: "add checklist as a comment on newly opened PRs" - runs-on: [besu-research-ubuntu-8] + runs-on: ubuntu-latest steps: - uses: actions/github-script@v5 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5c9b2328208..35b74bbfd04 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,7 +4,7 @@ on: types: released jobs: dockerPromoteX64: - runs-on: [besu-research-ubuntu-16] + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 diff --git a/.github/workflows/repolinter.yml b/.github/workflows/repolinter.yml index e1c61cadea8..9440951f032 100644 --- a/.github/workflows/repolinter.yml +++ b/.github/workflows/repolinter.yml @@ -8,14 +8,16 @@ on: branches: - master - main + - release-23.10.x pull_request: branches: - master - main + - release-23.10.x jobs: build: - runs-on: [besu-research-ubuntu-16] + runs-on: ubuntu-latest container: ghcr.io/todogroup/repolinter:v0.10.1 steps: - name: Checkout Code diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index e3a6e088e06..2fee53a12a5 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -14,7 +14,7 @@ permissions: jobs: Analysis: runs-on: ubuntu-latest - if: github.repository == 'hyperledger/besu' + if: github.repository == 'optimism-java/op-besu' steps: - name: checkout uses: actions/checkout@v3 diff --git a/datatypes/src/main/java/org/hyperledger/besu/datatypes/TransactionType.java b/datatypes/src/main/java/org/hyperledger/besu/datatypes/TransactionType.java index 984a4cc7467..010b12b1143 100644 --- a/datatypes/src/main/java/org/hyperledger/besu/datatypes/TransactionType.java +++ b/datatypes/src/main/java/org/hyperledger/besu/datatypes/TransactionType.java @@ -27,7 +27,10 @@ public enum TransactionType { /** Eip1559 transaction type. */ EIP1559(0x02), /** Blob transaction type. */ - BLOB(0x03); + BLOB(0x03), + + /** Optimism Deposit transaction type. */ + OPTIMISM_DEPOSIT(0x7e); private static final Set ACCESS_LIST_SUPPORTED_TRANSACTION_TYPES = Set.of(ACCESS_LIST, EIP1559, BLOB); diff --git a/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/transactions/PendingTransaction.java b/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/transactions/PendingTransaction.java index dbc461ecc38..684ebeac616 100644 --- a/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/transactions/PendingTransaction.java +++ b/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/transactions/PendingTransaction.java @@ -131,6 +131,7 @@ private int computeMemorySize() { case ACCESS_LIST -> computeAccessListMemorySize(); case EIP1559 -> computeEIP1559MemorySize(); case BLOB -> computeBlobMemorySize(); + case OPTIMISM_DEPOSIT -> throw new UnsupportedOperationException("Not yet implemented"); } + PENDING_TRANSACTION_MEMORY_SIZE; } diff --git a/ethereum/referencetests/src/reference-test/external-resources b/ethereum/referencetests/src/reference-test/external-resources index 661356317ac..428f218d7d6 160000 --- a/ethereum/referencetests/src/reference-test/external-resources +++ b/ethereum/referencetests/src/reference-test/external-resources @@ -1 +1 @@ -Subproject commit 661356317ac6df52208d54187e692472a25a01f8 +Subproject commit 428f218d7d6f4a52544e12684afbfe6e2882ffbf