Skip to content

Commit

Permalink
sdk: evict shred_version
Browse files Browse the repository at this point in the history
  • Loading branch information
buffalojoec committed Dec 12, 2024
1 parent 5fe8d2e commit 1a06025
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 7 deletions.
11 changes: 11 additions & 0 deletions 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 @@ -174,6 +174,7 @@ members = [
"sdk/serialize-utils",
"sdk/sha256-hasher",
"sdk/short-vec",
"sdk/shred-version",
"sdk/signature",
"sdk/signer",
"sdk/slot-hashes",
Expand Down Expand Up @@ -576,6 +577,7 @@ solana-secp256k1-program = { path = "sdk/secp256k1-program", version = "=2.2.0"
solana-secp256k1-recover = { path = "curves/secp256k1-recover", version = "=2.2.0", default-features = false }
solana-send-transaction-service = { path = "send-transaction-service", version = "=2.2.0" }
solana-short-vec = { path = "sdk/short-vec", version = "=2.2.0" }
solana-shred-version = { path = "sdk/shred-version", version = "=2.2.0" }
solana-stable-layout = { path = "sdk/stable-layout", version = "=2.2.0" }
solana-stake-program = { path = "programs/stake", version = "=2.2.0" }
solana-storage-bigtable = { path = "storage-bigtable", version = "=2.2.0" }
Expand Down
11 changes: 11 additions & 0 deletions programs/sbf/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 sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ full = [
"dep:solana-secp256k1-program",
"dep:solana-seed-derivable",
"dep:solana-seed-phrase",
"dep:solana-shred-version",
"dep:solana-signer",
"dep:solana-system-transaction",
"dep:solana-transaction",
Expand Down Expand Up @@ -180,6 +181,7 @@ solana-seed-phrase = { workspace = true, optional = true }
solana-serde = { workspace = true }
solana-serde-varint = { workspace = true }
solana-short-vec = { workspace = true }
solana-shred-version = { workspace = true, optional = true }
solana-signature = { workspace = true, features = [
"rand",
"serde",
Expand Down
22 changes: 22 additions & 0 deletions sdk/shred-version/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[package]
name = "solana-shred-version"
description = "Calculation of shred versions."
documentation = "https://docs.rs/solana-shred-version"
version = { workspace = true }
authors = { workspace = true }
repository = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
edition = { workspace = true }

[dependencies]
byteorder = { workspace = true }
solana-hard-forks = { workspace = true }
solana-hash = { workspace = true }
solana-sha256-hasher = { workspace = true }

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

[lints]
workspace = true
7 changes: 1 addition & 6 deletions sdk/src/shred_version.rs → sdk/shred-version/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
//!
//! [shred]: https://solana.com/docs/terminology#shred
#![cfg(feature = "full")]

use solana_sdk::{
hard_forks::HardForks,
hash::{extend_and_hash, Hash},
};
use {solana_hard_forks::HardForks, solana_hash::Hash, solana_sha256_hasher::extend_and_hash};

pub fn version_from_hash(hash: &Hash) -> u16 {
let hash = hash.as_ref();
Expand Down
4 changes: 3 additions & 1 deletion sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ pub mod reward_type {
pub use solana_reward_info::RewardType;
}
pub mod rpc_port;
pub mod shred_version;
#[cfg(feature = "full")]
#[deprecated(since = "2.2.0", note = "Use `solana-shred-version` crate instead")]
pub use solana_shred_version as shred_version;
pub mod signature;
pub mod signer;
pub mod transaction;
Expand Down
11 changes: 11 additions & 0 deletions 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 1a06025

Please sign in to comment.