46 Commits

Author SHA1 Message Date
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
dependabot[bot]
2e75023840
chore: bump regex from 1.4.5 to 1.5.4 (#17885)
* chore: bump regex from 1.4.5 to 1.5.4

Bumps [regex](https://github.com/rust-lang/regex) from 1.4.5 to 1.5.4.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.4.5...1.5.4)

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

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

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2021-06-11 09:50:54 -06: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
dependabot[bot]
8e1e57a181
chore: bump tar from 0.4.28 to 0.4.35 (#17666)
* chore: bump tar from 0.4.28 to 0.4.35

Bumps [tar](https://github.com/alexcrichton/tar-rs) from 0.4.28 to 0.4.35.
- [Release notes](https://github.com/alexcrichton/tar-rs/releases)
- [Commits](https://github.com/alexcrichton/tar-rs/compare/0.4.28...0.4.35)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <you@example.com>
2021-06-02 14:17:58 -06: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
Michael Vines
8eab0e8602
Bump version to v1.8.0 (#17541) 2021-05-27 08:51:53 -07: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
a2eb655322 =1.7.0 2021-03-16 07:51:07 +00:00
Michael Vines
0c9ca5522c Bump version to v1.7.0 2021-03-13 09:01:21 +00: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
1e977ac025 Bump version to v1.6.0 2020-12-15 18:28:04 +00:00
Michael Vines
f25c969ad8 Disable publishing of cargo-build-bpf/cargo-test-bpf to crates.io 2020-11-18 19:09:04 +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