(provenance_id: u64, phase_name: &str)
| 244 | /// the B-tree) matches numeric order, enabling correct prefix range scans. |
| 245 | #[inline] |
| 246 | pub fn encode_session_phase_key(provenance_id: u64, phase_name: &str) -> [u8; 16] { |
| 247 | let hash = blake3::hash(phase_name.as_bytes()); |
| 248 | let hash_bytes = hash.as_bytes(); |
| 249 | let mut key = [0u8; 16]; |
| 250 | key[0..8].copy_from_slice(&provenance_id.to_be_bytes()); |
| 251 | key[8..16].copy_from_slice(&hash_bytes[0..8]); |
| 252 | key |
| 253 | } |
| 254 | |
| 255 | /// Decode the `provenance_id` from a `SESSION_PHASES` key. |
| 256 | /// |