Commit f363368
committed
Add enhanced logging and rollback detection
Node startup logging improvements:
- Log data directory path on state load
- Log current_round when loading DAG
- Log last_finalized_round when loading finality tracker
- Log total_supply and last_finalized_round when loading state engine
- Log transaction count when loading mempool
- Log when starting fresh (no state files found)
This will help diagnose restart issues by showing exactly what state
was loaded and from where.
Extended monitoring enhancements:
- Track previous round and supply across samples
- Detect round rollbacks (current < previous)
- Detect supply drops (>100k UDAG decrease)
- Alert with 🚨 when rollback or supply drop detected
- Output NODE:ROUND and NODE:SUPPLY for tracking
This will immediately alert if the network restarts from old state,
preventing undetected rollbacks like the one observed at 12:30:00.
Critical for mainnet safety - rollback detection is essential.1 parent d1b0c48 commit f363368
2 files changed
Lines changed: 54 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
| 129 | + | |
128 | 130 | | |
129 | 131 | | |
130 | 132 | | |
| 133 | + | |
| 134 | + | |
131 | 135 | | |
132 | | - | |
133 | 136 | | |
134 | 137 | | |
135 | 138 | | |
| 139 | + | |
| 140 | + | |
136 | 141 | | |
137 | 142 | | |
138 | 143 | | |
139 | 144 | | |
140 | 145 | | |
| 146 | + | |
| 147 | + | |
141 | 148 | | |
142 | | - | |
143 | 149 | | |
144 | 150 | | |
145 | 151 | | |
| 152 | + | |
| 153 | + | |
146 | 154 | | |
147 | 155 | | |
148 | 156 | | |
149 | 157 | | |
150 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
151 | 162 | | |
152 | | - | |
153 | 163 | | |
154 | 164 | | |
155 | 165 | | |
| 166 | + | |
| 167 | + | |
156 | 168 | | |
157 | 169 | | |
158 | 170 | | |
159 | 171 | | |
160 | 172 | | |
| 173 | + | |
| 174 | + | |
161 | 175 | | |
162 | | - | |
163 | 176 | | |
164 | 177 | | |
165 | 178 | | |
| 179 | + | |
| 180 | + | |
166 | 181 | | |
167 | 182 | | |
168 | 183 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
| |||
52 | 57 | | |
53 | 58 | | |
54 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
55 | 64 | | |
56 | 65 | | |
57 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
58 | 84 | | |
59 | 85 | | |
60 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
61 | 95 | | |
62 | 96 | | |
63 | 97 | | |
| |||
0 commit comments