clawft_kernel/node_facts/
mod.rs1mod accel;
20pub mod host;
21pub mod linux;
22pub mod macos;
23pub mod measured;
24pub mod probe;
25pub mod runtimes;
26
27#[cfg(any(feature = "mesh", feature = "exochain"))]
28pub mod cache;
29
30#[cfg(test)]
31mod fake_host;
32#[cfg(test)]
33mod tests_linux;
34#[cfg(test)]
35mod tests_mac;
36
37pub use host::{ProbeHost, SystemHost};
38pub use probe::{
39 Collected, DEFAULT_FACTS_TTL_SECS, EmulationCache, ProbeConfig, build_facts, probe_capabilities,
40 refresh_live, valid_image_ref,
41};
42
43#[cfg(any(feature = "mesh", feature = "exochain"))]
44pub use cache::{CacheError, CachedNodeFacts, InsertOutcome, NodeFactsCache, TierSource};
45
46#[cfg(any(feature = "mesh", feature = "exochain"))]
48pub fn probe_and_sign(
49 host: &dyn ProbeHost,
50 cfg: &ProbeConfig,
51 key: &ed25519_dalek::SigningKey,
52 now: u64,
53 seq: u64,
54 ttl_secs: u64,
55) -> Result<crate::node_facts_advert::SignedNodeFacts, crate::node_facts_advert::NodeFactsAdvertError>
56{
57 let node_id = crate::node_registry::node_id_from_pubkey(&key.verifying_key().to_bytes());
58 let facts = build_facts(&node_id, now, ttl_secs, seq, probe_capabilities(host, cfg));
59 crate::node_facts_advert::sign_node_facts(&facts, key)
60}