Compare commits

...

3 Commits

Author SHA1 Message Date
bruno-valante
4f53573cf5
Merge 7caaa14b93 into f1a1c39332 2024-08-27 09:52:19 +08:00
Bo QIU
f1a1c39332
adjust sync timeout in py test (#171)
Some checks are pending
abi-consistent-check / build-and-compare (push) Waiting to run
code-coverage / unittest-cov (push) Waiting to run
rust / check (push) Waiting to run
rust / test (push) Waiting to run
rust / lints (push) Waiting to run
functional-test / test (push) Waiting to run
2024-08-27 09:52:00 +08:00
Bruno Valente
7caaa14b93 Fix issue found in auditions 2024-08-24 14:12:47 +08:00
4 changed files with 13 additions and 2 deletions

View File

@ -99,7 +99,7 @@ impl MineRangeConfig {
}
Some(
self_start_position <= recall_position + SECTORS_PER_LOAD as u64
|| self_end_position > recall_position,
&& self_end_position > recall_position,
)
}
}

View File

@ -37,6 +37,7 @@ pub(crate) async fn check_and_request_miner_id(
d_id, c_id
))
} else {
check_miner_id(&mine_contract, d_id).await?;
Ok(d_id)
}
}

View File

@ -111,7 +111,7 @@ impl<'a> Miner<'a> {
"Find a PoRA valid answer, quality: {}, target_quality {}, scale {:.3}",
U256::MAX / quality,
U256::MAX / self.target_quality,
difficulty_scale_x64.as_u128() as f64 / (u64::MAX as f64 + 1.0)
difficulty_scale_x64.as_u128() as f64 / u64::MAX as f64
);
inc_counter(&HIT_COUNT);
// Undo mix data when find a valid solition

View File

@ -5,6 +5,16 @@ ZGS_CONFIG = {
"confirmation_block_count": 1,
"router": {
"private_ip_enabled": True,
},
"sync": {
"heartbeat_interval": "1s",
"peer_connect_timeout": "3s",
"peer_disconnect_timeout": "3s",
"peer_find_timeout": "3s",
"peer_chunks_download_timeout": "3s",
"auto_sync_idle_interval": "1s",
"sequential_find_peer_timeout": "10s",
"random_find_peer_timeout": "10s",
}
}