Skip to content

Commit

Permalink
feat(thegraph): add proof-of-indexing to the types module (#58)
Browse files Browse the repository at this point in the history
Co-authored-by: Theo Butler <[email protected]>
  • Loading branch information
LNSD and Theodus authored Dec 11, 2023
1 parent fc272f1 commit c90935e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions thegraph/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
pub use attestation::*;
pub use block_pointer::*;
pub use deployment_id::*;
pub use poi::*;
pub use primitives::*;
pub use subgraph_id::*;

pub mod attestation;
pub mod block_pointer;
pub mod deployment_id;
pub mod poi;
mod primitives;
pub mod subgraph_id;
11 changes: 11 additions & 0 deletions thegraph/src/types/poi.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//! A Proof of Indexing (POI) a cryptographic proof submitted by indexers to demonstrate that they
//! have accurately indexed a subgraph.
//!
//! The POI is essentially a signature over a message digest that is generated during the indexing
//! of a subgraph from genesis. Each time a subgraph’s state is updated, so does the message digest.
use super::primitives::B256;

/// A Proof of Indexing (POI) a cryptographic proof submitted by indexers to demonstrate that they
/// have accurately indexed a subgraph.
pub type ProofOfIndexing = B256;

0 comments on commit c90935e

Please sign in to comment.