solana/sdk/program/src
Jarred Nicholls 4da435f2a0 Avoid entropy sources when constructing a solana_program::message::Message.
The solana-program crate can be used in certain embedded environments (HSMs) where
the source of entropy, whether used for cryptographic purposes or not, is tightly
controlled. In these cases, using the default OS source of entrophy is not always
acceptable. Thus, using the default Rust stdlib entropy source for seeding its
default hasher, is prohibited. This means any use of HashMap/HashSet must be able
to be constructed and used with a custom hasher implementation.

This commit removes the use of Itertools::unique() to dedupe Instructions that are
being compiled into a new Message, which uses a default-configured HashMap
under-the-hood. Instead, we use a BTreeSet which does not invoke any entropy
source in order to seed a hash implementation.
2021-12-07 19:19:01 -08:00
..
message Avoid entropy sources when constructing a solana_program::message::Message. 2021-12-07 19:19:01 -08:00
nonce Reformat imports to a consistent style for imports 2021-12-03 09:19:13 -08:00
stake Reformat imports to a consistent style for imports 2021-12-03 09:19:13 -08:00
sysvar Reformat imports to a consistent style for imports 2021-12-03 09:19:13 -08:00
account_info.rs Remove dependency on `hex` (#21567) 2021-12-03 20:53:35 -07:00
atomic_u64.rs Support building solana-program on 32-bit architectures that do not (#21577) 2021-12-03 01:18:21 +00:00
blake3.rs Reformat imports to a consistent style for imports 2021-12-03 09:19:13 -08:00
borsh.rs Update to Rust 1.56.1 2021-11-30 23:28:07 -08:00
bpf_loader.rs Remove @brief annotations from Rust API docs (#20769) 2021-10-19 15:48:15 -06:00
bpf_loader_deprecated.rs Remove @brief annotations from Rust API docs (#20769) 2021-10-19 15:48:15 -06:00
bpf_loader_upgradeable.rs Reformat imports to a consistent style for imports 2021-12-03 09:19:13 -08:00
clock.rs Handle removing slots during account scans (#17471) 2021-06-14 21:04:01 -07:00
debug_account_data.rs Remove dependency on `hex` (#21567) 2021-12-03 20:53:35 -07:00
decode_error.rs Reformat imports to a consistent style for imports 2021-12-03 09:19:13 -08:00
ed25519_program.rs feat: add ed25519 signature verify program 2021-09-05 18:59:37 +01:00
entrypoint.rs Reformat imports to a consistent style for imports 2021-12-03 09:19:13 -08:00
entrypoint_deprecated.rs Reformat imports to a consistent style for imports 2021-12-03 09:19:13 -08:00
epoch_schedule.rs SDK: Ovf in epoch_schedule 2021-03-17 22:23:18 -06:00
feature.rs Reformat imports to a consistent style for imports 2021-12-03 09:19:13 -08:00
fee_calculator.rs Reformat imports to a consistent style for imports 2021-12-03 09:19:13 -08:00
hash.rs Reformat imports to a consistent style for imports 2021-12-03 09:19:13 -08:00
incinerator.rs
instruction.rs Reformat imports to a consistent style for imports 2021-12-03 09:19:13 -08:00
keccak.rs Reformat imports to a consistent style for imports 2021-12-03 09:19:13 -08:00
lamports.rs Reformat imports to a consistent style for imports 2021-12-03 09:19:13 -08:00
lib.rs Remove dependency on `hex` (#21567) 2021-12-03 20:53:35 -07:00
loader_instruction.rs Deprecate Instruction::new (#15695) 2021-03-04 05:46:48 +00:00
loader_upgradeable_instruction.rs Allow closing upgradeable program accounts (#19319) 2021-08-24 10:05:54 -07:00
log.rs Remove @brief annotations from Rust API docs (#20769) 2021-10-19 15:48:15 -06:00
native_token.rs sdk/program: switch allow to mod-level for integer_arithmetic lint 2021-03-17 22:23:18 -06:00
program.rs Updates documentation around what needs to be passed in CPI. (#21633) 2021-12-06 21:20:16 +01:00
program_error.rs Reformat imports to a consistent style for imports 2021-12-03 09:19:13 -08:00
program_memory.rs Remove @brief annotations from Rust API docs (#20769) 2021-10-19 15:48:15 -06:00
program_option.rs Fix typo in program_option.rs (#21444) 2021-11-26 05:52:21 -06:00
program_pack.rs Upgrade to Rust v1.49.0 2021-01-23 19:16:36 -08:00
program_stubs.rs Fix incorrect nonoverlapping test in sol_memcpy (#21007) 2021-12-06 09:26:46 -08:00
pubkey.rs Rework docs for Pubkey::find_program_address and friends (#21528) 2021-12-06 17:00:50 +00:00
rent.rs test-validator: hold rent constant with `--slots-per-epoch` 2021-06-30 00:46:12 -06:00
sanitize.rs
secp256k1_program.rs
secp256k1_recover.rs Reformat imports to a consistent style for imports 2021-12-03 09:19:13 -08:00
serialize_utils.rs Reformat imports to a consistent style for imports 2021-12-03 09:19:13 -08:00
short_vec.rs Reformat imports to a consistent style for imports 2021-12-03 09:19:13 -08:00
slot_hashes.rs Reformat imports to a consistent style for imports 2021-12-03 09:19:13 -08:00
slot_history.rs Reformat imports to a consistent style for imports 2021-12-03 09:19:13 -08:00
stake_history.rs Reformat imports to a consistent style for imports 2021-12-03 09:19:13 -08:00
system_instruction.rs Reformat imports to a consistent style for imports 2021-12-03 09:19:13 -08:00
system_program.rs