Skip to content

Commit

Permalink
Merge branch 'master' into fix-alt_bn128-const
Browse files Browse the repository at this point in the history
  • Loading branch information
LStan authored Jan 17, 2025
2 parents f65ec08 + 9ec0980 commit 292245b
Show file tree
Hide file tree
Showing 904 changed files with 31,555 additions and 19,011 deletions.
4 changes: 2 additions & 2 deletions .buildkite/scripts/build-stable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ partitions=$(
{
"name": "partitions",
"command": "ci/docker-run-default-image.sh ci/stable/run-partition.sh",
"timeout_in_minutes": 30,
"timeout_in_minutes": 25,
"agent": "$agent",
"parallelism": 2,
"parallelism": 5,
"retry": 3
}
EOF
Expand Down
7 changes: 4 additions & 3 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
# repo and would like to avoid introducing dependencies in the meantime.
/builtins-default-costs/ @anza-xyz/svm
/compute-budget/ @anza-xyz/svm
/fee/ @anza-xyz/svm
/compute-budget-instruction/ @anza-xyz/svm @anza-xyz/fees
/fee/ @anza-xyz/svm @anza-xyz/fees
/log-collector/ @anza-xyz/svm
/program-runtime/ @anza-xyz/svm
/programs/bpf_loader/ @anza-xyz/svm
/programs/compute-budget/ @anza-xyz/svm
/programs/loader-v4/ @anza-xyz/svm
/programs/system/ @anza-xyz/svm
/runtime-transaction/ @anza-xyz/svm
/runtime-transaction/ @anza-xyz/tx-metadata
/svm-conformance/ @anza-xyz/svm
/svm-rent-collector/ @anza-xyz/svm
/svm-transaction/ @anza-xyz/svm
/svm/ @anza-xyz/svm
/svm/examples/Cargo.lock
/transaction-view/ @anza-xyz/svm
/transaction-view/ @anza-xyz/tx-metadata
14 changes: 8 additions & 6 deletions .github/scripts/downstream-project-spl-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,27 @@
set -e

here="$(dirname "${BASH_SOURCE[0]}")"
program="$1"

#shellcheck source=ci/downstream-projects/common.sh
source "$here"/../../ci/downstream-projects/common.sh

set -x
rm -rf spl
git clone https://github.com/solana-labs/solana-program-library.git spl
rm -rf "${program}"
git clone https://github.com/solana-program/"${program}".git

# copy toolchain file to use solana's rust version
cp "$SOLANA_DIR"/rust-toolchain.toml spl/
cd spl || exit 1
cp "$SOLANA_DIR"/rust-toolchain.toml "${program}"/
cd "${program}" || exit 1
echo "HEAD: $(git rev-parse HEAD)"

project_used_solana_version=$(sed -nE 's/solana-sdk = \"[>=<~]*(.*)\"/\1/p' <"token/program/Cargo.toml")
project_used_solana_version=$(sed -nE 's/solana = \"(.*)\"/\1/p' <"Cargo.toml")
echo "used solana version: $project_used_solana_version"
if semverGT "$project_used_solana_version" "$SOLANA_VER"; then
echo "skip"
export SKIP_SPL_DOWNSTREAM_PROJECT_TEST=1
return
fi

./patch.crates-io.sh "$SOLANA_DIR"
update_solana_dependencies . "$SOLANA_VER"
patch_crates_io_solana Cargo.toml "$SOLANA_DIR"
2 changes: 1 addition & 1 deletion .github/scripts/downstream-project-spl-install-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
set -e

sudo apt-get update
sudo apt-get install libudev-dev binutils-dev libunwind-dev protobuf-compiler -y
sudo apt-get install libudev-dev protobuf-compiler -y
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
test:
- {
name: "solana-sdk",
commands: ["cargo +$rust_nightly bench -p solana-sdk"],
commands: ["cargo +$rust_nightly bench -p solana-sdk --features openssl-vendored"],
}
- {
name: "solana-runtime",
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/crate-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

jobs:
check:
name: crate check
if: github.repository == 'anza-xyz/agave'
runs-on: ubuntu-20.04
steps:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/downstream-project-anchor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ env:

jobs:
test:
if: github.repository == 'anza-xyz/agave'
#if: github.repository == 'anza-xyz/agave'
if: false # restore once all program-specific repos are ready
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down
103 changes: 36 additions & 67 deletions .github/workflows/downstream-project-spl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
- v[0-9]+.[0-9]+
paths:
- "**.rs"
- "rust-toolchain.toml"
- "Cargo.toml"
- "Cargo.lock"
- "cargo-build-sbf"
Expand Down Expand Up @@ -39,6 +40,20 @@ jobs:
check:
if: github.repository == 'anza-xyz/agave'
runs-on: ubuntu-latest
strategy:
matrix:
programs:
- associated-token-account
- feature-proposal
- instruction-padding
- memo
- record
- single-pool
- slashing
- stake-pool
- token-2022
# re-enable with https://github.com/buffalojoec/mollusk/pull/74
# - token
steps:
- uses: actions/checkout@v4

Expand All @@ -53,45 +68,20 @@ jobs:
- shell: bash
run: |
source .github/scripts/downstream-project-spl-install-deps.sh
source .github/scripts/downstream-project-spl-common.sh
source .github/scripts/downstream-project-spl-common.sh "${{ matrix.programs }}"
if [ -n "$SKIP_SPL_DOWNSTREAM_PROJECT_TEST" ]; then
exit 0
fi
cargo check
test:
test_cli:
if: github.repository == 'anza-xyz/agave'
runs-on: ubuntu-latest
strategy:
matrix:
arrays:
[
{
test_paths: ["token/cli"],
required_programs:
[
"token/program",
"token/program-2022",
"associated-token-account/program",
"instruction-padding/program",
],
},
{
test_paths: ["single-pool/cli"],
required_programs:
[
"single-pool/program",
],
},
{
test_paths: ["token-upgrade/cli"],
required_programs:
[
"token-upgrade/program",
],
},
]
programs:
- single-pool
- token-2022
steps:
- uses: actions/checkout@v4

Expand All @@ -106,45 +96,30 @@ jobs:
- shell: bash
run: |
source .github/scripts/downstream-project-spl-install-deps.sh
source .github/scripts/downstream-project-spl-common.sh
source .github/scripts/downstream-project-spl-common.sh "${{ matrix.programs }}"
if [ -n "$SKIP_SPL_DOWNSTREAM_PROJECT_TEST" ]; then
exit 0
fi
programStr="${{ tojson(matrix.arrays.required_programs) }}"
IFS=', ' read -ra programs <<<"${programStr//[\[\]$'\n'$'\r' ]/}"
for program in "${programs[@]}"; do
$CARGO_BUILD_SBF --manifest-path "$program"/Cargo.toml
done
testPathsStr="${{ tojson(matrix.arrays.test_paths) }}"
IFS=', ' read -ra test_paths <<<"${testPathsStr//[\[\]$'\n'$'\r' ]/}"
for test_path in "${test_paths[@]}"; do
cargo test --manifest-path "$test_path"/Cargo.toml
done
$CARGO_BUILD_SBF --manifest-path program/Cargo.toml
cargo test --manifest-path clients/cli/Cargo.toml
cargo-test-sbf:
if: github.repository == 'anza-xyz/agave'
runs-on: ubuntu-latest
strategy:
matrix:
programs:
- [token/program]
- [
instruction-padding/program,
token/program-2022,
token/program-2022-test,
]
- [
associated-token-account/program,
associated-token-account/program-test,
]
- [token-upgrade/program]
- [feature-proposal/program]
- [governance/addin-mock/program, governance/program]
- [name-service/program]
- [stake-pool/program]
- [single-pool/program]
- associated-token-account
- feature-proposal
- instruction-padding
- memo
- record
- single-pool
- slashing
- stake-pool
- token-2022
# re-enable with https://github.com/buffalojoec/mollusk/pull/74
# - token
steps:
- uses: actions/checkout@v4

Expand All @@ -159,14 +134,8 @@ jobs:
- shell: bash
run: |
source .github/scripts/downstream-project-spl-install-deps.sh
source .github/scripts/downstream-project-spl-common.sh
source .github/scripts/downstream-project-spl-common.sh "${{ matrix.programs }}"
if [ -n "$SKIP_SPL_DOWNSTREAM_PROJECT_TEST" ]; then
exit 0
fi
programStr="${{ tojson(matrix.programs) }}"
IFS=', ' read -ra programs <<<"${programStr//[\[\]$'\n'$'\r' ]/}"
for program in "${programs[@]}"; do
$CARGO_TEST_SBF --manifest-path "$program"/Cargo.toml
done
$CARGO_TEST_SBF --manifest-path program/Cargo.toml
32 changes: 23 additions & 9 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,29 @@ pull_request_rules:
- or:
- -files~=(\.rs|Cargo\.toml|Cargo\.lock|cargo-build-sbf|cargo-test-sbf|ci/downstream-projects/run-spl\.sh|\.github/workflows/downstream-project-spl\.yml)$
- and:
- status-success=cargo-test-sbf (token/program)
- status-success=cargo-test-sbf (instruction-padding/program, token/program-2022, token/program-2022-test)
- status-success=cargo-test-sbf (associated-token-account/program, associated-token-account/program-test)
- status-success=cargo-test-sbf (token-upgrade/program)
- status-success=cargo-test-sbf (feature-proposal/program)
- status-success=cargo-test-sbf (governance/addin-mock/program, governance/program)
- status-success=cargo-test-sbf (name-service/program)
- status-success=cargo-test-sbf (stake-pool/program)
- status-success=cargo-test-sbf (single-pool/program)
- status-success=check (associated-token-account)
- status-success=check (feature-proposal)
- status-success=check (instruction-padding)
- status-success=check (memo)
- status-success=check (record)
- status-success=check (single-pool)
- status-success=check (slashing)
- status-success=check (stake-pool)
- status-success=check (token-2022)
- status-success=test_cli (single-pool)
- status-success=test_cli (token-2022)
- status-success=cargo-test-sbf (associated-token-account)
- status-success=cargo-test-sbf (feature-proposal)
- status-success=cargo-test-sbf (instruction-padding)
- status-success=cargo-test-sbf (memo)
- status-success=cargo-test-sbf (record)
- status-success=cargo-test-sbf (single-pool)
- status-success=cargo-test-sbf (slashing)
- status-success=cargo-test-sbf (stake-pool)
- status-success=cargo-test-sbf (token-2022)
- or:
- -files~=(Cargo\.toml|.github/workflows/crate-check\.yml|ci/check-crates\.sh)$
- check-success=crate check
actions:
merge:
method: squash
Expand Down
8 changes: 5 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ and follows a [Backwards Compatibility Policy](https://docs.solanalabs.com/backw

Release channels have their own copy of this changelog:
* [edge - v2.2](#edge-channel)
* [beta - v2.1](https://github.com/solana-labs/solana/blob/v2.1/CHANGELOG.md)
* [stable - v2.0](https://github.com/solana-labs/solana/blob/v2.0/CHANGELOG.md)
* [beta - v2.1](https://github.com/anza-xyz/agave/blob/v2.1/CHANGELOG.md)
* [stable - v2.0](https://github.com/anza-xyz/agave/blob/v2.0/CHANGELOG.md)

<a name="edge-channel"></a>
## [2.2.0] - Unreleased
* Changes
* CLI:
* Add global `--skip-preflight` option for skipping preflight checks on all transactions sent through RPC. This flag, along with `--use-rpc`, can improve success rate with program deployments using the public RPC nodes.
* Unhide `--accounts-db-access-storages-method` for agave-validator and agave-ledger-tool
* Add new command `solana feature revoke` for revoking pending feature activations. When a feature is activated, `solana feature revoke <feature-keypair> <cluster>` can be used to deallocate and reassign the account to the System program, undoing the operation. This can only be done before the feature becomes active.
* Unhide `--accounts-db-access-storages-method` for agave-validator and agave-ledger-tool and change default to `file`
* Remove tracer stats from banking-trace. `banking-trace` directory should be cleared when restarting on v2.2 for first time. It will not break if not cleared, but the file will be a mix of new/old format. (#4043)

## [2.1.0]
* Breaking:
Expand Down
Loading

0 comments on commit 292245b

Please sign in to comment.