Commit Graph

346 Commits

Author SHA1 Message Date
Jack May
7fc4cfebc8 Rename BpfComputeBudget (#18768) 2021-07-22 10:18:51 -07:00
Trent Nelson
abe5a0a349 gate libsecp256k1 upgrade to v0.5.0 2021-07-15 18:43:55 +00:00
Ryo Onodera
f96de208e2 Implement MockInvokeContext::is_feature_active properly 2021-07-09 09:08:38 -07:00
Ryo Onodera
f029af0fca Remove sysvar special cases for rent and assign 2021-07-09 09:08:38 -07:00
Jack May
2867584985 Bump compute budget for neon evm (#17700) 2021-07-08 10:43:34 -07:00
s-medvedev
1f288ce527 Add ecrecover syscall (#17720)
Co-authored-by: Anton Lisanin <lisanin.anton@gmail.com>
2021-07-07 13:15:14 -07:00
Alexander Meißner
8d5c04e257 Bump solana_rbpf to version 0.2.13 (#18068)
* Moves syscall_registry into the rbpf Executable constructor.

* Adds the reject_unresolved_syscalls flag which is only set when deploying programs via the CLI.
2021-07-07 09:50:11 +02:00
Justin Starry
100fabf469 Remove feature switch for demoting sysvar write locks (#18373) 2021-07-06 21:22:22 +00:00
Alexander Meißner
7462c27d07 Refactoring: Unify account_deps and accounts (#17898)
* Changes ThisInvokeContext::get_account() to use accounts instead of pre_accounts.

* Adds explicit keys to accounts to make them symmetric to account_deps.

* Appends account_deps to accounts in transaction loading and removes account_deps everywhere else.
2021-07-05 13:49:37 +02:00
Trent Nelson
d3a7e22112 sdk: refactor pda generation 2021-06-30 19:01:51 -06:00
Sebastian Bor
3a4176aa3e feat: remove set_upgrade_authority_via_cpi_enabled feature (#17933) 2021-06-22 10:05:33 +01:00
Alexander Meißner
6514096a67 chore: cargo +nightly clippy --fix -Z unstable-options 2021-06-18 10:42:46 -07:00
Dmitri Makarov
361c1bdd57 Fix file permissions (#17910) 2021-06-12 02:03:32 +00:00
Arthur Greef
28fdfed1ba Blake3 syscall (#17358) 2021-06-08 11:04:10 -07:00
Jack May
83b9a046d1 Add missing ProgramError to InstructionError mappings (#16231)
* Add missing ProgramError to InstructionError mappings

* add note

* Clarify process of adding new program error
2021-06-03 21:59:04 +00:00
Jack May
2b50529265 Add memory operation syscalls (#16447) 2021-06-01 15:33:17 -07:00
Jack May
89ee8778bc Unify BPF verifiers (#17585) 2021-05-28 14:24:02 -07:00
Jack May
a3240aebde Always bail if program modifies a ro account (#17569) 2021-05-28 09:50:25 -07:00
Dmitri Makarov
85b647d80f Bump solana_rbpf to version 0.2.11 (#17404) 2021-05-25 08:05:35 +00:00
Alexander Meißner
855ae79598 Fix InvokeContext::push() account_deps (#17350)
* Reverts aliasing of account_deps with the previous invocation stack frame in InvokeContext::push().
* Adds explicit assert of programdata account content in test_program_bpf_upgrade_via_cpi.
2021-05-21 22:34:07 +02:00
Michael Vines
2c99b23ad7 Add get_sysvar() helper to sdk 2021-05-21 01:30:12 +00:00
Jack May
477898f682 Optimize aligned memory used by the runtime (#17324) 2021-05-19 13:43:59 -07:00
Tao Zhu
0781fe1b4f Upgrade Rust to 1.52.0 (#17096)
* Upgrade Rust to 1.52.0
update nightly_version to newly pushed docker image
fix clippy lint errors
1.52 comes with grcov 0.8.0, include this version to script

* upgrade to Rust 1.52.1

* disabling Serum from downstream projects until it is upgraded to Rust 1.52.1
2021-05-19 09:31:47 -05:00
Jack May
8eb05d6ed4 Add Keccak256 syscall and sdk support (#16498) 2021-05-10 16:16:58 -07:00
Jeff Washington (jwash)
541aa5ad85 tests: lamports -> lamports() (#16982) 2021-05-03 10:45:54 -05:00
Jeff Washington (jwash)
763c04adf3 lamports = -> .set_lamports() (#16980) 2021-04-30 21:17:05 +00:00
Jeff Washington (jwash)
ac87bc40ca tests: .lamports -> .lamports() (#16976) 2021-04-30 18:16:58 +00:00
Jeff Washington (jwash)
59e19828ea set_lamports() (#16914) 2021-04-29 10:43:26 -05:00
Jeff Washington (jwash)
82e11588a5 lamports -> lamports() (#16915) 2021-04-28 14:55:55 -05:00
Jeff Washington (jwash)
a7a671b3aa AccountSharedData.set_executable() (#16881) 2021-04-28 14:07:43 +00:00
Jeff Washington (jwash)
2021255f91 executable() (#16880) 2021-04-28 08:53:54 -05:00
Jack May
9b3a59f030 Retain alloc'd and updated data in cpi (#16850) 2021-04-27 13:36:42 -07:00
Jeff Washington (jwash)
1bd623cd15 private AccountSharedData.rent_epoch (#16844) 2021-04-27 13:51:13 -05:00
Jeff Washington (jwash)
69bfbf9e98 AccountSharedData.set_executable (#16836) 2021-04-27 09:56:50 -05:00
Jeff Washington (jwash)
998cba74b5 AccountSharedData.executable() (#16835) 2021-04-27 09:12:17 -05:00
Jeff Washington (jwash)
4e7e675c07 lamports += -> checked_add_lamports (#16791) 2021-04-27 09:11:35 -05:00
Jeff Washington (jwash)
aeff911c93 owner -> owner() (#16784) 2021-04-26 10:40:11 -05:00
Jeff Washington (jwash)
ca14c18998 owner -> owner() (#16782) 2021-04-23 22:49:47 +00:00
Jeff Washington (jwash)
1a4a7059af owner -> owner() (#16785) 2021-04-23 15:59:13 -05:00
Jeff Washington (jwash)
fb0b76c1f3 account.owner = X -> account.set_owner(X) (#16754) 2021-04-23 12:34:22 -05:00
Jeff Washington (jwash)
87e2e07d34 AccountSharedData.copy_into_owner_from_slice (#16755) 2021-04-23 09:34:08 -05:00
Jack May
be4df39a4c Remove unactivated ristretto syscall (#16727) 2021-04-22 09:29:42 -07:00
Sebastian Bor
1a658c7f31 Allow SetUpgradeAuthority instruction in CPI calls (#16676)
* feat: allow SetAuthority in CLI calls

* chore: clippy match_like_matches_macro

* chore: clippy match_like_matches_macro

* chore: rename CLI to CPI

* chore: move check for cpi authorised instruction to syscalls

* chore: add set_upgrade_authority cpi test

* chore: assert upgrade authority was changed

* feat: gate set_upgrade_authority via cpi with a feature

* chore: move feature to the end of the list

* chore: remove white spaces

* chore: remove white spaces

* chore: update comment to rerun build
2021-04-22 00:06:59 +01:00
Jeff Washington (jwash)
03f7b251b8 ReadableAccount.data returns slice (#16686)
* ReadAbleAccount.data returns slice

* more slice fixup

* more slice

* slice
2021-04-20 16:41:16 -05:00
Jack May
08d5253651 Enforce host aligned memory for program regions (#16590) 2021-04-20 11:07:30 -07:00
Jack May
2409bb18f3 Remove unwrap from bpf_loader serialization (#16645) 2021-04-19 13:30:31 -07:00
Alexander Meißner
9dfcb921cf Refactoring: Move KeyedAccounts to InvokeContext (#15410)
Collects all parametric occurrences and the construction of keyed_accounts and puts them into InvokeContext.
2021-04-19 18:48:48 +02:00
Michael Vines
a911ae00ba clippy 2021-04-18 20:55:02 -07:00
Michael Vines
f7eadd9d70 bump solana_rbpf from 0.2.5 to 0.2.7 (#16515) 2021-04-13 14:49:09 -07:00
Jack May
fa83f3bd73 Return sysvars via syscalls (#16422) 2021-04-12 16:04:57 -07:00