Skip to content

Commit e30a885

Browse files
committed
fix: sync every block, let WASM handle frequency internally
The validator now calls WASM sync() on every block. The WASM module uses block % 120 internally to decide when to actually fetch GitHub issues. This gives the WASM full control over its sync cadence.
1 parent feb6eb6 commit e30a885

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bins/validator-node/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ async fn main() -> Result<()> {
956956
let mut last_weight_submission_epoch: u64 = 0; // Local tracking of weight submissions
957957
let mut challenge_sync_interval = tokio::time::interval(Duration::from_secs(30)); // Check every 30s
958958
let mut last_sync_block: u64 = 0;
959-
let sync_block_interval: u64 = 100; // Sync every 100 blocks (~20 min)
959+
let sync_block_interval: u64 = 1; // Call WASM sync every block, WASM decides frequency internally
960960
let mut storage_stats_interval = tokio::time::interval(Duration::from_secs(300));
961961
// Track last synced block per challenge for delta sync
962962
let challenge_last_sync: Arc<

0 commit comments

Comments
 (0)