Commit Graph

263 Commits

Author SHA1 Message Date
e146e860e2 Add convenience function for programs to get minimum delegation (#24175) 2022-04-13 14:41:52 -05:00
37497657c6 assert-type-assumptions (#23996) 2022-03-30 08:28:49 -07:00
c4ecfa5716 Bump version to v1.11 (#23807)
* Revert crossbeam_epoch to stable. 0.9.8 only works with nightly
* Remove unneeded unit expression
2022-03-21 17:40:50 -05:00
848093b9fd Fix typo in processor.rs (#23786)
relavant -> relevant
2022-03-19 15:24:40 -05:00
2f58c9e501 Bump version to 1.10.4 (#23743) 2022-03-17 14:02:13 -05:00
b4350a2522 Make solana-address-lookup-table-program crate bpf compatible (#23700) 2022-03-17 08:21:07 +08:00
63bf0f66af Bump version to 1.10.3 (#23648) 2022-03-14 11:18:45 -05:00
7ee7fc6f58 CI clippy and fmt for all (#23599) 2022-03-11 12:07:06 -08:00
b444836a97 Bump version to 1.10.2 (#23597) 2022-03-10 16:41:06 -06:00
97d40ba3da Resized accounts must be rent exempt 2022-03-02 13:02:02 -08:00
1a99251498 Bump version to 1.10.1 (#23453) 2022-03-02 13:47:01 -06:00
c97f34a0fd Add script for running nightly rustfmt on all workspaces (#23244)
* Add script for running nightly rustfmt on all workspaces

* invalidate ci cache
2022-02-22 11:59:06 +08:00
7e08ae1d0c Revert "Add simulation detection countermeasure (#22880)" (#23261)
This reverts commit c42b80f099.
2022-02-21 21:15:37 +00:00
c42b80f099 Add simulation detection countermeasure (#22880)
* Add simulation detection countermeasures

* Add program and test using TestValidator

* Remove incinerator deposit

* Remove incinerator

* Update Cargo.lock

* Add more features to simulation bank

* Update Cargo.lock per rebase

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2022-02-15 13:09:59 +01:00
ab02dba96f Add get_processed_sibling_instruction syscall (#22859) 2022-02-02 16:45:57 -08:00
a71f05f86c Fix CPI duplicate account privilege escalation (#22752)
* Adds TEST_DUPLICATE_PRIVILEGE_ESCALATION_SIGNER and TEST_DUPLICATE_PRIVILEGE_ESCALATION_WRITABLE.

* Moves CPI privilege verification out of deduplication loop.
2022-01-28 00:52:02 +01:00
bb3a1b6b31 Add zk_token_sdk_enabled feature to gate Zk Token proof program and sol_zk_token_elgamal_op syscalls 2022-01-05 11:57:37 -08:00
ec7536faf6 Add test to enforce that program id account info for CPI is optional (#22069)
* 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
2021-12-24 00:43:15 +01:00
ba8e15848e Fix #21986 (#22035)
* Partial revert "Updates documentation around what needs to be passed in CPI. (#21633)"

* Enforces the program_id being passed explicitly by removing it from get_instruction_keyed_accounts().

* instruction_accounts => instructions_account
2021-12-21 12:53:22 +01:00
c5c699a918 Remove the 5 integer msg! form 2021-12-11 09:37:11 -08:00
d6f22433d0 Bump version to v1.10.0 2021-12-04 20:17:54 +00:00
dd12d90eac Upgrade to Rust 2021 2021-11-30 20:43:46 -08:00
e540b1cf3c Refactor: Move sdk::process_instruction in program-runtime-crate (#21180)
* Moves the Executor dyn Trait to instruction_processor.rs

* Moves the Logger dyn Trait as well as the ic_msg and ic_logger_msg macros to log_collector.rs,
and moves the stable_log to stable_log.rs

* Moves the ComputeMeter dyn Trait to invoke_context.rs

* Moves the InvokeContext dyn Trait and the ProcessInstructionWithContext type to invoke_context.rs

* Updates cargo files.

* Re-export InvokeContext in program-test

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2021-11-17 19:35:07 +01:00
346cb9a275 Add sanity test to verify floating point std math lib works for BPF (#21013)
On-chain programs frequently require floating point operations. In
addition standard library functions are expected to be available.
This change adds a simple sanity check that such functions are
available and work correctly when compiled to BPF.
2021-11-03 00:09:58 +00:00
e16c060abf nit: better rust (#21058) 2021-10-28 17:13:42 -07:00
53358ab1aa fix account index (#21041) 2021-10-28 09:03:47 -07:00
4fe3354c8f Instruction sysvar fixes, additions (#20958) 2021-10-26 13:07:40 -07:00
a8098f37d0 add checked instructions sysvar api (#20790) 2021-10-19 21:01:58 -07:00
d9b0fc0e3e Remove @brief annotations from Rust API docs (#20769) 2021-10-19 15:48:15 -06:00
13462d63a2 solana-sdk now builds for wasm32-unknown-unknown 2021-10-13 13:15:33 -07:00
46230185c2 Add test to ensure instructions sysvar behaves as expected from within a CPI 2021-10-11 19:32:20 -07:00
767f740305 Bump version to 1.9.0 2021-10-06 17:57:41 -07:00
3b70cdb8d8 Upgrade to Rust 1.55.0 2021-10-06 17:48:58 -07:00
66e6110f5a Fix return data too large test 2021-09-30 10:53:49 +01:00
037c9f571e Improve test maintainability (#20318) 2021-09-29 13:13:10 -07:00
8fee9a2e1a Dont call precompiled programs (#19930) 2021-09-29 06:25:08 +00:00
4e27543415 Allow programs to realloc their accounts within limits (#19475) 2021-09-28 01:13:03 -07:00
d714cf659c Proposal: log binary data for Solidity
The program_id is not needed on "Program return data: " because it
always preceeded by the program invoke message, so no need to repeat
the program id. Also rename this to "Program return: " since "data"
is redundant.
2021-09-22 07:59:06 +01:00
098585234d Add return data implementation
This consists of:
 - syscalls
 - passing return data from invoked to invoker
 - printing to stable log
 - rust and C SDK changes
2021-09-10 14:25:54 +01:00
529fefc7cc Remove native id check in pda creation (#19595) 2021-09-07 14:44:52 -07:00
c52d3736e8 Clean up feature set entries (#19427)
* Clean up feature set entries

* fix test

* bump
2021-08-25 13:57:27 -07:00
3e5ba8dcaa bug: sysvar::Instructions is not owned by Sysvar1111111111111111111111111111111111111 (#19242)
* Fix instructions sysvar owner

* Update feature switch address

Co-authored-by: Justin Starry <justin@solana.com>
2021-08-20 08:32:28 -07:00
9dfeee2993 Add BPF Sanity program-test based test (#19159) 2021-08-11 12:07:15 -07:00
bb275350c7 Remove unused import (#19015) 2021-08-02 10:45:55 -06:00
77861e2d40 Feature disable fees sysvar (#18981)
* Feature disable fees sysvar

* nudge
2021-08-02 00:31:11 +00:00
0247c280ff Run BPF program unit tests (#18982) 2021-07-30 15:15:06 -07:00
dfbb0c559b deprecate fees sysvar (#18960) 2021-07-29 10:48:14 -07:00
14f0ce850d chore: bump blake3 from 0.3.8 to 1.0.0 (#18908)
* chore: bump blake3 from 0.3.8 to 1.0.0

Bumps [blake3](https://github.com/BLAKE3-team/BLAKE3) from 0.3.8 to 1.0.0.
- [Release notes](https://github.com/BLAKE3-team/BLAKE3/releases)
- [Commits](https://github.com/BLAKE3-team/BLAKE3/compare/0.3.8...1.0.0)

---
updated-dependencies:
- dependency-name: blake3
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Make versions consistent

* Enable new feature

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-07-27 17:55:21 -06:00
72e374d0f3 Deprecate SysvarRecentBlockhashes (#18875) 2021-07-27 16:34:21 -07:00
1f288ce527 Add ecrecover syscall (#17720)
Co-authored-by: Anton Lisanin <lisanin.anton@gmail.com>
2021-07-07 13:15:14 -07:00