diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8fadfbb2..3facacc7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -204,6 +204,8 @@ jobs: uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ github.repository }} + tags: | + type=semver,pattern={{raw}} - name: Build and push Docker image uses: docker/build-push-action@v5 @@ -214,14 +216,38 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + push_native_image_to_github: + name: Push Docker image to Github + runs-on: ubuntu-latest + permissions: write-all + steps: + - name: Check out the repo + uses: actions/checkout@v4 + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ github.repository }} + tags: | + type=semver,pattern={{raw}}-native + type=raw,value=latest,enable=false + type=raw,value=latest-native + - name: Build and push graalvm native Docker image uses: docker/build-push-action@v5 with: context: . file: ./docker/Dockerfile push: true - tags: ${{ steps.meta.outputs.tags }}-native - labels: ${{ steps.meta.outputs.labels }}-native + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} release: diff --git a/hildr-node/src/main/java/io/optimism/common/AttributesDepositedCall.java b/hildr-node/src/main/java/io/optimism/common/AttributesDepositedCall.java index e130cb70..686830c0 100644 --- a/hildr-node/src/main/java/io/optimism/common/AttributesDepositedCall.java +++ b/hildr-node/src/main/java/io/optimism/common/AttributesDepositedCall.java @@ -16,11 +16,7 @@ package io.optimism.common; -import java.io.IOException; import java.math.BigInteger; -import java.net.URISyntaxException; -import java.nio.file.Path; -import java.nio.file.Paths; import java.util.Objects; import net.osslabz.evm.abi.decoder.AbiDecoder; import net.osslabz.evm.abi.decoder.DecodedFunctionCall; @@ -52,13 +48,7 @@ public record AttributesDepositedCall( private static final AbiDecoder l1BlockAbi; static { - try { - Path path = Paths.get(Objects.requireNonNull(Epoch.class.getResource("/abi/L1Block.json")) - .toURI()); - l1BlockAbi = new AbiDecoder(path.toString()); - } catch (URISyntaxException | IOException e) { - throw new AbiFileLoadException(e); - } + l1BlockAbi = new AbiDecoder(Objects.requireNonNull(Epoch.class.getResourceAsStream("/abi/L1Block.json"))); } /** diff --git a/hildr-node/src/main/java/io/optimism/driver/Driver.java b/hildr-node/src/main/java/io/optimism/driver/Driver.java index 3ccb4b4a..af4559f1 100644 --- a/hildr-node/src/main/java/io/optimism/driver/Driver.java +++ b/hildr-node/src/main/java/io/optimism/driver/Driver.java @@ -202,7 +202,7 @@ public static Driver from(Config config, CountDownLatch latch) try { head = HeadInfo.from(finalizedBlock.getBlock()); } catch (Throwable throwable) { - LOGGER.warn("could not get head info. Falling back to the genesis head."); + LOGGER.warn("could not parse head info. Falling back to the genesis head.", throwable); head = new HeadInfo( config.chainConfig().l2Genesis(), config.chainConfig().l1StartEpoch(), BigInteger.ZERO); } @@ -212,7 +212,7 @@ public static Driver from(Config config, CountDownLatch latch) Epoch finalizedEpoch = head.l1Epoch(); BigInteger finalizedSeq = head.sequenceNumber(); - LOGGER.info("starting from head: {}", finalizedHead.hash()); + LOGGER.info("starting from head: number{}, hash{}", finalizedHead.number(), finalizedHead.hash()); BigInteger l1StartBlock = finalizedEpoch.number().subtract(config.chainConfig().channelTimeout()); ChainWatcher watcher = new ChainWatcher(