carp icon indicating copy to clipboard operation
carp copied to clipboard

Redeemer task

Open SebastienGllmt opened this issue 1 year ago • 0 comments
trafficstars

Redeemers are not part of the transaction body (hence not part of the Transaction table), but are required to know the full Plutus context of a transaction (therefore, would be useful to add as an option in the history endpoint)

We have a TransactionMetadata table for a similar reason

I feel the schema for the table could probably just be something like

CREATE TABLE public."Redeemer" (
    tx_id bigint NOT NULL,
    redeemers bytea[] NOT NULL,
);

since:

  1. I don't think there is ever really a case to sub-index into the redeemer structure
  2. The Plutus context requires all witnesses anyway
  3. This is more space efficient
  4. The logic for redeemer tags & indices is complex (depends on the global order of things in a tx), so it would be hard to join on even if you wanted to

SebastienGllmt avatar Mar 31 '24 13:03 SebastienGllmt