mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 13:53:31 +01:00
hs_pow: Lower several logs from notice to info
Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
This commit is contained in:
parent
ff678d0fb5
commit
ee63863dca
@ -665,7 +665,7 @@ trim_rend_pqueue(hs_pow_service_state_t *pow_state, time_t now)
|
||||
smartlist_t *old_pqueue = pow_state->rend_request_pqueue;
|
||||
smartlist_t *new_pqueue = pow_state->rend_request_pqueue = smartlist_new();
|
||||
|
||||
log_notice(LD_REND, "Rendezvous request priority queue has "
|
||||
log_info(LD_REND, "Rendezvous request priority queue has "
|
||||
"reached capacity (%d). Discarding the bottom half.",
|
||||
smartlist_len(old_pqueue));
|
||||
|
||||
@ -776,10 +776,10 @@ handle_rend_pqueue_cb(mainloop_event_t *ev, void *arg)
|
||||
|
||||
(void) ev; /* Not using the returned event, make compiler happy. */
|
||||
|
||||
log_notice(LD_REND, "Considering launching more rendezvous responses. "
|
||||
"%d in-flight, %d pending.",
|
||||
in_flight,
|
||||
smartlist_len(pow_state->rend_request_pqueue));
|
||||
log_info(LD_REND, "Considering launching more rendezvous responses. "
|
||||
"%d in-flight, %d pending.",
|
||||
in_flight,
|
||||
smartlist_len(pow_state->rend_request_pqueue));
|
||||
|
||||
/* Process rendezvous request until the maximum per mainloop run. */
|
||||
while (smartlist_len(pow_state->rend_request_pqueue) > 0) {
|
||||
@ -790,8 +790,8 @@ handle_rend_pqueue_cb(mainloop_event_t *ev, void *arg)
|
||||
/* We have queued requests, but they are all low priority, and also
|
||||
* we have too many in-progress rendezvous responses. Don't launch
|
||||
* any more. Schedule ourselves to reassess in a bit. */
|
||||
log_notice(LD_REND, "Next request to launch is low priority, and "
|
||||
"%d in-flight already. Waiting to launch more.", in_flight);
|
||||
log_info(LD_REND, "Next request to launch is low priority, and "
|
||||
"%d in-flight already. Waiting to launch more.", in_flight);
|
||||
const struct timeval delay_tv = { 0, 100000 };
|
||||
mainloop_event_schedule(pow_state->pop_pqueue_ev, &delay_tv);
|
||||
return; /* done here! no cleanup needed. */
|
||||
@ -820,7 +820,7 @@ handle_rend_pqueue_cb(mainloop_event_t *ev, void *arg)
|
||||
hs_metrics_pow_pqueue_rdv(service,
|
||||
smartlist_len(pow_state->rend_request_pqueue));
|
||||
|
||||
log_notice(LD_REND, "Dequeued pending rendezvous request with effort: %u. "
|
||||
log_info(LD_REND, "Dequeued pending rendezvous request with effort: %u. "
|
||||
"Waited %d. "
|
||||
"Remaining requests: %u",
|
||||
req->rdv_data.pow_effort,
|
||||
@ -828,7 +828,7 @@ handle_rend_pqueue_cb(mainloop_event_t *ev, void *arg)
|
||||
smartlist_len(pow_state->rend_request_pqueue));
|
||||
|
||||
if (queued_rend_request_is_too_old(req, now)) {
|
||||
log_notice(LD_REND, "Top rend request has been pending for too long; "
|
||||
log_info(LD_REND, "Top rend request has been pending for too long; "
|
||||
"discarding and moving to the next one.");
|
||||
free_pending_rend(req);
|
||||
continue; /* do not increment count, this one's free */
|
||||
@ -907,7 +907,7 @@ enqueue_rend_request(const hs_service_t *service, hs_service_intro_point_t *ip,
|
||||
hs_metrics_pow_pqueue_rdv(service,
|
||||
smartlist_len(pow_state->rend_request_pqueue));
|
||||
|
||||
log_notice(LD_REND, "Enqueued rendezvous request with effort: %u. "
|
||||
log_info(LD_REND, "Enqueued rendezvous request with effort: %u. "
|
||||
"Queued requests: %u",
|
||||
req->rdv_data.pow_effort,
|
||||
smartlist_len(pow_state->rend_request_pqueue));
|
||||
@ -1382,9 +1382,9 @@ hs_circ_handle_introduce2(const hs_service_t *service,
|
||||
/* Add the rendezvous request to the priority queue if PoW defenses are
|
||||
* enabled, otherwise rendezvous as usual. */
|
||||
if (have_module_pow() && service->config.has_pow_defenses_enabled) {
|
||||
log_notice(LD_REND,
|
||||
"Adding introduction request to pqueue with effort: %u",
|
||||
data.rdv_data.pow_effort);
|
||||
log_info(LD_REND,
|
||||
"Adding introduction request to pqueue with effort: %u",
|
||||
data.rdv_data.pow_effort);
|
||||
if (enqueue_rend_request(service, ip, &data, now) < 0) {
|
||||
goto done;
|
||||
}
|
||||
|
@ -787,9 +787,9 @@ consider_sending_introduce1(origin_circuit_t *intro_circ,
|
||||
new_effort = MIN((uint64_t)CLIENT_MAX_POW_EFFORT, new_effort);
|
||||
}
|
||||
if (pow_inputs.effort != (uint32_t)new_effort) {
|
||||
log_notice(LD_REND, "Increasing PoW effort from %d to %d after intro "
|
||||
"point unreachable_count=%d",
|
||||
pow_inputs.effort, (int)new_effort, unreachable_count);
|
||||
log_info(LD_REND, "Increasing PoW effort from %d to %d after intro "
|
||||
"point unreachable_count=%d",
|
||||
pow_inputs.effort, (int)new_effort, unreachable_count);
|
||||
pow_inputs.effort = (uint32_t)new_effort;
|
||||
}
|
||||
|
||||
|
@ -202,7 +202,7 @@ hs_pow_solve(const hs_pow_solver_inputs_t *pow_inputs,
|
||||
equix_solution solutions[EQUIX_MAX_SOLS];
|
||||
uint8_t sol_bytes[HS_POW_EQX_SOL_LEN];
|
||||
|
||||
log_notice(LD_REND, "Solving proof of work (effort %u)", effort);
|
||||
log_info(LD_REND, "Solving proof of work (effort %u)", effort);
|
||||
for (;;) {
|
||||
/* Calculate solutions to S = equix_solve(C || N || E), */
|
||||
int count = equix_solve(ctx, challenge, HS_POW_CHALLENGE_LEN, solutions);
|
||||
@ -431,7 +431,7 @@ pow_worker_replyfn(void *work_)
|
||||
if (intro_circ && rend_circ && service_identity_pk && desc && ip &&
|
||||
job->pow_solution_out) { /* successful pow solve, and circs still here */
|
||||
|
||||
log_notice(LD_REND, "Got a PoW solution we like! Shipping it!");
|
||||
log_info(LD_REND, "Got a PoW solution we like! Shipping it!");
|
||||
/* Set flag to reflect that the HS we are attempting to rendezvous has PoW
|
||||
* defenses enabled, and as such we will need to be more lenient with
|
||||
* timing out while waiting for the service-side circuit to be built. */
|
||||
|
@ -298,7 +298,7 @@ initialize_pow_defenses(hs_service_t *service)
|
||||
* seed to be predictable even if it doesn't really exist yet, and it needs
|
||||
* to be different to the current nonce for the replay cache scrubbing to
|
||||
* function correctly. */
|
||||
log_notice(LD_REND, "Generating both PoW seeds...");
|
||||
log_info(LD_REND, "Generating both PoW seeds...");
|
||||
crypto_rand((char *)&pow_state->seed_current, HS_POW_SEED_LEN);
|
||||
crypto_rand((char *)&pow_state->seed_previous, HS_POW_SEED_LEN);
|
||||
|
||||
@ -2450,7 +2450,7 @@ update_all_descriptors_pow_params(time_t now)
|
||||
* initialise pow_params in the descriptors. If this runs the next if
|
||||
* statement will run and set the correct values. */
|
||||
if (!encrypted->pow_params) {
|
||||
log_notice(LD_REND, "Initializing pow_params in descriptor...");
|
||||
log_info(LD_REND, "Initializing pow_params in descriptor...");
|
||||
encrypted->pow_params = tor_malloc_zero(sizeof(hs_pow_desc_params_t));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user