168 Commits

Author SHA1 Message Date
Alexander Meißner
c833ede4af
Rbpf v0.2.1 (#13732)
* Refactoring to match rbpf-v0.2.1 and add JIT compilation caching.

* Removes obsolete bpf-trace.py which has been replaced by the rbpf CLI tool.
2020-11-24 18:00:19 +01:00
Jack May
3a9dca0c67
Add back BPF error logging (#13633)
* Add back BPF error logging

* Update programs/bpf_loader/src/lib.rs

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-11-17 08:10:14 +00:00
Jack May
8c922a0198
fix arithmetic overflow in slice translation (#13624)
* fix arithmetic overflow in slice translation

* nudge
2020-11-17 00:13:01 +00:00
Michael Vines
baa6b3a261 Add stable program logging for BPF and native programs 2020-11-14 08:26:01 -08:00
Jack May
30ef53cb13
fix bpf lddw check (#13554) 2020-11-12 13:13:42 -08:00
Jack May
461ae40eea
provide full Rust panic messages in BPF and add memory optimizations (#13455) 2020-11-09 13:40:26 -08:00
Alexander Meißner
4999fe298b
Rbpf v0.2.0 (#13365)
* Updates rbpf to v0.2.0,
which unifies the interfaces of the interpreter and the JIT.
However, the JIT is not enabled yet.
2020-11-04 18:46:26 +01:00
Michael Vines
9263ae1c60 Simplify CPI interface into MessageProcessor 2020-10-30 09:20:09 +00:00
Michael Vines
da9548fd12 de-mut some InvokeContext methods 2020-10-30 09:20:09 +00:00
Michael Vines
da361afbb9 Revert "Updates rbpf to v0.2.0, (#12951)"
This reverts commit 6606590b8132e56dab9e60b3f7d20ba7412a736c.
2020-10-29 21:45:24 -07:00
Michael Vines
7d686b72a0 Add Bank::set_bpf_compute_budget() 2020-10-29 21:45:24 -07:00
Michael Vines
66e51a7363 Add sol_log_compute_units syscall 2020-10-29 21:45:24 -07:00
Michael Vines
33884d847a Remove programs clone() 2020-10-29 21:45:24 -07:00
Michael Vines
2664a1f7ef Remove MessageProcessor::loaders 2020-10-29 21:45:24 -07:00
Michael Vines
df8dab9d2b Native/builtin programs now receive an InvokeContext 2020-10-29 21:45:24 -07:00
Alexander Meißner
6606590b81
Updates rbpf to v0.2.0, (#12951)
which unifies the interfaces of the interpreter and the JIT.
However, the JIT is not enabled yet.
2020-10-29 11:34:52 -07:00
Alexander Meißner
65ee3a6bdd
Refactors the common code of test and bench targets into the solana_runtime::bpf_test_utils module. (#13203) 2020-10-29 10:04:47 +01:00
Michael Vines
1b343665a1 Move KeyedAccount out of solana-program. Native programs are not supported by solana-program 2020-10-26 18:54:54 -07:00
Michael Vines
959880db60 Remove unused pubkey::Pubkey imports 2020-10-21 19:08:13 -07:00
Michael Vines
7bc073defe Run codemod --extensions rs Pubkey::new_rand solana_sdk::pubkey::new_rand 2020-10-21 19:08:13 -07:00
Ryo Onodera
c0675968b1
Support Debug Bank (#13017) 2020-10-21 01:05:45 +09:00
Jack May
b510474dcb
Report compute budget usage (#12931) 2020-10-15 15:55:37 -07:00
Jack May
3f9e6a600b
program log pubkey as base58 (#12901) 2020-10-15 09:11:54 -07:00
Jack May
c3907be623
Add adjustable stack size and call depth (#12728) 2020-10-09 13:07:09 -07:00
Jack May
2cd7cd3149
Bump max invoke depth to 4 (#12742) 2020-10-09 10:33:12 -07:00
Michael Vines
11df2e2236 Bump version to v1.5.0 2020-10-08 04:51:36 +00:00
Jack May
973f0965e1
Add ristretto multiply syscall (#12699) 2020-10-06 23:52:13 -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
74fcb184b2
Pipe FeatureSet though InvokeContext (#12536)
* Pipe FeatureSet though InvokeContext

* gate program size cap

* nit
2020-09-29 21:36:30 +00:00
Jack May
2ff983647f
Move process_instruction defs to runtime (#12507) 2020-09-29 01:36:46 -07:00
Jack May
d00453f747
Drain the entire compute budget (#12478) 2020-09-25 18:08:10 +00:00
Jack May
b8c4b88188
Cleanup names, fix line dependent test (#12477) 2020-09-25 09:00:06 -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
3278d78f08
Cache re-usable work performed by the loader (#12135) 2020-09-14 17:42:37 -07:00
Jack May
ae7b15f062
Gate pointer alignment enforcement (#12176) 2020-09-11 11:07:03 -07:00
Jack May
fd47d38e59
Calc size ahead of time to alloc once (#12154) 2020-09-10 11:13:35 -07:00
Jack May
ea179ad762
Bump compute budget (#11864)
* Bump compute budget

* nudge
2020-08-26 21:48:51 +00:00
Jack May
c2e5dae7ba
Gate aligned program heap (#11808) 2020-08-24 13:21:34 -07:00
Jack May
8d362f682b
The constraints on compute power a program can consume is limited only to its instruction count (#11717) 2020-08-21 15:31:19 -07:00
Jack May
46830124f8
CPI support for bpf_loader_deprecated (#11695) 2020-08-18 11:26:29 -07:00
Jack May
e9b610b8df
Add SystemInstruction::CreateAccount support to CPI (#11649) 2020-08-17 13:38:42 -07:00
Jack May
f1ba2387d3
More efficient padding (#11656) 2020-08-17 10:24:34 -07:00
Jack May
750e5344f1
Return an error from create_program_address syscall (#11658) 2020-08-17 09:49:40 -07:00
Jack May
f8606fca4f
Aligned program heap (#11657) 2020-08-17 09:49:21 -07:00
Jack May
4196686acf
Feature check CPI up front (#11652) 2020-08-16 23:12:22 -07:00
Jack May
768b386f0a
fix region checks (#11651) 2020-08-16 23:11:52 -07:00
Jack May
7c736f71fe
Make BPF Loader static (#11516) 2020-08-14 12:32:45 -07:00
Jack May
9290e561e1
Align host addresses (#11384)
* Align host addresses

* support new program abi

* update epoch rollout

* Enforce aligned pointers in cross-program invocations
2020-08-11 16:11:52 -07:00