Skip to content
Open
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
8 changes: 6 additions & 2 deletions crates/setu-network-anemo/src/generic_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,12 @@ where
Ok(Response::new(Bytes::new()))
}
Err(e) => {
tracing::warn!("Handler error: {}", e);
Ok(Response::new(Bytes::new()))
tracing::warn!("Handler error on route {}: {}", route, e);
// Return the error as the response body instead of silently
// swallowing it. Callers can detect errors by checking for
// the "__HANDLER_ERROR__:" prefix.
let error_body = format!("__HANDLER_ERROR__:{e}");
Ok(Response::new(Bytes::from(error_body)))
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion setu-rpc/src/registration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ impl RegistrationClient {
let timestamp = std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
.unwrap()
.as_secs();
.as_millis() as u64;

let request = HeartbeatRequest {
node_id,
Expand Down
8 changes: 6 additions & 2 deletions setu-validator/src/consensus_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -847,8 +847,12 @@ impl ConsensusValidator {
let mut vs = self.validator_set.write().await;
vs.add_validator(info.clone());

// Also register in TEE verifier if they have a public key
// (This would be extended in a real implementation)
// Also update the engine's ValidatorSet + ConsensusManager.validator_count
// so the new validator is visible to quorum/leader election logic.
// Without this, the validator exists in the local copy but is invisible
// to the consensus engine.
drop(vs);
self.engine.add_consensus_validator(info.clone()).await;

info!(
validator_id = %info.node.id,
Expand Down
4 changes: 2 additions & 2 deletions setu-validator/src/user_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1142,8 +1142,8 @@ impl UserRpcHandler for ValidatorUserHandler {
// Forward the canonical subnet id (D1); no local side effects before
// DAG submission succeeds or fails inside submit_transfer.
let submit_request = SubmitTransferRequest {
from: request.from,
to: request.to,
from: normalized_from,
to: normalized_to,
amount: amount_units,
transfer_type: "setu".to_string(),
resources: vec![],
Expand Down