Skip to content

Whitelist: replace "in superblock" count with project-by-project "active" count - #452

Merged
barton2526 merged 1 commit into
gridcoin-community:masterfrom
jamescowens:whitelist-active-count
Jun 5, 2026
Merged

barton2526 merged 1 commit into
gridcoin-community:masterfrom
jamescowens:whitelist-active-count

Conversation

@jamescowens

Copy link
Copy Markdown
Member

Summary

  • The summary header reads Whitelisted Projects: N (M in superblock), where M is sb.total_projects straight from the superblock contract. That count includes manually-greylisted projects whose scraper-converged stats still landed in the superblock with Mag=0, so the headline overstates how many projects are actually earning rewards. On the live data today the cell reads 16 (15 in superblock) while only 11 projects are accruing.
  • Replace the parenthetical with a project-by-project active count → 16 (11 active).
  • The new count filters on projectStatus(p).cssClass === "status-active", which already maps both "Active" (with in_superblock=true) and "Active by Greylist Override" to status-active, and routes "Active" + in_superblock=false to status-excluded. So one filter pass picks up exactly the active-and-in-superblock projects.

Why it can't just be in_superblock − greylisted − excluded

The greylisted set and the excluded-by-scrapers set overlap. A manually-greylisted project whose stats host is also unreachable (e.g. SiDock@home on mainnet today — site hard-down, picked up by convergencereport's excluded_projects) is both greylisted and excluded by scrapers. Set arithmetic on the aggregate counts double-counts that project; the only correct computation is project-by-project.

Test plan

  • Local preview at http://jco-linux.jcowens.net:81/whitelist.htm shows Whitelisted Projects 16 (11 active) on current mainnet data (11 Active by Greylist Override, 4 manually-greylisted-but-in-superblock, 1 manually-greylisted-and-unreachable).
  • Greylisted-row badges still red, excluded-row badges still yellow, active-row badges still green (no regression from Whitelist: color and sort "Active by Greylist Override" as active #451).
  • Spot-check after merge that the live site headline matches the table contents.

🤖 Generated with Claude Code

…ive" count

The summary header showed "Whitelisted Projects: N (M in superblock)",
where M was sb.total_projects from the superblock contract. That count
includes manually-greylisted projects whose scraper-converged stats
still landed in the superblock with Mag=0, so the headline overstated
how many projects are actually earning rewards. On the live data today
the cell read "16 (15 in superblock)" while only 11 projects are
active and accruing.

Replace the parenthetical with a project-by-project active count:

  16 (11 active)

The new count filters on projectStatus(p).cssClass === "status-active",
which already maps both plain "Active" (in_superblock=true) and
"Active by Greylist Override" to status-active, and routes "Active +
in_superblock=false" to status-excluded. It cannot be derived as
"in_superblock − greylisted − excluded" because the greylisted and
excluded sets can overlap (a manually-greylisted project whose host
is also scraper-unreachable shows up in both registries), so a
project-by-project filter is the only correct computation.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@barton2526
barton2526 merged commit 3b2ec87 into gridcoin-community:master Jun 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants