Skip to content

Commit

Permalink
add solana-sdk-ids dependency and remove solana-secp256r1-program
Browse files Browse the repository at this point in the history
… dependency
  • Loading branch information
samkim-crypto committed Dec 3, 2024
1 parent 3f503c6 commit c47cfe6
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 12 deletions.
5 changes: 2 additions & 3 deletions 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 runtime-transaction/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ solana-builtins-default-costs = { workspace = true }
solana-compute-budget = { workspace = true }
solana-pubkey = { workspace = true }
solana-sdk = { workspace = true }
solana-secp256r1-program = { workspace = true, features = ["openssl-vendored"] }
solana-sdk-ids = { workspace = true }
solana-svm-transaction = { workspace = true }
thiserror = { workspace = true }

Expand Down
6 changes: 3 additions & 3 deletions runtime-transaction/src/signature_details.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl SignatureDetailsFilter {
ProgramIdStatus::Secp256k1
} else if program_id == &solana_sdk::ed25519_program::ID {
ProgramIdStatus::Ed25519
} else if program_id == &solana_secp256r1_program::ID {
} else if program_id == &solana_sdk_ids::secp256r1_program::ID {
ProgramIdStatus::Secp256r1
} else {
ProgramIdStatus::NotSignature
Expand Down Expand Up @@ -150,7 +150,7 @@ mod tests {
Pubkey::new_unique(),
solana_sdk::secp256k1_program::ID,
solana_sdk::ed25519_program::ID,
solana_secp256r1_program::ID,
solana_sdk_ids::secp256r1_program::ID,
];
let instructions = [
make_instruction(&program_ids, 1, &[5]),
Expand All @@ -174,7 +174,7 @@ mod tests {
let program_ids = [
solana_sdk::secp256k1_program::ID,
solana_sdk::ed25519_program::ID,
solana_secp256r1_program::ID,
solana_sdk_ids::secp256r1_program::ID,
];
let instructions = [
make_instruction(&program_ids, 0, &[]),
Expand Down
1 change: 0 additions & 1 deletion sdk/message/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ solana-logger = { workspace = true, optional = true }
solana-pubkey = { workspace = true }
solana-sanitize = { workspace = true }
solana-sdk-ids = { workspace = true }
solana-secp256r1-program = { workspace = true, features = ["openssl-vendored"] }
solana-short-vec = { workspace = true, optional = true }
solana-system-interface = { workspace = true, optional = true, features = [
"bincode",
Expand Down
4 changes: 2 additions & 2 deletions sdk/message/src/sanitized.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use {
solana_instruction::{BorrowedAccountMeta, BorrowedInstruction},
solana_pubkey::Pubkey,
solana_sanitize::Sanitize,
solana_sdk_ids::{ed25519_program, secp256k1_program},
solana_sdk_ids::{ed25519_program, secp256k1_program, secp256r1_program},
std::{borrow::Cow, collections::HashSet, convert::TryFrom},
};

Expand Down Expand Up @@ -411,7 +411,7 @@ impl SanitizedMessage {
.num_ed25519_instruction_signatures
.saturating_add(u64::from(*num_verifies));
}
} else if solana_secp256r1_program::check_id(program_id) {
} else if secp256r1_program::check_id(program_id) {
if let Some(num_verifies) = instruction.data.first() {
transaction_signature_details.num_secp256r1_instruction_signatures =
transaction_signature_details
Expand Down
2 changes: 1 addition & 1 deletion transaction-view/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ edition = { workspace = true }

[dependencies]
solana-sdk = { workspace = true }
solana-secp256r1-program = { workspace = true }
solana-sdk-ids = { workspace = true }
solana-svm-transaction = { workspace = true }

[dev-dependencies]
Expand Down
3 changes: 2 additions & 1 deletion transaction-view/src/resolved_transaction_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use {
secp256k1_program,
signature::Signature,
},
solana_sdk_ids::secp256r1_program,
solana_svm_transaction::{
instruction::SVMInstruction, message_address_table_lookup::SVMMessageAddressTableLookup,
svm_message::SVMMessage, svm_transaction::SVMTransaction,
Expand Down Expand Up @@ -177,7 +178,7 @@ impl<D: TransactionData> ResolvedTransactionView<D> {
num_ed25519_instruction_signatures =
num_ed25519_instruction_signatures.wrapping_add(u64::from(*num_verifies));
}
} else if solana_secp256r1_program::check_id(program_id) {
} else if secp256r1_program::check_id(program_id) {
if let Some(num_verifies) = instruction.data.first() {
num_secp256r1_instruction_signatures =
num_secp256r1_instruction_signatures.wrapping_add(u64::from(*num_verifies));
Expand Down

0 comments on commit c47cfe6

Please sign in to comment.