@@ -607,8 +607,24 @@ cardanoTxFromBytes
607
607
-> ByteString -- ^ Serialised transaction
608
608
-> Either DecoderError (InAnyCardanoEra Cardano. Tx )
609
609
cardanoTxFromBytes maxEra bs = asum $ map snd $ filter (withinEra maxEra . fst )
610
- [ deserialise BabbageEra Cardano. AsBabbageEra
611
- , deserialise AlonzoEra Cardano. AsAlonzoEra
610
+ -- NOTE: Attempting to deserialise in Alonzo before Babbage is intentional.
611
+ --
612
+ -- It seems Alonzo transactions can be deserialized as Babbage
613
+ -- transactions. This causes new-tx workflow integration tests to fail.
614
+ -- The txs are interpreted as Babbage txs right before submitting them to
615
+ -- the Alonzo-era ledger.
616
+ --
617
+ -- This may also cause problems with our store of pending txs.
618
+ --
619
+ -- TODO: Can we come up with a better solution?
620
+ -- - Using Alonzo txs once we're in Babbage doesn't sound good?
621
+ -- - Ideally we should set @maxEra == currentNodeEra@ argument.
622
+ -- - But we can't access currentNodeEra from PersistField instances
623
+ -- - It might be good to ensure txs in the DB also store which era they
624
+ -- correspond to.
625
+ [ deserialise AlonzoEra Cardano. AsAlonzoEra
626
+ , deserialise BabbageEra Cardano. AsBabbageEra
627
+
612
628
, deserialise MaryEra Cardano. AsMaryEra
613
629
, deserialise AllegraEra Cardano. AsAllegraEra
614
630
, deserialise ShelleyEra Cardano. AsShelleyEra
0 commit comments