Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/concentration.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ export async function loadChainConcentration(d1) {
// bounded to a chartable range because each day needs its full per-UID
// distribution (concentration can't be a cheap SQL GROUP BY like the structural
// history) — a row cap then guards an unexpectedly large subnet.
const CONCENTRATION_HISTORY_WINDOWS = { "7d": 7, "30d": 30, "90d": 90 };
const DEFAULT_CONCENTRATION_HISTORY_WINDOW = "30d";
export const CONCENTRATION_HISTORY_WINDOWS = { "7d": 7, "30d": 30, "90d": 90 };
export const DEFAULT_CONCENTRATION_HISTORY_WINDOW = "30d";
// Safety valve on the raw per-UID read (≈256 UIDs × 90d ≈ 23k; this leaves head
// room and the builder drops a truncated oldest day so every point is complete).
export const CONCENTRATION_HISTORY_ROW_CAP = 50_000;
Expand Down
4 changes: 2 additions & 2 deletions src/subnet-performance.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ export async function loadSubnetPerformance(d1, netuid) {
// bounded by a row cap that then drops a truncated oldest day.
const DAY_MS = 24 * 60 * 60 * 1000;

const PERFORMANCE_HISTORY_WINDOWS = { "7d": 7, "30d": 30, "90d": 90 };
const DEFAULT_PERFORMANCE_HISTORY_WINDOW = "30d";
export const PERFORMANCE_HISTORY_WINDOWS = { "7d": 7, "30d": 30, "90d": 90 };
export const DEFAULT_PERFORMANCE_HISTORY_WINDOW = "30d";
// Safety valve on the raw per-UID read (≈256 UIDs × 90d ≈ 23k; leaves head room
// and the builder drops a truncated oldest day so every point is complete).
export const PERFORMANCE_HISTORY_ROW_CAP = 50_000;
Expand Down
4 changes: 2 additions & 2 deletions src/subnet-yield.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ export async function loadSubnetYield(d1, netuid) {
// oldest day.
const DAY_MS = 24 * 60 * 60 * 1000;

const YIELD_HISTORY_WINDOWS = { "7d": 7, "30d": 30, "90d": 90 };
const DEFAULT_YIELD_HISTORY_WINDOW = "30d";
export const YIELD_HISTORY_WINDOWS = { "7d": 7, "30d": 30, "90d": 90 };
export const DEFAULT_YIELD_HISTORY_WINDOW = "30d";
// Safety valve on the raw per-UID read (≈256 UIDs × 90d ≈ 23k; leaves head room
// and the builder drops a truncated oldest day so every point is complete).
export const YIELD_HISTORY_ROW_CAP = 50_000;
Expand Down
2 changes: 1 addition & 1 deletion src/turnover.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ export function buildTurnoverChanges(
};
}

function turnoverChangeDetail(changes) {
export function turnoverChangeDetail(changes) {
return {
validators_entered_count: changes.validators_entered_count,
validators_exited_count: changes.validators_exited_count,
Expand Down
Loading
Loading