livepeer / livepeer/subgraph

Clarify and rename `firstActiveDay` semantics

Open
#210 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
5
Forks
7
Avg merge
4h 1m
Merged PRs (30d)
6

Description

We added a new [firstActiveDay](https://github.com/livepeer/subgraph/blob/25b5e5fc01fcf92f59eb473a51f101ef93af856b/schema.graphql#L247) field to the Broadcaster entity in https://github.com/livepeer/subgraph/pull/168. However due to a patch we had to do in https://github.com/livepeer/subgraph/pull/202#issuecomment-3745212017 this now is a bit ambiguous because [activeBroadcasters](https://github.com/livepeer/subgraph/blob/25b5e5fc01fcf92f59eb473a51f101ef93af856b/schema.graphql#L58) on the Protocol entity only tracks broadcasters that are actively sending fees. We might consider deprecating `firstActiveDay` in favor of a clearer field such as `activationTimestap` and `lastActiveDay` to `lastActiveTimestamp`, and update the schema and related logic accordingly.

Example

```graphql
"The date this broadcaster first funded a deposit or reserve, beginning at 12:00am UTC"
firstFundedTimestamp: Int!
"The date this broadcaster first funded a deposit or reserve, beginning at 12:00am UTC"
firstActiveDay: Int! @deprecated(reason: "Use firstFundedDay instead.")
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Broadcaster and Protocol definitions in schema.graphql, especially the referenced lines around firstActiveDay and activeBroadcasters, then read the linked pull request context. The work is done when the field semantics and names are unambiguous and the schema plus related logic consistently reflect the agreed changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
api, backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.