Cleanup (#7176)
* Drop serde error instances These were no longer needed after ToPrimitive instances were added. * Rename last of _api crates
This commit is contained in:
parent
f4229a5d3e
commit
92d485dd4d
|
@ -3131,7 +3131,7 @@ dependencies = [
|
||||||
"solana-core 0.22.0",
|
"solana-core 0.22.0",
|
||||||
"solana-drone 0.22.0",
|
"solana-drone 0.22.0",
|
||||||
"solana-genesis 0.22.0",
|
"solana-genesis 0.22.0",
|
||||||
"solana-librapay-api 0.22.0",
|
"solana-librapay 0.22.0",
|
||||||
"solana-local-cluster 0.22.0",
|
"solana-local-cluster 0.22.0",
|
||||||
"solana-logger 0.22.0",
|
"solana-logger 0.22.0",
|
||||||
"solana-measure 0.22.0",
|
"solana-measure 0.22.0",
|
||||||
|
@ -3599,7 +3599,7 @@ dependencies = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-librapay-api"
|
name = "solana-librapay"
|
||||||
version = "0.22.0"
|
version = "0.22.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -3766,7 +3766,7 @@ dependencies = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-ownable-api"
|
name = "solana-ownable"
|
||||||
version = "0.22.0"
|
version = "0.22.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|
|
@ -33,7 +33,7 @@ members = [
|
||||||
"programs/exchange",
|
"programs/exchange",
|
||||||
"programs/failure",
|
"programs/failure",
|
||||||
"programs/noop",
|
"programs/noop",
|
||||||
"programs/ownable_api",
|
"programs/ownable",
|
||||||
"programs/stake",
|
"programs/stake",
|
||||||
"programs/stake_tests",
|
"programs/stake_tests",
|
||||||
"programs/storage",
|
"programs/storage",
|
||||||
|
@ -55,5 +55,5 @@ members = [
|
||||||
exclude = [
|
exclude = [
|
||||||
"programs/bpf",
|
"programs/bpf",
|
||||||
"programs/move_loader",
|
"programs/move_loader",
|
||||||
"programs/librapay_api",
|
"programs/librapay",
|
||||||
]
|
]
|
||||||
|
|
|
@ -21,7 +21,7 @@ solana-core = { path = "../core", version = "0.22.0" }
|
||||||
solana-genesis = { path = "../genesis", version = "0.22.0" }
|
solana-genesis = { path = "../genesis", version = "0.22.0" }
|
||||||
solana-client = { path = "../client", version = "0.22.0" }
|
solana-client = { path = "../client", version = "0.22.0" }
|
||||||
solana-drone = { path = "../drone", version = "0.22.0" }
|
solana-drone = { path = "../drone", version = "0.22.0" }
|
||||||
solana-librapay-api = { path = "../programs/librapay_api", version = "0.22.0", optional = true }
|
solana-librapay = { path = "../programs/librapay", version = "0.22.0", optional = true }
|
||||||
solana-logger = { path = "../logger", version = "0.22.0" }
|
solana-logger = { path = "../logger", version = "0.22.0" }
|
||||||
solana-metrics = { path = "../metrics", version = "0.22.0" }
|
solana-metrics = { path = "../metrics", version = "0.22.0" }
|
||||||
solana-measure = { path = "../measure", version = "0.22.0" }
|
solana-measure = { path = "../measure", version = "0.22.0" }
|
||||||
|
@ -36,4 +36,4 @@ serial_test_derive = "0.3.1"
|
||||||
solana-local-cluster = { path = "../local-cluster", version = "0.22.0" }
|
solana-local-cluster = { path = "../local-cluster", version = "0.22.0" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
move = ["solana-librapay-api", "solana-move-loader-program"]
|
move = ["solana-librapay", "solana-move-loader-program"]
|
||||||
|
|
|
@ -5,7 +5,7 @@ use solana_client::perf_utils::{sample_txs, SampleStats};
|
||||||
use solana_core::gen_keys::GenKeys;
|
use solana_core::gen_keys::GenKeys;
|
||||||
use solana_drone::drone::request_airdrop_transaction;
|
use solana_drone::drone::request_airdrop_transaction;
|
||||||
#[cfg(feature = "move")]
|
#[cfg(feature = "move")]
|
||||||
use solana_librapay_api::{create_genesis, upload_mint_script, upload_payment_script};
|
use solana_librapay::{create_genesis, upload_mint_script, upload_payment_script};
|
||||||
use solana_measure::measure::Measure;
|
use solana_measure::measure::Measure;
|
||||||
use solana_metrics::{self, datapoint_debug};
|
use solana_metrics::{self, datapoint_debug};
|
||||||
use solana_sdk::{
|
use solana_sdk::{
|
||||||
|
@ -37,7 +37,7 @@ const MAX_TX_QUEUE_AGE: u64 =
|
||||||
MAX_PROCESSING_AGE as u64 * DEFAULT_TICKS_PER_SLOT / DEFAULT_TICKS_PER_SECOND;
|
MAX_PROCESSING_AGE as u64 * DEFAULT_TICKS_PER_SLOT / DEFAULT_TICKS_PER_SECOND;
|
||||||
|
|
||||||
#[cfg(feature = "move")]
|
#[cfg(feature = "move")]
|
||||||
use solana_librapay_api::librapay_transaction;
|
use solana_librapay::librapay_transaction;
|
||||||
|
|
||||||
pub const MAX_SPENDS_PER_TX: u64 = 4;
|
pub const MAX_SPENDS_PER_TX: u64 = 4;
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ The Stake account is moved from Ininitialized to StakeState::Stake form. This is
|
||||||
* `account[0]` - RW - The StakeState::Stake instance. `StakeState::Stake::credits_observed` is initialized to `VoteState::credits`, `StakeState::Stake::voter_pubkey` is initialized to `account[1]`. If this is the initial delegation of stake, `StakeState::Stake::stake` is initialized to the account's balance in lamports, `StakeState::Stake::activated` is initialized to the current Bank epoch, and `StakeState::Stake::deactivated` is initialized to std::u64::MAX
|
* `account[0]` - RW - The StakeState::Stake instance. `StakeState::Stake::credits_observed` is initialized to `VoteState::credits`, `StakeState::Stake::voter_pubkey` is initialized to `account[1]`. If this is the initial delegation of stake, `StakeState::Stake::stake` is initialized to the account's balance in lamports, `StakeState::Stake::activated` is initialized to the current Bank epoch, and `StakeState::Stake::deactivated` is initialized to std::u64::MAX
|
||||||
* `account[1]` - R - The VoteState instance.
|
* `account[1]` - R - The VoteState instance.
|
||||||
* `account[2]` - R - sysvar::clock account, carries information about current Bank epoch
|
* `account[2]` - R - sysvar::clock account, carries information about current Bank epoch
|
||||||
* `account[3]` - R - stake\_api::Config accoount, carries warmup, cooldown, and slashing configuration
|
* `account[3]` - R - stake::Config accoount, carries warmup, cooldown, and slashing configuration
|
||||||
|
|
||||||
### StakeInstruction::Authorize\(Pubkey, StakeAuthorize\)
|
### StakeInstruction::Authorize\(Pubkey, StakeAuthorize\)
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,7 @@ test-move)
|
||||||
^ci/test-stable.sh \
|
^ci/test-stable.sh \
|
||||||
^ci/test-move.sh \
|
^ci/test-move.sh \
|
||||||
^programs/move_loader \
|
^programs/move_loader \
|
||||||
^programs/librapay_api \
|
^programs/librapay \
|
||||||
^logger/ \
|
^logger/ \
|
||||||
^runtime/ \
|
^runtime/ \
|
||||||
^sdk/ \
|
^sdk/ \
|
||||||
|
@ -106,7 +106,7 @@ test-move)
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
_ cargo +"$rust_stable" test --manifest-path programs/move_loader/Cargo.toml ${V:+--verbose} -- --nocapture
|
_ cargo +"$rust_stable" test --manifest-path programs/move_loader/Cargo.toml ${V:+--verbose} -- --nocapture
|
||||||
_ cargo +"$rust_stable" test --manifest-path programs/librapay_api/Cargo.toml ${V:+--verbose} -- --nocapture
|
_ cargo +"$rust_stable" test --manifest-path programs/librapay/Cargo.toml ${V:+--verbose} -- --nocapture
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
test-local-cluster)
|
test-local-cluster)
|
||||||
|
|
|
@ -5,7 +5,7 @@ use solana_sdk::pubkey::Pubkey;
|
||||||
|
|
||||||
// HeaderStore is a data structure that allows linked list style cheap appends and
|
// HeaderStore is a data structure that allows linked list style cheap appends and
|
||||||
// sequential reads, but also has a "lookup index" to speed up random access
|
// sequential reads, but also has a "lookup index" to speed up random access
|
||||||
#[derive(Serialize, Deserialize, Debug, PartialEq, Eq, Clone)]
|
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||||
pub enum HeaderStoreError {
|
pub enum HeaderStoreError {
|
||||||
InvalidHeader,
|
InvalidHeader,
|
||||||
GroupExists,
|
GroupExists,
|
||||||
|
|
|
@ -399,7 +399,7 @@ impl Default for AccountState {
|
||||||
}
|
}
|
||||||
|
|
||||||
///Errors
|
///Errors
|
||||||
#[derive(Serialize, Deserialize, Debug, PartialEq, Eq, Clone)]
|
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||||
pub enum SpvError {
|
pub enum SpvError {
|
||||||
InvalidBlockHeader,
|
InvalidBlockHeader,
|
||||||
// blockheader is malformed or out of order
|
// blockheader is malformed or out of order
|
||||||
|
|
|
@ -30,7 +30,7 @@ impl fmt::Display for DecodeHexError {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug, PartialEq, Eq, Clone)]
|
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||||
pub enum LengthError {
|
pub enum LengthError {
|
||||||
OddLength,
|
OddLength,
|
||||||
Maximum(u32),
|
Maximum(u32),
|
||||||
|
|
|
@ -11,7 +11,7 @@ use solana_sdk::{
|
||||||
system_instruction,
|
system_instruction,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, FromPrimitive, ToPrimitive)]
|
#[derive(Debug, Clone, PartialEq, FromPrimitive, ToPrimitive)]
|
||||||
pub enum BudgetError {
|
pub enum BudgetError {
|
||||||
DestinationMissing,
|
DestinationMissing,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
name = "solana-librapay-api"
|
name = "solana-librapay"
|
||||||
version = "0.22.0"
|
version = "0.22.0"
|
||||||
description = "Solana Libra Payment"
|
description = "Solana Libra Payment"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
|
@ -19,5 +19,5 @@ language_e2e_tests = { version = "0.0.1-sol4", package = "solana_libra_language_
|
||||||
types = { version = "0.0.1-sol4", package = "solana_libra_types" }
|
types = { version = "0.0.1-sol4", package = "solana_libra_types" }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["lib"]
|
crate-type = ["lib", "cdylib"]
|
||||||
name = "solana_librapay_api"
|
name = "solana_librapay"
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "solana-ownable-api"
|
name = "solana-ownable"
|
||||||
version = "0.22.0"
|
version = "0.22.0"
|
||||||
description = "ownable program API"
|
description = "ownable program"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
@ -20,5 +20,5 @@ num-traits = "0.2"
|
||||||
solana-runtime = { path = "../../runtime", version = "0.22.0" }
|
solana-runtime = { path = "../../runtime", version = "0.22.0" }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["lib"]
|
crate-type = ["lib", "cdylib"]
|
||||||
name = "solana_ownable_api"
|
name = "solana_ownable"
|
|
@ -1,5 +1,4 @@
|
||||||
use num_derive::{FromPrimitive, ToPrimitive};
|
use num_derive::{FromPrimitive, ToPrimitive};
|
||||||
use serde_derive::{Deserialize, Serialize};
|
|
||||||
use solana_sdk::{
|
use solana_sdk::{
|
||||||
instruction::{AccountMeta, Instruction},
|
instruction::{AccountMeta, Instruction},
|
||||||
instruction_processor_utils::DecodeError,
|
instruction_processor_utils::DecodeError,
|
||||||
|
@ -7,7 +6,7 @@ use solana_sdk::{
|
||||||
system_instruction,
|
system_instruction,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, FromPrimitive, ToPrimitive)]
|
#[derive(Debug, Clone, PartialEq, FromPrimitive, ToPrimitive)]
|
||||||
pub enum OwnableError {
|
pub enum OwnableError {
|
||||||
IncorrectOwner,
|
IncorrectOwner,
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@ use solana_sdk::{
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Reasons the stake might have had an error
|
/// Reasons the stake might have had an error
|
||||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, FromPrimitive, ToPrimitive)]
|
#[derive(Debug, Clone, PartialEq, FromPrimitive, ToPrimitive)]
|
||||||
pub enum StakeError {
|
pub enum StakeError {
|
||||||
NoCreditsToRedeem,
|
NoCreditsToRedeem,
|
||||||
LockupInForce,
|
LockupInForce,
|
||||||
|
|
|
@ -38,7 +38,7 @@ impl Credits {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, FromPrimitive)]
|
#[derive(Debug, Clone, PartialEq, FromPrimitive)]
|
||||||
pub enum StorageError {
|
pub enum StorageError {
|
||||||
InvalidSegment,
|
InvalidSegment,
|
||||||
InvalidBlockhash,
|
InvalidBlockhash,
|
||||||
|
|
|
@ -10,7 +10,7 @@ use solana_sdk::{
|
||||||
system_instruction,
|
system_instruction,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, FromPrimitive)]
|
#[derive(Debug, Clone, PartialEq, FromPrimitive)]
|
||||||
pub enum VestError {
|
pub enum VestError {
|
||||||
DestinationMissing,
|
DestinationMissing,
|
||||||
Unauthorized,
|
Unauthorized,
|
||||||
|
|
|
@ -19,7 +19,7 @@ use solana_sdk::{
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Reasons the stake might have had an error
|
/// Reasons the stake might have had an error
|
||||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, FromPrimitive, ToPrimitive)]
|
#[derive(Debug, Clone, PartialEq, FromPrimitive, ToPrimitive)]
|
||||||
pub enum VoteError {
|
pub enum VoteError {
|
||||||
VoteTooOld,
|
VoteTooOld,
|
||||||
SlotsMismatch,
|
SlotsMismatch,
|
||||||
|
|
Loading…
Reference in New Issue