From 219f117ef682db591d53e77fb8d53fa4a26ebac0 Mon Sep 17 00:00:00 2001 From: garyschulte Date: Tue, 10 Dec 2024 10:27:54 -0800 Subject: [PATCH 1/2] use new servicemanager plugin-api, bump junit deps, bump rev to 0.4.0 Signed-off-by: garyschulte --- gradle.properties | 4 ++-- gradle/versions.gradle | 2 +- .../net/consensys/shomei/rpc/BesuShomeiRpcPlugin.java | 6 +++--- .../net/consensys/shomei/trielog/ZkTrieLogPlugin.java | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gradle.properties b/gradle.properties index 9ed8fa7..83ff156 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ -releaseVersion=0.3.2 -besuVersion=24.10.0 +releaseVersion=0.4.0 +besuVersion=24.12.0 diff --git a/gradle/versions.gradle b/gradle/versions.gradle index 52efced..f0f2dbe 100644 --- a/gradle/versions.gradle +++ b/gradle/versions.gradle @@ -59,7 +59,7 @@ dependencyManagement { } // junit - dependencySet(group: 'org.junit.jupiter', version: '5.8.2') { + dependencySet(group: 'org.junit.jupiter', version: '5.11.2') { entry 'junit-jupiter' entry 'junit-jupiter-api' entry 'junit-jupiter-engine' diff --git a/src/main/java/net/consensys/shomei/rpc/BesuShomeiRpcPlugin.java b/src/main/java/net/consensys/shomei/rpc/BesuShomeiRpcPlugin.java index b308402..c2cca98 100644 --- a/src/main/java/net/consensys/shomei/rpc/BesuShomeiRpcPlugin.java +++ b/src/main/java/net/consensys/shomei/rpc/BesuShomeiRpcPlugin.java @@ -21,8 +21,8 @@ import java.util.List; import com.google.auto.service.AutoService; -import org.hyperledger.besu.plugin.BesuContext; import org.hyperledger.besu.plugin.BesuPlugin; +import org.hyperledger.besu.plugin.ServiceManager; import org.hyperledger.besu.plugin.services.RpcEndpointService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -32,13 +32,13 @@ public class BesuShomeiRpcPlugin implements BesuPlugin { private static final Logger LOG = LoggerFactory.getLogger(BesuShomeiRpcPlugin.class); @Override - public void register(final BesuContext context) { + public void register(final ServiceManager serviceManager) { LOG.debug("Registering RPC plugins"); var methods = List.of( new ShomeiGetTrieLogsByRange(ZkTrieLogService.getInstance()), new ShomeiGetTrieLog(ZkTrieLogService.getInstance())); - context + serviceManager .getService(RpcEndpointService.class) .ifPresent( rpcEndpointService -> diff --git a/src/main/java/net/consensys/shomei/trielog/ZkTrieLogPlugin.java b/src/main/java/net/consensys/shomei/trielog/ZkTrieLogPlugin.java index 78677c1..128f149 100644 --- a/src/main/java/net/consensys/shomei/trielog/ZkTrieLogPlugin.java +++ b/src/main/java/net/consensys/shomei/trielog/ZkTrieLogPlugin.java @@ -17,8 +17,8 @@ import java.util.Optional; import com.google.auto.service.AutoService; -import org.hyperledger.besu.plugin.BesuContext; import org.hyperledger.besu.plugin.BesuPlugin; +import org.hyperledger.besu.plugin.ServiceManager; import org.hyperledger.besu.plugin.services.PicoCLIOptions; import org.hyperledger.besu.plugin.services.TrieLogService; import org.slf4j.Logger; @@ -31,11 +31,11 @@ public class ZkTrieLogPlugin implements BesuPlugin { private static ShomeiCliOptions options = ShomeiCliOptions.create(); @Override - public void register(final BesuContext besuContext) { + public void register(final ServiceManager serviceManager) { LOG.info("Registering ZkTrieLog plugin"); LOG.debug("Adding command line params"); - final Optional cmdlineOptions = besuContext.getService(PicoCLIOptions.class); + final Optional cmdlineOptions = serviceManager.getService(PicoCLIOptions.class); if (cmdlineOptions.isEmpty()) { throw new IllegalStateException( @@ -43,7 +43,7 @@ public void register(final BesuContext besuContext) { } cmdlineOptions.get().addPicoCLIOptions(NAME, options); - besuContext.addService(TrieLogService.class, ZkTrieLogService.getInstance()); + serviceManager.addService(TrieLogService.class, ZkTrieLogService.getInstance()); } @Override From 7c0f073cd8adfed7c907ac4503e19e6df9e2cbe0 Mon Sep 17 00:00:00 2001 From: garyschulte Date: Thu, 12 Dec 2024 16:44:44 -0800 Subject: [PATCH 2/2] bump to 24.12.1 Signed-off-by: garyschulte --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 83ff156..9171047 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ releaseVersion=0.4.0 -besuVersion=24.12.0 +besuVersion=24.12.1