Sean Young
ebe77a0985
Proposal: log binary data for Solidity
...
Rename "Program return data: " to "Program return: " since "data" is
redundant.
(cherry picked from commit b89177c8de
)
Conflicts:
programs/bpf_loader/src/syscalls.rs
sdk/bpf/c/inc/sol/log.h
sdk/program/Cargo.toml
sdk/src/feature_set.rs
sdk/src/process_instruction.rs
2021-10-13 14:34:36 +01:00
Sean Young
927d3b5e0d
Add return data implementation
...
This consists of:
- syscalls
- passing return data from invoked to invoker
- printing to stable log
- rust and C SDK changes
(cherry picked from commit 53b47b87b2
)
2021-10-12 18:31:42 +01:00
mergify[bot]
95ac00d30a
Make rewards tracer async friendly (backport #20452 ) ( #20456 )
...
* Make rewards tracer async friendly (#20452 )
(cherry picked from commit 250a8503fe
)
# Conflicts:
# Cargo.lock
# ledger-tool/Cargo.toml
# runtime/src/bank.rs
* fix conflicts
Co-authored-by: Justin Starry <justin@solana.com >
2021-10-06 11:20:50 +00:00
Dmitri Makarov
458ccecb5d
Bump bpf-tools version to 1.12
...
(cherry picked from commit e98a7504f2
)
2021-09-24 18:05:13 +02:00
mergify[bot]
1cdcabf7cf
Bump BPF tools to v1.9 ( #18766 )
...
(cherry picked from commit 47861fc373
)
Co-authored-by: Dmitri Makarov <dmakarov@alumni.stanford.edu >
2021-07-19 20:46:59 +00:00
mergify[bot]
8c328316ae
Add ecrecover syscall (backport #17720 ) ( #18500 )
...
* Add ecrecover syscall (#17720 )
Co-authored-by: Anton Lisanin <lisanin.anton@gmail.com >
(cherry picked from commit 1f288ce527
)
# Conflicts:
# Cargo.lock
# programs/bpf/Cargo.lock
# programs/bpf/tests/programs.rs
# programs/bpf_loader/Cargo.toml
# programs/bpf_loader/src/syscalls.rs
# sdk/program/Cargo.toml
* resolve conflicts
Co-authored-by: s-medvedev <40623263+s-medvedev@users.noreply.github.com >
Co-authored-by: Jack May <jack@solana.com >
2021-07-08 21:56:19 +00:00
Trent Nelson
98e1c68a70
sdk: ensure ld
can find criterion when running BPF tests
...
(cherry picked from commit 7ee39fcb0f
)
2021-06-25 10:17:17 -06:00
mergify[bot]
3c7c6dacfb
Add BPF rustc option to reduce the optimizations to safer level ( #17590 ) ( #17594 )
...
(cherry picked from commit 831e87c65d
)
Co-authored-by: Dmitri Makarov <dmakarov@users.noreply.github.com >
2021-05-31 19:15:56 +00:00
mergify[bot]
8ec09884b8
Revert bpf-tools to version 1.8 because of a codegen bug suspicion ( #17568 ) ( #17577 )
...
(cherry picked from commit 2316ddb90a
)
Co-authored-by: Dmitri Makarov <dmakarov@users.noreply.github.com >
2021-05-28 11:10:14 +00:00
Dmitri Makarov
3ae4806dae
Fix missing builtins in C programs linking with compiler_builtins ( #17475 )
2021-05-25 17:11:02 +00:00
Christian Machacek
8758e9ed82
Remove const qualifier from syscall out-parameters ( #17382 )
2021-05-21 12:09:22 -07:00
Dmitri Makarov
2ae57c172a
Bump bpf-tools version to 1.9
...
- upgrade rustc to 1.52.1 and clang to 12.0
2021-05-20 11:35:37 +02:00
Dmitri Makarov
ab871ed4b7
Bump bpf-tools version to 1.8
2021-05-18 08:10:57 +02:00
Christian Machacek
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
Dmitri Makarov
88626b2945
Bump bpf-tools version to 1.7 ( #17176 )
2021-05-11 19:51:20 +00:00
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
1359bceb5d
Bump bpf-tools to version v1.5 ( #16331 )
...
The new version of bpf-tools eliminates the separate
rust-bpf-sysroot. The Rust standard libraries for the BPF target are
built in tree when the compiler is built. The standard libraries code
is slightly more optimized and some reduction of compute budget can be
expected with this version of bpf-tools.
2021-04-04 13:04:22 +00:00
Jack May
bcd89dd34c
Fix BPF ELF layout ( #16256 )
...
* Fix BPF ELF layout
* whitespace
2021-03-31 08:51:19 +00:00
Justin Starry
abada56ba1
Print the rust version when building bpf programs ( #16181 )
2021-03-29 14:17:08 +08:00
Dmitri Makarov
658ddd1c9c
Bump bpf-tools to version v1.4 ( #16152 )
2021-03-26 19:21:41 +00:00
Dmitri Makarov
664ed76523
Bump bpf-tools to version v1.3 ( #16068 )
...
* Bump bpf-tools to version v1.3
This brings in the fix for increased compute budget that wasn't caught
when bpf-tools v1.2 were released.
* Adjust BPF test programs instruction counts
2021-03-24 07:16:38 +00:00
Dmitri Makarov
14e45155e4
Bump bpf-tools to v1.2 and get rid of xargo
2021-03-19 12:09:15 +01:00
Dmitri Makarov
c5a5d7457e
Bump bpf-tools to v1.1 ( #15776 )
2021-03-10 18:13:38 +01:00
Jack May
4789a13a6e
configure rust-bpf toolchain for each tree ( #15620 )
2021-03-02 00:45:28 -08: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
286e4d6924
bump rust-bpf-sysroot to v0.14 ( #15040 )
2021-02-03 10:43:38 +00:00
Jack May
ab98c1f2d4
Add try_find_program_address syscall ( #14118 )
2020-12-15 08:15:01 -08:00
Jack May
1dc71fb5aa
Bump criterion to v2.3.3 ( #14002 )
2020-12-07 21:53:28 +00:00
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
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
Jack May
461ae40eea
provide full Rust panic messages in BPF and add memory optimizations ( #13455 )
2020-11-09 13:40:26 -08:00
Michael Vines
66e51a7363
Add sol_log_compute_units syscall
2020-10-29 21:45:24 -07:00
Jack May
4e0d1b1d4a
more portable install.sh ( #13114 )
2020-10-27 22:43:34 -07:00
Jack May
e3c0cc980b
fix .gitignore ( #13177 )
2020-10-27 00:42:26 +00:00
Jack May
fc83a666fc
macos portable rust-bpf ( #13176 )
2020-10-27 00:11:33 +00:00
Michael Vines
b169d9cfbe
Add --bpf-out-dir argument to control where the final build products land
2020-10-23 04:57:03 +00:00
Michael Vines
61be155413
Remove do.sh
2020-10-21 18:56:40 -07:00
Michael Vines
07a853d6cc
Add cargo-build-bpf
2020-10-21 18:56:40 -07:00
Jon Cinque
81d0c8ae7f
Force unset CARGO to use correct version of cargo ( #13027 )
2020-10-20 14:50:34 -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
65049bd112
Bump rust-bpf to v0.2.4 ( #12361 )
2020-09-20 23:10:50 +00:00