Commit Graph

273 Commits

Author SHA1 Message Date
Dmitri Makarov 8260ffc1ef
Bump platform-tools to v1.39 (#33804) 2023-10-21 16:22:16 -04:00
Pierre 8a20e7f8de
sdk: fix broken C examples (#33701)
fix C broken example
2023-10-16 23:53:03 +02:00
vadorovsky bea062b1e6
Add alt_bn128 syscall tests (and fix related issues) (#31436)
* Fix C headers (the name of the syscall was incorrect).
* Add C SBF tests using the alt_bn128 syscall.
* Fix the Rust SBF program:
  * Do not use serde and array-bytes, provide test cases as byte arrays
    directly.
  * Use the `custom_heap_default` macro.
  * Replace `bpf` with `sbf` in the crate name.
* Execute both previously existing Rust tests and new C tests in
  `programs/sbf/tests`, so they are actually tested on CI.
2023-05-22 14:05:10 -07:00
Dmitri Makarov 8c860e9894
Bump platform-tools version to v1.37 (#31017) 2023-04-01 12:08:03 -04:00
Dmitri Makarov b915b47315
Bump sbf-tools version to v1.35 (#30628)
- this release includes fixes in relocation handling necessary for
  source-level debugging of on-chain programs
2023-03-07 07:23:59 -08:00
Dmitri Makarov 03652ada69
Bump sbf-tools version (#30397) 2023-02-21 15:23:48 +01:00
Dmitri Makarov ec4f33b024
Fix SDK C makefile setting the correct path to clang headers (#30378) 2023-02-17 06:53:45 -08:00
Dmitri Makarov 1896d4110f
Bump sbf-tools version (#30186) 2023-02-08 13:20:26 -08:00
valiksinev 5f7fea100a
Big integer modular exponentiation (EIP-198) (#28503)
* big_mod_exp impl

* fix programs/sbf/Cargo.lock

* ComputeBudget impl

* update compute_budget

* compute_budget update

* fix build

* fix tests

* fix cargo clippy

* fix clippy

* fix bpf_loader dependency sorting

* fix sorting

* fix merge from master

* fix cargo fmt

* fix C-tests

* fix cargo fmt

* comments apply

* fix programs/sbf/Cargo.lock

* update compude_budget cost

* remove whitespaces

* fix cargo fmt

Co-authored-by: sinev-valentine <sinev-valentine@yandex.ru>
2023-01-20 18:42:37 +09:00
Dmitri Makarov 3a14e52eb7
Bump sbf-tools to v1.32 (#29325)
* Bump sbf-tools to v1.32

This version of sbf-tools is based on Rust 1.65.0 and LLVM 15.0.

* Temporary ignore build-sbf tests until issue with buildkite cache resolved
2022-12-24 11:34:12 -08:00
ananas-block afc3fee937
added alt_bn syscalls (#27961)
* added alt_bn128_syscalls

* increased regression build redundancy to > 10
2022-11-21 17:43:06 +01:00
bji 6dc7cd0845
Fixed warnings caused by redefined macros. Also fixed sol_memcpy to … (#28378)
Fixed warnings caused by redefined macros.  Also fixed sol_memcpy to have
the same signature as memcpy.
2022-11-20 03:42:17 +00:00
Dmitri Makarov d6b3d338d0 Bump sbf-tools to v1.31 2022-10-27 07:18:35 -04:00
Dmitri Makarov 786c558a1f Bump sbf-tools to v1.30 2022-10-21 09:36:18 -04:00
Justin Starry b9700244b5
Increase transaction account lock limit from 64 to 128 (#27242)
* Increase transaction account lock limit from 64 to 256

* fix bpf test

* Reduce lock limit from 256 to 128
2022-09-15 13:50:14 -04:00
Dmitri Makarov 776a47bd83 Bump sbf-tools version to v1.29 2022-08-07 22:11:57 +00:00
Dmitri Makarov 8db5a6a4f2 Copy changes made to a generated header file to its source 2022-07-30 10:38:53 -07:00
Richard Patel 741076ecdd bpf: fix objcopy.sh
Uses bundled version of llvm-objcopy.
2022-07-27 15:42:10 -07:00
Justin Starry 2335f6908a
Loosen CPI restrictions and charge compute for ix data len (#26653)
* Loosen CPI restrictions and charge compute for ix data len

* Address feedback

* use explicit casting

* more feedback
2022-07-24 20:20:16 +02:00
Dmitri Makarov 8bc8f77820 Sync return_data.inc and add a warning about modifying generated header files 2022-07-19 20:03:05 -07:00
Richard Patel 4163dc181e
sdk/bpf/c: fix sol_get_return_data signature (#26525) 2022-07-19 09:30:29 +02:00
bji 61fd9288ba
Fix sol_memset to return the correct value. (#26598) 2022-07-14 17:27:02 +01:00
Dmitri Makarov 8797ad03c4 Bump sbf-tools version to v1.28 2022-07-13 21:47:48 +00:00
steviez 853b0ea966
fixup! Add syscall tests for curve25519 (#25634) (#25921) 2022-06-11 23:32:28 -05:00
samkim-crypto 697a69cbe8
Add syscall tests for curve25519 (#25634)
* add curve25519 syscall tests

* add curve25519 syscall feature set description

* fmt

* rename curve25519 group syscall

* update point to scalar

* resolve conflict
2022-06-12 10:18:51 +09:00
Dmitri Makarov ffeac6488e Ignore sbf-tools in sdk/bpf/dependencies and remove the ignored file 2022-06-08 18:11:04 -07:00
Jack May 363d8d1539
Bump rBPF (#25593) 2022-06-07 04:45:07 -07:00
Jack May 851958f77a
Disallow deployment of deprecated _sol_alloc_free syscall (#25179) 2022-05-20 13:19:41 -07:00
Dmitri Makarov dcce90555b Bump sbf-tools to v1.27 2022-05-19 21:56:56 +00:00
Dmitri Makarov 3c70220142 Remove obsolete string C header input file
string.h doesn't contain any syscall declarations that need to be
processed by the gen-headers C header file generating utility.
2022-05-13 10:37:25 -07:00
Jack May 8902a66b20
Revert "Disallow deployment of deprecated _sol_alloc_free syscall (#24986)" (#25170)
This reverts commit 8f1d4c1665.
2022-05-12 17:58:17 -05:00
Dmitri Makarov 9d18fe019b Bump sbf-tools version to 1.26 2022-05-12 03:53:55 +00:00
Jack May 8f1d4c1665
Disallow deployment of deprecated _sol_alloc_free syscall (#24986)
* Disallow deployment of deprecated _sol_alloc_free syscall

* remove cli argument
2022-05-11 05:22:49 +00:00
Dmitri Makarov 66366615bb Generate syscall headers 2022-05-05 19:50:54 -07:00
Dmitri Makarov 6bf58572ca Update llvm include path in C toolchain makefile 2022-04-19 21:38:36 -07:00
Dmitri Makarov f58ebff44e Update C toolchain linker script to match the rust toolchain script 2022-04-18 17:35:38 -07:00
Dmitri Makarov 6b611e1c52 Bump bpf-tools to v1.25
- Tweak linker script
  Ensure that all read only sections end up in one segment, and
  everything else in other segments. Discard .eh_frame, .hash and
  .gnu.hash since they are unused.
- Don't create invalid string slices in stdout/stderr on Solana
- Report exceeded stack size as a warning if dynamic frames are off
- Native support for signed division in SBF
  Adds BPF_SDIV, which is enabled only for the SBF subtarget.
- Introduce dynamic stack frames and the SBFv2 flag
  Dynamic stack frames  are currently opt-in and enabled setting
  cpu=sbfv2. When sbfv2 is used, ELF files are flagged with
  e_flags=EF_SBF_V2 so the runtime can detect it and react
  accordingly.
2022-04-12 10:51:15 -07:00
Dmitri Makarov 689064a4f4 Bump sbf-tools version to v1.24 2022-04-08 09:06:40 -07:00
HaoranYi 0b7d0476c8
fix a typo (#24070) 2022-04-01 15:16:51 -07:00
Dmitri Makarov a9d9a5095b Bump bpf-tools to v1.23 2022-02-03 15:50:18 -08:00
Alessandro Decina 959ea26816
Re-enable LTO (#22287)
LTO seems to work fine now. It was possibly fixed by either the LLVM13 upgrade
or by b2ed47a925,
which fixed a LTO issue with tests.
2022-01-06 09:16:50 +11:00
Jon Cinque 57986f982a
cargo-build-bpf: Add Windows support (#20276)
* cargo-build-bpf: Add Windows support

* Update error message
2021-12-28 18:37:35 -05:00
Dmitri Makarov 7cc6262b5a Bump bpf-tools to v1.21 2021-12-21 16:40:42 -08:00
Jon Cinque 923720f529
SDK: Add stdlib.h include to pull in `abort()` (#21700) 2021-12-08 17:00:16 +01:00
Dmitri Makarov bae5dae61d Bump bpf-tools to v1.20
- Fix C standard library to include only reentrant versions of functions
- Use a version of solana_rbpf with fixed relocations handling
- Add a test of using C standard library functions in on-chain program
2021-11-18 20:50:58 -08:00
Dmitri Makarov 3f4f05865d
Bump bpf-tools to v1.19 (#21256)
Toolchain upgrade to rust 1.56.0 and clang 13.0.
2021-11-13 19:36:28 +00:00
Dmitri Makarov 4287bf6b8b
Bump bpf-tools to v1.18 (#20991)
- added newlib standard C library to clang toolchain
- fixed BPF backend bug that accidentally deleted code, issue #20538
2021-10-26 22:51:44 +00:00
Sean Young 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
Sean Young 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
Jack May 04c0c608a3
Split solana_sdk.h (#19172) 2021-08-13 09:49:24 -07:00