Commit c4ec450
core/state: state size tracking (ethereum#32362)
Add state size tracking and retrieve api, start geth with `--state.size-tracking`,
the initial bootstrap is required (around 1h on mainnet), after the bootstrap,
use `debug_stateSize()` RPC to retrieve the state size:
```
> debug.stateSize()
{
accountBytes: "0x39681967b",
accountTrienodeBytes: "0xc57939f0c",
accountTrienodes: "0x198b36ac",
accounts: "0x129da14a",
blockNumber: "0x1635e90",
contractCodeBytes: "0x2b63ef481",
contractCodes: "0x1c7b45",
stateRoot: "0x9c36a3ec3745d72eea8700bd27b90dcaa66de0494b187c5600750044151e620a",
storageBytes: "0x18a6e7d3f1",
storageTrienodeBytes: "0x2e7f53fae6",
storageTrienodes: "0x6e49a234",
storages: "0x517859c5"
}
```
---------
Signed-off-by: jsvisa <[email protected]>
Co-authored-by: Gary Rong <[email protected]>1 parent 8ce2047 commit c4ec450
File tree
16 files changed
+1016
-8
lines changed- cmd
- geth
- utils
- core
- state
- eth
- ethconfig
- internal/web3ext
- triedb
- pathdb
16 files changed
+1016
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| 203 | + | |
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
273 | 279 | | |
274 | 280 | | |
275 | 281 | | |
| |||
1726 | 1732 | | |
1727 | 1733 | | |
1728 | 1734 | | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
1729 | 1738 | | |
1730 | 1739 | | |
1731 | 1740 | | |
| |||
2208 | 2217 | | |
2209 | 2218 | | |
2210 | 2219 | | |
| 2220 | + | |
| 2221 | + | |
| 2222 | + | |
2211 | 2223 | | |
2212 | 2224 | | |
2213 | 2225 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
199 | 202 | | |
200 | 203 | | |
201 | 204 | | |
| |||
333 | 336 | | |
334 | 337 | | |
335 | 338 | | |
| 339 | + | |
336 | 340 | | |
337 | 341 | | |
338 | 342 | | |
| |||
526 | 530 | | |
527 | 531 | | |
528 | 532 | | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
529 | 544 | | |
530 | 545 | | |
531 | 546 | | |
| |||
1252 | 1267 | | |
1253 | 1268 | | |
1254 | 1269 | | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
1255 | 1274 | | |
1256 | 1275 | | |
1257 | 1276 | | |
| |||
1586 | 1605 | | |
1587 | 1606 | | |
1588 | 1607 | | |
1589 | | - | |
| 1608 | + | |
1590 | 1609 | | |
1591 | 1610 | | |
1592 | 1611 | | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
1593 | 1616 | | |
1594 | 1617 | | |
1595 | 1618 | | |
| |||
2791 | 2814 | | |
2792 | 2815 | | |
2793 | 2816 | | |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
| 2820 | + | |
| 2821 | + | |
0 commit comments