Commit Graph

251 Commits

Author SHA1 Message Date
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
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
Michael Vines 52575349dc Build programs with `--no-default-features --features program` to match solana-sdk 2020-07-31 08:57:42 -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 d77818c18b
Pull program stubs into SDK (#10704) 2020-06-18 23:23:28 -07:00
R. M. Shea 48febf153b
Change documentation introduction to indicate Foundation IP transfer (#10440) 2020-06-13 14:41:05 -07:00
Jack May 97f9b63507
Improve BPF SDK dependency caching (#10434) 2020-06-08 09:20:12 -07:00
Michael Vines 9eefb2c929 Bump version to 1.3.0 2020-05-28 15:01:13 -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 1018807db9
Bump Rust-BPF version to be interoperable with latest Rust (#9783)
automerge
2020-04-28 23:47:59 -07:00
Jack May b26c07b788
Fix BPF tool caching (#9781)
automerge
2020-04-28 21:06:04 -07:00
Jack May d836dfff14
Fix bpf unit test linkage (#9780)
automerge
2020-04-28 19:41:08 -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
Michael Vines 47ae57610a Only build x86_64-unknown-linux-gnu on docs.rs 2020-04-16 19:06:17 -07:00
Jack May 6e1ce5ab6c
Safer cargo command (#9437) 2020-04-10 15:44:24 -07:00
Michael Vines b4e00275b2 Cache downloads to speed up CI 2020-04-06 22:53:19 -07:00
Michael Vines d7fa40087c
Bump version to 1.2.0 2020-03-28 09:44:13 -07:00
Jack May 30bed18b77
Install xargo using CI dictated cargo version if available (#9068) 2020-03-26 11:47:41 -07:00
Justin Starry c558db2a48
Fix xargo to version 0.3.19 to avoid unstable feature (#9065)
automerge
2020-03-25 08:43:36 -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 d9b0490f72
Update rust-bpf to include matching cargo (#8598) 2020-03-03 14:14:31 -08:00
Jack May de6679ea95
Improve install messaging (#8477) 2020-02-27 14:07:36 -08:00
Dan Albert 2d9d2f1e99
Update cargo versions from 1.0 to 1.1 (#8397) 2020-02-21 23:09:45 -08:00
Michael Vines 48f58a88bc Bump version to 1.0.0 2020-02-20 23:52:19 -07:00
Jack May 059764586a
Rename from account userdata to data (#8224) 2020-02-11 16:30:22 -08:00
Jack May 2e9ba149f2
Update LVM and rBPF versions (#8215) 2020-02-11 12:52:13 -08:00
Jack May bf623219d2
nudge (#8214) 2020-02-11 10:50:57 -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
Dan Albert c324e71768
Bump cargo toml versions to 0.24.0 (#7976) 2020-01-25 11:04:27 -06: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 6c544708e1
Add safety docs (#7665) 2020-01-03 09:14:28 -08:00
Jack May 06cff1fb9f
Publish bpf-sdk releases (#7655) 2020-01-02 20:44:15 -08:00
Dan Albert ca10cf081f
Update cargo.toml files from 0.22.0 to 0.23.0 (#7596) 2019-12-20 21:45:42 -05:00
Jack May 9e2ce1751b
Bump Rust-BPF to Rust 1.39 (#7420) 2019-12-10 22:27:14 -08:00
Michael Vines 294662a1ce
Bump version to 0.22.0 2019-11-25 21:34:50 -07:00
Justin Starry 0be13a6295 Silence cargo install error in bpf script (#6926)
automerge
2019-11-13 08:57:12 -08:00
Justin Starry c7e2057d2d Install xargo if a new version is available (#6882)
automerge
2019-11-11 20:32:07 -08:00
Jack May 91cfa0aac9
Upgrade xargo if old (#6869) 2019-11-11 12:58:24 -08:00
Jack May bb9649e18d
Replacd todo with issue (#6823) 2019-11-08 11:48:07 -08:00
Dan Albert 73c31d873e
Update Cargo.toml versions from 0.20.0 to 0.21.0 (#6568) 2019-10-25 17:40:49 -06:00
Jack May 26d31b68d7
Update Rust-BPF to v0.1.8 (#6404) 2019-10-16 15:08:29 -07:00
Jack May 54d0168746 BPF call trace script (#6311)
automerge
2019-10-10 01:10:47 -07:00
Rob Walker 7cf90766a3
add epoch_schedule sysvar (#6256)
* add epoch_schedule sysvar

* book sheesh!
2019-10-08 22:34:26 -07:00
Jack May a09cf1470a Remove libstd statics to eliminate .bss (#6134)
automerge
2019-09-26 17:38:08 -07:00
Jack May c10b2e6cc0
Cleanup Rust BPF sysroot (#6124) 2019-09-26 13:27:33 -07:00
Jack May 03dc4a20a1
Single threaded LLD (#6088) 2019-09-25 07:44:33 -07:00
Dan Albert 9c9991db1d
Update cargo toml and lock files to v0.20.0 (#6016) 2019-09-22 21:45:56 -04:00
Jack May abaccd6882 Pull in Rust-BPF v0.1.6 (#5997)
automerge
2019-09-20 11:21:01 -07:00
Jack May 0d16db2d1b
Remove bloat due to test symbols (#5965) 2019-09-18 19:54:10 -07: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 e5f902369c
Rust BPF programs depend on Solana SDK (#5819) 2019-09-06 09:20:14 -07:00