Преглед изворни кода

replace serde_derive dep with derive feature on serde (#8421)

Trent Nelson пре 1 месец
родитељ
комит
349f080bb3
100 измењених фајлова са 77 додато и 152 уклоњено
  1. 0 33
      Cargo.lock
  2. 1 2
      Cargo.toml
  3. 0 1
      account-decoder-client-types/Cargo.toml
  4. 1 1
      account-decoder-client-types/src/lib.rs
  5. 1 1
      account-decoder-client-types/src/token.rs
  6. 0 1
      account-decoder/Cargo.toml
  7. 1 3
      account-decoder/src/lib.rs
  8. 1 0
      account-decoder/src/parse_account_data.rs
  9. 1 0
      account-decoder/src/parse_address_lookup_table.rs
  10. 1 0
      account-decoder/src/parse_bpf_loader.rs
  11. 1 0
      account-decoder/src/parse_config.rs
  12. 1 0
      account-decoder/src/parse_nonce.rs
  13. 1 0
      account-decoder/src/parse_stake.rs
  14. 1 0
      account-decoder/src/parse_sysvar.rs
  15. 1 0
      account-decoder/src/parse_vote.rs
  16. 1 0
      account-decoder/src/validator_info.rs
  17. 0 1
      accounts-db/Cargo.toml
  18. 1 0
      accounts-db/src/append_vec/meta.rs
  19. 0 2
      accounts-db/src/lib.rs
  20. 1 0
      accounts-db/src/stake_rewards.rs
  21. 0 1
      banks-interface/Cargo.toml
  22. 1 1
      banks-interface/src/lib.rs
  23. 0 1
      bloom/Cargo.toml
  24. 0 1
      cargo-registry/Cargo.toml
  25. 1 1
      cargo-registry/src/crate_handler.rs
  26. 1 1
      cargo-registry/src/sparse_index.rs
  27. 0 1
      cli-config/Cargo.toml
  28. 1 1
      cli-config/src/config.rs
  29. 0 1
      cli/Cargo.toml
  30. 0 2
      cli/src/lib.rs
  31. 0 1
      core/Cargo.toml
  32. 1 0
      core/src/banking_trace.rs
  33. 1 0
      core/src/consensus/tower1_14_11.rs
  34. 1 0
      core/src/consensus/tower1_7_14.rs
  35. 1 0
      core/src/consensus/tower_storage.rs
  36. 0 3
      core/src/lib.rs
  37. 1 1
      core/src/mock_alpenglow_consensus.rs
  38. 1 0
      core/src/repair/serve_repair.rs
  39. 1 0
      core/src/validator.rs
  40. 0 1
      faucet/Cargo.toml
  41. 1 1
      faucet/src/faucet.rs
  42. 0 1
      gossip/Cargo.toml
  43. 1 1
      gossip/src/crds_data.rs
  44. 1 0
      gossip/src/crds_gossip_pull.rs
  45. 1 1
      gossip/src/crds_value.rs
  46. 4 1
      gossip/src/deprecated.rs
  47. 1 0
      gossip/src/duplicate_shred.rs
  48. 1 0
      gossip/src/epoch_slots.rs
  49. 1 0
      gossip/src/legacy_contact_info.rs
  50. 0 3
      gossip/src/lib.rs
  51. 1 0
      gossip/src/ping_pong.rs
  52. 1 1
      gossip/src/protocol.rs
  53. 1 0
      gossip/src/restart_crds_values.rs
  54. 0 1
      install/Cargo.toml
  55. 1 1
      install/src/command.rs
  56. 1 1
      install/src/config.rs
  57. 1 1
      install/src/update_manifest.rs
  58. 0 1
      ledger-tool/Cargo.toml
  59. 1 1
      ledger-tool/src/main.rs
  60. 4 2
      ledger-tool/src/output.rs
  61. 1 1
      ledger-tool/src/program.rs
  62. 0 1
      net-utils/Cargo.toml
  63. 1 1
      net-utils/src/ip_echo_server.rs
  64. 0 29
      programs/sbf/Cargo.lock
  65. 1 2
      programs/sbf/Cargo.toml
  66. 0 1
      programs/sbf/rust/big_mod_exp/Cargo.toml
  67. 1 1
      programs/sbf/rust/big_mod_exp/src/lib.rs
  68. 0 1
      programs/system/Cargo.toml
  69. 0 1
      programs/vote/Cargo.toml
  70. 0 1
      pubsub-client/Cargo.toml
  71. 0 1
      rpc-client-api/Cargo.toml
  72. 1 0
      rpc-client-api/src/custom_error.rs
  73. 0 3
      rpc-client-api/src/lib.rs
  74. 0 1
      rpc-client-types/Cargo.toml
  75. 1 0
      rpc-client-types/src/config.rs
  76. 1 1
      rpc-client-types/src/error_object.rs
  77. 1 1
      rpc-client-types/src/filter.rs
  78. 0 3
      rpc-client-types/src/lib.rs
  79. 1 0
      rpc-client-types/src/request.rs
  80. 0 1
      rpc-client/Cargo.toml
  81. 0 1
      rpc/Cargo.toml
  82. 0 3
      rpc/src/lib.rs
  83. 1 0
      rpc/src/rpc_subscription_tracker.rs
  84. 0 1
      runtime/Cargo.toml
  85. 1 1
      runtime/src/bank.rs
  86. 3 2
      runtime/src/bank/bank_hash_details.rs
  87. 1 0
      runtime/src/bank/partitioned_epoch_rewards/distribution.rs
  88. 1 1
      runtime/src/bank/serde_snapshot.rs
  89. 5 2
      runtime/src/commitment.rs
  90. 0 2
      runtime/src/lib.rs
  91. 1 1
      runtime/src/rent_collector.rs
  92. 1 0
      runtime/src/serde_snapshot/status_cache.rs
  93. 1 1
      runtime/src/serde_snapshot/types.rs
  94. 1 0
      runtime/src/stake_history.rs
  95. 1 0
      runtime/src/stakes.rs
  96. 0 1
      storage-bigtable/Cargo.toml
  97. 1 1
      storage-bigtable/src/compression.rs
  98. 0 3
      storage-bigtable/src/lib.rs
  99. 0 1
      svm/Cargo.toml
  100. 2 2
      svm/src/message_processor.rs

+ 0 - 33
Cargo.lock

@@ -93,7 +93,6 @@ dependencies = [
  "hyper 0.14.32",
  "log",
  "serde",
- "serde_derive",
  "serde_json",
  "sha2 0.10.9",
  "solana-clap-utils",
@@ -161,7 +160,6 @@ dependencies = [
  "scopeguard",
  "semver 1.0.27",
  "serde",
- "serde_derive",
  "serde_yaml 0.8.26",
  "serde_yaml 0.9.34+deprecated",
  "solana-clap-utils",
@@ -219,7 +217,6 @@ dependencies = [
  "regex",
  "serde",
  "serde_bytes",
- "serde_derive",
  "serde_json",
  "signal-hook",
  "solana-account",
@@ -574,7 +571,6 @@ dependencies = [
  "rayon",
  "serde",
  "serde_bytes",
- "serde_derive",
  "solana-account",
  "solana-accounts-db",
  "solana-bloom",
@@ -6956,7 +6952,6 @@ dependencies = [
  "bs58",
  "bv",
  "serde",
- "serde_derive",
  "serde_json",
  "solana-account",
  "solana-account-decoder-client-types",
@@ -6996,7 +6991,6 @@ dependencies = [
  "base64 0.22.1",
  "bs58",
  "serde",
- "serde_derive",
  "serde_json",
  "solana-account",
  "solana-pubkey",
@@ -7098,7 +7092,6 @@ dependencies = [
  "seqlock",
  "serde",
  "serde_bytes",
- "serde_derive",
  "slab",
  "smallvec",
  "solana-account",
@@ -7275,7 +7268,6 @@ name = "solana-banks-interface"
 version = "3.1.0"
 dependencies = [
  "serde",
- "serde_derive",
  "solana-account",
  "solana-clock",
  "solana-commitment-config",
@@ -7464,7 +7456,6 @@ dependencies = [
  "rand 0.8.5",
  "rayon",
  "serde",
- "serde_derive",
  "solana-frozen-abi",
  "solana-frozen-abi-macro",
  "solana-hash",
@@ -7764,7 +7755,6 @@ dependencies = [
  "reqwest 0.12.23",
  "semver 1.0.27",
  "serde",
- "serde_derive",
  "serde_json",
  "solana-account",
  "solana-account-decoder",
@@ -7843,7 +7833,6 @@ dependencies = [
  "anyhow",
  "dirs-next",
  "serde",
- "serde_derive",
  "serde_yaml 0.9.34+deprecated",
  "solana-clap-utils",
  "solana-commitment-config",
@@ -8196,7 +8185,6 @@ dependencies = [
  "rustls 0.23.32",
  "serde",
  "serde_bytes",
- "serde_derive",
  "serde_json",
  "serial_test",
  "shaq",
@@ -8621,7 +8609,6 @@ dependencies = [
  "crossbeam-channel",
  "log",
  "serde",
- "serde_derive",
  "solana-clap-utils",
  "solana-cli-config",
  "solana-cli-output",
@@ -8889,7 +8876,6 @@ dependencies = [
  "serde",
  "serde-big-array",
  "serde_bytes",
- "serde_derive",
  "serial_test",
  "siphasher 1.0.1",
  "solana-bloom",
@@ -9457,7 +9443,6 @@ dependencies = [
  "pcap-file",
  "rand 0.8.5",
  "serde",
- "serde_derive",
  "shuttle",
  "socket2 0.6.0",
  "solana-logger",
@@ -9929,7 +9914,6 @@ dependencies = [
  "log",
  "semver 1.0.27",
  "serde",
- "serde_derive",
  "serde_json",
  "solana-account-decoder-client-types",
  "solana-clock",
@@ -10065,7 +10049,6 @@ dependencies = [
  "rayon",
  "regex",
  "serde",
- "serde_derive",
  "serde_json",
  "serial_test",
  "soketto",
@@ -10170,7 +10153,6 @@ dependencies = [
  "reqwest-middleware",
  "semver 1.0.27",
  "serde",
- "serde_derive",
  "serde_json",
  "solana-account",
  "solana-account-decoder",
@@ -10208,7 +10190,6 @@ dependencies = [
  "reqwest 0.12.23",
  "reqwest-middleware",
  "serde",
- "serde_derive",
  "serde_json",
  "solana-account-decoder-client-types",
  "solana-clock",
@@ -10258,7 +10239,6 @@ dependencies = [
  "const_format",
  "semver 1.0.27",
  "serde",
- "serde_derive",
  "serde_json",
  "solana-account",
  "solana-account-decoder-client-types",
@@ -10362,7 +10342,6 @@ dependencies = [
  "regex",
  "semver 1.0.27",
  "serde",
- "serde_derive",
  "serde_json",
  "serde_with",
  "shuttle",
@@ -10873,7 +10852,6 @@ dependencies = [
  "prost",
  "prost-types",
  "serde",
- "serde_derive",
  "smpl_jwt",
  "solana-clock",
  "solana-hash",
@@ -10988,7 +10966,6 @@ dependencies = [
  "qualifier_attr",
  "rand 0.7.3",
  "serde",
- "serde_derive",
  "shuttle",
  "solana-account",
  "solana-bpf-loader-program",
@@ -11133,7 +11110,6 @@ dependencies = [
  "criterion",
  "log",
  "serde",
- "serde_derive",
  "solana-account",
  "solana-bincode",
  "solana-compute-budget",
@@ -11227,7 +11203,6 @@ dependencies = [
  "bincode",
  "crossbeam-channel",
  "log",
- "serde_derive",
  "serde_json",
  "solana-account",
  "solana-accounts-db",
@@ -11300,7 +11275,6 @@ dependencies = [
  "indicatif 0.18.0",
  "pickledb",
  "serde",
- "serde_derive",
  "solana-account-decoder",
  "solana-clap-utils",
  "solana-cli-config",
@@ -11462,7 +11436,6 @@ dependencies = [
  "bincode",
  "qualifier_attr",
  "serde",
- "serde_derive",
  "solana-account",
  "solana-account-info",
  "solana-instruction",
@@ -11561,7 +11534,6 @@ dependencies = [
  "bytemuck",
  "log",
  "serde",
- "serde_derive",
  "serde_json",
  "solana-account-decoder",
  "solana-address-lookup-table-interface",
@@ -11600,7 +11572,6 @@ dependencies = [
  "bincode",
  "bs58",
  "serde",
- "serde_derive",
  "serde_json",
  "solana-account-decoder-client-types",
  "solana-commitment-config",
@@ -11761,7 +11732,6 @@ dependencies = [
  "rand 0.8.5",
  "semver 1.0.27",
  "serde",
- "serde_derive",
  "solana-frozen-abi",
  "solana-frozen-abi-macro",
  "solana-sanitize",
@@ -11833,7 +11803,6 @@ dependencies = [
  "log",
  "rand 0.8.5",
  "serde",
- "serde_derive",
  "solana-account",
  "solana-bincode",
  "solana-clock",
@@ -11898,7 +11867,6 @@ dependencies = [
  "num-derive",
  "num-traits",
  "serde",
- "serde_derive",
  "solana-account",
  "solana-bincode",
  "solana-clock",
@@ -12081,7 +12049,6 @@ dependencies = [
  "num-traits",
  "rand 0.8.5",
  "serde",
- "serde_derive",
  "serde_json",
  "sha3",
  "solana-curve25519 3.1.0",

+ 1 - 2
Cargo.toml

@@ -355,10 +355,9 @@ rustls = { version = "0.23.32", features = ["std"], default-features = false }
 scopeguard = "1.2.0"
 semver = "1.0.27"
 seqlock = "0.2.0"
-serde = "1.0.228" # must match the serde_derive version, see https://github.com/serde-rs/serde/issues/2584#issuecomment-1685252251
+serde = { version = "1.0.228", features = ["derive"] }
 serde-big-array = "0.5.1"
 serde_bytes = "0.11.19"
-serde_derive = "1.0.228" # must match the serde version, see https://github.com/serde-rs/serde/issues/2584#issuecomment-1685252251
 serde_json = "1.0.145"
 serde_with = { version = "3.15.0", default-features = false }
 serde_yaml = "0.9.34"

+ 0 - 1
account-decoder-client-types/Cargo.toml

@@ -21,7 +21,6 @@ zstd = ["dep:zstd"]
 base64 = { workspace = true }
 bs58 = { workspace = true, features = ["std"] }
 serde = { workspace = true }
-serde_derive = { workspace = true }
 serde_json = { workspace = true }
 solana-account = { workspace = true }
 solana-pubkey = { workspace = true }

+ 1 - 1
account-decoder-client-types/src/lib.rs

@@ -5,7 +5,7 @@ use std::io::Read;
 use {
     base64::{prelude::BASE64_STANDARD, Engine},
     core::str::FromStr,
-    serde_derive::{Deserialize, Serialize},
+    serde::{Deserialize, Serialize},
     serde_json::Value,
     solana_account::WritableAccount,
     solana_pubkey::Pubkey,

+ 1 - 1
account-decoder-client-types/src/token.rs

@@ -1,6 +1,6 @@
 use {
     core::str::FromStr,
-    serde_derive::{Deserialize, Serialize},
+    serde::{Deserialize, Serialize},
 };
 
 #[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]

+ 0 - 1
account-decoder/Cargo.toml

@@ -19,7 +19,6 @@ bincode = { workspace = true }
 bs58 = { workspace = true }
 bv = { workspace = true }
 serde = { workspace = true }
-serde_derive = { workspace = true }
 serde_json = { workspace = true }
 solana-account = { workspace = true }
 solana-account-decoder-client-types = { workspace = true, features = ["zstd"] }

+ 1 - 3
account-decoder/src/lib.rs

@@ -1,8 +1,5 @@
 #![allow(clippy::arithmetic_side_effects)]
 
-#[macro_use]
-extern crate serde_derive;
-
 pub mod parse_account_data;
 pub mod parse_address_lookup_table;
 pub mod parse_bpf_loader;
@@ -22,6 +19,7 @@ pub use solana_account_decoder_client_types::{
 use {
     crate::parse_account_data::{parse_account_data_v3, AccountAdditionalDataV3},
     base64::{prelude::BASE64_STANDARD, Engine},
+    serde::{Deserialize, Serialize},
     solana_account::ReadableAccount,
     solana_fee_calculator::FeeCalculator,
     solana_pubkey::Pubkey,

+ 1 - 0
account-decoder/src/parse_account_data.rs

@@ -7,6 +7,7 @@ use {
         parse_token::parse_token_v3, parse_vote::parse_vote,
     },
     inflector::Inflector,
+    serde::{Deserialize, Serialize},
     solana_clock::UnixTimestamp,
     solana_instruction::error::InstructionError,
     solana_pubkey::Pubkey,

+ 1 - 0
account-decoder/src/parse_address_lookup_table.rs

@@ -1,5 +1,6 @@
 use {
     crate::parse_account_data::{ParsableAccount, ParseAccountError},
+    serde::{Deserialize, Serialize},
     solana_address_lookup_table_interface::state::AddressLookupTable,
     solana_instruction::error::InstructionError,
 };

+ 1 - 0
account-decoder/src/parse_bpf_loader.rs

@@ -5,6 +5,7 @@ use {
     },
     base64::{prelude::BASE64_STANDARD, Engine},
     bincode::{deserialize, serialized_size},
+    serde::{Deserialize, Serialize},
     solana_loader_v3_interface::state::UpgradeableLoaderState,
     solana_pubkey::Pubkey,
 };

+ 1 - 0
account-decoder/src/parse_config.rs

@@ -4,6 +4,7 @@ use {
         validator_info,
     },
     bincode::deserialize,
+    serde::{Deserialize, Serialize},
     serde_json::Value,
     solana_config_interface::state::{get_config_data, ConfigKeys},
     solana_pubkey::Pubkey,

+ 1 - 0
account-decoder/src/parse_nonce.rs

@@ -1,5 +1,6 @@
 use {
     crate::{parse_account_data::ParseAccountError, UiFeeCalculator},
+    serde::{Deserialize, Serialize},
     solana_instruction::error::InstructionError,
     solana_nonce::{state::State, versions::Versions},
 };

+ 1 - 0
account-decoder/src/parse_stake.rs

@@ -4,6 +4,7 @@ use {
         StringAmount,
     },
     bincode::deserialize,
+    serde::{Deserialize, Serialize},
     solana_clock::{Epoch, UnixTimestamp},
     solana_stake_interface::state::{Authorized, Delegation, Lockup, Meta, Stake, StakeStateV2},
 };

+ 1 - 0
account-decoder/src/parse_sysvar.rs

@@ -7,6 +7,7 @@ use {
     },
     bincode::deserialize,
     bv::BitVec,
+    serde::{Deserialize, Serialize},
     solana_clock::{Clock, Epoch, Slot, UnixTimestamp},
     solana_epoch_schedule::EpochSchedule,
     solana_pubkey::Pubkey,

+ 1 - 0
account-decoder/src/parse_vote.rs

@@ -1,5 +1,6 @@
 use {
     crate::{parse_account_data::ParseAccountError, StringAmount},
+    serde::{Deserialize, Serialize},
     solana_clock::{Epoch, Slot},
     solana_pubkey::Pubkey,
     solana_vote_interface::state::{BlockTimestamp, Lockout, VoteStateV3},

+ 1 - 0
account-decoder/src/validator_info.rs

@@ -1,3 +1,4 @@
+use serde::{Deserialize, Serialize};
 pub const MAX_SHORT_FIELD_LENGTH: usize = 80;
 pub const MAX_LONG_FIELD_LENGTH: usize = 300;
 /// Maximum size of validator configuration data (`ValidatorInfo`).

+ 0 - 1
accounts-db/Cargo.toml

@@ -58,7 +58,6 @@ rand = { workspace = true }
 rayon = { workspace = true }
 seqlock = { workspace = true }
 serde = { workspace = true, features = ["rc"] }
-serde_derive = { workspace = true }
 slab = { workspace = true }
 smallvec = { workspace = true, features = ["const_generics"] }
 solana-account = { workspace = true, features = ["serde"] }

+ 1 - 0
accounts-db/src/append_vec/meta.rs

@@ -1,5 +1,6 @@
 use {
     crate::is_zero_lamport::IsZeroLamport,
+    serde::{Deserialize, Serialize},
     solana_account::ReadableAccount,
     solana_clock::Epoch,
     solana_pubkey::Pubkey,

+ 0 - 2
accounts-db/src/lib.rs

@@ -52,8 +52,6 @@ pub use {
 
 #[macro_use]
 extern crate solana_metrics;
-#[macro_use]
-extern crate serde_derive;
 
 #[cfg_attr(feature = "frozen-abi", macro_use)]
 #[cfg(feature = "frozen-abi")]

+ 1 - 0
accounts-db/src/stake_rewards.rs

@@ -5,6 +5,7 @@ use {
         is_zero_lamport::IsZeroLamport,
         storable_accounts::{AccountForStorage, StorableAccounts},
     },
+    serde::{Deserialize, Serialize},
     solana_account::{AccountSharedData, ReadableAccount},
     solana_clock::Slot,
     solana_pubkey::Pubkey,

+ 0 - 1
banks-interface/Cargo.toml

@@ -18,7 +18,6 @@ name = "solana_banks_interface"
 
 [dependencies]
 serde = { workspace = true }
-serde_derive = { workspace = true }
 solana-account = { workspace = true, features = [ "serde" ] }
 solana-clock = { workspace = true }
 solana-commitment-config = { workspace = true, features = [ "serde" ] }

+ 1 - 1
banks-interface/src/lib.rs

@@ -1,7 +1,7 @@
 #![allow(deprecated)]
 
 use {
-    serde_derive::{Deserialize, Serialize},
+    serde::{Deserialize, Serialize},
     solana_account::Account,
     solana_clock::Slot,
     solana_commitment_config::CommitmentLevel,

+ 0 - 1
bloom/Cargo.toml

@@ -28,7 +28,6 @@ bv = { workspace = true, features = ["serde"] }
 fnv = { workspace = true }
 rand = { workspace = true }
 serde = { workspace = true, features = ["rc"] }
-serde_derive = { workspace = true }
 solana-frozen-abi = { workspace = true, optional = true, features = [
     "frozen-abi",
 ] }

+ 0 - 1
cargo-registry/Cargo.toml

@@ -25,7 +25,6 @@ hex = { workspace = true }
 hyper = { workspace = true, features = ["full"] }
 log = { workspace = true }
 serde = { workspace = true }
-serde_derive = { workspace = true }
 serde_json = { workspace = true }
 sha2 = { workspace = true }
 solana-clap-utils = { workspace = true }

+ 1 - 1
cargo-registry/src/crate_handler.rs

@@ -9,7 +9,7 @@ use {
     },
     hyper::body::Bytes,
     log::*,
-    serde_derive::{Deserialize, Serialize},
+    serde::{Deserialize, Serialize},
     serde_json::from_slice,
     sha2::{Digest, Sha256},
     solana_cli::program_v4::{process_deploy_program, process_dump, AdditionalCliConfig},

+ 1 - 1
cargo-registry/src/sparse_index.rs

@@ -5,7 +5,7 @@ use {
         response_builder,
     },
     log::info,
-    serde_derive::{Deserialize, Serialize},
+    serde::{Deserialize, Serialize},
     std::{
         collections::BTreeMap,
         sync::{Arc, RwLock},

+ 0 - 1
cli-config/Cargo.toml

@@ -15,7 +15,6 @@ targets = ["x86_64-unknown-linux-gnu"]
 [dependencies]
 dirs-next = { workspace = true }
 serde = { workspace = true }
-serde_derive = { workspace = true }
 serde_yaml = { workspace = true }
 solana-clap-utils = { workspace = true }
 solana-commitment-config = { workspace = true }

+ 1 - 1
cli-config/src/config.rs

@@ -1,7 +1,7 @@
 use std::sync::LazyLock;
 // Wallet settings that can be configured for long-term use
 use {
-    serde_derive::{Deserialize, Serialize},
+    serde::{Deserialize, Serialize},
     std::{collections::HashMap, io, path::Path},
     url::Url,
 };

+ 0 - 1
cli/Cargo.toml

@@ -41,7 +41,6 @@ pretty-hex = { workspace = true }
 reqwest = { workspace = true, features = ["blocking", "brotli", "deflate", "gzip", "rustls-tls", "rustls-tls-native-roots", "json"] }
 semver = { workspace = true }
 serde = { workspace = true }
-serde_derive = { workspace = true }
 serde_json = { workspace = true }
 solana-account = "=3.1.0"
 solana-account-decoder = { workspace = true }

+ 0 - 2
cli/src/lib.rs

@@ -20,8 +20,6 @@ macro_rules! pubkey {
 #[macro_use]
 extern crate const_format;
 
-extern crate serde_derive;
-
 pub mod address_lookup_table;
 pub mod checks;
 pub mod clap_app;

+ 0 - 1
core/Cargo.toml

@@ -81,7 +81,6 @@ rolling-file = { workspace = true }
 rustls = { workspace = true }
 serde = { workspace = true }
 serde_bytes = { workspace = true }
-serde_derive = { workspace = true }
 slab = { workspace = true }
 solana-account = { workspace = true }
 solana-accounts-db = { workspace = true }

+ 1 - 0
core/src/banking_trace.rs

@@ -4,6 +4,7 @@ use {
     chrono::{DateTime, Local},
     crossbeam_channel::{unbounded, Receiver, SendError, Sender, TryRecvError},
     rolling_file::{RollingCondition, RollingConditionBasic, RollingFileAppender},
+    serde::{Deserialize, Serialize},
     solana_clock::Slot,
     solana_hash::Hash,
     std::{

+ 1 - 0
core/src/consensus/tower1_14_11.rs

@@ -1,5 +1,6 @@
 use {
     crate::consensus::{BlockhashStatus, SwitchForkDecision},
+    serde::{Deserialize, Serialize},
     solana_clock::Slot,
     solana_pubkey::Pubkey,
     solana_vote::vote_transaction::VoteTransaction,

+ 1 - 0
core/src/consensus/tower1_7_14.rs

@@ -1,5 +1,6 @@
 use {
     crate::consensus::{BlockhashStatus, Result, SwitchForkDecision, TowerError},
+    serde::{Deserialize, Serialize},
     solana_clock::Slot,
     solana_pubkey::Pubkey,
     solana_signature::Signature,

+ 1 - 0
core/src/consensus/tower_storage.rs

@@ -3,6 +3,7 @@ use {
         tower1_14_11::Tower1_14_11, tower1_7_14::SavedTower1_7_14, Result, Tower, TowerError,
         TowerVersions,
     },
+    serde::{Deserialize, Serialize},
     solana_pubkey::Pubkey,
     solana_signature::Signature,
     solana_signer::Signer,

+ 0 - 3
core/src/lib.rs

@@ -50,9 +50,6 @@ pub mod window_service;
 #[macro_use]
 extern crate log;
 
-#[macro_use]
-extern crate serde_derive;
-
 #[macro_use]
 extern crate solana_metrics;
 

+ 1 - 1
core/src/mock_alpenglow_consensus.rs

@@ -3,7 +3,7 @@ use {
     crate::consensus::Stake,
     bytemuck::{Pod, Zeroable},
     crossbeam_channel::{bounded, Receiver, Sender},
-    serde::de::DeserializeOwned,
+    serde::{de::DeserializeOwned, Deserialize, Serialize},
     solana_clock::{Slot, DEFAULT_MS_PER_SLOT},
     solana_gossip::{cluster_info::ClusterInfo, epoch_specs::EpochSpecs},
     solana_keypair::Keypair,

+ 1 - 0
core/src/repair/serve_repair.rs

@@ -24,6 +24,7 @@ use {
         distributions::{Distribution, WeightedError, WeightedIndex},
         Rng,
     },
+    serde::{Deserialize, Serialize},
     solana_clock::Slot,
     solana_cluster_type::ClusterType,
     solana_gossip::{

+ 1 - 0
core/src/validator.rs

@@ -34,6 +34,7 @@ use {
     anyhow::{anyhow, Context, Result},
     crossbeam_channel::{bounded, unbounded, Receiver},
     quinn::Endpoint,
+    serde::{Deserialize, Serialize},
     solana_accounts_db::{
         accounts_db::{AccountsDbConfig, ACCOUNTS_DB_CONFIG_FOR_TESTING},
         accounts_update_notifier_interface::AccountsUpdateNotifier,

+ 0 - 1
faucet/Cargo.toml

@@ -29,7 +29,6 @@ clap = { workspace = true }
 crossbeam-channel = { workspace = true }
 log = { workspace = true }
 serde = { workspace = true }
-serde_derive = { workspace = true }
 solana-clap-utils = { workspace = true }
 solana-cli-config = { workspace = true }
 solana-cli-output = { workspace = true }

+ 1 - 1
faucet/src/faucet.rs

@@ -8,7 +8,7 @@ use {
     bincode::{deserialize, serialize, serialized_size},
     crossbeam_channel::{unbounded, Sender},
     log::*,
-    serde_derive::{Deserialize, Serialize},
+    serde::{Deserialize, Serialize},
     solana_cli_output::display::build_balance_message,
     solana_hash::Hash,
     solana_instruction::Instruction,

+ 0 - 1
gossip/Cargo.toml

@@ -55,7 +55,6 @@ rayon = { workspace = true }
 serde = { workspace = true }
 serde-big-array = { workspace = true }
 serde_bytes = { workspace = true }
-serde_derive = { workspace = true }
 siphasher = { workspace = true }
 solana-bloom = { workspace = true }
 solana-clap-utils = { workspace = true }

+ 1 - 1
gossip/src/crds_data.rs

@@ -8,7 +8,7 @@ use {
         restart_crds_values::{RestartHeaviestFork, RestartLastVotedForkSlots},
     },
     rand::Rng,
-    serde::de::{Deserialize, Deserializer},
+    serde::{de::Deserializer, Deserialize, Serialize},
     solana_clock::Slot,
     solana_hash::Hash,
     solana_pubkey::{self, Pubkey},

+ 1 - 0
gossip/src/crds_gossip_pull.rs

@@ -27,6 +27,7 @@ use {
         Rng,
     },
     rayon::{prelude::*, ThreadPool},
+    serde::{Deserialize, Serialize},
     solana_bloom::bloom::{Bloom, ConcurrentBloom},
     solana_hash::Hash,
     solana_keypair::Keypair,

+ 1 - 1
gossip/src/crds_value.rs

@@ -8,7 +8,7 @@ use {
     arrayvec::ArrayVec,
     bincode::serialize,
     rand::Rng,
-    serde::de::{Deserialize, Deserializer},
+    serde::{de::Deserializer, Deserialize, Serialize},
     solana_hash::Hash,
     solana_keypair::{signable::Signable, Keypair},
     solana_packet::PACKET_DATA_SIZE,

+ 4 - 1
gossip/src/deprecated.rs

@@ -1,4 +1,7 @@
-use solana_clock::Slot;
+use {
+    serde::{Deserialize, Serialize},
+    solana_clock::Slot,
+};
 
 #[cfg_attr(feature = "frozen-abi", derive(AbiExample, AbiEnumVisitor))]
 #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]

+ 1 - 0
gossip/src/duplicate_shred.rs

@@ -1,6 +1,7 @@
 use {
     crate::crds_data::sanitize_wallclock,
     itertools::Itertools,
+    serde::{Deserialize, Serialize},
     solana_clock::Slot,
     solana_ledger::{
         blockstore::BlockstoreError,

+ 1 - 0
gossip/src/epoch_slots.rs

@@ -6,6 +6,7 @@ use {
     bincode::serialized_size,
     bv::BitVec,
     flate2::{Compress, Compression, Decompress, FlushCompress, FlushDecompress},
+    serde::{Deserialize, Serialize},
     solana_clock::Slot,
     solana_pubkey::Pubkey,
     solana_sanitize::{Sanitize, SanitizeError},

+ 1 - 0
gossip/src/legacy_contact_info.rs

@@ -2,6 +2,7 @@
 use crate::contact_info::{sanitize_socket, ContactInfo, Error, Protocol, SOCKET_ADDR_UNSPECIFIED};
 use {
     crate::crds_data::MAX_WALLCLOCK,
+    serde::{Deserialize, Serialize},
     solana_pubkey::Pubkey,
     solana_sanitize::{Sanitize, SanitizeError},
     solana_streamer::socket::SocketAddrSpace,

+ 0 - 3
gossip/src/lib.rs

@@ -50,9 +50,6 @@ extern crate log;
 #[macro_use]
 extern crate assert_matches;
 
-#[macro_use]
-extern crate serde_derive;
-
 #[cfg_attr(feature = "frozen-abi", macro_use)]
 #[cfg(feature = "frozen-abi")]
 extern crate solana_frozen_abi_macro;

+ 1 - 0
gossip/src/ping_pong.rs

@@ -2,6 +2,7 @@ use {
     crate::cluster_info_metrics::should_report_message_signature,
     lru::LruCache,
     rand::{CryptoRng, Rng},
+    serde::{Deserialize, Serialize},
     serde_big_array::BigArray,
     siphasher::sip::SipHasher24,
     solana_hash::Hash,

+ 1 - 1
gossip/src/protocol.rs

@@ -7,7 +7,7 @@ use {
         ping_pong::{self, Pong},
     },
     bincode::serialize,
-    serde::Serialize,
+    serde::{Deserialize, Serialize},
     solana_keypair::signable::Signable,
     solana_perf::packet::PACKET_DATA_SIZE,
     solana_pubkey::Pubkey,

+ 1 - 0
gossip/src/restart_crds_values.rs

@@ -3,6 +3,7 @@ use {
     bv::BitVec,
     itertools::Itertools,
     rand::Rng,
+    serde::{Deserialize, Serialize},
     solana_clock::Slot,
     solana_hash::Hash,
     solana_pubkey::Pubkey,

+ 0 - 1
install/Cargo.toml

@@ -28,7 +28,6 @@ reqwest = { workspace = true, features = ["blocking", "brotli", "deflate", "gzip
 scopeguard = { workspace = true }
 semver = { workspace = true }
 serde = { workspace = true }
-serde_derive = { workspace = true }
 serde_yaml = { workspace = true }
 serde_yaml_08 = { package = "serde_yaml", version = "0.8.26" }
 solana-clap-utils = { workspace = true }

+ 1 - 1
install/src/command.rs

@@ -8,7 +8,7 @@ use {
     console::{style, Emoji},
     crossbeam_channel::unbounded,
     indicatif::{ProgressBar, ProgressStyle},
-    serde_derive::{Deserialize, Serialize},
+    serde::{Deserialize, Serialize},
     solana_config_interface::{
         instruction::{self as config_instruction},
         state::get_config_data,

+ 1 - 1
install/src/config.rs

@@ -1,6 +1,6 @@
 use {
     crate::update_manifest::UpdateManifest,
-    serde_derive::{Deserialize, Serialize},
+    serde::{Deserialize, Serialize},
     solana_pubkey::Pubkey,
     std::{
         fs::{create_dir_all, File},

+ 1 - 1
install/src/update_manifest.rs

@@ -1,5 +1,5 @@
 use {
-    serde_derive::{Deserialize, Serialize},
+    serde::{Deserialize, Serialize},
     solana_hash::Hash,
     solana_keypair::signable::Signable,
     solana_pubkey::Pubkey,

+ 0 - 1
ledger-tool/Cargo.toml

@@ -35,7 +35,6 @@ rayon = { workspace = true }
 regex = { workspace = true }
 serde = { workspace = true }
 serde_bytes = { workspace = true }
-serde_derive = { workspace = true }
 serde_json = { workspace = true }
 solana-account  = { workspace = true }
 solana-account-decoder = { workspace = true }

+ 1 - 1
ledger-tool/src/main.rs

@@ -20,7 +20,7 @@ use {
     },
     dashmap::DashMap,
     log::*,
-    serde_derive::Serialize,
+    serde::Serialize,
     solana_account::{state_traits::StateMut, AccountSharedData, ReadableAccount, WritableAccount},
     solana_accounts_db::accounts_index::{ScanConfig, ScanOrder},
     solana_clap_utils::{

+ 4 - 2
ledger-tool/src/output.rs

@@ -6,8 +6,10 @@ use {
     chrono::{Local, TimeZone},
     itertools::Either,
     pretty_hex::PrettyHex,
-    serde::ser::{Impossible, SerializeSeq, SerializeStruct, Serializer},
-    serde_derive::{Deserialize, Serialize},
+    serde::{
+        ser::{Impossible, SerializeSeq, SerializeStruct, Serializer},
+        Deserialize, Serialize,
+    },
     solana_account::{AccountSharedData, ReadableAccount},
     solana_accounts_db::{
         accounts_index::{ScanConfig, ScanOrder},

+ 1 - 1
ledger-tool/src/program.rs

@@ -3,7 +3,7 @@ use {
     agave_syscalls::create_program_runtime_environment_v1,
     clap::{App, AppSettings, Arg, ArgMatches, SubCommand},
     log::*,
-    serde_derive::{Deserialize, Serialize},
+    serde::{Deserialize, Serialize},
     serde_json::Result,
     solana_account::{
         create_account_shared_data_for_test, state_traits::StateMut, AccountSharedData,

+ 0 - 1
net-utils/Cargo.toml

@@ -34,7 +34,6 @@ nix = { workspace = true, features = ["socket"] }
 pcap-file = { version = "2.0.0", optional = true }
 rand = { workspace = true }
 serde = { workspace = true }
-serde_derive = { workspace = true }
 shuttle = { workspace = true, optional = true }
 socket2 = { workspace = true }
 solana-serde = { workspace = true }

+ 1 - 1
net-utils/src/ip_echo_server.rs

@@ -1,7 +1,7 @@
 use {
     crate::{bind_to_unspecified, HEADER_LENGTH, IP_ECHO_SERVER_RESPONSE_LENGTH},
     log::*,
-    serde_derive::{Deserialize, Serialize},
+    serde::{Deserialize, Serialize},
     solana_serde::default_on_eof,
     std::{
         io,

+ 0 - 29
programs/sbf/Cargo.lock

@@ -315,7 +315,6 @@ dependencies = [
  "rayon",
  "serde",
  "serde_bytes",
- "serde_derive",
  "solana-account",
  "solana-accounts-db",
  "solana-bloom",
@@ -5739,7 +5738,6 @@ dependencies = [
  "bs58",
  "bv",
  "serde",
- "serde_derive",
  "serde_json",
  "solana-account",
  "solana-account-decoder-client-types",
@@ -5777,7 +5775,6 @@ dependencies = [
  "base64 0.22.1",
  "bs58",
  "serde",
- "serde_derive",
  "serde_json",
  "solana-account",
  "solana-pubkey",
@@ -5826,7 +5823,6 @@ dependencies = [
  "rayon",
  "seqlock",
  "serde",
- "serde_derive",
  "slab",
  "smallvec",
  "solana-account",
@@ -5946,7 +5942,6 @@ name = "solana-banks-interface"
 version = "3.1.0"
 dependencies = [
  "serde",
- "serde_derive",
  "solana-account",
  "solana-clock",
  "solana-commitment-config",
@@ -6029,7 +6024,6 @@ dependencies = [
  "fnv",
  "rand 0.8.5",
  "serde",
- "serde_derive",
  "solana-sanitize",
  "solana-time-utils",
 ]
@@ -6195,7 +6189,6 @@ version = "3.1.0"
 dependencies = [
  "dirs-next",
  "serde",
- "serde_derive",
  "serde_yaml",
  "solana-clap-utils",
  "solana-commitment-config",
@@ -6472,7 +6465,6 @@ dependencies = [
  "rustls 0.23.32",
  "serde",
  "serde_bytes",
- "serde_derive",
  "shaq",
  "slab",
  "solana-account",
@@ -6792,7 +6784,6 @@ dependencies = [
  "crossbeam-channel",
  "log",
  "serde",
- "serde_derive",
  "solana-clap-utils",
  "solana-cli-config",
  "solana-cli-output",
@@ -6970,7 +6961,6 @@ dependencies = [
  "serde",
  "serde-big-array",
  "serde_bytes",
- "serde_derive",
  "siphasher 1.0.1",
  "solana-bloom",
  "solana-clap-utils",
@@ -7399,7 +7389,6 @@ dependencies = [
  "nix",
  "rand 0.8.5",
  "serde",
- "serde_derive",
  "socket2 0.6.0",
  "solana-serde",
  "solana-svm-type-overrides",
@@ -7797,7 +7786,6 @@ dependencies = [
  "log",
  "semver",
  "serde",
- "serde_derive",
  "serde_json",
  "solana-account-decoder-client-types",
  "solana-clock",
@@ -7922,7 +7910,6 @@ dependencies = [
  "rayon",
  "regex",
  "serde",
- "serde_derive",
  "serde_json",
  "soketto",
  "solana-account",
@@ -8001,7 +7988,6 @@ dependencies = [
  "reqwest-middleware",
  "semver",
  "serde",
- "serde_derive",
  "serde_json",
  "solana-account",
  "solana-account-decoder",
@@ -8034,7 +8020,6 @@ dependencies = [
  "reqwest 0.12.23",
  "reqwest-middleware",
  "serde",
- "serde_derive",
  "serde_json",
  "solana-account-decoder-client-types",
  "solana-clock",
@@ -8068,7 +8053,6 @@ dependencies = [
  "bs58",
  "semver",
  "serde",
- "serde_derive",
  "serde_json",
  "solana-account",
  "solana-account-decoder-client-types",
@@ -8127,7 +8111,6 @@ dependencies = [
  "regex",
  "semver",
  "serde",
- "serde_derive",
  "serde_json",
  "serde_with",
  "solana-account",
@@ -8392,7 +8375,6 @@ version = "3.1.0"
 dependencies = [
  "array-bytes",
  "serde",
- "serde_derive",
  "serde_json",
  "solana-big-mod-exp",
  "solana-msg",
@@ -9326,7 +9308,6 @@ dependencies = [
  "prost",
  "prost-types",
  "serde",
- "serde_derive",
  "smpl_jwt",
  "solana-clock",
  "solana-message",
@@ -9423,7 +9404,6 @@ dependencies = [
  "percentage",
  "qualifier_attr",
  "serde",
- "serde_derive",
  "solana-account",
  "solana-clock",
  "solana-fee-structure",
@@ -9532,7 +9512,6 @@ dependencies = [
  "bincode",
  "log",
  "serde",
- "serde_derive",
  "solana-account",
  "solana-bincode",
  "solana-fee-calculator",
@@ -9618,7 +9597,6 @@ dependencies = [
  "bincode",
  "crossbeam-channel",
  "log",
- "serde_derive",
  "serde_json",
  "solana-account",
  "solana-accounts-db",
@@ -9762,7 +9740,6 @@ dependencies = [
  "bincode",
  "qualifier_attr",
  "serde",
- "serde_derive",
  "solana-account",
  "solana-instruction",
  "solana-instructions-sysvar",
@@ -9810,7 +9787,6 @@ dependencies = [
  "bs58",
  "log",
  "serde",
- "serde_derive",
  "serde_json",
  "solana-account-decoder",
  "solana-address-lookup-table-interface",
@@ -9848,7 +9824,6 @@ dependencies = [
  "bincode",
  "bs58",
  "serde",
- "serde_derive",
  "serde_json",
  "solana-account-decoder-client-types",
  "solana-commitment-config",
@@ -9989,7 +9964,6 @@ dependencies = [
  "rand 0.8.5",
  "semver",
  "serde",
- "serde_derive",
  "solana-sanitize",
  "solana-serde-varint",
 ]
@@ -10003,7 +9977,6 @@ dependencies = [
  "log",
  "rand 0.8.5",
  "serde",
- "serde_derive",
  "solana-account",
  "solana-bincode",
  "solana-clock",
@@ -10058,7 +10031,6 @@ dependencies = [
  "num-derive",
  "num-traits",
  "serde",
- "serde_derive",
  "solana-account",
  "solana-bincode",
  "solana-clock",
@@ -10200,7 +10172,6 @@ dependencies = [
  "num-traits",
  "rand 0.8.5",
  "serde",
- "serde_derive",
  "serde_json",
  "sha3",
  "solana-curve25519 3.1.0",

+ 1 - 2
programs/sbf/Cargo.toml

@@ -109,8 +109,7 @@ net2 = "0.2.37"
 num-derive = "0.4.2"
 num-traits = "0.2"
 rand = "0.8"
-serde = "1.0.112"                                                                             # must match the serde_derive version, see https://github.com/serde-rs/serde/issues/2584#issuecomment-1685252251
-serde_derive = "1.0.112"                                                                      # must match the serde version, see https://github.com/serde-rs/serde/issues/2584#issuecomment-1685252251
+serde = { version = "1.0.112", features = ["derive"] }
 serde_json = "1.0.56"
 sha2 = "0.10.8"
 sha3 = "0.10.8"

+ 0 - 1
programs/sbf/rust/big_mod_exp/Cargo.toml

@@ -14,7 +14,6 @@ crate-type = ["cdylib"]
 [dependencies]
 array-bytes = { workspace = true }
 serde = { workspace = true }
-serde_derive = { workspace = true }
 serde_json = { workspace = true }
 solana-big-mod-exp = { workspace = true }
 solana-msg = { workspace = true }

+ 1 - 1
programs/sbf/rust/big_mod_exp/src/lib.rs

@@ -6,7 +6,7 @@ use {
 };
 
 fn big_mod_exp_test() {
-    #[derive(serde_derive::Deserialize)]
+    #[derive(serde::Deserialize)]
     #[serde(rename_all = "PascalCase")]
     struct TestCase {
         base: String,

+ 0 - 1
programs/system/Cargo.toml

@@ -20,7 +20,6 @@ name = "solana_system_program"
 bincode = { workspace = true }
 log = { workspace = true }
 serde = { workspace = true }
-serde_derive = { workspace = true }
 solana-account = { workspace = true }
 solana-bincode = { workspace = true }
 solana-fee-calculator = { workspace = true }

+ 0 - 1
programs/vote/Cargo.toml

@@ -33,7 +33,6 @@ log = { workspace = true }
 num-derive = { workspace = true }
 num-traits = { workspace = true }
 serde = { workspace = true }
-serde_derive = { workspace = true }
 solana-account = { workspace = true }
 solana-bincode = { workspace = true }
 solana-clock = { workspace = true }

+ 0 - 1
pubsub-client/Cargo.toml

@@ -19,7 +19,6 @@ http = { workspace = true }
 log = { workspace = true }
 semver = { workspace = true }
 serde = { workspace = true }
-serde_derive = { workspace = true }
 serde_json = { workspace = true }
 solana-account-decoder-client-types = { workspace = true }
 solana-clock = { workspace = true }

+ 0 - 1
rpc-client-api/Cargo.toml

@@ -18,7 +18,6 @@ jsonrpc-core = { workspace = true }
 reqwest = { workspace = true, default-features = false, features = ["rustls-tls"] }
 reqwest-middleware = { workspace = true }
 serde = { workspace = true }
-serde_derive = { workspace = true }
 serde_json = { workspace = true }
 solana-account-decoder-client-types = { workspace = true }
 solana-clock = { workspace = true }

+ 1 - 0
rpc-client-api/src/custom_error.rs

@@ -2,6 +2,7 @@
 use {
     crate::response::RpcSimulateTransactionResult,
     jsonrpc_core::{Error, ErrorCode},
+    serde::{Deserialize, Serialize},
     solana_clock::Slot,
     solana_transaction_status_client_types::EncodeError,
     thiserror::Error,

+ 0 - 3
rpc-client-api/src/lib.rs

@@ -4,6 +4,3 @@ pub mod client_error;
 pub mod custom_error;
 pub mod response;
 pub use solana_rpc_client_types::{config, error_object, filter, request};
-
-#[macro_use]
-extern crate serde_derive;

+ 0 - 1
rpc-client-types/Cargo.toml

@@ -17,7 +17,6 @@ base64 = { workspace = true }
 bs58 = { workspace = true, features = ["std"] }
 semver = { workspace = true }
 serde = { workspace = true }
-serde_derive = { workspace = true }
 serde_json = { workspace = true }
 solana-account = { workspace = true }
 solana-account-decoder-client-types = { workspace = true }

+ 1 - 0
rpc-client-types/src/config.rs

@@ -1,5 +1,6 @@
 use {
     crate::filter::RpcFilterType,
+    serde::{Deserialize, Serialize},
     solana_clock::{Epoch, Slot},
 };
 pub use {

+ 1 - 1
rpc-client-types/src/error_object.rs

@@ -1,4 +1,4 @@
-#[derive(Deserialize, Debug)]
+#[derive(serde::Deserialize, Debug)]
 pub struct RpcErrorObject {
     pub code: i64,
     pub message: String,

+ 1 - 1
rpc-client-types/src/filter.rs

@@ -1,6 +1,6 @@
 use {
     base64::{prelude::BASE64_STANDARD, Engine},
-    serde::Deserialize,
+    serde::{Deserialize, Serialize},
     std::borrow::Cow,
     thiserror::Error,
 };

+ 0 - 3
rpc-client-types/src/lib.rs

@@ -5,6 +5,3 @@ pub mod error_object;
 pub mod filter;
 pub mod request;
 pub mod response;
-
-#[macro_use]
-extern crate serde_derive;

+ 1 - 0
rpc-client-types/src/request.rs

@@ -1,6 +1,7 @@
 pub use solana_address::Address;
 use {
     crate::response::RpcSimulateTransactionResult,
+    serde::{Deserialize, Serialize},
     serde_json::{json, Value},
     solana_clock::Slot,
     std::fmt,

+ 0 - 1
rpc-client/Cargo.toml

@@ -30,7 +30,6 @@ reqwest = { workspace = true, features = ["blocking", "brotli", "deflate", "gzip
 reqwest-middleware = { workspace = true }
 semver = { workspace = true }
 serde = { workspace = true }
-serde_derive = { workspace = true }
 serde_json = { workspace = true }
 solana-account = { workspace = true }
 solana-account-decoder = { workspace = true }

+ 0 - 1
rpc/Cargo.toml

@@ -40,7 +40,6 @@ log = { workspace = true }
 rayon = { workspace = true }
 regex = { workspace = true }
 serde = { workspace = true }
-serde_derive = { workspace = true }
 serde_json = { workspace = true }
 soketto = { workspace = true }
 solana-account = { workspace = true }

+ 0 - 3
rpc/src/lib.rs

@@ -20,9 +20,6 @@ pub mod transaction_status_service;
 #[macro_use]
 extern crate log;
 
-#[macro_use]
-extern crate serde_derive;
-
 #[cfg(test)]
 #[macro_use]
 extern crate serde_json;

+ 1 - 0
rpc/src/rpc_subscription_tracker.rs

@@ -1,6 +1,7 @@
 use {
     crate::rpc_subscriptions::{NotificationEntry, RpcNotification, TimestampedNotificationEntry},
     dashmap::{mapref::entry::Entry as DashEntry, DashMap},
+    serde::{Deserialize, Serialize},
     solana_account_decoder::{UiAccountEncoding, UiDataSliceConfig},
     solana_clock::Slot,
     solana_commitment_config::CommitmentConfig,

+ 0 - 1
runtime/Cargo.toml

@@ -87,7 +87,6 @@ rayon = { workspace = true }
 regex = { workspace = true }
 semver = { workspace = true }
 serde = { workspace = true, features = ["rc"] }
-serde_derive = { workspace = true }
 serde_json = { workspace = true }
 serde_with = { workspace = true }
 shuttle = { workspace = true, optional = true }

+ 1 - 1
runtime/src/bank.rs

@@ -68,7 +68,7 @@ use {
     log::*,
     partitioned_epoch_rewards::PartitionedRewardsCalculation,
     rayon::{ThreadPool, ThreadPoolBuilder},
-    serde::Serialize,
+    serde::{Deserialize, Serialize},
     solana_account::{
         create_account_shared_data_with_fields as create_account, from_account, Account,
         AccountSharedData, InheritableAccountFields, ReadableAccount, WritableAccount,

+ 3 - 2
runtime/src/bank/bank_hash_details.rs

@@ -5,8 +5,9 @@ use {
     base64::{prelude::BASE64_STANDARD, Engine},
     log::*,
     serde::{
-        de::{self, Deserialize, Deserializer},
-        ser::{Serialize, SerializeSeq, Serializer},
+        de::{self, Deserializer},
+        ser::{SerializeSeq, Serializer},
+        Deserialize, Serialize,
     },
     solana_account::{Account, AccountSharedData, ReadableAccount},
     solana_clock::Slot,

+ 1 - 0
runtime/src/bank/partitioned_epoch_rewards/distribution.rs

@@ -11,6 +11,7 @@ use {
         stake_account::StakeAccount,
     },
     log::error,
+    serde::{Deserialize, Serialize},
     solana_account::{state_traits::StateMut, AccountSharedData, ReadableAccount, WritableAccount},
     solana_accounts_db::stake_rewards::StakeReward,
     solana_measure::measure_us,

+ 1 - 1
runtime/src/bank/serde_snapshot.rs

@@ -350,7 +350,7 @@ mod tests {
             derive(AbiExample),
             frozen_abi(digest = "HxmFy4D1VFmq91rp4PDAMsunMnwxqdeQ2CNyaNkStnEw")
         )]
-        #[derive(Serialize)]
+        #[derive(serde::Serialize)]
         pub struct BankAbiTestWrapper {
             #[serde(serialize_with = "wrapper")]
             bank: PhantomData<Bank>,

+ 5 - 2
runtime/src/commitment.rs

@@ -1,6 +1,9 @@
 use {
-    solana_clock::Slot, solana_commitment_config::CommitmentLevel,
-    solana_vote_program::vote_state::MAX_LOCKOUT_HISTORY, std::collections::HashMap,
+    serde::{Deserialize, Serialize},
+    solana_clock::Slot,
+    solana_commitment_config::CommitmentLevel,
+    solana_vote_program::vote_state::MAX_LOCKOUT_HISTORY,
+    std::collections::HashMap,
 };
 
 pub const VOTE_THRESHOLD_SIZE: f64 = 2f64 / 3f64;

+ 0 - 2
runtime/src/lib.rs

@@ -41,8 +41,6 @@ pub mod vote_sender_types;
 
 #[macro_use]
 extern crate solana_metrics;
-#[macro_use]
-extern crate serde_derive;
 
 #[cfg_attr(feature = "frozen-abi", macro_use)]
 #[cfg(feature = "frozen-abi")]

+ 1 - 1
runtime/src/rent_collector.rs

@@ -4,7 +4,7 @@ use {
 };
 
 #[cfg_attr(feature = "frozen-abi", derive(solana_frozen_abi_macro::AbiExample))]
-#[derive(Clone, Debug, PartialEq, serde_derive::Deserialize, serde_derive::Serialize)]
+#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
 pub struct RentCollector {
     pub epoch: Epoch,
     pub epoch_schedule: EpochSchedule,

+ 1 - 0
runtime/src/serde_snapshot/status_cache.rs

@@ -7,6 +7,7 @@ use std::sync::Mutex;
 use {
     crate::{bank::BankSlotDelta, snapshot_utils, status_cache::KeySlice},
     bincode::{self, Options as _},
+    serde::{Deserialize, Serialize},
     solana_clock::Slot,
     solana_hash::Hash,
     solana_instruction::error::InstructionError,

+ 1 - 1
runtime/src/serde_snapshot/types.rs

@@ -3,7 +3,7 @@ use {solana_accounts_db::accounts_hash::AccountsLtHash, solana_lattice_hash::lt_
 /// Snapshot serde-safe AccountsLtHash
 #[cfg_attr(feature = "frozen-abi", derive(AbiExample))]
 #[serde_with::serde_as]
-#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)]
+#[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)]
 pub struct SerdeAccountsLtHash(
     // serde only has array support up to 32 elements; anything larger needs to be handled manually
     // see https://github.com/serde-rs/serde/issues/1937 for more information

+ 1 - 0
runtime/src/stake_history.rs

@@ -2,6 +2,7 @@
 //! unnecessary cloning of the underlying vector.
 pub use solana_stake_interface::stake_history::StakeHistoryGetEntry;
 use {
+    serde::{Deserialize, Serialize},
     solana_clock::Epoch,
     solana_stake_interface::stake_history::{self, StakeHistoryEntry},
     std::{

+ 1 - 0
runtime/src/stakes.rs

@@ -8,6 +8,7 @@ use {
     log::error,
     num_derive::ToPrimitive,
     rayon::{prelude::*, ThreadPool},
+    serde::{Deserialize, Serialize},
     solana_account::{AccountSharedData, ReadableAccount},
     solana_clock::Epoch,
     solana_pubkey::Pubkey,

+ 0 - 1
storage-bigtable/Cargo.toml

@@ -36,7 +36,6 @@ openssl = { workspace = true, features = ["vendored"] }
 prost = { workspace = true }
 prost-types = { workspace = true }
 serde = { workspace = true }
-serde_derive = { workspace = true }
 smpl_jwt = { workspace = true }
 solana-clock = { workspace = true }
 solana-message = { workspace = true }

+ 1 - 1
storage-bigtable/src/compression.rs

@@ -3,7 +3,7 @@ use {
     std::io::{self, BufReader, Read, Write},
 };
 
-#[derive(Debug, Serialize, Deserialize, Sequence)]
+#[derive(Debug, serde::Serialize, serde::Deserialize, Sequence)]
 pub enum CompressionMethod {
     NoCompression,
     Bzip2,

+ 0 - 3
storage-bigtable/src/lib.rs

@@ -38,9 +38,6 @@ use {
 #[macro_use]
 extern crate solana_metrics;
 
-#[macro_use]
-extern crate serde_derive;
-
 mod access_token;
 mod bigtable;
 mod compression;

+ 0 - 1
svm/Cargo.toml

@@ -40,7 +40,6 @@ log = { workspace = true }
 percentage = { workspace = true }
 qualifier_attr = { workspace = true, optional = true }
 serde = { workspace = true, features = ["rc"] }
-serde_derive = { workspace = true }
 solana-account = { workspace = true }
 solana-clock = { workspace = true }
 solana-fee-structure = { workspace = true }

+ 2 - 2
svm/src/message_processor.rs

@@ -131,7 +131,7 @@ mod tests {
 
     #[test]
     fn test_process_message_readonly_handling() {
-        #[derive(serde_derive::Serialize, serde_derive::Deserialize)]
+        #[derive(serde::Serialize, serde::Deserialize)]
         enum MockSystemInstruction {
             Correct,
             TransferLamports { lamports: u64 },
@@ -350,7 +350,7 @@ mod tests {
 
     #[test]
     fn test_process_message_duplicate_accounts() {
-        #[derive(serde_derive::Serialize, serde_derive::Deserialize)]
+        #[derive(serde::Serialize, serde::Deserialize)]
         enum MockSystemInstruction {
             BorrowFail,
             MultiBorrowMut,

Неке датотеке нису приказане због велике количине промена