Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ci: add weekly on-chain LIP status reconciliation#116

Draft
rickstaa wants to merge 2 commits into
master from
ci/lip-onchain-reconcile
Draft

ci: add weekly on-chain LIP status reconciliation #116
rickstaa wants to merge 2 commits into
master from
ci/lip-onchain-reconcile

Conversation

@rickstaa

@rickstaa rickstaa commented Jun 27, 2026

Copy link
Copy Markdown
Member

Part of #112.

Adds a scheduled (weekly) job that compares each LIP's documented status against the outcome of its on-chain LIP-16 governance poll, and opens a ready-to-merge PR with the suggested edits when they diverge. It never auto-merges — an editor reviews and merges.

How it works (scripts/reconcile-onchain.mjs):

  1. Queries the Livepeer subgraph for Poll entities (proposal IPFS hash, endBlock, quorum/quota, tally) + totalActiveStake.
  2. Resolves each poll to a LIP by fetching its proposal from IPFS ({ gitCommitHash, text }) and reading the lip: frontmatter — the same linkage the Livepeer Explorer uses.
  3. Determines active vs concluded against the current L1 block (endBlock is an Ethereum block number even though polls live on Arbitrum).
  4. Applies the LIP-16 pass rule: quorum met when yes+no ≥ totalStake·quorum/1e6; result is yes when yes > (yes+no)·quota/1e6.
  5. For a divergence, edits the frontmatter + README and writes the PR body.

Validated against live data before submitting: it correctly flags LIP-107 → Rejected (its poll passed quorum but fell short of the 50% quota) and LIP-101 → Accepted/Final (poll passed). So once merged, the bot's first PR will likely propose fixing LIP-107, which is currently still marked Proposed.

Configuration required:

  • Secret SUBGRAPH_URL — the Graph gateway endpoint incl. API key, e.g. https://gateway.thegraph.com/api/<KEY>/subgraphs/id/FE63YgkzcpVocxdCEyEYbvjYqEf2kb1A6daMYRxmejYC.
  • Settings → Actions → General → enable "Allow GitHub Actions to create and approve pull requests".

Notes/limits: uses current totalActiveStake as the LIP-16 totalStake (the exact value is the snapshot at endBlock; only matters in a knife-edge quorum case, and every result is surfaced in the PR for confirmation). A passed poll is suggested as Accepted with a note that it may already be Final if executed.

rickstaa and others added 2 commits June 27, 2026 10:08
Adds a scheduled job that compares each LIP's documented status against the
outcome of its on-chain LIP-16 governance poll and opens a ready-to-merge PR
with the suggested status edits when they diverge. Never auto-merges.
- scripts/reconcile-onchain.mjs: queries the Livepeer subgraph for polls,
 resolves each poll to a LIP via its proposal IPFS hash (the path the
 Explorer uses), determines active/concluded against the L1 block, applies
 the LIP-16 quorum/quota pass rule, and writes the suggested edits + PR body.
- .github/workflows/lip-onchain-reconcile.yml: weekly cron + manual dispatch,
 opens the PR via peter-evans/create-pull-request.
Requires a SUBGRAPH_URL secret (Graph gateway endpoint + API key) and the repo
setting allowing Actions to create pull requests.
Refs #112.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011c4cuAi1T5yQ7WtCbMp3DW 
actions/checkout v4 -> v7, actions/setup-node v4 -> v6, Node 20 -> 24,
peter-evans/create-pull-request v6 -> v8. No breaking changes affect this
workflow on hosted ubuntu-latest runners.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011c4cuAi1T5yQ7WtCbMp3DW 
@rickstaa rickstaa marked this pull request as draft June 29, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /