From 8e643ba081095f380ae97e2892080fecc180a08e Mon Sep 17 00:00:00 2001 From: Satya <35016438+satran004@users.noreply.github.com> Date: Thu, 17 Oct 2024 11:16:03 +0800 Subject: [PATCH] Feat/graalvm - metadata files (#95) * chore: Graalvm reachable metadata * Implement StakePoolParamsQuery deserialization Added functionality to deserialize StakePoolParamsQuery results, converting CBOR data items into PoolParams objects. Updated integration tests to validate the deserialization process. --- .../PoolRegistrationSerializer.java | 2 +- .../queries/StakePoolParamQueryResult.java | 8 + .../queries/StakePoolParamsQuery.java | 76 ++++++++- .../native-image/yaci/jni-config.json | 11 ++ .../native-image/yaci/native-image.properties | 14 ++ .../yaci/native-image.properties.ci | 14 ++ .../native-image/yaci/reflect-config.json | 148 ++++++++++++++++++ .../native-image/yaci/resource-config.json | 13 ++ .../yaci/helper/LocalStateQueryClientIT.java | 14 +- 9 files changed, 291 insertions(+), 9 deletions(-) create mode 100644 core/src/main/resources/META-INF/native-image/yaci/jni-config.json create mode 100644 core/src/main/resources/META-INF/native-image/yaci/native-image.properties create mode 100644 core/src/main/resources/META-INF/native-image/yaci/native-image.properties.ci create mode 100644 core/src/main/resources/META-INF/native-image/yaci/reflect-config.json create mode 100644 core/src/main/resources/META-INF/native-image/yaci/resource-config.json diff --git a/core/src/main/java/com/bloxbean/cardano/yaci/core/model/serializers/PoolRegistrationSerializer.java b/core/src/main/java/com/bloxbean/cardano/yaci/core/model/serializers/PoolRegistrationSerializer.java index 57772a69..ea1e6143 100644 --- a/core/src/main/java/com/bloxbean/cardano/yaci/core/model/serializers/PoolRegistrationSerializer.java +++ b/core/src/main/java/com/bloxbean/cardano/yaci/core/model/serializers/PoolRegistrationSerializer.java @@ -91,7 +91,7 @@ public PoolRegistration deserializeDI(DataItem di) { return new PoolRegistration(poolParams); } - private Relay deserializeRelay(DataItem relayDI) { + public static Relay deserializeRelay(DataItem relayDI) { List relayItems = ((Array) relayDI).getDataItems(); int type = toInt(relayItems.get(0)); diff --git a/core/src/main/java/com/bloxbean/cardano/yaci/core/protocol/localstate/queries/StakePoolParamQueryResult.java b/core/src/main/java/com/bloxbean/cardano/yaci/core/protocol/localstate/queries/StakePoolParamQueryResult.java index 2c8c5982..1bb58090 100644 --- a/core/src/main/java/com/bloxbean/cardano/yaci/core/protocol/localstate/queries/StakePoolParamQueryResult.java +++ b/core/src/main/java/com/bloxbean/cardano/yaci/core/protocol/localstate/queries/StakePoolParamQueryResult.java @@ -1,6 +1,14 @@ package com.bloxbean.cardano.yaci.core.protocol.localstate.queries; +import com.bloxbean.cardano.yaci.core.model.PoolParams; import com.bloxbean.cardano.yaci.core.protocol.localstate.api.QueryResult; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.ToString; +@Getter +@ToString +@AllArgsConstructor public class StakePoolParamQueryResult implements QueryResult { + private java.util.Map poolParams; } diff --git a/core/src/main/java/com/bloxbean/cardano/yaci/core/protocol/localstate/queries/StakePoolParamsQuery.java b/core/src/main/java/com/bloxbean/cardano/yaci/core/protocol/localstate/queries/StakePoolParamsQuery.java index d40945bb..4e6651b4 100644 --- a/core/src/main/java/com/bloxbean/cardano/yaci/core/protocol/localstate/queries/StakePoolParamsQuery.java +++ b/core/src/main/java/com/bloxbean/cardano/yaci/core/protocol/localstate/queries/StakePoolParamsQuery.java @@ -1,9 +1,9 @@ package com.bloxbean.cardano.yaci.core.protocol.localstate.queries; -import co.nstant.in.cbor.model.Array; -import co.nstant.in.cbor.model.ByteString; -import co.nstant.in.cbor.model.DataItem; -import co.nstant.in.cbor.model.UnsignedInteger; +import co.nstant.in.cbor.model.*; +import co.nstant.in.cbor.model.Map; +import com.bloxbean.cardano.yaci.core.model.PoolParams; +import com.bloxbean.cardano.yaci.core.model.Relay; import com.bloxbean.cardano.yaci.core.protocol.handshake.messages.AcceptVersion; import com.bloxbean.cardano.yaci.core.protocol.localstate.api.Era; import com.bloxbean.cardano.yaci.core.protocol.localstate.api.EraQuery; @@ -12,7 +12,12 @@ import lombok.Getter; import lombok.NonNull; -import java.util.List; +import java.math.BigInteger; +import java.util.*; + +import static com.bloxbean.cardano.yaci.core.model.serializers.PoolRegistrationSerializer.deserializeRelay; +import static com.bloxbean.cardano.yaci.core.util.CborSerializationUtil.*; +import static com.bloxbean.cardano.yaci.core.util.CborSerializationUtil.toHex; @Getter @AllArgsConstructor @@ -41,6 +46,65 @@ public DataItem serialize(AcceptVersion protocolVersion) { @Override public StakePoolParamQueryResult deserializeResult(AcceptVersion protocolVersion, DataItem[] di) { - throw new UnsupportedOperationException("Not implemented yet"); + List dataItemList = extractResultArray(di[0]); + Map poolMap = (Map) dataItemList.get(0); + + java.util.Map poolParamsMap = new LinkedHashMap<>(); + for (var key : poolMap.getKeys()) { + String poolId = HexUtil.encodeHexString(((ByteString) key).getBytes()); + var poolParamDIList = ((Array)poolMap.get(key)).getDataItems(); + + String operator = toHex(poolParamDIList.get(0)); + String vrfKeyHash = toHex(poolParamDIList.get(1)); + BigInteger pledge = toBigInteger(poolParamDIList.get(2)); + BigInteger cost = toBigInteger(poolParamDIList.get(3)); + String margin = ((RationalNumber) poolParamDIList.get(4)).getNumerator() + "/" + ((RationalNumber) poolParamDIList.get(4)).getDenominator(); + String rewardAccount = toHex(poolParamDIList.get(5)); + + //Pool Owners0 + Set poolOwners = new HashSet<>(); + List poolOwnersDataItems = ((Array) poolParamDIList.get(6)).getDataItems(); + for (DataItem poolOwnerDI : poolOwnersDataItems) { + if (poolOwnerDI == SimpleValue.BREAK) + continue; + poolOwners.add(toHex(poolOwnerDI)); + } + + //Relays + List relaysDataItems = ((Array) poolParamDIList.get(7)).getDataItems(); + List relays = new ArrayList<>(); + for (DataItem relayDI : relaysDataItems) { + if (relayDI == SimpleValue.BREAK) + continue; + relays.add(deserializeRelay(relayDI)); + } + + //pool metadata + DataItem poolMetaDataDI = poolParamDIList.get(8); + String metadataUrl = null; + String metadataHash = null; + if (poolMetaDataDI != SimpleValue.NULL) { + List poolMetadataDataItems = ((Array) poolMetaDataDI).getDataItems(); + metadataUrl = toUnicodeString(poolMetadataDataItems.get(0)); + metadataHash = toHex(poolMetadataDataItems.get(1)); + } + + PoolParams poolParams = PoolParams.builder() + .operator(operator) + .vrfKeyHash(vrfKeyHash) + .pledge(pledge) + .cost(cost) + .margin(margin) + .rewardAccount(rewardAccount) + .poolOwners(poolOwners) + .relays(relays) + .poolMetadataUrl(metadataUrl) + .poolMetadataHash(metadataHash) + .build(); + + poolParamsMap.put(poolId, poolParams); + } + + return new StakePoolParamQueryResult(poolParamsMap); } } diff --git a/core/src/main/resources/META-INF/native-image/yaci/jni-config.json b/core/src/main/resources/META-INF/native-image/yaci/jni-config.json new file mode 100644 index 00000000..41fb8dbb --- /dev/null +++ b/core/src/main/resources/META-INF/native-image/yaci/jni-config.json @@ -0,0 +1,11 @@ +[ + { + "name" : "io.netty.channel.kqueue.KQueueStaticallyReferencedJniMethods" + }, + { + "name" : "io.netty.channel.kqueue.Native" + }, + { + "name" : "io.netty.channel.kqueue.BsdSocket" + } +] diff --git a/core/src/main/resources/META-INF/native-image/yaci/native-image.properties b/core/src/main/resources/META-INF/native-image/yaci/native-image.properties new file mode 100644 index 00000000..b92daea7 --- /dev/null +++ b/core/src/main/resources/META-INF/native-image/yaci/native-image.properties @@ -0,0 +1,14 @@ +Args = --initialize-at-run-time=io.netty.channel.epoll.Epoll \ +--initialize-at-run-time=io.netty.channel.epoll.Native \ +--initialize-at-run-time=io.netty.channel.epoll.EpollEventLoop \ +--initialize-at-run-time=io.netty.channel.epoll.EpollEventArray \ +--initialize-at-run-time=io.netty.channel.DefaultFileRegion \ +--initialize-at-run-time=io.netty.channel.kqueue.KQueueEventArray \ +--initialize-at-run-time=io.netty.channel.kqueue.KQueueEventLoop \ +--initialize-at-run-time=io.netty.channel.kqueue.Native \ +--initialize-at-run-time=io.netty.channel.unix.Errors \ +--initialize-at-run-time=io.netty.channel.unix.IovArray \ +--initialize-at-run-time=io.netty.channel.unix.Limits \ +--initialize-at-run-time=io.netty.util.internal.logging.Log4JLogger \ +--initialize-at-run-time=io.netty.channel.kqueue.KQueue \ +--initialize-at-run-time=io.netty.handler.ssl.BouncyCastleAlpnSslUtils diff --git a/core/src/main/resources/META-INF/native-image/yaci/native-image.properties.ci b/core/src/main/resources/META-INF/native-image/yaci/native-image.properties.ci new file mode 100644 index 00000000..d0da1323 --- /dev/null +++ b/core/src/main/resources/META-INF/native-image/yaci/native-image.properties.ci @@ -0,0 +1,14 @@ +Args = --static --libc=musl --initialize-at-run-time=io.netty.channel.epoll.Epoll \ +--initialize-at-run-time=io.netty.channel.epoll.Native \ +--initialize-at-run-time=io.netty.channel.epoll.EpollEventLoop \ +--initialize-at-run-time=io.netty.channel.epoll.EpollEventArray \ +--initialize-at-run-time=io.netty.channel.DefaultFileRegion \ +--initialize-at-run-time=io.netty.channel.kqueue.KQueueEventArray \ +--initialize-at-run-time=io.netty.channel.kqueue.KQueueEventLoop \ +--initialize-at-run-time=io.netty.channel.kqueue.Native \ +--initialize-at-run-time=io.netty.channel.unix.Errors \ +--initialize-at-run-time=io.netty.channel.unix.IovArray \ +--initialize-at-run-time=io.netty.channel.unix.Limits \ +--initialize-at-run-time=io.netty.util.internal.logging.Log4JLogger \ +--initialize-at-run-time=io.netty.channel.kqueue.KQueue \ +--initialize-at-run-time=io.netty.handler.ssl.BouncyCastleAlpnSslUtils diff --git a/core/src/main/resources/META-INF/native-image/yaci/reflect-config.json b/core/src/main/resources/META-INF/native-image/yaci/reflect-config.json new file mode 100644 index 00000000..61dcf9d5 --- /dev/null +++ b/core/src/main/resources/META-INF/native-image/yaci/reflect-config.json @@ -0,0 +1,148 @@ +[ + { + "name":"io.netty.buffer.AbstractByteBufAllocator", + "queryAllDeclaredMethods":true + }, + { + "name":"io.netty.buffer.AbstractReferenceCountedByteBuf", + "fields":[{"name":"refCnt"}] + }, + { + "name":"io.netty.buffer.PooledByteBufAllocator" + }, + { + "name":"io.netty.channel.AbstractChannelHandlerContext", + "fields":[{"name":"handlerState"}] + }, + { + "name":"io.netty.channel.ChannelHandlerAdapter", + "methods":[{"name":"exceptionCaught","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Throwable"] }] + }, + { + "name":"io.netty.channel.ChannelInboundHandlerAdapter", + "methods":[{"name":"channelActive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }, {"name":"channelInactive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }, {"name":"channelRead","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object"] }, {"name":"channelReadComplete","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }, {"name":"channelRegistered","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }, {"name":"channelUnregistered","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }, {"name":"channelWritabilityChanged","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }, {"name":"exceptionCaught","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Throwable"] }, {"name":"userEventTriggered","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object"] }] + }, + { + "name":"io.netty.channel.ChannelInitializer", + "methods":[{"name":"channelRegistered","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }, {"name":"exceptionCaught","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Throwable"] }] + }, + { + "name":"io.netty.channel.ChannelOutboundBuffer", + "fields":[{"name":"totalPendingSize"}, {"name":"unwritable"}] + }, + { + "name":"io.netty.channel.ChannelOutboundHandlerAdapter", + "methods":[{"name":"bind","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","io.netty.channel.ChannelPromise"] }, {"name":"close","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] }, {"name":"connect","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","java.net.SocketAddress","io.netty.channel.ChannelPromise"] }, {"name":"deregister","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] }, {"name":"disconnect","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] }, {"name":"flush","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }, {"name":"read","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }] + }, + { + "name":"io.netty.channel.DefaultChannelConfig", + "fields":[{"name":"autoRead"}, {"name":"writeBufferWaterMark"}] + }, + { + "name":"io.netty.channel.DefaultChannelPipeline", + "fields":[{"name":"estimatorHandle"}] + }, + { + "name":"io.netty.channel.DefaultChannelPipeline$HeadContext", + "methods":[{"name":"bind","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","io.netty.channel.ChannelPromise"] }, {"name":"channelActive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }, {"name":"channelInactive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }, {"name":"channelRead","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object"] }, {"name":"channelReadComplete","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }, {"name":"channelRegistered","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }, {"name":"channelUnregistered","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }, {"name":"channelWritabilityChanged","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }, {"name":"close","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] }, {"name":"connect","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","java.net.SocketAddress","io.netty.channel.ChannelPromise"] }, {"name":"deregister","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] }, {"name":"disconnect","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] }, {"name":"exceptionCaught","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Throwable"] }, {"name":"flush","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }, {"name":"read","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }, {"name":"userEventTriggered","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object"] }, {"name":"write","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object","io.netty.channel.ChannelPromise"] }] + }, + { + "name":"io.netty.channel.DefaultChannelPipeline$TailContext", + "methods":[{"name":"channelActive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }, {"name":"channelInactive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }, {"name":"channelRead","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object"] }, {"name":"channelReadComplete","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }, {"name":"channelRegistered","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }, {"name":"channelUnregistered","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }, {"name":"channelWritabilityChanged","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }, {"name":"exceptionCaught","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Throwable"] }, {"name":"userEventTriggered","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object"] }] + }, + { + "name":"io.netty.channel.DefaultFileRegion" + }, + { + "name":"io.netty.channel.kqueue.KQueueDomainSocketChannel", + "methods":[{"name":"","parameterTypes":[] }] + }, + { + "name":"io.netty.channel.kqueue.KQueueEventLoop", + "fields":[{"name":"wakenUp"}] + }, + { + "name":"io.netty.channel.socket.nio.NioSocketChannel", + "methods":[{"name":"","parameterTypes":[] }] + }, + { + "name":"io.netty.channel.unix.DatagramSocketAddress" + }, + { + "name":"io.netty.channel.unix.DomainDatagramSocketAddress" + }, + { + "name":"io.netty.channel.unix.FileDescriptor", + "fields":[{"name":"state"}] + }, + { + "name":"io.netty.channel.unix.PeerCredentials" + }, + { + "name":"io.netty.handler.codec.ByteToMessageDecoder", + "methods":[{"name":"channelInactive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }, {"name":"channelRead","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object"] }, {"name":"channelReadComplete","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }, {"name":"userEventTriggered","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object"] }] + }, + { + "name":"io.netty.handler.codec.MessageToByteEncoder", + "methods":[{"name":"write","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object","io.netty.channel.ChannelPromise"] }] + }, + { + "name":"io.netty.util.AbstractReferenceCounted", + "fields":[{"name":"refCnt"}] + }, + { + "name":"io.netty.util.DefaultAttributeMap", + "fields":[{"name":"attributes"}] + }, + { + "name":"io.netty.util.NettyRuntime" + }, + { + "name":"io.netty.util.Recycler$DefaultHandle", + "fields":[{"name":"state"}] + }, + { + "name":"io.netty.util.ReferenceCountUtil", + "queryAllDeclaredMethods":true + }, + { + "name":"io.netty.util.ResourceLeakDetector$DefaultResourceLeak", + "fields":[{"name":"droppedRecords"}, {"name":"head"}] + }, + { + "name":"io.netty.util.concurrent.DefaultPromise", + "fields":[{"name":"result"}] + }, + { + "name":"io.netty.util.concurrent.SingleThreadEventExecutor", + "fields":[{"name":"state"}, {"name":"threadProperties"}] + }, + { + "name":"io.netty.util.internal.NativeLibraryUtil", + "methods":[{"name":"loadLibrary","parameterTypes":["java.lang.String","boolean"] }] + }, + { + "name":"io.netty.util.internal.shaded.org.jctools.queues.BaseMpscLinkedArrayQueueColdProducerFields", + "fields":[{"name":"producerLimit"}] + }, + { + "name":"io.netty.util.internal.shaded.org.jctools.queues.BaseMpscLinkedArrayQueueConsumerFields", + "fields":[{"name":"consumerIndex"}] + }, + { + "name":"io.netty.util.internal.shaded.org.jctools.queues.BaseMpscLinkedArrayQueueProducerFields", + "fields":[{"name":"producerIndex"}] + }, + { + "name":"io.netty.util.internal.shaded.org.jctools.queues.MpscArrayQueueConsumerIndexField", + "fields":[{"name":"consumerIndex"}] + }, + { + "name":"io.netty.util.internal.shaded.org.jctools.queues.MpscArrayQueueProducerIndexField", + "fields":[{"name":"producerIndex"}] + }, + { + "name":"io.netty.util.internal.shaded.org.jctools.queues.MpscArrayQueueProducerLimitField", + "fields":[{"name":"producerLimit"}] + } +] diff --git a/core/src/main/resources/META-INF/native-image/yaci/resource-config.json b/core/src/main/resources/META-INF/native-image/yaci/resource-config.json new file mode 100644 index 00000000..c687a0e8 --- /dev/null +++ b/core/src/main/resources/META-INF/native-image/yaci/resource-config.json @@ -0,0 +1,13 @@ +{ + "resources": { + "includes": [ + { + "pattern":"\\QMETA-INF/native/libnetty_transport_native_kqueue_aarch_64.dylib\\E" + }, + { + "pattern":"\\QMETA-INF/native/libnetty_transport_native_kqueue_aarch_64.jnilib\\E" + } + ], + "excludes": [] + } +} diff --git a/helper/src/integrationTest/java/com/bloxbean/cardano/yaci/helper/LocalStateQueryClientIT.java b/helper/src/integrationTest/java/com/bloxbean/cardano/yaci/helper/LocalStateQueryClientIT.java index 1ca2d892..d00259d9 100644 --- a/helper/src/integrationTest/java/com/bloxbean/cardano/yaci/helper/LocalStateQueryClientIT.java +++ b/helper/src/integrationTest/java/com/bloxbean/cardano/yaci/helper/LocalStateQueryClientIT.java @@ -217,11 +217,21 @@ void stakeSnapshotsQuery() { @Test void stakePoolParamQuery() { - Mono mono = localStateQueryClient.executeQuery(new StakePoolParamsQuery(List.of("032a04334a846fdf542fd5633c9b3928998691b8276e004facbc8af1", - "0a4ed3c5cc11a044cff16f7045588c9b6f6c98f7154026a3a3f55f24"))); + String poolId1 = "27aa9ad499cb47f856727913abd02dfd08bbb69dbefd1b4c098c6e96"; + //String poolId2 = "1c07dbd3648fe70545170b6f6d390136c1cc66ec83326f5d94a0fd3e"; + Mono mono = localStateQueryClient.executeQuery(new StakePoolParamsQuery(List.of(poolId1))); StakePoolParamQueryResult result = mono.block(Duration.ofSeconds(5)); System.out.println(result); + assertThat(result.getPoolParams().get(poolId1)).isNotNull(); + assertThat(result.getPoolParams().get(poolId1).getOperator()).isEqualTo(poolId1); + assertThat(result.getPoolParams().get(poolId1).getVrfKeyHash()).isEqualTo("5f97dc97196c55b7eca60909b68de9db9bedee4f04a000b27c2df4b95911c5af"); + assertThat(result.getPoolParams().get(poolId1).getCost()).isNotNull(); + +// assertThat(result.getPoolParams().get(poolId2)).isNotNull(); +// assertThat(result.getPoolParams().get(poolId2).getOperator()).isEqualTo(poolId2); +// assertThat(result.getPoolParams().get(poolId2).getVrfKeyHash()).isEqualTo("322828d4f7cfe86db0f8c3fb385e317b5415a8287963aa58c967eb3643c5ee25"); +// assertThat(result.getPoolParams().get(poolId2).getCost()).isNotNull(); } @Test