Commit Graph

57 Commits

Author SHA1 Message Date
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
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
04c0c608a3 Split solana_sdk.h (#19172) 2021-08-13 09:49:24 -07:00
1f288ce527 Add ecrecover syscall (#17720)
Co-authored-by: Anton Lisanin <lisanin.anton@gmail.com>
2021-07-07 13:15:14 -07:00
7ee39fcb0f sdk: ensure ld can find criterion when running BPF tests 2021-06-24 22:14:54 -06:00
361c1bdd57 Fix file permissions (#17910) 2021-06-12 02:03:32 +00:00
28fdfed1ba Blake3 syscall (#17358) 2021-06-08 11:04:10 -07:00
6f193bf357 Add separate rules to generate dependencies files for C BPF build 2021-06-08 05:34:40 -07:00
47861fc373 Bump BPF tools to v1.9 2021-06-03 17:06:49 -07:00
2316ddb90a Revert bpf-tools to version 1.8 because of a codegen bug suspicion (#17568) 2021-05-28 09:36:46 +00:00
3ae4806dae Fix missing builtins in C programs linking with compiler_builtins (#17475) 2021-05-25 17:11:02 +00:00
8758e9ed82 Remove const qualifier from syscall out-parameters (#17382) 2021-05-21 12:09:22 -07:00
ab871ed4b7 Bump bpf-tools version to 1.8 2021-05-18 08:10:57 +02:00
e02b4e1192 Fix a bug in input deserialization in the C SDK (#17217)
When the input contains more accounts than the user has requested to be deserialized, and one of the excess ones is a dup, the input pointer is not adjusted correctly.

Compare the lines added by this commit to line 401: "input += 7; // padding". Since the input data layout does not depend on the number of accounts the user wants to deserialize, this adjustment by 7 bytes must happen in both branches.
2021-05-14 16:41:55 -06:00
8eb05d6ed4 Add Keccak256 syscall and sdk support (#16498) 2021-05-10 16:16:58 -07:00
82fb6712e7 fix c program deploy help (#17152) 2021-05-10 15:38:01 -07:00
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
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
db3bca7edd Add llvm feature option to compile for Solana BPF target (#16495) 2021-04-13 07:20:18 +00:00
c5a5d7457e Bump bpf-tools to v1.1 (#15776) 2021-03-10 18:13:38 +01:00
48785b507b Bump Rust-BPF to v1.46 (#15273) 2021-02-18 11:30:08 -08:00
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
ab98c1f2d4 Add try_find_program_address syscall (#14118) 2020-12-15 08:15:01 -08:00
e390c8cb7f Add stubs and heap region definitions (#13521)
* Add stubs and heap region definitions

* nudge
2020-11-11 05:50:16 +00:00
9ca8e98525 Add printf declaration (#13514) 2020-11-10 23:40:48 +00:00
23c558510a add missing c logging stubs (#13511) 2020-11-10 22:19:54 +00:00
66e51a7363 Add sol_log_compute_units syscall 2020-10-29 21:45:24 -07:00
3f9e6a600b program log pubkey as base58 (#12901) 2020-10-15 09:11:54 -07:00
058bca6632 add sha256 syscall (#12569) 2020-09-29 23:29:20 -07:00
b8c4b88188 Cleanup names, fix line dependent test (#12477) 2020-09-25 09:00:06 -07:00
5ab4109b7e Add memory allocation support for C programs (#12254) 2020-09-15 16:42:20 -07:00
ae0fd3043a Add support for deprecated loader (#11946) 2020-08-31 14:06:58 -07:00
e9b610b8df Add SystemInstruction::CreateAccount support to CPI (#11649) 2020-08-17 13:38:42 -07:00
f1ba2387d3 More efficient padding (#11656) 2020-08-17 10:24:34 -07:00
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
03263c850a Force program address off the curve (#11323) 2020-08-05 16:35:54 -07:00
db4a18ada4 Add PubkeyError for ProgramError (#10748) 2020-06-23 11:19:27 -07:00
73586c1aad Use &[u8] for program address seeds rather then &str (#10744) 2020-06-22 16:51:43 -07:00
c5460e7fee Remove inline from all BPF C functions (#10038) 2020-05-13 17:23:39 -07:00
7678af6300 Cleanup BPF helper symbols (#9804) 2020-04-30 11:29:11 -07:00
de9d8cd849 Rename BPF helper to syscall (#9819)
automerge
2020-04-30 01:43:11 -07:00
068f12fd6f Add Cross-program invocations (#9582) 2020-04-28 14:33:56 -07:00
d08517db8c Nit picks (#9580) 2020-04-18 22:39:08 -07:00
f192e4f08f Nit: Align Rust and C names (#8918) 2020-03-17 19:37:16 -07:00
668dfc40c7 Align C and Rust handling of AccountInfos (#8906) 2020-03-17 12:34:14 -07:00
25df95be6f Expose executable and rent_epoch in AccountInfo (#8619) 2020-03-04 10:52:09 -08:00
059764586a Rename from account userdata to data (#8224) 2020-02-11 16:30:22 -08:00
517fe73734 Non-conflicting account duplicate marker value (#8206) 2020-02-11 10:03:28 -08:00
df782b93ae Add is_writable to AccountInfo (#8196) 2020-02-10 21:33:29 -08:00
0fd795a676 Remove program error footgun and cleaner developer experience (#8042) 2020-01-31 10:58:07 -08:00