Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract system-transaction crate #3834

Merged
merged 4 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 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 @@ -173,6 +173,7 @@ members = [
"sdk/slot-hashes",
"sdk/slot-history",
"sdk/stable-layout",
"sdk/system-transaction",
"sdk/sysvar",
"sdk/sysvar-id",
"sdk/time-utils",
Expand Down Expand Up @@ -570,6 +571,7 @@ solana-svm-rent-collector = { path = "svm-rent-collector", version = "=2.2.0" }
solana-svm-transaction = { path = "svm-transaction", version = "=2.2.0" }
solana-system-interface = "1.0"
solana-system-program = { path = "programs/system", version = "=2.2.0" }
solana-system-transaction = { path = "sdk/system-transaction", version = "=2.2.0" }
solana-sysvar = { path = "sdk/sysvar", version = "=2.2.0" }
solana-sysvar-id = { path = "sdk/sysvar-id", version = "=2.2.0" }
solana-test-validator = { path = "test-validator", version = "=2.2.0" }
Expand Down
14 changes: 14 additions & 0 deletions programs/sbf/Cargo.lock

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

1 change: 1 addition & 0 deletions sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ solana-signature = { workspace = true, features = [
"verify",
], optional = true }
solana-signer = { workspace = true, optional = true }
solana-system-transaction = { workspace = true }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry, I missed this -- the new crate should be optional and added under the "full" feature. That's why CI is failing to build sdk in BPF

solana-time-utils = { workspace = true }
solana-transaction = { workspace = true, features = [
"blake3",
Expand Down
7 changes: 6 additions & 1 deletion sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ pub mod rpc_port;
pub mod shred_version;
pub mod signature;
pub mod signer;
pub mod system_transaction;
pub mod transaction;
pub mod transport;
pub mod wasm;
Expand Down Expand Up @@ -201,6 +200,12 @@ pub use solana_serde as deserialize_utils;
pub use solana_serde_varint as serde_varint;
#[deprecated(since = "2.1.0", note = "Use `solana-short-vec` crate instead")]
pub use solana_short_vec as short_vec;
#[cfg(feature = "full")]
#[deprecated(
since = "2.2.0",
note = "Use `solana-system-transaction` crate instead"
)]
pub use solana_system_transaction as system_transaction;
#[deprecated(since = "2.2.0", note = "Use `solana-time-utils` crate instead")]
pub use solana_time_utils as timing;
#[cfg(feature = "full")]
Expand Down
22 changes: 22 additions & 0 deletions sdk/system-transaction/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[package]
name = "solana-system-transaction"
description = "Functionality for creating system transactions."
documentation = "https://docs.rs/solana-system-transaction"
version = { workspace = true }
authors = { workspace = true }
repository = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
edition = { workspace = true }

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

[dependencies]
solana-hash = { workspace = true }
solana-keypair = { workspace = true }
solana-message = { workspace = true }
solana-pubkey = { workspace = true }
solana-signer = { workspace = true }
solana-system-interface = { workspace = true, features = ["bincode"] }
solana-transaction = { workspace = true, features = ["bincode"] }
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
//! The `system_transaction` module provides functionality for creating system transactions.
#![cfg(feature = "full")]

use crate::{
hash::Hash,
message::Message,
pubkey::Pubkey,
signature::{Keypair, Signer},
system_instruction,
transaction::Transaction,
use {
solana_hash::Hash, solana_keypair::Keypair, solana_message::Message, solana_pubkey::Pubkey,
solana_signer::Signer, solana_system_interface::instruction as system_instruction,
solana_transaction::Transaction,
};

/// Create and sign new SystemInstruction::CreateAccount transaction
Expand Down
14 changes: 14 additions & 0 deletions svm/examples/Cargo.lock

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

Loading