Commit Graph

49 Commits

Author SHA1 Message Date
Jack May a89f180145
Allow closing upgradeable program accounts (#19319) 2021-08-24 10:05:54 -07:00
Dmitri Makarov d6a2b70438
Bump bpf-tools to v1.15 (#19117)
- update to rust 1.54.0
2021-08-10 07:21:14 +00:00
Dmitri Makarov cde1461555
Bump bpf-tools to v1.14 (#19023)
- improved memory operations performance
- minor fixes
2021-08-03 09:13:58 +00:00
Dmitri Makarov d117be6792
Reword help of generate-child-script-on-failure cargo bpf tools option (#18685) 2021-07-15 03:31:33 +00:00
Dmitri Makarov 6f72f8b1fc
Generate a script to rerun the failed sub-command in cargo-test-bpf (#18582)
* Generate a script to rerun the failed sub-command in cargo-test-bpf

* Generate a script to rerun the failed sub-command in cargo-build-bpf

* Add cargo-build-bpf test for generate-child-script-on-failure option
2021-07-15 01:02:42 +00:00
Dmitri Makarov cf9a4575ae
Prevent duplication of RUSTFLAGS settings in cargo-build-bpf subprocesses (#18576) 2021-07-11 01:24:26 +00:00
Dmitri Makarov e752299ac5 Bump bpf-tools version
Update Rust BPF to version 1.53
2021-07-07 05:08:40 -07:00
Dmitri Makarov cf25729eaa Add cargo-build-bpf integration tests 2021-07-01 06:47:25 -07:00
Dmitri Makarov e98a7504f2 Bump bpf-tools version to 1.12 2021-06-25 18:00:44 -07:00
Dmitri Makarov d6bad60c1b
Bump bpf-tools version to 1.11 (#18079)
Avoid including local paths in compiler generated ELF files
2021-06-19 01:00:59 +00:00
Alexander Meißner 6514096a67 chore: cargo +nightly clippy --fix -Z unstable-options 2021-06-18 10:42:46 -07:00
Dmitri Makarov 3570b00560 Make cargo-build-bpf pass additional options to cargo build command
Users need to be able to pass additional command line options such as
-p that are not supported by 'cargo build-bpf' but are meaningful for
the 'cargo build' command.  This change allows cargo-build-bpf to pass
all command line options specified after '--' option to 'cargo build'.
2021-06-18 10:20:35 -07:00
dependabot[bot] d99b8f10d0
chore: bump cargo_metadata from 0.12.0 to 0.13.1 (#17999)
* chore: bump cargo_metadata from 0.12.0 to 0.13.1

Bumps [cargo_metadata](https://github.com/oli-obk/cargo_metadata) from 0.12.0 to 0.13.1.
- [Release notes](https://github.com/oli-obk/cargo_metadata/releases)
- [Commits](https://github.com/oli-obk/cargo_metadata/commits)

---
updated-dependencies:
- dependency-name: cargo_metadata
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Accommodate type change

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-06-16 17:50:22 +00:00
Dmitri Makarov 32742df1b4 Add build script to extract a list of registered syscalls
The list is used in cargo-build-bpf to check generated .so modules for
undefined symbols that are not known run-time syscalls.
2021-06-14 04:51:30 -07:00
Dmitri Makarov 3026954d71 Update RUSTFLAGS if it is set, instead of overriding in build-bpf 2021-06-11 13:19:43 -07:00
Dmitri Makarov c684e2bdc0
Check for undefined symbols in .so and warn about run-time errors (#17850) 2021-06-10 22:23:09 +00:00
Dmitri Makarov 2fe211c5e0
Remove O2 option for compiling BPF programs (#17865)
rustc default compiler optimization level is O3. This change removes
the option that overrides the default optimization level, because it
is safe to do so.  The code generation is incorrect in some cases
because of link-time optimizations, which remain disabled for
compiling BPF programs.  In addition, this commit updates the expected
instruction counts for assert_instruction_count test.
2021-06-10 05:04:17 +00:00
Dmitri Makarov d7a0fd8afa
Print commands output in cargo-build-bpf if verbose option is set (#17845) 2021-06-08 20:55:33 +00:00
Dmitri Makarov 910ac94a8c
Fix handling of stale links to bpf-tools in cargo-build-bpf (#17772) 2021-06-07 16:26:01 +00:00
Dmitri Makarov ae0bea1ad3 Bump BPF tools to v1.10 2021-06-04 19:10:23 -07:00
Dmitri Makarov 47861fc373 Bump BPF tools to v1.9 2021-06-03 17:06:49 -07:00
Dmitri Makarov 831e87c65d
Add BPF rustc option to reduce the optimizations to safer level (#17590) 2021-05-28 23:14:53 +00:00
Dmitri Makarov 2316ddb90a
Revert bpf-tools to version 1.8 because of a codegen bug suspicion (#17568) 2021-05-28 09:36:46 +00:00
Lijun Wang 54f0fc9f0f
Use type alias for DownloadProgress callback (#17518)
Convert to use type alias for the callback and cascade the changes to callers. Thanks @jeffwashington for the help making it possible.
Changed the closure for the progress update in the validator main to FnMut and modify the abort count in the closure which is more reliable.
2021-05-26 13:26:07 -07:00
Lijun Wang 4c17243157
snapshot download enhancement (#17415)
1. Allow the validator bootstrap code to specify the minimal snapshot download speed. If the snapshot download speed is detected below that, a different RPC can be retried. The default is 10MB/sec.

2. To prevent spinning on a number of sub-optimal choices and not making progress, the abort/retry logic is implemented with the following safe guards:
2.1 at maximum we do this retry for 5 times -- this number is configurable with default 5.
2.2 if the download in one notification round (5 second) is more than 2%, do not do retry -- it is not as bad anyway.
2.3 if the remaining estimate time is less than 1 minutes, do not abort retry as it will be done quickly anyway.
2.4 We do this abort/retry logic only at the first notification to avoid wasting download efforts -- the reasoning is being opportunistic and too greedy may not achieve overall shorter download time.

3. The download_snapshot and download_file is modified with the option allowing caller to notified of download progress via a callback. This allows the business logic of retrying to the place it belongs.
2021-05-25 09:32:12 -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
Dmitri Makarov 88626b2945
Bump bpf-tools version to 1.7 (#17176) 2021-05-11 19:51:20 +00:00
Dmitri Makarov 77272a17b3
Fix dump postprocessing in cargo-build-bpf (#17165) 2021-05-11 09:24:12 +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 78d1d59889 Augment BPF binary dumps to resolve call instruction targets 2021-04-12 18:36:41 +02:00
Jack May 878e52f0b9
Fix cargo-build/test-bpf --workspace (#16431) 2021-04-07 17:22:55 -07: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
Dmitri Makarov 658ddd1c9c
Bump bpf-tools to version v1.4 (#16152) 2021-03-26 19:21:41 +00:00
Michael Vines 07273bfa9e Show bpf-tools download progress 2021-03-25 12:23:51 -07: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
Michael Vines 6a8dd86722 Remove unix path separators 2021-02-19 08:22:36 -08:00
Michael Vines cbffab7850 Upgrade to Rust v1.49.0 2021-01-23 19:16:36 -08:00
Jack May 3316e7166c
Rework upgradeable loader cli (#14209) 2020-12-21 13:02:53 -08:00
Michael Vines 636a455790 Create a random `-keypair.json` file alongside the program deploy artifact for easy upgrades 2020-12-16 19:51:16 +00:00
Michael Vines 9f95704706 Add --offline flag 2020-11-12 20:03:12 -08:00
Michael Vines 0ea795caa8 cargo-build-bpf/cargo-test-bpf now support --workspace/--all 2020-11-06 12:27:46 -08:00
Michael Vines 5a435a4342 Check file modification times before strip and dump 2020-11-05 14:29:17 -08:00
Michael Vines 6c36a2085f Add cargo-test-bpf 2020-11-05 14:29:17 -08:00
Michael Vines 661a935075 Final program ELF is now placed in ./target/deploy/ instead of . 2020-11-04 23:03:55 +00:00
Michael Vines 85c51f5787 Only activate legacy program feature for the solana-sdk crate 2020-10-24 08:37:55 -07: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 07a853d6cc Add cargo-build-bpf 2020-10-21 18:56:40 -07:00