Commit ed92af2
authored
db-analyser: document pitfall of
This PR documents a deficiency of `--repro-mempool-and-forge 2`. This
mode is used to simulate larger mempools compared to
`--repro-mempool-and-forge 1` by inserting the contents of more than one
block into the mempool. However, Cardano transactions have a validity
interval, so but the transactions in the mempool are always validated
against the same slot at any given point, which can lead to failures.
A concrete example occurs with the Cardano mainnet chain with
`--analyse-from 100007913 --repro-mempool-and-forge 2
--num-blocks-to-process 3`, where the transaction with id
`3cba8560cd6b2fee11d7813526cd2863e33db991796a2db5a052040cf572cf78` of
block `9137142` will fail due to
```haskell
OutsideValidityIntervalUTxO
( ValidityInterval
{ invalidBefore = SJust ( SlotNo 100008025 )
, invalidHereafter = SJust ( SlotNo 100009025 )
}
)
( SlotNo 100008021 )
```
as block `9137140` is in slot `100008020`, and we increase the slot by
one for validation:
https://github.com/IntersectMBO/ouroboros-consensus/blob/126de8eb9669afb3220f57feb74da930f3b5dfa2/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Mempool/Impl/Common.hs#L249
Follow-up work could include allowing to skip such transactions.
Also, we now print the tx id of rejected transactions prominently as the
first entry.--repro-mempool-and-forge 2 (#1169)File tree
2 files changed
+22
-2
lines changed- ouroboros-consensus-cardano
- src/unstable-cardano-tools/Cardano/Tools/DBAnalyser
2 files changed
+22
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
169 | 179 | | |
170 | 180 | | |
171 | 181 | | |
| |||
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
811 | 811 | | |
812 | 812 | | |
813 | 813 | | |
814 | | - | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
815 | 818 | | |
816 | | - | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
817 | 827 | | |
818 | 828 | | |
819 | 829 | | |
| |||
0 commit comments