Skip to content

Commit

Permalink
revert(thegraph-core): add graph-attestation http header (#414)
Browse files Browse the repository at this point in the history
This reverts commit 6d0613e.
  • Loading branch information
LNSD authored Dec 4, 2024
1 parent 6d0613e commit b88983c
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 308 deletions.
26 changes: 0 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions thegraph-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,14 @@ alloy-signers = ["alloy/signers"]
alloy-sol-types = ["alloy/sol-types"]
async-graphql = ["dep:async-graphql"]
fake = ["dep:fake"]
headers = [
"dep:headers",
# Required by headers::graph_attestation
"alloy/serde", "dep:serde", "dep:serde_json",
]
serde = ["dep:serde", "dep:serde_with", "alloy/serde"]

[dependencies]
alloy = "0.7"
async-graphql = { version = "7.0", optional = true }
bs58 = "0.5"
fake = { version = "3.0", optional = true }
headers = { version = "0.4.0", optional = true }
serde = { version = "1.0", optional = true }
serde_json = { version = "1.0.133", optional = true }
serde_with = { version = "3.8", optional = true }
thiserror = "1.0"

Expand Down
14 changes: 0 additions & 14 deletions thegraph-core/src/attestation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,20 +169,6 @@ pub fn recover_allocation(
.map_err(|_| VerificationError::FailedSignerRecovery)
}

#[cfg(feature = "fake")]
impl fake::Dummy<fake::Faker> for Attestation {
fn dummy_with_rng<R: fake::Rng + ?Sized>(config: &fake::Faker, rng: &mut R) -> Self {
Self {
request_cid: B256::from(<[u8; 32]>::dummy_with_rng(config, rng)),
response_cid: B256::from(<[u8; 32]>::dummy_with_rng(config, rng)),
deployment: DeploymentId::dummy_with_rng(config, rng).into(),
r: B256::from(<[u8; 32]>::dummy_with_rng(config, rng)),
s: B256::from(<[u8; 32]>::dummy_with_rng(config, rng)),
v: u8::dummy_with_rng(config, rng),
}
}
}

#[cfg(test)]
mod tests {
use alloy::{
Expand Down
8 changes: 0 additions & 8 deletions thegraph-core/src/headers.rs

This file was deleted.

247 changes: 0 additions & 247 deletions thegraph-core/src/headers/graph_attestation.rs

This file was deleted.

6 changes: 0 additions & 6 deletions thegraph-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
//! attestation-related operations.
//! - `async-graphql`: Enables support for the [`async-graphql`] crate.
//! - `fake`: Enables the [`fake`] crate integration for generating random test data.
//! - `headers`: Enables the `headers` module, which provides common HTTP _typed headers_ used
//! across _The Graph_ network services.
//! - `serde`: Enables [`serde`] serialization and deserialization support for types in this crate.
//!
//! Additionally, this crate re-exports other features from the `alloy` crate as described above.
Expand All @@ -51,10 +49,6 @@ mod allocation_id;
pub mod attestation;
mod block;
mod deployment_id;

#[cfg(feature = "headers")]
#[cfg_attr(docsrs, doc(cfg(feature = "headers")))]
pub mod headers;
mod indexer_id;
mod proof_of_indexing;
mod subgraph_id;
Expand Down

0 comments on commit b88983c

Please sign in to comment.