Apparently missing fees for Byron-era TXs
This command will get the latest transaction from Byron-era in mainnet:
oura watch relays-new.cardano-mainnet.iohk.io:3001 --bearer tcp --since 4492794,5c196e7394ace0449ba5a51c919369699b13896e97432894b4f0354dce8670b6
which produces the following output, where we can also see the first TX from the Shelly-era
Oura terminal output started, waiting for chain data
BLOCK:------- █ TX:-- █ RLLBCK { slot: 4492794, hash: 5c196e7394ace0449ba5a51c919369699b13896e97432894b4f0354dce8670b6 }
BLOCK:4490506 █ TX:-- █ BLOCK { era: Byron, slot: 4492795, hash: 2548ad5d0d9d33d50ab43151f574474454017a733e307229fa509c4987ca9782, number: 4490506, body size: 989, tx_count: 1, issuer v...
BLOCK:4490506 █ TX:00 █ TX { total_output: 115627225, fee: 0, hash: 336d520af58ff440b2f20210ddb5ef5b2c035e0ec7ec258bae4b519a87fa1696, ttl: None }
BLOCK:4490506 █ TX:00 █ STXI { tx_id: fb76850ccc6df7b4f4834321f5bce0f5fbf98424d98749e7d96fda9974b95fd9, index: 0 }
BLOCK:4490506 █ TX:00 █ UTXO { to: DdzFFzCqrhsk3Bqvun2x2CZh3E7xRrdmH9552oWkBQ6JUNtsSgTFzRhZKN7FjdUFwdZa4B5pm4xVnKVGov3Vox53iigr7upJoBcNBLXf, amount: 97732765 }
BLOCK:4490506 █ TX:00 █ UTXO { to: DdzFFzCqrhstRzCFdvH49sVaidcbJpeVHezS4739jhDYek55Y2Uz1t644X577vLXfUud8dmfWGnfhjkAxWxXGaUzF17w4voTSzrbS7Us, amount: 17894460 }
BLOCK:4490506 █ TX:-- █ ENDBLK { slot: 4492795, hash: 2548ad5d0d9d33d50ab43151f574474454017a733e307229fa509c4987ca9782, number: 4490506 }
BLOCK:4490507 █ TX:-- █ BLOCK { era: Byron, slot: 4492796, hash: 01f4a17d2aa5f4e2393c831953af9fe5f5350843d9175971530ccf24932859ca, number: 4490507, body size: 636, tx_count: 0, issuer v...
BLOCK:4490507 █ TX:-- █ ENDBLK { slot: 4492796, hash: 01f4a17d2aa5f4e2393c831953af9fe5f5350843d9175971530ccf24932859ca, number: 4490507 }
BLOCK:4490508 █ TX:-- █ BLOCK { era: Byron, slot: 4492797, hash: f25fd4b75c3c92b9e0d631bf1842d231a88096907e43eb772928d4fe7299a0f7, number: 4490508, body size: 636, tx_count: 0, issuer v...
BLOCK:4490508 █ TX:-- █ ENDBLK { slot: 4492797, hash: f25fd4b75c3c92b9e0d631bf1842d231a88096907e43eb772928d4fe7299a0f7, number: 4490508 }
BLOCK:4490509 █ TX:-- █ BLOCK { era: Byron, slot: 4492798, hash: 7e037dcb8995990d49d69ffc83327e79291e3e9c71fa46e0ddd48a1f6016f3a3, number: 4490509, body size: 636, tx_count: 0, issuer v...
BLOCK:4490509 █ TX:-- █ ENDBLK { slot: 4492798, hash: 7e037dcb8995990d49d69ffc83327e79291e3e9c71fa46e0ddd48a1f6016f3a3, number: 4490509 }
BLOCK:4490510 █ TX:-- █ BLOCK { era: Byron, slot: 4492799, hash: f8084c61b6a238acec985b59310b6ecec49c0ab8352249afd7268da5cff2a457, number: 4490510, body size: 636, tx_count: 0, issuer v...
BLOCK:4490510 █ TX:-- █ ENDBLK { slot: 4492799, hash: f8084c61b6a238acec985b59310b6ecec49c0ab8352249afd7268da5cff2a457, number: 4490510 }
BLOCK:4490511 █ TX:-- █ BLOCK { era: Shelley, slot: 4492800, hash: aa83acbf5904c0edfe4d79b3689d3d00fcfc553cf360fd2229b98d464c28e9de, number: 4490511, body size: 3, tx_count: 0, issuer v...
BLOCK:4490511 █ TX:-- █ ENDBLK { slot: 4492800, hash: aa83acbf5904c0edfe4d79b3689d3d00fcfc553cf360fd2229b98d464c28e9de, number: 4490511 }
BLOCK:4490512 █ TX:-- █ BLOCK { era: Shelley, slot: 4492840, hash: 4aff331a7b3022c0e3f94694f9a5f5739a78727db344a7b0331d1a0376e923e9, number: 4490512, body size: 3, tx_count: 0, issuer v...
BLOCK:4490512 █ TX:-- █ ENDBLK { slot: 4492840, hash: 4aff331a7b3022c0e3f94694f9a5f5739a78727db344a7b0331d1a0376e923e9, number: 4490512 }
BLOCK:4490513 █ TX:-- █ BLOCK { era: Shelley, slot: 4492860, hash: 3b5acf05f4f58290acee1654c9e1ec3a787aa9c27810c296103afd206702fb1b, number: 4490513, body size: 3, tx_count: 0, issuer v...
BLOCK:4490513 █ TX:-- █ ENDBLK { slot: 4492860, hash: 3b5acf05f4f58290acee1654c9e1ec3a787aa9c27810c296103afd206702fb1b, number: 4490513 }
BLOCK:4490514 █ TX:-- █ BLOCK { era: Shelley, slot: 4492880, hash: 23fd3b638e8f286978681567d52597b73f7567e18719cef2cbd66bba31303d98, number: 4490514, body size: 3, tx_count: 0, issuer v...
BLOCK:4490514 █ TX:-- █ ENDBLK { slot: 4492880, hash: 23fd3b638e8f286978681567d52597b73f7567e18719cef2cbd66bba31303d98, number: 4490514 }
BLOCK:4490515 █ TX:-- █ BLOCK { era: Shelley, slot: 4492900, hash: b51b1605cc27b0be3a1ab07dfcc2ceb0b0da5e8ab5d0cb944c16366edba92e83, number: 4490515, body size: 1053, tx_count: 1, issue...
BLOCK:4490515 █ TX:00 █ TX { total_output: 544826096465, fee: 218873, hash: 79acf08126546b68d0464417af9530473b8c56c63b2a937bf6451e96e55cb96a, ttl: Some(4500080) }
The fee for the Byron TX is zero, but according to CardanoScan, the transaction has fees: https://cardanoscan.io/transaction/336d520af58ff440b2f20210ddb5ef5b2c035e0ec7ec258bae4b519a87fa1696
I also checked the following query on db-sync and got the same value from CardanoScan, so I suppose there's some problem when reading the fees from the Byron-era blocks:
SELECT fee FROM tx WHERE decode('336d520af58ff440b2f20210ddb5ef5b2c035e0ec7ec258bae4b519a87fa1696', 'hex') = hash
It appears this is intentional. There are comments which give more context as to why:
https://github.com/txpipe/oura/blob/lts/v1/src/mapper/byron.rs#L81-L96