Skip to content

Conversation

@rickstaa
Copy link
Member

Description

Ensure gateways which were inactive for >90 days are added to the active
set again so 30/60/90-day fee sums update.

Fixes # (issue)

Checklist

  • Ran yarn prepare and verified yarn codegen and yarn build succeed.
  • (Optional) Validated locally with yarn deploy:local.
  • Confirmed the Subgraph Studio preview link in the PR comment works and the subgraph syncs without errors.

@github-actions
Copy link

github-actions bot commented Jan 10, 2026

🚀 Subgraph Studio preview deployed

Item Details
Version label pr-202-b67dbc4-20964667423
Query endpoint https://api.studio.thegraph.com/query/31909/livepeer-ci/pr-202-b67dbc4-20964667423
curl -H 'Content-Type: application/json' \
  -d '{"query":"{ protocol(id: \"0\") { inflation } }"}' \
  https://api.studio.thegraph.com/query/31909/livepeer-ci/pr-202-b67dbc4-20964667423

Ensure gateways which were inactive for >90 days are added to the active
set again so 30/60/90-day fee sums update.
@rickstaa
Copy link
Member Author

This should have been already done in:

let protocol = createOrLoadProtocol();

Not sure why it was not working without this logic.

@rickstaa rickstaa marked this pull request as draft January 11, 2026 17:30
@rickstaa
Copy link
Member Author

rickstaa commented Jan 13, 2026

This should have been already done in:

let protocol = createOrLoadProtocol();

Not sure why it was not working without this logic.

I identified the issue: it was caused by creating and persisting two separate protocol objects. I removed the logic from the createOrLoadBroadcaster helper, since gateways should only be added to the activeBroadcasters array when they send fees.

This introduces some ambiguity around firstActiveDay. In the future, we could want to rename it to activationDay or firstFundedDay, but for now I have clarified the schema docstrings.

I opened #210 to track this and create a follow up pull request.

@rickstaa rickstaa force-pushed the fix/improve-active-gateway-tracking branch from 9d3a794 to ac5fae4 Compare January 13, 2026 16:24
@rickstaa rickstaa marked this pull request as ready for review January 13, 2026 16:30
Move active broadcaster updates into `winningTicketRedeemed` to avoid stale
protocol saves and ensure inactive gateways rejoin the active set for rolling
fee totals.
@rickstaa rickstaa force-pushed the fix/improve-active-gateway-tracking branch from ac5fae4 to acfdddd Compare January 13, 2026 16:37
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.

Problem in active gateway tracking

2 participants