Skip to content

chore(everlight): default payment_period_blocks to 432000 (~30 days)#144

Merged
a-ok123 merged 2 commits into
1.12.0from
chore/everlight-payment-period-30d
May 13, 2026
Merged

chore(everlight): default payment_period_blocks to 432000 (~30 days)#144
a-ok123 merged 2 commits into
1.12.0from
chore/everlight-payment-period-30d

Conversation

@a-ok123
Copy link
Copy Markdown
Contributor

@a-ok123 a-ok123 commented May 13, 2026

Summary

  • Switch the Everlight payout cadence default from ~7 days (100800 blocks) to ~30 days (432000 blocks) — matches operator pay-frequency expectations and cuts per-block bank-send overhead 4x. Cadence remains governance-tunable via supernode MsgUpdateParams.
  • Fix a latent bug in the helper scripts: pool_period_usd was hardcoded to weekly via /weeks_per_month, so the new default would have under-reported per-period budgets by ~4.35x.
  • Refresh docs/design/Cascade-Everlight-Funding-Model.md so the cadence-derived numbers (K_year, per-period LUME/USD figures, sensitivity tables) reflect the monthly default. Annual figures unchanged.
  • Bundle regenerated proto artifacts (doc-comments only — HashAlgo, SuperNodeState, RewardDistribution) plus the corresponding openapi.yml and buf.lock refresh from make build-proto.

Default-value sites updated

File Change
x/supernode/v1/types/params.go DefaultRewardDistribution.PaymentPeriodBlocks: 100800 → 432000
devnet/default-config/devnet-genesis.json payment_period_blocks: "100800" → "432000"
scripts/everlight-{budget,sn-reward,endowment}.py --period-blocks default + corrected per-period formula
docs/design/Cascade-Everlight-Funding-Model.md K_year ~52.18 → ~12.17; weekly → monthly prose; recomputed worked numbers (~14,746 LUME/period at placeholder)

Test plan

  • go build ./x/supernode/v1/... ./x/action/v1/... ./app/... clean
  • python3 scripts/everlight-budget.py → 30-day period, ~$4,360/period, $53,084/year, 176,947 LUME/year
  • python3 scripts/everlight-endowment.py → principal 1,769,472 LUME @ 10% staking APR (matches doc ~1.77M)
  • python3 scripts/everlight-sn-reward.py --sn-storage-gib 3072 → $145.34/period, +20% margin
  • git diff --ignore-all-space on funding doc shows no leftover "weekly", "per week", "/wk", "4.3482", or "52.18" references
  • CI green
  • Reviewer spot-checks placeholder math against scripts/everlight-budget.py output

🤖 Generated with Claude Code

Switch the Everlight payout cadence default from ~7 days (100800 blocks)
to ~30 days (432000 blocks) so operators receive one larger monthly
payout instead of four small weekly ones; matches operator pay-frequency
expectations and reduces per-block bank-send overhead by 4x.

The cadence remains governance-tunable via supernode MsgUpdateParams;
this only changes the genesis default.

- x/supernode/v1/types/params.go: DefaultRewardDistribution.PaymentPeriodBlocks
- devnet/default-config/devnet-genesis.json: matching genesis default
- scripts/everlight-{budget,sn-reward,endowment}.py: --period-blocks default
  + fixed pool_period_usd formula (was hardcoded to weekly via /weeks_per_month)
- docs/design/Cascade-Everlight-Funding-Model.md: K_year, weekly→monthly prose,
  recomputed placeholder per-period figures (~14,746 LUME/month vs ~3,391 LUME/wk);
  annual figures unchanged (~177k LUME, ~$53k)

Also picks up regenerated proto artifacts (doc-comments on HashAlgo,
SuperNodeState, RewardDistribution) and the corresponding openapi.yml
and buf.lock refresh from make build-proto.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 13, 2026 01:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Everlight’s default payout cadence from weekly (~7 days) to monthly (~30 days) by changing payment_period_blocks to 432,000, and then propagates that new default through genesis config, helper scripts, and the funding model documentation. It also refreshes generated proto/OpenAPI artifacts and buf.lock as part of the proto build output.

Changes:

  • Updated the on-chain default (DefaultRewardDistribution.PaymentPeriodBlocks) and devnet genesis to use 432,000 blocks (~30 days).
  • Fixed helper script per-period math to scale with actual period duration (instead of a hard-coded weekly conversion), and updated script defaults to match the new cadence.
  • Updated funding model documentation and regenerated proto artifacts / dependency lockfile.

Reviewed changes

Copilot reviewed 6 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
x/supernode/v1/types/supernode_state.pb.go Regenerated proto Go with expanded enum/doc comments for SuperNode state.
x/supernode/v1/types/params.pb.go Regenerated proto Go with added RewardDistribution doc comment.
x/supernode/v1/types/params.go Changes default Everlight payment_period_blocks to 432,000 (~30 days).
x/action/v1/types/metadata.pb.go Regenerated proto Go with expanded enum/doc comments for HashAlgo.
scripts/everlight-sn-reward.py Updates default period and fixes per-period reward scaling based on elapsed seconds.
scripts/everlight-endowment.py Updates default period (though endowment math remains annualized).
scripts/everlight-budget.py Updates default period and fixes per-period budget scaling based on elapsed seconds.
docs/design/Cascade-Everlight-Funding-Model.md Updates prose + placeholder numbers to reflect monthly default cadence.
devnet/default-config/devnet-genesis.json Updates devnet genesis payment_period_blocks default to 432,000.
buf.lock Refreshes buf dependency lock (googleapis commit/digest).
Files not reviewed (3)
  • x/action/v1/types/metadata.pb.go: Language not supported
  • x/supernode/v1/types/params.pb.go: Language not supported
  • x/supernode/v1/types/supernode_state.pb.go: Language not supported
Comments suppressed due to low confidence (1)

docs/design/Cascade-Everlight-Funding-Model.md:138

  • The placeholder worked example math (pool_period_usd / pool_period_lume) assumes per-period equals per-month, but with payment_period_blocks=432000 (30d) and a calendar-month HW_rate the prorated per-period payout is ~1.44% lower. After aligning the formula, please recompute these example figures (and any dependent tables below) from the script so the doc’s numeric examples match scripts/everlight-budget.py/everlight-sn-reward.py outputs.
per_byte_payout_monthly = 0.04 * 1.20             = $0.048/GiB/month
pool_monthly_usd        = 30 * 3072 * 0.048        = $4,423.68/month
pool_period_usd         = pool_monthly_usd         = ~$4,423.68/period
pool_period_lume        = 4,423.68 / 0.30          = ~14,746 LUME/period

So at placeholder settings, the pool needs ~14.7k LUME paid out per month in aggregate as extra recurring SN retention compensation, totaling ~177k LUME per year, equivalent to ~$4,424/month or ~$53k/year for the entire fleet of 30 SNs holding 3 TiB each (90 TiB total).

</details>



---

💡 <a href="/LumeraProtocol/lumera/new/1.12.0?filename=.github/instructions/*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.

Comment thread docs/design/Cascade-Everlight-Funding-Model.md
Comment thread scripts/everlight-endowment.py Outdated
…144 review)

Address Copilot review on PR #144:

1. Budget and per-SN scripts: use a 30-day reference month for per-period
   proration, so at the default cadence (432000 blocks * 6s = 30 days) the
   prorated per-period figure equals the calendar-month figure exactly.
   This removes the ~1.4% gap between the funding-model doc placeholders
   ($4,423.68/period, 14,746 LUME/period) and the previous script output
   that used (365.25/12)*86400 seconds_per_month.

2. Endowment script: drop --period-blocks and --block-time-sec CLI args
   (and the corresponding compute_endowment() parameters). Principal
   sizing is purely annualized; payout cadence does not affect it. The
   args were noise that could mislead callers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@a-ok123
Copy link
Copy Markdown
Contributor Author

a-ok123 commented May 13, 2026

Addressed both Copilot review comments in d678d69:

1. Doc/script numeric gap (line 116-138) — Took option (b): set seconds_per_month = 30 * 86400 in everlight-budget.py and everlight-sn-reward.py. At the default cadence (432000 blocks × 6 s = 2,592,000 s = exactly 30 days), seconds_per_period / seconds_per_month = 1.0 exactly, so pool_period_usd == pool_monthly_usd matches the doc's "period ≈ month" framing precisely. No doc changes needed — placeholder numbers now match script output.

Verification at defaults:

  • everlight-budget.py$4,423.68/period (14,746 LUME) ✓ matches doc §4.1
  • everlight-sn-reward.py --sn-storage-gib 3072$147.46/period (491.5 LUME) ✓ matches doc §4.3 worked example (~491 LUME)
  • everlight-endowment.py1,769,472 LUME principal ✓ unchanged

2. Dead args in everlight-endowment.py — Removed --period-blocks / --block-time-sec from CLI and from compute_endowment(). Principal sizing is purely annualized; cadence doesn't enter the formula. Added a docstring note about the cadence-independence so future readers don't wonder.

@a-ok123 a-ok123 merged commit b64a33b into 1.12.0 May 13, 2026
7 checks passed
@a-ok123 a-ok123 deleted the chore/everlight-payment-period-30d branch May 13, 2026 01:40
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