From cd5891618e4f4757d996e84bbe919865f3de1ad6 Mon Sep 17 00:00:00 2001 From: jonesho <81145364+jonesho@users.noreply.github.com> Date: Tue, 22 Oct 2024 18:18:29 +0800 Subject: [PATCH] fix: revert the change and use GITHUB_SHA for commit tag (#220) * fix: revert the change and use GITHUB_SHA for commit tag * fix: accommodate recent besu lib version upgrade --- .github/workflows/reuse-store-image-name-and-tags.yml | 2 +- transaction-exclusion-api/app/build.gradle | 5 +---- .../linea/transactionexclusion/app/api/ArgumentParser.kt | 4 +++- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/reuse-store-image-name-and-tags.yml b/.github/workflows/reuse-store-image-name-and-tags.yml index e16c23d6e..bad0023fc 100644 --- a/.github/workflows/reuse-store-image-name-and-tags.yml +++ b/.github/workflows/reuse-store-image-name-and-tags.yml @@ -42,7 +42,7 @@ jobs: - name: Compute version tags id: step2 run: | - echo COMMIT_TAG=$(git rev-parse --short "${{ github.event.pull_request.head.sha }}") >> $GITHUB_OUTPUT + echo COMMIT_TAG=$(git rev-parse --short "$GITHUB_SHA") >> $GITHUB_OUTPUT echo LAST_COMMIT_TAG=$(git rev-parse --short "${{ env.EVENT_BEFORE }}") >> $GITHUB_OUTPUT echo DEVELOP_TAG=develop >> $GITHUB_OUTPUT echo COMMON_ANCESTOR_TAG=$(git rev-parse --short "${{ env.COMMON_ANCESTOR }}") >> $GITHUB_OUTPUT diff --git a/transaction-exclusion-api/app/build.gradle b/transaction-exclusion-api/app/build.gradle index f7fa9c714..12300a52e 100644 --- a/transaction-exclusion-api/app/build.gradle +++ b/transaction-exclusion-api/app/build.gradle @@ -29,11 +29,8 @@ dependencies { implementation "com.fasterxml.jackson.core:jackson-databind:${libs.versions.jackson.get()}" implementation "com.fasterxml.jackson.module:jackson-module-kotlin:${libs.versions.jackson.get()}" - implementation "org.hyperledger.besu:besu-datatypes:${libs.versions.besu.get()}" - implementation "org.hyperledger.besu:evm:${libs.versions.besu.get()}" - implementation "org.hyperledger.besu.internal:rlp:${libs.versions.besu.get()}" implementation "org.hyperledger.besu.internal:core:${libs.versions.besu.get()}" - implementation "org.hyperledger.besu.internal:crypto:${libs.versions.besu.get()}" + implementation "org.hyperledger.besu:plugin-api:${libs.versions.besu.get()}" api("io.netty:netty-transport-native-epoll:${libs.versions.netty.get()}:linux-x86_64") { because "It enables native transport for Linux." diff --git a/transaction-exclusion-api/app/src/main/kotlin/net/consensys/linea/transactionexclusion/app/api/ArgumentParser.kt b/transaction-exclusion-api/app/src/main/kotlin/net/consensys/linea/transactionexclusion/app/api/ArgumentParser.kt index 8e44eac61..b9e134df9 100644 --- a/transaction-exclusion-api/app/src/main/kotlin/net/consensys/linea/transactionexclusion/app/api/ArgumentParser.kt +++ b/transaction-exclusion-api/app/src/main/kotlin/net/consensys/linea/transactionexclusion/app/api/ArgumentParser.kt @@ -8,6 +8,7 @@ import net.consensys.linea.transactionexclusion.RejectedTransaction import net.consensys.linea.transactionexclusion.TransactionInfo import net.consensys.linea.transactionexclusion.dto.ModuleOverflowJsonDto import org.apache.tuweni.bytes.Bytes +import org.hyperledger.besu.ethereum.core.encoding.EncodingContext import org.hyperledger.besu.ethereum.core.encoding.TransactionDecoder import java.time.format.DateTimeFormatter import java.time.format.DateTimeParseException @@ -32,7 +33,8 @@ object ArgumentParser { fun getTransactionInfoFromRLP(rlp: ByteArray): TransactionInfo { try { return TransactionDecoder.decodeOpaqueBytes( - Bytes.wrap(rlp) + Bytes.wrap(rlp), + EncodingContext.BLOCK_BODY ).run { TransactionInfo( hash = this.hash.toArray(),