Commit Graph

141 Commits

Author SHA1 Message Date
Jack May 851958f77a
Disallow deployment of deprecated _sol_alloc_free syscall (#25179) 2022-05-20 13:19:41 -07:00
Jack May 8902a66b20
Revert "Disallow deployment of deprecated _sol_alloc_free syscall (#24986)" (#25170)
This reverts commit 8f1d4c1665.
2022-05-12 17:58:17 -05:00
Jack May 8f1d4c1665
Disallow deployment of deprecated _sol_alloc_free syscall (#24986)
* Disallow deployment of deprecated _sol_alloc_free syscall

* remove cli argument
2022-05-11 05:22:49 +00:00
Alexander Meißner 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
Dmitri Makarov bae5dae61d Bump bpf-tools to v1.20
- Fix C standard library to include only reentrant versions of functions
- Use a version of solana_rbpf with fixed relocations handling
- Add a test of using C standard library functions in on-chain program
2021-11-18 20:50:58 -08:00
ryleung-solana 4663b86b8b
Add DOS test that sends large transactions (#20624)
Problem
We need a test that stress-tests the network using large transactions, including sending multiple large transactions that reference independent sets of accounts, so they can be executed in parallel.

Summary of Changes
Adds such a test. Also adds a version of the tuner program that runs for a configurable number of iterations.
2021-10-29 15:57:32 -04:00
Jack May 8fee9a2e1a
Dont call precompiled programs (#19930) 2021-09-29 06:25:08 +00:00
Sean Young 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
Sean Young 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
Jack May 04c0c608a3
Split solana_sdk.h (#19172) 2021-08-13 09:49:24 -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
Jack May 2fbedd834f Don't update if already an executable 2021-06-26 19:19:26 -06:00
Dmitri Makarov e98a7504f2 Bump bpf-tools version to 1.12 2021-06-25 18:00:44 -07:00
Dmitri Makarov 28b2ff3733 Add test for signed division in on-chain programs 2021-06-21 18:06:05 -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 80e5b24b38
Fix CPI recursion depth (#17659)
* Fix CPI recursion depth
2021-06-02 11:15:19 +02:00
Jack May a3240aebde
Always bail if program modifies a ro account (#17569) 2021-05-28 09:50:25 -07:00
Dmitri Makarov 3ae4806dae
Fix missing builtins in C programs linking with compiler_builtins (#17475) 2021-05-25 17:11:02 +00:00
Jack May cfcae50022
fix test (#17310) 2021-05-18 11:46:42 -07:00
Jack May f15dd1b4ef
Add C Serialization Tests for #17217 (#17294) 2021-05-17 16:33:58 -07:00
Jack May 8eb05d6ed4
Add Keccak256 syscall and sdk support (#16498) 2021-05-10 16:16:58 -07:00
Jack May 74f58376f8
Expand and update instruction count tests (#16522) 2021-04-13 16:23:42 -07:00
Jack May cc38ae72e7
Skip deserialization of readonly accounts (#15813) 2021-03-11 19:28:21 -08:00
Jack May efcb58092e
Add more duplicate account tests (#15746) 2021-03-05 20:36:27 -08:00
Yang Hau 6acb06f8d8
refactor: Use UINT64_MAX to replace hardcoded number (#15676) 2021-03-03 17:16:18 +00:00
Jack May 77572a7c53
Track account writable deescalation (#14626) 2021-01-22 15:28:01 -08:00
Jack May aa96ad042b
Add signer/writable de/escalation tests (#14726) 2021-01-21 09:19:46 +00:00
Jack May 6e8a1ba7de
Load executable accounts from invoke context (#14574) 2021-01-14 00:19:22 -08:00
Jack May ec48631fc5
Bail on all CPI errors (#14500)
* Bail on all CPI errors

* whitespace
2021-01-09 02:27:39 +00:00
Jack May 5524938a50
Limit CPI instruction size (#14317) 2020-12-29 01:14:17 +00:00
Jack May b1d702a618
Don't use caller passed executable account (#14276) 2020-12-23 14:34:14 -08:00
Jack May 025f886e10
check for resize access violations (#14142) 2020-12-15 23:21:08 -08:00
Jack May ab98c1f2d4
Add try_find_program_address syscall (#14118) 2020-12-15 08:15:01 -08:00
Jack May 5ea80e673f
Fix priv escalation test (#14046) 2020-12-10 22:36:33 +00:00
Jack May e1a4251b07
Cap CPI signers (#14021) 2020-12-09 02:14:53 -08:00
Jack May 661ca52135
Cap seeds not signers (#13941) 2020-12-03 09:58:25 -08:00
Jack May 1c51711c75
Invoke with empty account slice (#13931) 2020-12-03 07:06:26 -08:00
Michael Vines 66e51a7363 Add sol_log_compute_units syscall 2020-10-29 21:45:24 -07:00
Jack May 3f9e6a600b
program log pubkey as base58 (#12901) 2020-10-15 09:11:54 -07:00
sakridge e4f45bfd3b
Bpf speed debug and tuner program (#12845) 2020-10-13 12:16:27 -07:00
Jack May 56211378d3
terminology update, nonce to bump seed (#12840) 2020-10-13 10:11:08 -07:00
Jack May 2cd7cd3149
Bump max invoke depth to 4 (#12742) 2020-10-09 10:33:12 -07:00
Jack May d0aa8a6446
Fix zero-len slice translations (#12642) 2020-10-02 17:45:39 -07:00
Jack May adeb06e550
Check CPI program is executable (#12644) 2020-10-02 13:55:22 -07:00
Jack May 058bca6632
add sha256 syscall (#12569) 2020-09-29 23:29:20 -07:00
Jack May d326512121
Add ComputeBudget tuner (#12476) 2020-09-25 09:01:22 -07:00
Justin Starry 6601ec8f26
Record and store invoked instructions in transaction meta (#12311)
* Record invoked instructions and store in transaction meta

* Enable cpi recording if transaction sender is some

* Rename invoked to innerInstructions
2020-09-24 22:36:22 +08:00
Jack May 5ab4109b7e
Add memory allocation support for C programs (#12254) 2020-09-15 16:42:20 -07:00
Jack May 555252f435
Make noop a real noop (#12196)
* Make noop a real noop

* nudge
2020-09-12 01:49:00 +00:00