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

Move most of program into program-core #2432

Closed
wants to merge 37 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
d989c68
extract solana-program-core from solana-program
kevinheavey Aug 3, 2024
edf438e
make curve25519-dalek an optional feature of program-core
kevinheavey Aug 3, 2024
8c553d3
fmt
kevinheavey Aug 3, 2024
7b99d7b
no default features in program-core
kevinheavey Aug 3, 2024
a8f8b12
unused solana-program dep
kevinheavey Aug 3, 2024
5a5ab2d
make bytemuck optional in program-core
kevinheavey Aug 3, 2024
b2387b0
make bincode optional in program-core
kevinheavey Aug 3, 2024
ac51eec
make serde optional in program-core
kevinheavey Aug 3, 2024
d8b09ac
make sha2 optional in program-core
kevinheavey Aug 3, 2024
d8064b3
fix sbf imports
kevinheavey Aug 3, 2024
4a61429
fix wasm issues
kevinheavey Aug 3, 2024
2b294e3
make sha3 optional in program-core
kevinheavey Aug 3, 2024
bec1419
remove num_derive from program-core
kevinheavey Aug 3, 2024
56b869a
remove thiserror from program-core
kevinheavey Aug 3, 2024
a41c7a9
update lock file
kevinheavey Aug 3, 2024
57c07e9
remove CloneZeroed from program-core
kevinheavey Aug 3, 2024
3d73891
fmt
kevinheavey Aug 3, 2024
d70653d
add const pubkey support and make declare_id a declarative macro
kevinheavey Aug 3, 2024
9410352
remove unused dep
kevinheavey Aug 3, 2024
1a1ff24
deps cleanup
kevinheavey Aug 3, 2024
2fa31a1
make base64 dep optional
kevinheavey Aug 3, 2024
854fa96
fix doc test
kevinheavey Aug 3, 2024
1ca260e
make bv dep optional
kevinheavey Aug 3, 2024
da10f7b
clean up cfg clause
kevinheavey Aug 3, 2024
05b5096
activate bv feature in solana-program
kevinheavey Aug 3, 2024
da4397b
make blake3 optional in program-core
kevinheavey Aug 3, 2024
b43b5d8
remove unnecessary num-traits feature
kevinheavey Aug 3, 2024
4ebf335
make num-traits optional in program-core
kevinheavey Aug 3, 2024
2f87c53
make log optional in program-core
kevinheavey Aug 3, 2024
6b369a0
clippy
kevinheavey Aug 3, 2024
cbc3ca8
fix num-traits feature
kevinheavey Aug 4, 2024
9ccc12b
clippy
kevinheavey Aug 4, 2024
e5e08a4
update nits.sh
kevinheavey Aug 4, 2024
416ba55
conditional test fix
kevinheavey Aug 4, 2024
bd7d4f9
sort Cargo.toml
kevinheavey Aug 4, 2024
17d5889
fmt
kevinheavey Aug 4, 2024
cc6e753
fix for sha2+curve25519 feature activation
kevinheavey Aug 5, 2024
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
69 changes: 60 additions & 9 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ members = [
"sdk/msg",
"sdk/package-metadata-macro",
"sdk/program",
"sdk/program-core",
"sdk/program-memory",
"send-transaction-service",
"short-vec",
Expand Down Expand Up @@ -226,6 +227,7 @@ env_logger = "0.9.3"
etcd-client = "0.11.1"
fast-math = "0.1"
fd-lock = "3.0.13"
five8_const = "0.1.3"
flate2 = "1.0.30"
fnv = "1.0.7"
fs_extra = "1.3.0"
Expand Down Expand Up @@ -394,6 +396,7 @@ solana-perf = { path = "perf", version = "=2.1.0" }
solana-poh = { path = "poh", version = "=2.1.0" }
solana-poseidon = { path = "poseidon", version = "=2.1.0" }
solana-program = { path = "sdk/program", version = "=2.1.0", default-features = false }
solana-program-core = { path = "sdk/program-core", version = "=2.1.0", default-features = false }
solana-program-memory = { path = "sdk/program-memory", version = "=2.1.0" }
solana-program-runtime = { path = "program-runtime", version = "=2.1.0" }
solana-program-test = { path = "program-test", version = "=2.1.0" }
Expand Down
4 changes: 3 additions & 1 deletion accounts-db/benches/accounts_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

extern crate test;

#[allow(deprecated)]
use solana_sdk::pubkey;
use {
rand::{thread_rng, Rng},
solana_accounts_db::{
Expand All @@ -11,7 +13,7 @@ use {
ACCOUNTS_INDEX_CONFIG_FOR_BENCHMARKS,
},
},
solana_sdk::{account::AccountSharedData, pubkey},
solana_sdk::account::AccountSharedData,
std::sync::Arc,
test::Bencher,
};
Expand Down
4 changes: 2 additions & 2 deletions ci/nits.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ declare print_free_tree=(
':sdk/**.rs'
':^sdk/cargo-build-sbf/**.rs'
':^sdk/msg/src/lib.rs'
':^sdk/program/src/program_option.rs'
':^sdk/program/src/program_stubs.rs'
':^sdk/program-core/src/program_option.rs'
':^sdk/program-core/src/program_stubs.rs'
':programs/**.rs'
':^**bin**.rs'
':^**bench**.rs'
Expand Down
3 changes: 2 additions & 1 deletion core/benches/banking_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ use {

extern crate test;

#[allow(deprecated)]
use solana_sdk::pubkey;
use {
crossbeam_channel::{unbounded, Receiver},
log::*,
Expand Down Expand Up @@ -46,7 +48,6 @@ use {
genesis_config::GenesisConfig,
hash::Hash,
message::Message,
pubkey,
signature::{Keypair, Signature, Signer},
system_instruction, system_transaction,
timing::{duration_as_us, timestamp},
Expand Down
2 changes: 2 additions & 0 deletions keygen/src/keygen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ use {
};

mod smallest_length_44_public_key {
#[allow(deprecated)]
use solana_sdk::{pubkey, pubkey::Pubkey};

#[allow(deprecated)]
pub(super) static PUBKEY: Pubkey = pubkey!("21111111111111111111111111111111111111111111");

#[test]
Expand Down
4 changes: 3 additions & 1 deletion ledger/benches/protobuf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#![feature(test)]
extern crate test;

#[allow(deprecated)]
use solana_sdk::pubkey;
use {
bincode::{deserialize, serialize},
solana_ledger::{
Expand All @@ -10,7 +12,7 @@ use {
get_tmp_ledger_path_auto_delete,
},
solana_runtime::bank::RewardType,
solana_sdk::{clock::Slot, pubkey},
solana_sdk::clock::Slot,
solana_transaction_status::{Reward, Rewards},
std::path::Path,
test::Bencher,
Expand Down
2 changes: 2 additions & 0 deletions program-runtime/src/sysvar_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ pub struct SysvarCache {

// declare_deprecated_sysvar_id doesn't support const.
// These sysvars are going away anyway.
#[allow(deprecated)]
const FEES_ID: Pubkey = solana_sdk::pubkey!("SysvarFees111111111111111111111111111111111");
#[allow(deprecated)]
const RECENT_BLOCKHASHES_ID: Pubkey =
solana_sdk::pubkey!("SysvarRecentB1ockHashes11111111111111111111");

Expand Down
58 changes: 51 additions & 7 deletions programs/sbf/Cargo.lock

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

6 changes: 4 additions & 2 deletions runtime/src/bank/fee_distribution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,15 +352,17 @@ impl Bank {

#[cfg(test)]
pub mod tests {
#[allow(deprecated)]
use solana_sdk::pubkey;
use {
super::*,
crate::genesis_utils::{
create_genesis_config, create_genesis_config_with_leader,
create_genesis_config_with_vote_accounts, ValidatorVoteKeypairs,
},
solana_sdk::{
account::AccountSharedData, feature_set, native_token::sol_to_lamports, pubkey,
rent::Rent, signature::Signer,
account::AccountSharedData, feature_set, native_token::sol_to_lamports, rent::Rent,
signature::Signer,
},
std::sync::RwLock,
};
Expand Down
1 change: 1 addition & 0 deletions sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ solana-decode-error = { workspace = true }
solana-frozen-abi = { workspace = true, optional = true }
solana-frozen-abi-macro = { workspace = true, optional = true }
solana-program = { workspace = true }
solana-program-core = { workspace = true }
solana-program-memory = { workspace = true }
solana-sanitize = { workspace = true }
solana-sdk-macro = { workspace = true }
Expand Down
5 changes: 1 addition & 4 deletions sdk/decode-error/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "solana-decode-error"
description = "Solana DecodeError Trait"
description = "Solana DecodeError Trait. Obsolete."
documentation = "https://docs.rs/solana-decode-error"
version = { workspace = true }
authors = { workspace = true }
Expand All @@ -11,6 +11,3 @@ edition = { workspace = true }

[dependencies]
num-traits = { workspace = true }

[dev-dependencies]
num-derive = { workspace = true }
Loading
Loading