diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index c8d0702..8669fc5 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -16,10 +16,10 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v3 with: - java-version: 17 + java-version: 21 distribution: 'adopt' - name: Cache Gradle dependencies @@ -54,10 +54,10 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v3 with: - java-version: 17 + java-version: 21 distribution: 'adopt' - name: Cache Gradle dependencies diff --git a/CHANGELOG.md b/CHANGELOG.md index f20cf59..50233e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## version 0.3.1 +Bump besu dependency to 24.6.0 +- minor trielog factory interface change +- bump java to 21 +- bump gradle to 8.7.0 +- add hyperledger artifactory repo for besu maven deps + ## version 0.3.0 this release version uses the final build of 23.10.4-SNAPSHOT diff --git a/build.gradle b/build.gradle index d48f182..bc0fb9c 100644 --- a/build.gradle +++ b/build.gradle @@ -18,6 +18,10 @@ import groovy.transform.Memoized buildscript { repositories { mavenLocal() + maven { + url "https://hyperledger.jfrog.io/artifactory/besu-maven/" + content { includeGroupByRegex('org\\.hyperledger\\.besu\\..*')} + } mavenCentral() maven { url "https://artifacts.consensys.net/public/maven/maven/" @@ -30,7 +34,7 @@ buildscript { } plugins { - id 'com.diffplug.spotless' version '6.16.0' + id 'com.diffplug.spotless' version '6.21.0' id 'com.github.ben-manes.versions' version '0.46.0' id 'com.github.hierynomus.license' version '0.16.1' id 'io.spring.dependency-management' version '1.1.0' @@ -53,17 +57,21 @@ group = 'net.consensys.shomei.besu.plugin' //version = '0.1.0' version = project.hasProperty('releaseVersion') ? project.getProperty('releaseVersion') : 'snapshot' -sourceCompatibility = JavaVersion.VERSION_17 -targetCompatibility = JavaVersion.VERSION_17 +sourceCompatibility = JavaVersion.VERSION_21 +targetCompatibility = JavaVersion.VERSION_21 defaultTasks 'build', 'checkLicenses', 'javadoc', 'plugin' repositories { mavenLocal() + maven { + url "https://hyperledger.jfrog.io/artifactory/besu-maven/" + content { includeGroupByRegex('org\\.hyperledger\\.besu\\..*')} + } mavenCentral() maven { url "https://artifacts.consensys.net/public/maven/maven/" - content { includeGroupByRegex('tech\\.pegasys($|\\..*)') } + content { includeGroupByRegex('tech\\.pegasys($|\\..*)')} } maven { url "https://dl.cloudsmith.io/public/libp2p/jvm-libp2p/maven/" @@ -88,7 +96,7 @@ spotless { exclude '**/build/**' } removeUnusedImports() - googleJavaFormat('1.15.0') + googleJavaFormat('1.17.0') importOrder 'net.consensys', 'java', '' trimTrailingWhitespace() endWithNewline() diff --git a/gradle.properties b/gradle.properties index 63b0083..a7fd3f9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,3 @@ -releaseVersion=0.3.0 -besuVersion=23.10.4-SNAPSHOT +releaseVersion=0.3.1 +besuVersion=24.6.0 + diff --git a/gradle/versions.gradle b/gradle/versions.gradle index 9b2b3a3..52efced 100644 --- a/gradle/versions.gradle +++ b/gradle/versions.gradle @@ -35,8 +35,6 @@ dependencyManagement { dependency "org.hyperledger.besu:plugin-api:${besuVersion}" dependency "org.hyperledger.besu:besu-datatypes:${besuVersion}" dependency "org.hyperledger.besu.internal:rlp:${besuVersion}" - - // Logging dependencies dependencySet(group: 'org.apache.logging.log4j', version: '2.20.0') { entry 'log4j-api' @@ -82,7 +80,5 @@ dependencyManagement { dependency 'org.assertj:assertj-core:3.24.2' dependency 'com.google.guava:guava:31.1-jre' - - } -} \ No newline at end of file +} diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 4b854e8..a0afe0f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Wed May 03 13:03:35 PDT 2023 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/net/consensys/shomei/trielog/ZkTrieLogService.java b/src/main/java/net/consensys/shomei/trielog/ZkTrieLogService.java index b2c1084..542edeb 100644 --- a/src/main/java/net/consensys/shomei/trielog/ZkTrieLogService.java +++ b/src/main/java/net/consensys/shomei/trielog/ZkTrieLogService.java @@ -15,6 +15,7 @@ package net.consensys.shomei.trielog; import java.util.List; +import java.util.Optional; import java.util.concurrent.atomic.AtomicReference; import org.hyperledger.besu.plugin.services.TrieLogService; @@ -48,8 +49,8 @@ public List getObservers() { } @Override - public TrieLogFactory getTrieLogFactory() { - return ZkTrieLogFactory.INSTANCE; + public Optional getTrieLogFactory() { + return Optional.of(ZkTrieLogFactory.INSTANCE); } @Override diff --git a/src/test/java/net/consensys/shomei/rpc/GetShomeiTrieLogsTests.java b/src/test/java/net/consensys/shomei/rpc/GetShomeiTrieLogsTests.java index e2426fe..2f3a8c7 100644 --- a/src/test/java/net/consensys/shomei/rpc/GetShomeiTrieLogsTests.java +++ b/src/test/java/net/consensys/shomei/rpc/GetShomeiTrieLogsTests.java @@ -147,7 +147,7 @@ public void testGetSingleTrieLogIsPresent(VertxTestContext testContext) { var res = response.getString("result"); assertThat(res) .isEqualTo( - Bytes.wrap(trieLogService.getTrieLogFactory().serialize(mockLayer)) + Bytes.wrap(trieLogService.getTrieLogFactory().get().serialize(mockLayer)) .toHexString()); }); }