mlabs-haskell / clb

Cardano Node Emulator (next-gen PSM)
7 stars 3 forks source link

Output Datums are not indexed #45

Open mikekeke opened 3 weeks ago

mikekeke commented 3 weeks ago

I'm using CLB through integration in Atlas and during unit testing bumped into an issue when Datums can not be found by hash after transaction is submitted. mockDatums Map remains empty through the whole test run.

I've copy-pasted scriptDataFromCardanoTxBody to my project to see what is going on there, and seems like getting Datums only from (L.TxDats' dats) is not enough, as in my case it's an empty map. But I can see that Datums are present in transaction outputs as they suppose to. Probably, Datums can be extracted from outputs as well for proper indexing.

UPD: I'm submitting transactions with inline datums.

mikekeke commented 3 weeks ago

Hmm, I just noticed this comment. Does that mean that inline datums are not supposed to be indexed at all?

euonymos commented 2 weeks ago

I guess I wrongly decided we didn't want to hash them, but it looks as if we should do it.