Skip to content

Commit 6e30b83

Browse files
committed
Fix block timing to 12s/block (5 blocks/min) and fix mermaid route diagram
- Corrected all block calculations: 5 blocks/min, 300 blocks/h, 7200 blocks/day - Grace: 21,600 blocks, half-life: 7,200 blocks - Quoted mermaid node labels containing / to fix render error
1 parent 625d0e8 commit 6e30b83

6 files changed

Lines changed: 24 additions & 24 deletions

File tree

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,15 @@ flowchart LR
115115

116116
```mermaid
117117
flowchart LR
118-
Top[Top Score Achieved] --> Grace[43,200 blocks Grace Period ≈ 72h]
118+
Top[Top Score Achieved] --> Grace["21,600 blocks Grace Period ≈ 72h"]
119119
Grace -->|Within grace| Full[100% Weight Retained]
120120
Grace -->|After grace| Decay[Exponential Decay Begins]
121-
Decay --> Half[50% per 14,400 blocks half-life ≈ 24h]
121+
Decay --> Half["50% per 7,200 blocks half-life ≈ 24h"]
122122
Half --> Min[Decay to 0.0 min multiplier]
123123
Min --> Burn[Weight Burns to UID 0]
124124
```
125125

126-
> **Block timing**: 1 block ≈ 10s, 6 blocks/min, 7,200 blocks/day.
126+
> **Block timing**: 1 block ≈ 12s, 5 blocks/min, 7,200 blocks/day.
127127
128128
---
129129

@@ -181,11 +181,11 @@ flowchart LR
181181
RPC -->|challenge_call| WE[WASM Executor]
182182
WE -->|handle_route request| WM[WASM Module]
183183
WM --> Router{Route Match}
184-
Router --> LB[/leaderboard]
185-
Router --> Subs[/submissions]
186-
Router --> DS[/dataset]
187-
Router --> Stats[/stats]
188-
Router --> Agent[/agent/:hotkey/code]
184+
Router --> LB["/leaderboard"]
185+
Router --> Subs["/submissions"]
186+
Router --> DS["/dataset"]
187+
Router --> Stats["/stats"]
188+
Router --> Agent["/agent/:hotkey/code"]
189189
LB & Subs & DS & Stats & Agent --> Storage[(Storage)]
190190
Storage --> Response[Serialized Response]
191191
Response --> WE
@@ -205,7 +205,7 @@ flowchart LR
205205
- **Timeout Handling**: Unresponsive reviewers are replaced with alternate validators
206206
- **Route Handlers**: WASM-native route handling for leaderboard, submissions, dataset, and agent data
207207
- **Epoch Rate Limiting**: 1 submission per 3 epochs per miner
208-
- **Top Agent Decay**: 43,200 blocks grace period (~72h), 50% per 14,400 blocks half-life (~24h) decay to 0 weight
208+
- **Top Agent Decay**: 21,600 blocks grace period (~72h), 50% per 7,200 blocks half-life (~24h) decay to 0 weight
209209
- **P2P Dataset Consensus**: Validators collectively select 50 evaluation tasks from [SWE-Forge](https://github.com/CortexLM/swe-forge)
210210
- **Zip Package Submissions**: Agents submitted as zip packages (no compilation step)
211211
- **Agent Code Storage**: Submitted agent packages (≤ 1MB) stored on-chain with hash verification
@@ -275,7 +275,7 @@ term-challenge/
275275
8. Agent code and hash are stored on-chain for auditability (≤ 1MB per package)
276276
9. Evaluation logs are proposed and validated via P2P consensus (>50% hash agreement)
277277
10. Scores are aggregated via P2P consensus and submitted to Bittensor at epoch boundaries
278-
11. Top agents enter a decay cycle: 43,200 blocks grace (~72h) → 50% per 14,400 blocks (~24h) decay → weight burns to UID 0
278+
11. Top agents enter a decay cycle: 21,600 blocks grace (~72h) → 50% per 7,200 blocks (~24h) decay → weight burns to UID 0
279279

280280
---
281281

docs/architecture.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,8 @@ ChallengeParams {
307307
}
308308
309309
DecayParams {
310-
grace_period_blocks: u64, // default: 43,200 (~72h at 6 blocks/min)
311-
half_life_blocks: u64, // default: 14,400 (~24h at 6 blocks/min)
310+
grace_period_blocks: u64, // default: 21,600 (~72h at 5 blocks/min, 12s/block)
311+
half_life_blocks: u64, // default: 7,200 (~24h at 5 blocks/min)
312312
min_multiplier: f64, // default: 0.0
313313
}
314314

server/src/timeout_handler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use rand::Rng;
44
use crate::types::{ReviewAssignment, TimeoutConfig};
55

66
fn current_block_number() -> i64 {
7-
chrono::Utc::now().timestamp() / 10
7+
chrono::Utc::now().timestamp() / 12
88
}
99

1010
pub fn get_timeout_config(db: &ChallengeDatabase) -> TimeoutConfig {

server/src/types.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ pub struct TimeoutConfig {
123123
impl Default for TimeoutConfig {
124124
fn default() -> Self {
125125
Self {
126-
review_timeout_blocks: 30, // 5min * 6 blocks/min
127-
judge_timeout_blocks: 12, // 2min * 6 blocks/min
126+
review_timeout_blocks: 25, // 5min * 5 blocks/min (12s/block)
127+
judge_timeout_blocks: 10, // 2min * 5 blocks/min
128128
max_retries: 2,
129129
}
130130
}
@@ -256,6 +256,6 @@ pub struct ReviewAssignment {
256256
pub const MAX_AGENT_CODE_SIZE: usize = 1_048_576;
257257
pub const MAX_AGENT_LOGS_SIZE: usize = 262_144;
258258
pub const MAX_OUTPUT_PREVIEW: usize = 4_096;
259-
pub const GRACE_PERIOD_BLOCKS: u64 = 43_200; // 72h * 600 blocks/h (6 blocks/min, 7200 blocks/day)
260-
pub const DECAY_HALF_LIFE_BLOCKS: u64 = 14_400; // 24h * 600 blocks/h
259+
pub const GRACE_PERIOD_BLOCKS: u64 = 21_600; // 72h * 300 blocks/h (5 blocks/min, 12s/block)
260+
pub const DECAY_HALF_LIFE_BLOCKS: u64 = 7_200; // 24h * 300 blocks/h
261261
pub const SUBMISSION_RATE_LIMIT_EPOCHS: u64 = 3;

wasm/src/scoring.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ use crate::types::{
1111
};
1212

1313
const TOP_AGENT_KEY: &[u8] = b"top_agent_state";
14-
const GRACE_BLOCKS: u64 = 43_200; // 72h * 600 blocks/h (6 blocks/min, 7200 blocks/day)
15-
const HALF_LIFE_BLOCKS: f64 = 14_400.0; // 24h * 600 blocks/h
14+
const GRACE_BLOCKS: u64 = 21_600; // 72h * 300 blocks/h (5 blocks/min, 12s/block)
15+
const HALF_LIFE_BLOCKS: f64 = 7_200.0; // 24h * 300 blocks/h
1616

1717
pub struct AggregateScore {
1818
pub tasks_passed: u32,

wasm/src/types.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ pub struct DecayParams {
6767
impl Default for DecayParams {
6868
fn default() -> Self {
6969
Self {
70-
grace_period_blocks: 43_200, // 72h * 600 blocks/h (6 blocks/min)
71-
half_life_blocks: 14_400, // 24h * 600 blocks/h
70+
grace_period_blocks: 21_600, // 72h * 300 blocks/h (5 blocks/min, 12s/block)
71+
half_life_blocks: 7_200, // 24h * 300 blocks/h
7272
min_multiplier: 0.0,
7373
}
7474
}
@@ -178,9 +178,9 @@ pub struct TimeoutConfig {
178178
impl Default for TimeoutConfig {
179179
fn default() -> Self {
180180
Self {
181-
evaluation_timeout_blocks: 2_160, // 6h * 360 blocks/h (6 blocks/min)
182-
llm_review_timeout_blocks: 18, // 3min * 6 blocks/min
183-
ast_review_timeout_blocks: 6, // 1min * 6 blocks/min
181+
evaluation_timeout_blocks: 1_800, // 6h * 300 blocks/h (5 blocks/min, 12s/block)
182+
llm_review_timeout_blocks: 15, // 3min * 5 blocks/min
183+
ast_review_timeout_blocks: 5, // 1min * 5 blocks/min
184184
}
185185
}
186186
}

0 commit comments

Comments
 (0)