Commit Graph

43 Commits

Author SHA1 Message Date
Jack May
8eb05d6ed4 Add Keccak256 syscall and sdk support (#16498) 2021-05-10 16:16:58 -07:00
Jack May
82fb6712e7 fix c program deploy help (#17152) 2021-05-10 15:38:01 -07:00
Christian Machacek
ff95e2aaa6 Add a make target to run the readelf utility on a compiled program
The readelf utility (already shipped with the solana tools) shows meta-information about ELF files, such as symbol tables. It is useful for investigating "unresolved symbol" errors that crop up at runtime.

This commit also fixes the objdump flags (two dashes are required and there is no "color" option) as well as a few typos.
2021-05-08 18:49:14 -07:00
Christian Machacek
6927d0c77e Fix syscalls in the C SDK failing at runtime when compiled as C++ (#17124)
Some syscalls are wrongly declared "static" in solana_sdk.h, which makes clang++ assume they are local to the compilation unit. It therefore ignores the extern "C" {} block and mangles their names. While that doesn't break C++ compilation, the syscall fails at runtime with something along the lines of "ELF error: Unresolved symbol (_ZL26sol_create_program_addressPK13SolSignerSeediPK9SolPubkeyS4_)".
2021-05-08 16:31:50 +00:00
Dmitri Makarov
db3bca7edd Add llvm feature option to compile for Solana BPF target (#16495) 2021-04-13 07:20:18 +00:00
Dmitri Makarov
c5a5d7457e Bump bpf-tools to v1.1 (#15776) 2021-03-10 18:13:38 +01:00
Jack May
48785b507b Bump Rust-BPF to v1.46 (#15273) 2021-02-18 11:30:08 -08:00
Jack May
bba1b49663 Generate keypair file for c program deployment (#15080)
* Generate keypair file for c program deployment

* Build and use solana-keygen in test-stable-perf
2021-02-04 13:56:12 -08:00
Jack May
ab98c1f2d4 Add try_find_program_address syscall (#14118) 2020-12-15 08:15:01 -08:00
Jack May
e390c8cb7f Add stubs and heap region definitions (#13521)
* Add stubs and heap region definitions

* nudge
2020-11-11 05:50:16 +00:00
Jack May
9ca8e98525 Add printf declaration (#13514) 2020-11-10 23:40:48 +00:00
Jack May
23c558510a add missing c logging stubs (#13511) 2020-11-10 22:19:54 +00: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
Jack May
058bca6632 add sha256 syscall (#12569) 2020-09-29 23:29:20 -07:00
Jack May
b8c4b88188 Cleanup names, fix line dependent test (#12477) 2020-09-25 09:00:06 -07:00
Jack May
5ab4109b7e Add memory allocation support for C programs (#12254) 2020-09-15 16:42:20 -07:00
Jack May
ae0fd3043a Add support for deprecated loader (#11946) 2020-08-31 14:06:58 -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
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
c5460e7fee Remove inline from all BPF C functions (#10038) 2020-05-13 17:23:39 -07:00
Jack May
7678af6300 Cleanup BPF helper symbols (#9804) 2020-04-30 11:29:11 -07:00
Jack May
de9d8cd849 Rename BPF helper to syscall (#9819)
automerge
2020-04-30 01:43:11 -07:00
Jack May
068f12fd6f Add Cross-program invocations (#9582) 2020-04-28 14:33:56 -07:00
Jack May
d08517db8c Nit picks (#9580) 2020-04-18 22:39:08 -07:00
Jack May
f192e4f08f Nit: Align Rust and C names (#8918) 2020-03-17 19:37:16 -07:00
Jack May
668dfc40c7 Align C and Rust handling of AccountInfos (#8906) 2020-03-17 12:34:14 -07:00
Jack May
25df95be6f Expose executable and rent_epoch in AccountInfo (#8619) 2020-03-04 10:52:09 -08:00
Jack May
059764586a Rename from account userdata to data (#8224) 2020-02-11 16:30:22 -08:00
Jack May
517fe73734 Non-conflicting account duplicate marker value (#8206) 2020-02-11 10:03:28 -08:00
Jack May
df782b93ae Add is_writable to AccountInfo (#8196) 2020-02-10 21:33:29 -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
Jack May
bb9649e18d Replacd todo with issue (#6823) 2019-11-08 11:48:07 -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