Commit 11b2581
committed
fix: reject getReferencedTransactions when scan range exceeds indexed watermark
Adds a check in IIndexedQueryManager.getReferencedTransactions that returns
DATA_AVAILABILITY_FAILURE if firstOverflowBlock.blockNumber - 1 exceeds
lastConfirmedBlockNumber, enforcing the spec requirement that the verifier
must have a complete view of all blocks in the scan range before attesting
nonexistence.
In practice, the verifier-xrp-indexer writes blocks, transactions, and the
state watermark in a single ACID transaction (SaveAllEntities), so the blocks
table cannot have rows beyond last_indexed_block_number at runtime. The check
is kept as explicit spec enforcement so correctness does not depend on that
indexer implementation detail.
Also adds an explicit null guard in XrpIndexerQueryManager._getStateObject.1 parent e66add4 commit 11b2581
3 files changed
Lines changed: 14 additions & 2 deletions
File tree
- src
- entity
- indexed-query-manager
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
| 118 | + | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
179 | 186 | | |
180 | 187 | | |
181 | 188 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
| |||
0 commit comments