V1 incentive overhaul: crown-time per direction#43
Merged
Conversation
This was referenced Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the fee/speed/success reward model with a crown-time model per the locked
plans/v1-incentive-overhaul.mdspec.tao→btc,btc→tao) has a fixed emission pool (4% each)pool × (miner_crown_blocks / total_crown_blocks) × success_rate^3RECYCLE_UIDNo miner UX break (
alw miner postunchanged), no dashboard pipeline change, no smart-contract change.What changed
allways/validator/rate_state.py— new SQLite store forrate_events,collateral_events,swap_outcomes. Thread-safe, pattern cloned frompending_confirms.py. Prunes to2 × SCORING_WINDOW_BLOCKS;swap_outcomesis all-time.allways/validator/forward.py— new_poll_commitments,_poll_collaterals,_refresh_min_collateral; new crown-timecalculate_miner_rewards+_replay_crown_time+_crown_holders+_success_rate; removed_chain_weighted_speedand legacy reward math.allways/validator/swap_tracker.py— writesswap_outcomeson every terminal transition (resolve + both_poll_innerpaths). Droppedwindow,prune_window,window_blocks.allways/classes.py— droppedMinerScoringStats(unused after crown-time replay).allways/constants.py— addedDIRECTION_POOLS,SUCCESS_EXPONENT=3,RATE_UPDATE_MIN_INTERVAL_BLOCKS=75,COMMITMENT_POLL_INTERVAL_BLOCKS=15,COLLATERAL_POLL_INTERVAL_BLOCKS=15,MIN_COLLATERAL_REFRESH_INTERVAL_BLOCKS=1200,EVENT_RETENTION_BLOCKS. RemovedDAILY_EMISSION_ALPHAandSCORING_SUCCESS_EXPONENT.allways/validator/recycle.py,allways/validator/utils/fees.py(scoring-path only, now orphaned).neurons/validator.py— instantiatesRateStateStore, cachesmin_collateral(falls back toMIN_COLLATERAL_TAOon contract read failure), threads store intoSwapTracker.README.md/.env.example— lite-node ops guide +SUBTENSOR_NETWORKhint for validators.Data pipeline
Commit sequence (reviewable per layer)
23610b4RateStateStore SQLite foundation (additive, zero wiring)4238ee9_poll_commitmentswiring91fa353_poll_collateralswiring68e609eswap_outcomes persistence inSwapTracker998c16ccrown-time replay replacescalculate_miner_rewardse038821remove legacy window /recycle.py/fees.py/MinerScoringStatsc1d8fd2constants cleanup + lite node docsfbe25fbfallbackMIN_COLLATERAL_TAOwhen initial contract read fails8f78cfdset SQLitebusy_timeoutbefore WAL to fix dev-env concurrent init racea90892awireprune_events_older_than, fix_refresh_min_collateralhot-retry, advance rate cache on throttled rejects (self-review sweep)Test plan
ruff format --check && ruff check && pytest tests/)rate_state.dbpopulated with rate + collateral + outcome rows end-to-end[65535, 630, 3875]in dev)entrius/alw-utils#31— kept draft until this PR is greenOut of scope
allways-db,das-allways,allways-uiuntouchedSource plan lives at
project-allways/plans/v1-incentive-overhaul.md.