https://github.com/yugensource/poh-yugen
A proof-of-history (PoH) implementation using Digests trait (allowing for multiple hash functions) while maintaining easy to use API and advanced features.
https://github.com/yugensource/poh-yugen
blockchain clock consensus consensus-algorithm digest hash hashing poh proof-of-history rust rust-lang solana time timestamping vdf yugensource
Last synced: 29 days ago
JSON representation
A proof-of-history (PoH) implementation using Digests trait (allowing for multiple hash functions) while maintaining easy to use API and advanced features.
- Host: GitHub
- URL: https://github.com/yugensource/poh-yugen
- Owner: YugenSource
- License: apache-2.0
- Created: 2025-03-23T19:54:22.000Z (about 1 month ago)
- Default Branch: master
- Last Pushed: 2025-04-02T18:36:43.000Z (30 days ago)
- Last Synced: 2025-04-02T19:36:18.980Z (30 days ago)
- Topics: blockchain, clock, consensus, consensus-algorithm, digest, hash, hashing, poh, proof-of-history, rust, rust-lang, solana, time, timestamping, vdf, yugensource
- Language: Rust
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PoH-yugen (Proof-of-History Implementation)
**Author:** @silene0259
**Date:** 2024-03-23
## Description
**Proof-of-History** offers a realistic way of measuring time using **hash functions** and **ticks** (time intervals). `PoH-yugen` features advanced features like custom configuration including:
* Interval Choosing (Ticks)
* Max Entries (Number of Ticks Per Slot)
* Generic Hash Functions (any that use the `digest` trait)
* Appending Data Per Tick
* Seeding
* Other Advanced Features## Usage
```rust
use poh_yugen::{PoHConfig,PoHUsage,InitialSeed,TickEntryType};
use sha2::Sha256;fn main() {
let config = PoHConfig::new(Sha256::new(), 32, 100, Some(1000), true, true, TickEntryType::Data);
let seed = InitialSeed([0; 64]);
let mut poh = PoHUsage::new(config, seed, Some(vec![1, 2, 3]), vec![]);
println!("{:?}", poh.state);
println!("Initializing PoH...");
// Initialize the PoH process
poh.init();
}```