Skip to content

Conversation

@rickstaa
Copy link
Member

@rickstaa rickstaa commented Nov 16, 2025

This pull request adds gateway fee tracking with daily snapshots and rolling-window metrics similar to what we currently do for transcoders. It also stores the active gateway set on Protocol so that newRound can efficiently recompute the 30/60/90-day aggregates. The goal is to make it straightforward to build a gateway dashboard in the explorer.

@victorges, @yondonfu, @mikezupper, @ecmulli does this approach make sense, and do you see any potential issues, variables which you want to see added? I kept the existing “broadcaster” naming to avoid divergence for now, we can rename and deprecate it later if needed, but it’s not a priority.

TODOs

  • Test in Graph Studio -> test it here
  • Request review from another core contributor

@rickstaa rickstaa marked this pull request as draft November 16, 2025 14:41
Copy link

@mikezupper mikezupper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the changes look good. The changes shows consideration for backwards compatibility.

Caveat: I am not able to run these change to ensure they work with the current subgraph.

@mikezupper
Copy link

@rickstaa I am unable to use the test link provided (Test in Graph Studio), is there some other mechanism I can run some tests?

Also, have we tested running this subgraph from scratch? I know its a bit out of scope for your change, but I had many issues when I attempted this process last year.

@rickstaa rickstaa marked this pull request as ready for review November 19, 2025 16:28
Added gateway fee tracking with daily snapshots and rolling-window metrics
like transcoders, and stored the active gateway set on Protocol so newRound
can recompute 30/60/90 day sums efficiently.
@rickstaa rickstaa force-pushed the feat/track-gateway-fees branch from bf0e9f1 to 2762102 Compare November 19, 2025 16:39
@github-actions
Copy link

🚀 Subgraph studio preview deployed

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

Ensure that peopel can query the day a broadcaster joined the network
(i.e. funded reserve/deposit).
@github-actions
Copy link

🚀 Subgraph studio preview deployed

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

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.

3 participants