Commit Graph

138 Commits

Author SHA1 Message Date
Ryo Onodera 23fa84b322
Re-do rent collection check on rent-exempt account (#11349)
* wip: re-do rent collection check on rent-exempt account

* Let's see how the ci goes

* Restore previous code

* Well, almost all new changes are revertable

* Update doc

* Add test and gating

* Fix tests

* Fix tests, especially avoid to change abi...

* Fix more tests...

* Fix snapshot restore

* Align to _new_ with better uninitialized detection
2020-08-17 14:22:16 +09: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
Jack May 03263c850a
Force program address off the curve (#11323) 2020-08-05 16:35:54 -07:00
Jack May db4a18ada4
Add PubkeyError for ProgramError (#10748) 2020-06-23 11:19:27 -07:00
Jack May 73586c1aad
Use &[u8] for program address seeds rather then &str (#10744) 2020-06-22 16:51:43 -07:00
Jack May 03abd3ddd7
Prevent privilege escalation (#10232)
automerge
2020-05-26 01:02:31 -07:00
Jack May 4a72c2b054
Support cross-program invocation to native programs (#10136) 2020-05-20 09:24:57 -07:00
Jack May af84dff9ef nudge 2020-05-11 09:06:05 -07:00
Jack May 97e17f9b32 Programs can only sign their accounts 2020-05-11 09:06:05 -07:00
Jack May 068f12fd6f
Add Cross-program invocations (#9582) 2020-04-28 14:33:56 -07:00
Jack May f192e4f08f
Nit: Align Rust and C names (#8918) 2020-03-17 19:37:16 -07:00
Jack May d087ed5bf6
Remove copypasta (#8912) 2020-03-17 15:59:09 -07:00
Jack May 668dfc40c7
Align C and Rust handling of AccountInfos (#8906) 2020-03-17 12:34:14 -07:00
Grimes fc409d9262
Consistency nits and spelling (#8642)
automerge
2020-03-04 16:26:32 -08:00
Jack May 059764586a
Rename from account userdata to data (#8224) 2020-02-11 16:30:22 -08:00
Jack May 0fd795a676
Remove program error footgun and cleaner developer experience (#8042) 2020-01-31 10:58:07 -08:00
Jack May dd276138c2
Add support for idiomatic error handling to BPF instruction processors (#7968) 2020-01-30 09:47:22 -08:00
Jack May 34ed93d57c
Optimize account copies and use RefCell to handle duplicate accounts in BPF programs (#7958) 2020-01-24 10:54:26 -08:00
Justin Starry 81c36699c4
Add support for BPF program custom errors (#5743)
* Add support for BPF program custom errors

* Rename SOL_SUCCESS -> SUCCESS
2019-09-06 16:05:01 -07:00
Jack May 97ea75a890
Pull in solana_rbpf v0.1.14 (#5609) 2019-08-23 11:03:53 -07:00
Jack May 4177c56c51
Use real panic that reports file/line (#4758) 2019-06-20 19:10:03 -07:00
Jack May 2a7a9fdf03
Re-org SDK dir (#4690) 2019-06-17 11:04:38 -07:00
Greg Fitzgerald 51a2988bb2
Revert "Rename programs to instruction_processors (#3789)" (#3824)
This reverts commit 34344982a9.
2019-04-17 15:05:49 -06:00
Amr Ali 34344982a9
Rename programs to instruction_processors (#3789)
* Rename programs to instruction_processors

* Updates around the code base to support instruction_processors rename

* Kabab instruction_processors

* Update Cargo.toml files and scripts to use instruction-processors

* Update Cargo.toml to use instruction-processors

* Update CI scripts to use instruction-processors
2019-04-16 22:39:00 +02:00
Michael Vines 3129e299e4 Rename tokens to lamports in programs/ 2019-03-05 17:56:44 -08:00
Jack May ba5077701d
Avoid possible simplified lowering of passed struct (#2938) 2019-02-25 17:05:59 -08:00
Jack May a0bc8b8af3
BPF programs can support up to 5 arguments (#2528) 2019-01-23 09:55:08 -08:00
Jak May e9a0b3a8f3
Add BPF-to-BPF and PC relative call tests (#2395) 2019-01-11 19:33:08 -08:00
Jak May 23c43ed21b
Multi-file BPF C builds (#2393) 2019-01-11 15:33:21 -08:00
jackcmay cefbb7c27d
Fix shared object relcations with multiple static arrays (#2121) 2018-12-12 08:41:45 -08:00
jackcmay 935524f20c
Fix eh frame relocation (#2109)
* Exclude .eh_frame
2018-12-11 12:14:41 -08:00
jackcmay e3dfd7b1ab
Allow BPF structure passing and returning (#2100)
* Add BPF struct passing and returning tests
2018-12-11 09:03:37 -08:00
Michael Vines e52f3f34a4 Autoinstall dependencies in the SDK itself 2018-12-01 10:47:59 -08:00
Michael Vines 7c3e6e8e86 Move bpf-sdk to sdk/bpf 2018-12-01 10:47:59 -08:00
jackcmay b00011a3f1
Use custom LLVM (#1971)
BPF SDK uses custom LLVM
2018-11-30 14:33:29 -08:00
Michael Vines bad0b55ab6 Expose which keys signed the Transaction in the SDK 2018-11-30 08:16:23 -08:00
jackcmay 0c091c1b24
Dockerized LLVM (#1914)
Optionally build with dockererized custom llvm
2018-11-28 14:41:53 -08:00
Michael Vines 83c0711760 Rename SolKeyedAccounts to SolKeyedAccount 2018-11-27 15:36:04 -08:00
Michael Vines ec0a56cb9c Tokens are unsigned 2018-11-27 10:14:37 -08:00
Michael Vines f0d24a68ee Configure -rpath to locate libcriterion 2018-11-26 21:16:42 -08:00
Michael Vines c7f678688d Stub out log functions when building tests 2018-11-26 15:41:49 -08:00
Michael Vines 7bf4c08f70 Add BPF C unittest framework 2018-11-26 12:25:29 -08:00
Michael Vines 826ac80e62 Avoid subverting bool return value 2018-11-26 09:11:40 -08:00
Michael Vines 4506584c48 Employ stdbool.h, add stub wchar.h 2018-11-26 09:11:40 -08:00
Michael Vines c1af48bd85 Rename program_id => owner 2018-11-18 16:24:13 -08:00
Michael Vines 3822c29415 Route program_id to program entrypoint 2018-11-17 19:42:03 -08:00
Michael Vines 201a4b7b2a
Advance input pointer correctly 2018-11-17 10:30:21 -08:00
jackcmay 39c87fd103
Add BPF benchmarks 2018-11-14 12:06:06 -08:00
Michael Vines 2ad2fdd235
Remove inline simple program to avoid maintenance burden 2018-11-14 10:39:22 -08:00
Michael Vines 1fda4b77ef Expose tick_height to bpf programs 2018-11-14 10:33:27 -08:00
Michael Vines 860dcdb449 Stubs for some libc headers 2018-11-13 17:44:46 -08:00
Michael Vines 70cebaf74a Add size_t/ssize_t/sol_memset/sol_strlen 2018-11-13 17:44:46 -08:00
Michael Vines 317fe19da7 Fix INC_DIRS usage 2018-11-13 17:44:46 -08:00
Michael Vines e702515312 Add basic C++ support 2018-11-12 09:08:40 -08:00
Rob Walker 3ccbf81646
Update README.md 2018-11-07 13:04:14 -08:00
Rob Walker 2e38cd98c0
Update README.md 2018-11-07 12:58:24 -08:00
jackcmay 1075a73902 Elf relocations (#1724)
Use relocatable BPF ELFs
2018-11-07 09:40:23 -08:00
Michael Vines ed09b2bdb8
Document BPF C program limitations 2018-11-04 12:31:38 -08:00
Michael Vines b8534a402d
shell 2018-11-01 15:25:27 -07:00
Michael Vines 45b9a7f8e9
shell 2018-11-01 14:40:21 -07:00
Michael Vines 6b777b066a Find clang 7 better
If LLVM_DIR is defined, use it to locate clang.  Otherwise use brew on
macOS, and assume clang-7 otherwise
2018-11-01 09:48:38 -07:00
Michael Vines 1e01088698 Improve clang install info for Linux 2018-11-01 09:48:38 -07:00
Michael Vines 3ea0651078 Rename sol_bpf.h to solana_sdk.h 2018-10-31 23:46:34 -07:00
Michael Vines 776b1c2294 sol_bpf.h improvements
- Define NULL
- Add sol_memcmp()
- Use sizeof() more
- Add SOL_ARRAY_SIZE
- Make sol_deserialize() more flexible
2018-10-31 23:46:34 -07:00
Michael Vines 5ecb9da801 Fix up bpf numeric types 2018-10-31 20:53:44 -07:00
jackcmay aca2f9666d
Fix deps (#1672) 2018-10-31 10:12:17 -07:00
Michael Vines b74e085538 SYSTEM_INC_DIRS needs immediate expansion 2018-10-31 07:20:09 -07:00
Jack May 899de2ff56 Revert inclusion change, fix doc 2018-10-31 07:03:38 -07:00
Jack May cf521a5bd2 Fix const 2018-10-31 07:03:38 -07:00
Jack May bc13248e1c Fix C programs 2018-10-31 07:03:38 -07:00
Michael Vines 45bb97cad6
Permit {INC,LLVM,OUT,SRC,SYSTEM_INC}_DIRs to be overridden 2018-10-30 07:59:07 -07:00
Michael Vines 546e4c5696 Remove bpf tictactoe 2018-10-29 21:43:37 -07:00
Michael Vines 30b22c8b78 Use NUM_KA 2018-10-29 20:52:38 -07:00
Michael Vines 6f5e92e5b3 README updates 2018-10-29 20:52:38 -07:00
Michael Vines cce5c70f29 LD -> LLC 2018-10-29 20:52:38 -07:00
Michael Vines 4af7c82ef0 Add extern "C" block 2018-10-29 20:52:38 -07:00
Michael Vines 52e5fb7e0c Use #pragma once, it's widely supported
Fix up some spelling too
2018-10-29 20:52:38 -07:00
Michael Vines a013e8ceb1 Rename sol_bpf_c.h to sol_bpf.h 2018-10-29 20:52:38 -07:00
Michael Vines 864632b582 slight reformatting 2018-10-29 20:52:38 -07:00
Michael Vines 71d6eaacef Apply some const 2018-10-29 20:52:38 -07:00
Michael Vines 4aba05d749 Include system includes in .d, remove unneeded tabs 2018-10-29 20:52:38 -07:00
Michael Vines 7d335165ec
Tune make output 2018-10-29 19:32:47 -07:00
Michael Vines 37213209c5 Create programs/bpf/c/sdk/ 2018-10-29 19:10:29 -07:00
Michael Vines ebcb9a2103 Add llvm install info 2018-10-29 10:00:45 -07:00
Michael Vines 6fb2e080bc Ignore out/ 2018-10-29 10:00:45 -07:00
Michael Vines 3ac5ffc188 Use V=1 for verbosity, easier to type 2018-10-29 10:00:45 -07:00
Michael Vines 88187ef282 Find llvm using brew on macOS 2018-10-29 10:00:45 -07:00
jackcmay 3488ea7d1c
Cleanup c programs (#1620)
Cleanup C programs
2018-10-26 19:38:07 -07:00