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

Separate the "program" feature of solana-sdk into a new crate called solana-program (bp #12989) #13131

Merged
merged 8 commits into from
Oct 24, 2020
Merged
Show file tree
Hide file tree
Changes from all 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
32 changes: 31 additions & 1 deletion Cargo.lock

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

4 changes: 2 additions & 2 deletions ci/nits.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ declare print_free_tree=(
':sdk/bpf/rust/rust-utils/**.rs'
':sdk/**.rs'
':^sdk/cargo-build-bpf/**.rs'
':^sdk/src/program_option.rs'
':^sdk/src/program_stubs.rs'
':^sdk/program/src/program_option.rs'
':^sdk/program/src/program_stubs.rs'
':programs/**.rs'
':^**bin**.rs'
':^**bench**.rs'
Expand Down
3 changes: 3 additions & 0 deletions ci/test-stable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ test-stable)
_ cargo +"$rust_stable" test --jobs "$NPROC" --all --exclude solana-local-cluster ${V:+--verbose} -- --nocapture
;;
test-stable-perf)
# BPF solana-sdk legacy compile test
./cargo-build-bpf --manifest-path sdk/Cargo.toml

# BPF program tests
_ make -C programs/bpf/c tests
_ cargo +"$rust_stable" test \
Expand Down
2 changes: 1 addition & 1 deletion core/src/cluster_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ pub fn make_accounts_hashes_message(
}

// TODO These messages should go through the gpu pipeline for spam filtering
#[frozen_abi(digest = "3ZHQscZ9SgxKh45idzHv3hiagyyPRtDgeySmJn171PTi")]
#[frozen_abi(digest = "21UweZ4WXK9RHypF97D1rEJQ4C8Bh4pw52SBSNAKxJvW")]
#[derive(Serialize, Deserialize, Debug, AbiEnumVisitor, AbiExample)]
#[allow(clippy::large_enum_variant)]
enum Protocol {
Expand Down
2 changes: 1 addition & 1 deletion core/src/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ pub(crate) struct ComputedBankState {
pub pubkey_votes: Arc<PubkeyVotes>,
}

#[frozen_abi(digest = "2ZUeCLMVQxmHYbeqMH7M97ifVSKoVErGvRHzyxcQRjgU")]
#[frozen_abi(digest = "Eay84NBbJqiMBfE7HHH2o6e51wcvoU79g8zCi5sw6uj3")]
#[derive(Clone, Serialize, Deserialize, Debug, PartialEq, AbiExample)]
pub struct Tower {
node_pubkey: Pubkey,
Expand Down
81 changes: 54 additions & 27 deletions programs/bpf/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 programs/bpf/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ fn main() {
let rust_programs = [
"128bit",
"alloc",
"call_depth",
"custom_heap",
"dep_crate",
"deprecated_loader",
Expand Down
10 changes: 2 additions & 8 deletions programs/bpf/rust/128bit/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


[package]
name = "solana-bpf-rust-128bit"
version = "1.4.3"
Expand All @@ -11,12 +9,8 @@ homepage = "https://solana.com/"
edition = "2018"

[dependencies]
solana-sdk = { path = "../../../../sdk/", version = "1.4.3", default-features = false }
solana-bpf-rust-128bit-dep = { path = "../128bit_dep", version = "1.4.3", default-features = false }

[features]
program = ["solana-sdk/program"]
default = ["program", "solana-sdk/default"]
solana-program = { path = "../../../../sdk/program", version = "1.4.3" }
solana-bpf-rust-128bit-dep = { path = "../128bit_dep", version = "1.4.3" }

[lib]
name = "solana_bpf_rust_128bit"
Expand Down
4 changes: 2 additions & 2 deletions programs/bpf/rust/128bit/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! @brief Example Rust-based BPF program tests loop iteration

extern crate solana_sdk;
use solana_sdk::entrypoint::SUCCESS;
extern crate solana_program;
use solana_program::entrypoint::SUCCESS;

#[no_mangle]
pub extern "C" fn entrypoint(_input: *mut u8) -> u64 {
Expand Down
Loading