Tyera Eulberg
39a4cc95dc
v1.9: Impl get_/set_return_data syscalls for ProgramTest ( #22652 )
...
* Remove &mut self from set_return_data
* Impl get_/set_return_data for program-test SyscallStubs
* Add return_data program-test
2022-01-21 18:03:27 -07:00
mergify[bot]
2ddb5b27c1
Refactor: move instructions sysvar serialization out of Message ( #22544 ) ( #22595 )
...
(cherry picked from commit 7ba57e7a7c
)
Co-authored-by: Justin Starry <justin@solana.com >
2022-01-21 13:45:47 +08:00
mergify[bot]
9d69f2b324
Bank::get_fee_for_message
is now nonce aware (backport #22494 ) ( #22499 )
...
* `Bank::get_fee_for_message` is now nonce aware
(cherry picked from commit 4c577d7f8c
)
# Conflicts:
# runtime/src/bank.rs
# sdk/program/src/message/sanitized.rs
* Resolve conflicts
Co-authored-by: Michael Vines <mvines@gmail.com >
2022-01-14 03:25:10 +00:00
mergify[bot]
a9ebba5643
Clarify docs of minimum_balance
( #22385 ) ( #22387 )
...
(cherry picked from commit 0f94e1d3a2
)
Co-authored-by: Evan Conrad <evan@roomservice.dev >
2022-01-08 20:07:57 +00:00
Justin Starry
1f00926874
Add runtime support for address table lookups (backport #22223 ) ( #22354 )
2022-01-08 07:57:04 +08:00
mergify[bot]
687cd4779e
Add AccountsDataMeter to InvokeContext ( #21813 ) ( #22299 )
...
(cherry picked from commit 800472ddf5
)
Co-authored-by: Brooks Prumo <brooks@solana.com >
2022-01-06 01:31:11 +00:00
mergify[bot]
09dbf069e8
Add test to enforce that program id account info for CPI is optional ( #22069 ) ( #22103 )
...
* Update tests to demonstrate that program id account info for CPI is optional
* Clean up comments that say that program id account info is required
(cherry picked from commit ec7536faf6
)
Co-authored-by: Justin Starry <justin@solana.com >
2022-01-04 21:47:48 +00:00
mergify[bot]
3b59f67562
Limit number of accounts that a transaction can lock (backport #22201 ) ( #22263 )
...
* Limit number of accounts that a transaction can lock (#22201 )
(cherry picked from commit 2b5e00d36d
)
# Conflicts:
# accountsdb-plugin-postgres/src/postgres_client/postgres_client_transaction.rs
# runtime/src/accounts.rs
# runtime/src/bank.rs
# sdk/src/feature_set.rs
# sdk/src/transaction/error.rs
# storage-proto/proto/transaction_by_addr.proto
# storage-proto/src/convert.rs
* resolve conflicts
Co-authored-by: Justin Starry <justin@solana.com >
2022-01-04 11:34:34 +00:00
mergify[bot]
f4521002b9
Clean up demote program write lock feature (backport #21949 ) ( #21969 )
...
* Clean up demote program write lock feature (#21949 )
* Clean up demote program write lock feature
* fix test
(cherry picked from commit 6ff0be6a82
)
# Conflicts:
# programs/bpf_loader/src/syscalls.rs
# runtime/src/accounts.rs
* resolve conflicts
Co-authored-by: Justin Starry <justin@solana.com >
2021-12-17 04:45:22 +00:00
mergify[bot]
2246135654
Document solana_program::instruction ( #21817 ) ( #21906 )
...
* Document solana_program::instruction
* Apply suggestions from code review
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
(cherry picked from commit dcb5849484
)
Co-authored-by: Brian Anderson <andersrb@gmail.com >
2021-12-15 00:55:56 +00:00
Michael Vines
c1f54c22ed
Remove the 5 integer msg! form
...
(cherry picked from commit c5c699a918
)
2021-12-11 12:47:43 -08:00
mergify[bot]
5bf4445ae6
Add address lookup table program (backport #21616 ) ( #21789 )
...
* Add address lookup table program (#21616 )
* Add address lookup table program
* feedback
(cherry picked from commit 9b41ddd9ba
)
# Conflicts:
# runtime/Cargo.toml
* resolve conflicts
Co-authored-by: Justin Starry <justin@solana.com >
2021-12-11 05:26:46 +00:00
mergify[bot]
2a6bb2b954
Migrate from address maps to address lookup tables ( #21634 ) ( #21773 )
...
* Migrate from address maps to address lookup tables
* update sanitize error
* cargo fmt
* update abi
(cherry picked from commit 6c108c8fc3
)
Co-authored-by: Justin Starry <justin@solana.com >
2021-12-10 18:10:37 +00:00
mergify[bot]
abecf292a3
Expand docs for Pubkey::create_program_address ( #21750 ) ( #21759 )
...
* Expand docs for Pubkey::create_program_address
* Update sdk/program/src/pubkey.rs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
(cherry picked from commit 6919c4863b
)
Co-authored-by: Brian Anderson <andersrb@gmail.com >
2021-12-10 11:23:54 -05:00
Michael Vines
b0754cc575
Add initial wasm bindings for Instruction
, SystemProgram
and Transaction
...
(cherry picked from commit a35df1cb02
)
2021-12-09 18:41:47 -08:00
Michael Vines
effd0b2547
Add wasm bindings for Hash
...
(cherry picked from commit 03a956e8d9
)
2021-12-09 18:41:47 -08:00
Michael Vines
8836069719
Add wasm bindings for Pubkey
and Keypair
...
(cherry picked from commit 488dc37fec
)
2021-12-09 18:41:47 -08:00
Jarred Nicholls
cabd851904
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.
(cherry picked from commit 4da435f2a0
)
2021-12-07 22:36:21 -08:00
mergify[bot]
58c755e1d4
Rework docs for Pubkey::find_program_address and friends ( #21528 ) ( #21637 )
...
* Rework docs for Pubkey::find_program_address and friends
* Remove circular dependency
* Minor tweaks
* Apply suggestions from code review
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
* Sort solana-program dev-dependencies
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
(cherry picked from commit d1c101cde2
)
Co-authored-by: Brian Anderson <andersrb@gmail.com >
2021-12-06 19:04:35 +00:00
fee1-dead
c4a9c8b5e9
Remove dependency on hex
( #21567 )
...
* Remove dependency on `hex`
* Update lock file
* Use `debug_struct` instead of own format
* Share code, add test, and fix rent_epoch spelling
Co-authored-by: Tyera Eulberg <tyera@solana.com >
2021-12-03 20:53:35 -07:00
Michael Vines
b8837c04ec
Reformat imports to a consistent style for imports
...
rustfmt.toml configuration:
imports_granularity = "One"
group_imports = "One"
2021-12-03 09:19:13 -08:00
Jarred Nicholls
18a16ad956
Support building solana-program on 32-bit architectures that do not ( #21577 )
...
have 64-bit atomics by using a Mutex<u64> on 32-bit architectures.
Currently the usage of atomics are only in functions that support
tests and benchmarks.
2021-12-03 01:18:21 +00:00
Brooks Prumo
cb368e6554
Pass Epoch by value in StakeHistory::get() ( #21523 )
2021-12-01 08:57:29 -06:00
Ikko Ashimine
1f13fd64bd
Fix typo in system_instruction.rs ( #21539 )
...
Uninitalized -> Uninitialized
2021-12-01 06:31:12 -05:00
Michael Vines
e922c2da9d
Update to Rust 1.56.1
2021-11-30 23:28:07 -08:00
Michael Vines
dd12d90eac
Upgrade to Rust 2021
2021-11-30 20:43:46 -08:00
Michael Vines
098dba607a
Fix more BPF alignment issues on arm64
2021-11-30 18:17:44 -08:00
Ikko Ashimine
4b67a6900d
Fix typo in program_option.rs ( #21444 )
...
accross -> across
2021-11-26 05:52:21 -06:00
Jack May
03c36d240a
Nonce naming cleanup ( #21336 )
2021-11-18 16:07:17 -08:00
Kirill Fomichev
1a7cefded7
Fix authority in bpf_loader_upgradeable::close_any ( #21344 )
2021-11-18 15:53:14 -08:00
carllin
b30c94ce55
ClusterInfoVoteListener send only missing votes to BankingStage ( #20873 )
2021-11-18 15:20:41 -08:00
Ben Newhouse
7e600bd451
Fix BPF parameter alignment to work regardless of target ABI ( #21271 )
2021-11-16 16:02:22 +01:00
Kirill Fomichev
d8a392c20b
add new macro: pubkey!
( #21245 )
...
* add new macro: `pubkey!`
* fmt
2021-11-15 11:22:51 -08:00
Alexander Meißner
29ad081555
Stop caching sysvars, instead load them ahead of time. ( #21108 )
2021-11-04 09:48:34 +01:00
Jack May
bced07a099
Update fee api to use blockhash ( #21054 )
2021-10-29 13:52:59 -07:00
Brian Anderson
62c8fb4792
Document next_account_info(s) ( #21076 )
2021-10-29 14:17:21 -06:00
Brian Anderson
ced1505b75
Document entrypoint!
, custom_heap_default!
, and custom_panic_default!
( #21003 )
2021-10-26 22:48:10 -07:00
Jack May
4fe3354c8f
Instruction sysvar fixes, additions ( #20958 )
2021-10-26 13:07:40 -07:00
Jack May
2515f6a04f
Update deprecation versions ( #20959 )
2021-10-26 09:06:41 -07:00
Eugene Lomov
edf5bc242c
Fixed bug in AccountInfo::serialize()
...
Closes #20917
2021-10-23 17:25:04 -07:00
Jack May
bfbbc53dac
Divorce the runtime from FeeCalculator ( #20737 )
2021-10-22 14:32:40 -07:00
Brian Anderson
64e4bbf829
Fix weird attribute order
2021-10-21 18:40:44 -07:00
Jack May
a8098f37d0
add checked instructions sysvar api ( #20790 )
2021-10-19 21:01:58 -07:00
Brian Anderson
d9b0fc0e3e
Remove @brief annotations from Rust API docs ( #20769 )
2021-10-19 15:48:15 -06:00
Jon Cinque
dc1b8ddea1
stake: Add BorshSerialize
trait to structs ( #20784 )
2021-10-19 20:10:15 +02:00
Michael Vines
2b76ea51b4
Reduce visibility of Hash
struct contents
2021-10-19 09:30:47 -07:00
Jack May
4beabb3a43
charge for ed25519 sig verifies ( #20639 )
2021-10-14 08:52:59 -07:00
Michael Vines
13462d63a2
solana-sdk now builds for wasm32-unknown-unknown
2021-10-13 13:15:33 -07:00
Jack May
da45be366a
Remove blockhash from fee calculation ( #20641 )
2021-10-13 13:10:58 -07:00
Jack May
c231cfe235
Reduce budget request instruction length ( #20636 )
2021-10-12 20:56:24 -07:00