Skip to content

Commit

Permalink
extract epoch-rewards-hasher crate
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinheavey committed Dec 4, 2024
1 parent 1d3c961 commit 5315ea6
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 10 deletions.
11 changes: 10 additions & 1 deletion Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ members = [
"sdk/ed25519-program",
"sdk/epoch-info",
"sdk/epoch-rewards",
"sdk/epoch-rewards-hasher",
"sdk/epoch-schedule",
"sdk/feature-set",
"sdk/fee-calculator",
Expand Down Expand Up @@ -464,6 +465,7 @@ solana-entry = { path = "entry", version = "=2.2.0" }
solana-program-entrypoint = { path = "sdk/program-entrypoint", version = "=2.2.0" }
solana-epoch-info = { path = "sdk/epoch-info", version = "=2.2.0" }
solana-epoch-rewards = { path = "sdk/epoch-rewards", version = "=2.2.0" }
solana-epoch-rewards-hasher = { path = "sdk/epoch-rewards-hasher", version = "=2.2.0" }
solana-epoch-schedule = { path = "sdk/epoch-schedule", version = "=2.2.0" }
solana-faucet = { path = "faucet", version = "=2.2.0" }
solana-feature-set = { path = "sdk/feature-set", version = "=2.2.0" }
Expand Down
11 changes: 10 additions & 1 deletion programs/sbf/Cargo.lock

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

2 changes: 1 addition & 1 deletion sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ serde_json = { workspace = true, optional = true }
serde_with = { workspace = true, features = ["macros"] }
sha2 = { workspace = true }
sha3 = { workspace = true, optional = true }
siphasher = { workspace = true }
solana-account = { workspace = true, features = ["bincode"] }
solana-bn254 = { workspace = true }
solana-cluster-type = { workspace = true, features = [
Expand All @@ -125,6 +124,7 @@ solana-decode-error = { workspace = true }
solana-derivation-path = { workspace = true }
solana-ed25519-program = { workspace = true, optional = true }
solana-epoch-info = { workspace = true, features = ["serde"] }
solana-epoch-rewards-hasher = { workspace = true }
solana-feature-set = { workspace = true }
solana-fee-structure = { workspace = true, features = ["serde"] }
solana-frozen-abi = { workspace = true, optional = true, features = [
Expand Down
21 changes: 21 additions & 0 deletions sdk/epoch-rewards-hasher/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[package]
name = "solana-epoch-rewards-hasher"
description = "Solana epoch rewards hasher."
documentation = "https://docs.rs/solana-epoch-rewards-hasher"
version = { workspace = true }
authors = { workspace = true }
repository = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
edition = { workspace = true }

[dependencies]
siphasher = { workspace = true }
solana-hash = { workspace = true }
solana-pubkey = { workspace = true }

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[lints]
workspace = true
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
use {
siphasher::sip::SipHasher13,
solana_sdk::{hash::Hash, pubkey::Pubkey},
std::hash::Hasher,
};
use {siphasher::sip::SipHasher13, solana_hash::Hash, solana_pubkey::Pubkey, std::hash::Hasher};

#[derive(Debug, Clone)]
pub struct EpochRewardsHasher {
Expand Down
6 changes: 5 additions & 1 deletion sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ pub use solana_signer::signers;
pub mod client;
pub mod entrypoint;
pub mod entrypoint_deprecated;
pub mod epoch_rewards_hasher;
pub mod example_mocks;
pub mod exit;
pub mod feature;
Expand Down Expand Up @@ -124,6 +123,11 @@ pub use solana_derivation_path as derivation_path;
pub use solana_ed25519_program as ed25519_instruction;
#[deprecated(since = "2.2.0", note = "Use `solana-epoch-info` crate instead")]
pub use solana_epoch_info as epoch_info;
#[deprecated(
since = "2.2.0",
note = "Use `solana-epoch-rewards-hasher` crate instead"
)]
pub use solana_epoch_rewards_hasher as epoch_rewards_hasher;
#[deprecated(since = "2.1.0", note = "Use `solana-feature-set` crate instead")]
pub use solana_feature_set as feature_set;
#[deprecated(since = "2.2.0", note = "Use `solana-fee-structure` crate instead")]
Expand Down
11 changes: 10 additions & 1 deletion svm/examples/Cargo.lock

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

0 comments on commit 5315ea6

Please sign in to comment.