bloxbean / yaci

A Cardano Mini Protocols implementation in Java
MIT License
25 stars 3 forks source link

(Conway) ClassCastException is thrown during Plutus V3 script deserializing #50

Closed Sotatek-HuyLe3a closed 8 months ago

Sotatek-HuyLe3a commented 8 months ago

At block 1055858:

com.bloxbean.cardano.client.exception.CborRuntimeException: Plutus V3 script deserialization failed
    at com.bloxbean.cardano.yaci.core.model.serializers.WitnessesSerializer.deserializeDI(WitnessesSerializer.java:158)
    at com.bloxbean.cardano.yaci.core.model.serializers.BlockSerializer.deserializeBlock(BlockSerializer.java:78)
    at com.bloxbean.cardano.yaci.core.model.serializers.BlockSerializer.deserialize(BlockSerializer.java:33)
    at com.bloxbean.cardano.yaci.core.protocol.blockfetch.BlockfetchAgent.onReceiveBlocks(BlockfetchAgent.java:128)
    at com.bloxbean.cardano.yaci.core.protocol.blockfetch.BlockfetchAgent.processResponse(BlockfetchAgent.java:83)
    at com.bloxbean.cardano.yaci.core.protocol.Agent.receiveResponse(Agent.java:44)
    at com.bloxbean.cardano.yaci.core.network.handlers.MiniProtoClientInboundHandler.channelRead(MiniProtoClientInboundHandler.java:39)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
    at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
    at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:333)
    at io.netty.handler.codec.ReplayingDecoder.callDecode(ReplayingDecoder.java:349)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.ClassCastException: class co.nstant.in.cbor.model.Array cannot be cast to class co.nstant.in.cbor.model.ByteString (co.nstant.in.cbor.model.Array and co.nstant.in.cbor.model.ByteString are in unnamed module of loader 'app')
    at com.bloxbean.cardano.yaci.core.util.CborSerializationUtil.toHex(CborSerializationUtil.java:68)
    at com.bloxbean.cardano.yaci.core.model.serializers.WitnessesSerializer.deserializeDI(WitnessesSerializer.java:151)
    ... 29 common frames omitted