chore(everlight): default payment_period_blocks to 432000 (~30 days)#144
Conversation
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>
There was a problem hiding this comment.
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-monthHW_ratethe 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 matchscripts/everlight-budget.py/everlight-sn-reward.pyoutputs.
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>.
…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>
|
Addressed both Copilot review comments in 1. Doc/script numeric gap (line 116-138) — Took option (b): set Verification at defaults:
2. Dead args in |
Summary
MsgUpdateParams.pool_period_usdwas hardcoded to weekly via/weeks_per_month, so the new default would have under-reported per-period budgets by ~4.35x.docs/design/Cascade-Everlight-Funding-Model.mdso the cadence-derived numbers (K_year, per-period LUME/USD figures, sensitivity tables) reflect the monthly default. Annual figures unchanged.HashAlgo,SuperNodeState,RewardDistribution) plus the correspondingopenapi.ymlandbuf.lockrefresh frommake build-proto.Default-value sites updated
x/supernode/v1/types/params.goDefaultRewardDistribution.PaymentPeriodBlocks: 100800 → 432000devnet/default-config/devnet-genesis.jsonpayment_period_blocks: "100800" → "432000"scripts/everlight-{budget,sn-reward,endowment}.py--period-blocksdefault + corrected per-period formuladocs/design/Cascade-Everlight-Funding-Model.mdTest plan
go build ./x/supernode/v1/... ./x/action/v1/... ./app/...cleanpython3 scripts/everlight-budget.py→ 30-day period, ~$4,360/period, $53,084/year, 176,947 LUME/yearpython3 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% margingit diff --ignore-all-spaceon funding doc shows no leftover "weekly", "per week", "/wk", "4.3482", or "52.18" referencesscripts/everlight-budget.pyoutput🤖 Generated with Claude Code