Commit Graph

12 Commits

Author SHA1 Message Date
Brooks Prumo d1ba42180d
clippy for rust 1.65.0 (#28765) 2022-11-09 19:39:38 +00:00
0xripleys 5de4dd8f9b
Add SetAuthorityChecked instruction to bpf loader (#28424)
* SetAuthorityChecked

* restore old logic for loader

* add more upgrade authority checked test cases

* setBufferAuthority checked tests

* format

* add set_buffer_authority_checked instruction to sdk

* Update transaction-status/src/parse_bpf_loader.rs

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>

* add is_set_authority_checked function

* fix set_buffer_authority_checked sdk instruction

* feature gate setAuthorityChecked

* add bpf loader tests for setAuthorityChecked ixs

* test that you can set to same authority

* allow set_authority_checked to be called via cpi (if feature is enabled)

* fix ci

* fmt

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>
Co-authored-by: Justin Starry <justin@solana.com>
2022-11-01 08:34:04 +00:00
Alexander Meißner 30b0a13ba9
Bump solana_rbpf to 0.2.34 (#28198)
* Bumps solana_rbpf to 0.2.34

* Removes generic UserError from EbpfError.

* Uses ProgramResult for syscalls.
Removes use sites of the question_mark! macro by wrapping the call method of SyscallObjects.

* Uses InvokeContext as syscall context object directly.

* Replaces bind_syscall_context_object() by a parameter in the constructor.

* Inlines bind_syscall_context_objects() at its only call site.
2022-10-06 20:31:58 +02:00
Alessandro Decina b9f4c8e3c0
BorrowedAccount: add set_data_from_slice(), make set_data() take owned values (#27836)
* BorrowedAccount: add set_data_from_slice(), make set_data() take owned values

set_data() used to take a slice and would force alloc+copy if the caller
has owned values (eg account creation, account lookup table).

Expose set_data_from_slice() for callers that have slices, and switch
set_data() to taking an owned Vec.

* BorrowAccount: refactor common accounts_update_delta code in helper method

* BorrowedAccount: add extend_from_slice()

This allows avoiding copies appending entries to account lookup tables.

* BorrowedAccount: remove unnecessary ifs around update_accounts_resize_delta
2022-09-24 01:37:02 +01:00
Justin Starry b9700244b5
Increase transaction account lock limit from 64 to 128 (#27242)
* Increase transaction account lock limit from 64 to 256

* fix bpf test

* Reduce lock limit from 256 to 128
2022-09-15 13:50:14 -04:00
Alexander Meißner 12d2147efa
Adds `IndexOfAccount` type (#27599)
Adds the type `IndexOfAccount`.
2022-09-06 11:31:40 +02:00
Justin Starry 7d765e3d67
clean feature: `prevent_calling_precompiles_as_programs` (#27100)
* clean feature: prevent_calling_precompiles_as_programs

* fix tests

* fix test

* remove comment

* fix test

* feedback
2022-08-18 05:21:16 +00:00
Alexander Meißner 85a679b098
Feature: disable CPI setting `is_executable` and `rent_epoch` (#26987)
* Adds the feature disable_cpi_setting_executable_and_rent_epoch.

* Adds the feature gate for disable_cpi_setting_executable_and_rent_epoch.

* Removes TEST_EXECUTABLE_LAMPORTS.

* Test that is_executable and rent_epoch are ignored.
2022-08-10 00:22:23 +02:00
Justin Starry 2335f6908a
Loosen CPI restrictions and charge compute for ix data len (#26653)
* Loosen CPI restrictions and charge compute for ix data len

* Address feedback

* use explicit casting

* more feedback
2022-07-24 20:20:16 +02:00
Alexander Meißner 36cfa78fa0
Removes `serialized_len_ptr` from `CallerAccount`. (#26737)
Removes serialized_len_ptr from CallerAccount.
2022-07-22 16:10:14 +02:00
Justin Starry ca4d917081 Fix clippy warning 2022-07-17 12:23:03 +02:00
Justin Starry 07d7c938b9
Refactor: split up syscalls module (#26637)
* Refactor: split up syscalls module

* fix ci script

* fix visibility
2022-07-16 19:33:57 +02:00