Issue originally created here; reposting here for better visibility.
Not sure how big of a problem this discrepancy between ledger api is, but its worth investigating.
cardano-api ==9.0.0.0
Issue description: For all types of transaction, size reported by cardano-api is 1-byte more compared to the size reported by ledger.
Code used to report the transactions:
reportFee:: Tx ConwayEra -> IO ()
reportFee = case tx of
ShelleyTx era ledgerTx -> let
txWitnesses = ledgerTx ^. L.witsTxL
sizeLedger = ledgerTx ^. L.sizeTxF
sizeCapi = fromIntegral $ BS.length $ serialiseToCBOR tx
txFee=L.unCoin $ ledgerTx ^. L.bodyTxL ^. L.feeTxBodyL
in do
putStrLn $ "Fee : " ++ show txFee
if sizeLedger /= sizeCapi
then do
putStrLn $ "Tx Bytes (ledger): " ++ show sizeLedger
putStrLn $ "Tx Bytes (api) : " ++ show sizeCapi
else
putStrLn $ "Tx Bytes : " ++ show sizeCapi
Issue originally created here; reposting here for better visibility. Not sure how big of a problem this discrepancy between ledger api is, but its worth investigating.
cardano-api ==9.0.0.0
Issue description: For all types of transaction, size reported by cardano-api is 1-byte more compared to the size reported by ledger.
Code used to report the transactions:
Output log