bloxbean / yaci

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

Datum does not have the same size error for some txs in Conway era #79

Closed satran004 closed 1 month ago

satran004 commented 1 month ago

In Conway era, we are encountering the following error for some txs.

Although this error does not stop the sync, this condition should not occur. The error is shown from the code where we first attempt to calculate the datum hash directly from CBOR bytes without a full serialization/deserialization round trip. If this attempt fails, we use the deserialized DataItem to create the datum hash.

In certain scenarios, the deserialization/serialization process during datum hash calculation may result in an incorrect datum hash, depending on how the transaction was built. We need to rely only on the raw bytes to calculate the datum hash.

ERROR 68298 --- [Yaci Store App] [tLoopGroup-32-1] c.b.c.y.c.m.serializers.BlockSerializer  : block: 2677527 datum does not have the same size