Commit Graph

1385 Commits

Author SHA1 Message Date
Alexander Meißner 9e703f85de
Upgrades Rust to 1.72.0 & nightly-2023-08-25 (#32961)
* allow pedantic invalid cast lint

* allow lint with false-positive triggered by `test-case` crate

* nightly `fmt` correction

* adapt to rust layout changes

* remove dubious test

* Use transmute instead of pointer cast and de/ref when check_aligned is false.

* Renames clippy::integer_arithmetic to clippy::arithmetic_side_effects.

* bump rust nightly to 2023-08-25

* Upgrades Rust to 1.72.0

---------

Co-authored-by: Trent Nelson <trent@solana.com>
2023-09-01 07:26:13 +00:00
Yihau Chen 37887d487c
ci: remove --ignore RUSTSEC-2022-0093 (#33019)
ci: remove --ignore RUSTSEC-2023-0052
2023-08-29 05:58:50 +00:00
Yihau Chen d90e158286
ci: install protobuf-compiler to docker image (#32956) 2023-08-24 02:13:38 +08:00
Yihau Chen e4a2d14c4e
ci: fix audit (#32932)
* ci: bump rustls-webpki to 0.101.4

* ci: ignore RUSTSEC-2023-0052
2023-08-23 01:23:18 +08:00
Jon Cinque 6521a100f7
ci: Use pipefail for some scripts, don't use `PIPESTATUS` (#32893) 2023-08-21 22:18:53 +02:00
Yihau Chen a02aebaa4b
ci: increase solana_program_count to 18 (#32922) 2023-08-22 03:01:12 +08:00
Jon Cinque 0fe902ced7
Bump rand to 0.8, rand_chacha to 0.3, getrandom to 0.2 (#32871)
* sdk: Add concurrent support for rand 0.7 and 0.8

* Update rand, rand_chacha, and getrandom versions

* Run command to replace `gen_range`

Run `git grep -l gen_range | xargs sed -i'' -e 's/gen_range(\(\S*\), /gen_range(\1../'

* sdk: Fix users of older `gen_range`

* Replace `hash::new_rand` with `hash::new_with_thread_rng`

Run:
```
git grep -l hash::new_rand | xargs sed -i'' -e 's/hash::new_rand([^)]*/hash::new_with_thread_rng(/'
```

* perf: Use `Keypair::new()` instead of `generate`

* Use older rand version in zk-token-sdk

* program-runtime: Inline random key generation

* bloom: Fix clippy warnings in tests

* streamer: Scope rng usage correctly

* perf: Fix clippy warning

* accounts-db: Map to char to generate a random string

* Remove `from_secret_key_bytes`, it's just `keypair_from_seed`

* ledger: Generate keypairs by hand

* ed25519-tests: Use new rand

* runtime: Use new rand in all tests

* gossip: Clean up clippy and inline keypair generators

* core: Inline keypair generation for tests

* Push sbf lockfile change

* sdk: Sort dependencies correctly

* Remove `hash::new_with_thread_rng`, use `Hash::new_unique()`

* Use Keypair::new where chacha isn't used

* sdk: Fix build by marking rand 0.7 optional

* Hardcode secret key length, add static assertion

* Unify `getrandom` crate usage to fix linking errors

* bloom: Fix tests that require a random hash

* Remove some dependencies, try to unify others

* Remove unnecessary uses of rand and rand_core

* Update lockfiles

* Add back some dependencies to reduce rebuilds

* Increase max rebuilds from 14 to 15

* frozen-abi: Remove `getrandom`

* Bump rebuilds to 17

* Remove getrandom from zk-token-proof
2023-08-21 19:11:21 +02:00
Yihau Chen 7902ac106d
ci: update aws cli image (#32910)
* ci: update aws cli image

* ci: add --acl public-read
2023-08-20 21:13:20 +08:00
Yihau Chen aa4598d436
ci: allow retrying mac publishing steps (#32899) 2023-08-19 21:12:44 +08:00
Trent Nelson f1a0cca547
ci: move some fast checks to sanity (#32875) 2023-08-17 21:58:17 -06:00
Yihau Chen bc5ad1d2ab
ci: re-enable SPL downstream project test on Github Action (#32677)
* ci: init spl downstream project on Github Action

* ci: fix spl downstream project doesn't use cargo-test-sbf

* ci: move nightly build to another individual file

* ci: get more space for runners on Github Action

* ci: trun off fali-fast

* Update .github/workflows/downstream-project-spl.yml

Co-authored-by: Jon Cinque <me@jonc.dev>

* ci: separate all spl programs

* use reusable workflow

* add error reporting for nightly build

* update test method

* add build and test

* only build required program

* remove other branches

* Update .github/workflows/downstream-project-spl.yml

Co-authored-by: Jon Cinque <me@jonc.dev>

* Update .github/workflows/downstream-project-spl.yml

Co-authored-by: Jon Cinque <me@jonc.dev>

* add check

* update build and test

* add lacking programs

* remove unnecessary programs

---------

Co-authored-by: Jon Cinque <me@jonc.dev>
2023-08-16 11:12:15 +00:00
behzad nouri 52616cf7aa
removes repair socket from gossip ContactInfo (#32831)
Repair responses are sent back to the address the repair request came
from and there is no need to gossip repair socket address.
https://github.com/solana-labs/solana/blob/9212ac347/core/src/repair/serve_repair.rs#L519
2023-08-14 20:01:18 +00:00
Trent Nelson b83cef43fc
ci: allow local bypass of stale Cargo.lock check with custom variable instead of `CI` (#32798)
ci: don't use `CI` envvar to skip local stale Cargo.lock check

to enable
```bash
echo "export SOLANA_CI_ALLOW_STALE_CARGO_LOCK=" >> ~/.profile
```
2023-08-11 13:53:16 -06:00
HaoranYi dbe6d0353f
Allow pending changes for `test-checks.sh` for local build (#32728)
* Add `local` options for ci test-check script

* check  env instead

* remove usage()

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-08-06 09:29:12 -05:00
Trent Nelson 1ce26ecba0
remove references to eol helloworld example repo (#32550) 2023-07-20 00:35:54 -05:00
Ryo Onodera 6246d817d7
Add --fail to curl for more robust retries (#32494) 2023-07-14 09:34:59 +00:00
Yihau Chen 40249cdc9e
ci: fix spl test (#32471) 2023-07-13 07:37:18 +00:00
Ryo Onodera e6f5f8777a
Relax dcou dep. in order-crates-for-publishing.py (#32432)
* Relax dcou dep. in order-crates-for-publishing.py

* Comment, comment and comment...

* Avoid early-abort and report all collected errors
2023-07-13 14:22:07 +09:00
Yihau Chen 1aa075fc2f
ci: allow retrying publish-crate although passed (#32441)
ci: allow publish crate retry although passed
2023-07-11 12:34:22 +08:00
Yihau Chen 3fa3d266cd
ci: update rules for triggering all_test_steps (#32442)
ci: update rules for trigger all_test_steps
2023-07-10 20:02:33 +00:00
behzad nouri d54b6204be
removes instances of clippy::manual_let_else (#32417) 2023-07-09 21:41:36 +00:00
Ryo Onodera 18247431b9
Add special feature for inter-crate safe dev-related code reuse (#32169)
* Add dev-utils feature for inter-crate test code safe reuse

* Sanitize mode

* Fix typo...

* Use case/esac intead of if

* port to `cargo tree` + `jq`

* Fix typo...

* Properly abort on errors

* Add trailing commas

* Select only normal dependencies

* Use more concise comma-separated code

* Skip if taint packages are empty

* Fold long lines and format code a bit

* Fix shellcheck

* Improve jq query and remove uneeded marker feature

* Use folding heredoc giving up proper indenting..

* Use jq's alternative operator (//)

* Rename to dev-context-only-utils

* Fix typo...

---------

Co-authored-by: Trent Nelson <trent@solana.com>
2023-07-07 09:30:20 +09:00
Ryo Onodera 5a2beb9835
Install jq in docker (#32340) 2023-06-30 13:32:25 +09:00
Yihau Chen 66233576a1
ci: trigger shellcheck for .buildkite/hooks (#32329) 2023-06-29 17:34:36 +00:00
Yihau Chen e60b58258d
ci: remove wasm-pack version lock (#32307)
* ci: remove wasm-pack version lock

* remove comment
2023-06-28 13:21:07 +00:00
mvines f202ccb033
Add rust-version field to solana-program to prevent the accidental use of unsupported platform-tools versions (#32232)
Require the rust-version of solana-program crate to match platform-tools
2023-06-23 21:48:56 -07:00
behzad nouri f6e039b0b3
moves turbine to a separate crate out of solana/core (#32226) 2023-06-22 16:22:11 +00:00
Ryo Onodera f62d231886
Make `ci/_` to print to stderr instead of stdout (#32238)
* make _ print to stderr instead...

* Trigger normal build procedure
2023-06-22 15:46:22 +09:00
Ryo Onodera 830c0ad04a
Fix wasm-pack (#32239) 2023-06-22 14:37:34 +09:00
Ryo Onodera cc0fb5a584
Install cargo-hack for upcoming dev-utils (#32234) 2023-06-22 14:05:08 +09:00
samkim-crypto 875b95a07b
[zk-token-proof] Add benches for proof instructions (#32071)
* add bench test for `VerifyPubkeyValidity`

* add bench test for `VerifyRangeProofU64`

* add bench test for `VerifyWithdraw`

* add bench test for `VerifyZeroBalance`

* add bench test for `VerifyGroupedCiphertextValidity`

* add bench test for `VerifyCiphertextCommitmentEquality`

* add bench test for `VerifyCiphertextCiphertextEquality`

* add bench test for `VerifyBatchedGroupedCiphertextValidity`

* add bench test for `VerifyBatchedRangeProofu64`, `VerifyBatchedRangeProofU128`, `VerifyBatchedRangeProofU256`

* add bench test for `VerifyTransfer` and `VerifyTransferWithFee`

* use add `criterion` to workspace cargo

* add bench to ci
2023-06-18 07:52:20 +09:00
Yihau Chen 405db3e436
ci: fix publish crate version checking (#31894)
* ci: fix publish crate version checking

* ci: add warning when publish crates don't use worksapce version
2023-06-01 14:28:10 +08:00
Ryo Onodera fc97b7d88e
Explain use of nightly clippy over whole monorepo (#31833)
* Explain use of nightly clippy over whole monorepo

ref: https://github.com/rust-lang/rust/issues/66287

* Fix typo and update link in test-checks.sh

* Incorporate review suggestions
2023-05-26 16:43:14 +09:00
Ryo Onodera f736fcee2b
Fix indent of ./ci/test-checks.sh (#31831) 2023-05-26 15:22:03 +09:00
Yihau Chen 8cb30d0693
ci: separate bench tests (#31763)
* ci: separate bench tests

* use readable names
2023-05-25 21:39:17 +08:00
Yihau Chen 239a7ba759
ci: refactor local cluster tests (#31730)
* ci: separate local cluster tests by nextest

* parallelism => 6

* Revert "parallelism => 6"

This reverts commit 5c271357fee8aa8ae812ee67e285d72ebb9bec10.
2023-05-24 15:07:33 +08:00
Ryo Onodera bd8289e114
Temporarily use stable clippy for redundant_clone (#31692) 2023-05-17 21:09:23 +00:00
Will Hickey 29163f71c6
Restore ci version bump logic with origin/ prefix on branch names (#31636)
Add origin/ prefix to branch names... Buildkite doesn't have the local branch aliases in the clone
2023-05-15 21:05:14 -05:00
Yihau Chen 98bef5c3da
ci: install lld to docker images (#31645)
ci: install lld to docker image
2023-05-15 11:34:14 +00:00
Will Hickey 91194cd342
Revert "Update CI pipeline to only run `checks` step on version bump … (#31603)
Revert "Update CI pipeline to only run `checks` step on version bump PRs (#29243)"

This reverts commit 0581fc2def.
2023-05-12 13:03:21 -05:00
Ryo Onodera 4d4dddcaea
Update to nightly rustc to 2023-04-19 (#31381)
* Update to nightly rustc to 2023-04-19

* pray...

* Not enough pray..

* skip check...

* hope merciful shellcheck

* ci hack...

* Restore ci/test-checks.sh

* Restore debug_assertions with proper workaround...

* small cleanup

* seems this isn't needed?

* Make the workaround more robust...

* Remove now-resolved clippy exception
2023-05-11 15:48:13 +09:00
Trent Nelson 53811e6053
add and recommend script for reserving new package names on crates.io (#31416)
* add script for reserving package names on crates.io

* ci/check-crates.sh: suggest script for new crate name reservation
2023-05-08 09:31:24 -06:00
Brooks c5e071c7fe
Upgrades nightly Rust to 2023-03-04 (#31487) 2023-05-05 08:28:23 -04:00
Yihau Chen bd5893907e
ci: fix private pipeline agents (#31407) 2023-04-29 04:23:23 +08:00
Ryo Onodera a30830d7a9
ci: treewide: deny used_underscore_binding (#31319)
* Enforce used_underscore_binding

* Fix all

* Work around for cfg()-ed code...

* ci....

* Make clipply fixes more pleasant

* Clone exit signal while intentionally shadowing

* Use more verbose code to avoid any #[allow(...)]s
2023-04-27 10:10:16 +09:00
Yihau Chen e79e13899d
ci: use crates api to get owner list (#31348)
use crete api to get owner lists
2023-04-26 08:36:50 +08:00
Yihau Chen c9ca6e3461
ci: update buildkite's hook (#31298)
* remove unnecessary files

* unify the hooks's header

* don't use set -e in post-checkout

* shellcheck.sh include .buildkite/hooks

* xxx: make ci unhappy

* Revert "xxx: make ci unhappy"

This reverts commit a0fdfb40db8aa226a2669e474a06fb0f45f8c5c4.
2023-04-25 15:49:58 +00:00
Brooks cd2b2d4a14
Upgrades Rust to 1.69.0 (#31336) 2023-04-25 10:22:38 -04:00
Yihau Chen 186b0d77f0
ci: use stable wasm-pack version in docker (#31338)
* ci: use latest wasm-pack version in docker

* print wasm-pack version in test-check.sh
2023-04-25 22:08:01 +08:00
Ryo Onodera 37576c8949
ci: show sccache version and prefix (#31317)
* ci: Show sccache version as well

* hmm, where's sccache?? (and prefix bonus)

* Use $PATH's sccache for consistency
2023-04-25 13:11:58 +09:00