Skip to content

Commit

Permalink
feat:add op tx type
Browse files Browse the repository at this point in the history
Signed-off-by: grapebaba <281165273@qq.com>
  • Loading branch information
GrapeBaBa committed Nov 13, 2023
1 parent 287f0c2 commit 28c857f
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 25 deletions.
25 changes: 15 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ executors:
besu_executor_med: # 2cpu, 4G ram
docker:
- image: cimg/openjdk:17.0
resource_class: medium
resource_class: large
working_directory: ~/project
environment:
architecture: "amd64"
Expand All @@ -24,7 +24,7 @@ executors:
besu_arm64_executor_med: # 2cpu, 8G ram
machine: #https://circleci.com/developer/machine/image/ubuntu-2204
image: ubuntu-2204:2022.10.2
resource_class: arm.medium
resource_class: arm.large
working_directory: ~/project
environment:
architecture: "arm64"
Expand All @@ -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: large

trivy_executor:
docker:
- image: docker:stable-git
Expand Down Expand Up @@ -107,7 +112,7 @@ commands:

jobs:
assemble:
executor: besu_executor_xl
executor: besu_executor_med
steps:
- prepare
- run:
Expand Down Expand Up @@ -176,7 +181,7 @@ jobs:
done
unitTests:
executor: besu_executor_xl
executor: besu_executor_med
steps:
- prepare
- attach_workspace:
Expand All @@ -189,7 +194,7 @@ jobs:
- capture_test_results

integrationTests:
executor: xl_machine_executor
executor: med_machine_executor
steps:
- prepare
- attach_workspace:
Expand All @@ -205,7 +210,7 @@ jobs:
- capture_test_results

referenceTests:
executor: besu_executor_xl
executor: besu_executor_med
steps:
- prepare
- attach_workspace:
Expand All @@ -220,7 +225,7 @@ jobs:

acceptanceTests:
parallelism: 4
executor: xl_machine_executor
executor: med_machine_executor
steps:
- prepare
- attach_workspace:
Expand All @@ -242,7 +247,7 @@ jobs:

acceptanceTestsCliqueBft:
parallelism: 6
executor: xl_machine_executor
executor: med_machine_executor
steps:
- prepare
- attach_workspace:
Expand All @@ -264,7 +269,7 @@ jobs:

acceptanceTestsPrivacy:
parallelism: 6
executor: xl_machine_executor
executor: med_machine_executor
steps:
- prepare
- attach_workspace:
Expand All @@ -286,7 +291,7 @@ jobs:

acceptanceTestsPermissioning:
parallelism: 6
executor: xl_machine_executor
executor: med_machine_executor
steps:
- prepare
- attach_workspace:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -24,7 +24,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: [besu-research-ubuntu-16]
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dco-merge-group.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion .github/workflows/dco.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions .github/workflows/pr-checklist-on-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/repolinter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<TransactionType> ACCESS_LIST_SUPPORTED_TRANSACTION_TYPES =
Set.of(ACCESS_LIST, EIP1559, BLOB);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ public Transaction transaction(
case EIP1559 -> eip1559Transaction(payload, to);
case ACCESS_LIST -> accessListTransaction(payload, to);
case BLOB -> blobTransaction(payload, to);
case OPTIMISM_DEPOSIT -> throw new UnsupportedOperationException();
// no default, all types accounted for.
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ public Transaction createTransaction(final KeyPair keys) {
builder.kzgBlobs(bwc.getKzgCommitments(), bwc.getBlobs(), bwc.getKzgProofs());
});
break;
case OPTIMISM_DEPOSIT:
break;
}

to.ifPresent(builder::to);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 28c857f

Please sign in to comment.