carp icon indicating copy to clipboard operation
carp copied to clipboard

New task: datum hash -> datum table

Open SebastienGllmt opened this issue 2 years ago • 5 comments

Lots of people want an indexer capable of mapping datum hash to datum. We should be able to create a task for this and then expose it in the server/client after

SebastienGllmt avatar May 26 '22 05:05 SebastienGllmt

Started doing some TDD for this and found that it's painful constructing some of the Pallas types (e.g. TransactionBody) the tasks depend on directly. It looks like the main branch of Pallas makes the fields of the structs pub (at least for TransactionBody) , so it should be easier to construct in the future. Otherwise I might need to decode from CBOR directly in the test helpers :(.

It would be nice if carp had its own domain types for all the primitives rather than depending directly on Pallas. It's always a big undertaking up front to do that, but it would help avoid problems like this.

MitchTurner avatar Jun 16 '22 07:06 MitchTurner

Yeah. pallas v0.11.0-alpha.1 has the needed changes. I would recommend waiting until carp/tasks is updated to that version before trying to write the tests for the datum task. It's a non-trivial amount of work to update.

MitchTurner avatar Jun 17 '22 02:06 MitchTurner

Ideally we would deprecate all of Pallas. Unfortunately it will be very hard and time-consuming to do

SebastienGllmt avatar Jun 17 '22 03:06 SebastienGllmt

What do you mean by "deprecate"? Swap them out with locally owned domain types?

MitchTurner avatar Jun 17 '22 03:06 MitchTurner

Swap it all out with CML once all the CML upgrades are in place. Cardano Multiplatform Lib still has some limitations which means we currently have to use both, but that's kind of awkward and not ideal.

SebastienGllmt avatar Jun 17 '22 20:06 SebastienGllmt