Commit 6dabaa8
committed
fix(light-node): use all epoch attestations for BitmapTX eligibility, fix Explorer labels
Previously, LightNodeEligibilityBitmap TX creation filtered attestations by
pinger_id == own_node_id. This caused 0 eligible nodes when a light node
responded to a different genesis node than the one that sent the FCM push
(which is expected behavior since FCM replies go to whichever genesis
endpoint the device reaches first).
Changes:
- node.rs: remove pinger_id filter from BitmapTX eligible_indices computation;
use all epoch attestations and filter by shard range [my_start, my_end)
instead; add HashSet deduplication so a node attested multiple times
counts once; update shard range log for visibility
- api/tx/[hash]/route.ts: add LightNodeEligibilityBitmap and all lowercase
variants to mapTxType so the TX detail page shows Heartbeat instead of
Transfer
- api/address/[address]/route.ts: already had bitmap mapping (no change needed)
Eligibility ownership is now correctly determined by shard membership
(deterministic sorted registry + genesis_idx), not by which genesis node
happened to receive the mobile device HTTP response.
Made-with: Cursor1 parent 5a7b08b commit 6dabaa8
3 files changed
Lines changed: 46 additions & 22 deletions
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
78 | 84 | | |
79 | 85 | | |
80 | 86 | | |
| 87 | + | |
81 | 88 | | |
82 | 89 | | |
83 | 90 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
40 | | - | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10400 | 10400 | | |
10401 | 10401 | | |
10402 | 10402 | | |
10403 | | - | |
10404 | | - | |
10405 | | - | |
10406 | | - | |
10407 | | - | |
10408 | | - | |
| 10403 | + | |
| 10404 | + | |
| 10405 | + | |
| 10406 | + | |
| 10407 | + | |
| 10408 | + | |
| 10409 | + | |
| 10410 | + | |
| 10411 | + | |
10409 | 10412 | | |
10410 | 10413 | | |
10411 | 10414 | | |
| |||
10453 | 10456 | | |
10454 | 10457 | | |
10455 | 10458 | | |
10456 | | - | |
10457 | | - | |
10458 | | - | |
10459 | | - | |
10460 | | - | |
10461 | | - | |
10462 | | - | |
10463 | | - | |
10464 | | - | |
10465 | | - | |
10466 | | - | |
10467 | | - | |
10468 | | - | |
| 10459 | + | |
| 10460 | + | |
| 10461 | + | |
| 10462 | + | |
| 10463 | + | |
| 10464 | + | |
| 10465 | + | |
| 10466 | + | |
| 10467 | + | |
| 10468 | + | |
| 10469 | + | |
| 10470 | + | |
| 10471 | + | |
| 10472 | + | |
| 10473 | + | |
| 10474 | + | |
| 10475 | + | |
| 10476 | + | |
| 10477 | + | |
| 10478 | + | |
| 10479 | + | |
| 10480 | + | |
| 10481 | + | |
10469 | 10482 | | |
10470 | | - | |
10471 | | - | |
| 10483 | + | |
| 10484 | + | |
10472 | 10485 | | |
10473 | 10486 | | |
10474 | 10487 | | |
| |||
0 commit comments