Commit Graph

22783 Commits

Author SHA1 Message Date
Ashwin Sekar 1b79875f51
Relax gossip to banking stage filtering to allow refreshed votes (#31879) 2023-05-31 23:50:36 +00:00
samkim-crypto 9216ff8c3e
[zk-token-sdk] Refactor transfer instruction (#31848)
* refactor `instruction::transfer` and `instruction::transfer_with_fee` into separate submodule

* rename `transfer.rs` to `transfer_without_fee.rs` to satisfy clippy

* refactor transfer encryptions into separate submodule

* refactor `FeeParameters` to parent transfer module

* refactor `Role` and ciphertext arithmetic specific to transfer instruction into transfer submodule

* fix visibility

* cargo fmt

* change `transfer_with_fee` and `transfer_without_fee` to `with_fee` and `without_fee`

* fix rebase errors
2023-06-01 06:55:23 +09:00
Lijun Wang 944310b751
Correct misleading comments for repair test (#31844)
* Correct misleading comments for repair test
2023-05-31 13:23:23 -07:00
steviez debe794987
Replace improper &Arc<...> with Arc<...> in Bank and Accounts (#31892)
The callstack updated in this PR passed an &Arc<...> down only to have
the bottom level clone the reference. Thus, we are giving shared
ownership so the reference is a bit redundant and arguably obscures the
intention to clone further down the callstack.
2023-05-31 12:36:44 -05:00
Yihau Chen 420784d19e
chore: use workspace's tempfile (#31895) 2023-05-31 16:58:40 +00:00
Brooks 2fc1dc1bf6
EpochAccountsHash tests no longer ignore shutdown errors (#31883) 2023-05-31 09:11:06 -04:00
Brooks 9220e53e23
ledger-tool: Clean up load_bank_forks() (#31870) 2023-05-31 06:50:33 -04:00
Bernie Blume c65605802a
Correct LICENSE to conform with https://apache.org/licenses/LICENSE-2.0 (#31860)
https://apache.org/licenses/LICENSE-2.0 lays out the correct way to apply the Apache 2.0 license to a work.

There is a section named "HOW TO APPLY THE APACHE LICENSE TO YOUR WORK". It says that applying the license to a work is easy: "Include a copy of the Apache License, typically in a file called LICENSE, in your work".

However, in the Solana repo, the contents of the file LICENSE is NOT a copy of the Apache 2.0 license. Instead, it is the text mention further down on that page, that is intended to be used as a SECTION within a specific FILE of a work, with the goal of applying the Apache license only to that SPECIFIC FILE.

This PR corrects these issue and places the correct contents of the Apache 2.0 license, as per https://apache.org/licenses/LICENSE-2.0, into the LICENSE file.
2023-05-31 03:06:42 +00:00
samkim-crypto 502f118931
[zk-token-sdk] Add `GroupedElGamalCiphertext` type (#31849)
* add `GroupedElGamalCiphertext` type

* add `GroupedElGamalCiphertext` type in `zk_token_elgamal::pod`

* cargo fmt

* Apply suggestions from code review

Co-authored-by: Tyera <teulberg@gmail.com>

* cargo fmt

* add explanation on `expected_byte_length`

* use `checked_add` and `checked_mul`

---------

Co-authored-by: Tyera <teulberg@gmail.com>
2023-05-31 10:01:44 +09:00
dependabot[bot] 1af1d42b9a
Bump chrono from 0.4.24 to 0.4.26 (#31884)
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.24 to 0.4.26.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](chronotope/chrono@v0.4.24...v0.4.26)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Signed-off-by: illia.bobyr@solana.com
2023-05-30 16:36:28 -07:00
Brooks 8e191bbc56
Downgrades log to warn if reading bank snapshot from dir fails (#31885) 2023-05-30 19:35:06 -04:00
Yueh-Hsuan Chiang 33d64c6b2f
[TieredStorage] Add doc comments for byte_block.rs (#31863)
#### Summary of Changes
Add doc comments for byte_block.rs

#### Test Plan
This is a comment-only PR.  No code change.
2023-05-30 16:25:25 -07:00
samkim-crypto e4fe9335e7
[zk-token-sdk] Refactor `zk-token-elgamal` conversion code for authenticated encryption, range proof, and sigma proof types (#31855)
* refactor convert logic for `AeCiphertext`

* refactor convert logic for `RangeProof`

* refactor convert logic for sigma proof types

* Apply suggestions from code review

Co-authored-by: Tyera <teulberg@gmail.com>

---------

Co-authored-by: Tyera <teulberg@gmail.com>
2023-05-31 08:12:38 +09:00
dependabot[bot] 66558fb5c4
Bump ctrlc from 3.3.1 to 3.4.0 (#31878)
Bumps [ctrlc](https://github.com/Detegr/rust-ctrlc) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/Detegr/rust-ctrlc/releases)
- [Commits](Detegr/rust-ctrlc@3.3.1...3.4.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: illia.bobyr@solana.com
2023-05-30 15:49:49 -07:00
dependabot[bot] 2410b34743
Bump openssl from 0.10.52 to 0.10.53 (#31865)
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.52 to 0.10.53.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](sfackler/rust-openssl@openssl-v0.10.52...openssl-v0.10.53)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Signed-off-by: illia.bobyr@solana.com
2023-05-30 15:48:38 -07:00
dependabot[bot] 8b3f0c47e6
Bump once_cell from 1.17.1 to 1.17.2 (#31868)
Bumps [once_cell](https://github.com/matklad/once_cell) from 1.17.1 to 1.17.2.
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](matklad/once_cell@v1.17.1...v1.17.2)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Signed-off-by: illia.bobyr@solana.com
2023-05-30 15:44:05 -07:00
dependabot[bot] bd1a109036
Bump log from 0.4.17 to 0.4.18 (#31856)
* Bump log from 0.4.17 to 0.4.18

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

---
updated-dependencies:
- dependency-name: log
  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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-05-30 16:05:16 -06:00
dependabot[bot] 6ef0a223c9
Bump const_format from 0.2.30 to 0.2.31 (#31867)
Bumps [const_format](https://github.com/rodrimati1992/const_format_crates) from 0.2.30 to 0.2.31.
- [Release notes](https://github.com/rodrimati1992/const_format_crates/releases)
- [Changelog](https://github.com/rodrimati1992/const_format_crates/blob/master/Changelog.md)
- [Commits](https://github.com/rodrimati1992/const_format_crates/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-30 15:58:51 -06:00
Brooks c569a37713
Handle errors when sending an accounts package during shutdown (#31874) 2023-05-30 17:42:33 -04:00
Kevin Ji 8c73a2cae9
Bump borsh to 0.10.3 (#30975)
* Bump borsh to 0.10.3

transaction-status relies on SPL which still requires borsh 0.9, so
until SPL also gets updated that package alone will use an older version of
borsh.

* ci: Temporarily disable spl and openbook-dex builds
2023-05-30 23:33:21 +02:00
Yueh-Hsuan Chiang 5334efd63c
Byte-blocks utils for TieredStorage (1/N) (#31815)
#### Summary of Changes
This PR includes the util structs for writing byte blocks, which will be used
by the TieredStorage writer (currently used in the prototype #30626).

The PR only includes the Raw encoding format.  Will add more in subsequent PRs.

#### Test Plan
Tested in mnb with the prototype implementation of the tiered-storage (#30626)
Unit tests are also included in this PR.
2023-05-30 14:14:29 -07:00
Tyera 6bd4ae6955
Clean up Spl type conversions (#31845)
* Use spl-token ids directly in program-id checks

* Remove id redefinitions

* Deprecate pubkey_from_spl_token and remove usage

* Deprecate spl_token_pubkey and remove usage

* Deprecate native mint helpers and remove usage

* Deprecate spl_token_instruction and remove usage
2023-05-30 14:34:38 -06:00
Will Hickey f63f811170
Add Mergify rules for v1.16 backport (#31875) 2023-05-30 15:07:05 -05:00
Brooks a4ff9be5fb
Handle errors when sending a snapshot package during shutdown (#31873) 2023-05-30 16:06:10 -04:00
Will Hickey b799b8632c
Bump version to 1.17 (#31806) 2023-05-30 15:04:47 -05:00
Lijun Wang 0426a2d96e
Flkay quic test in check_block_multiple_connections (#31871)
Flkay quic test -- put the test code in else condition
2023-05-30 12:43:07 -07:00
dependabot[bot] 8203c6e85a
Bump indicatif from 0.17.3 to 0.17.4 (#31857)
* Bump indicatif from 0.17.3 to 0.17.4

Bumps [indicatif](https://github.com/console-rs/indicatif) from 0.17.3 to 0.17.4.
- [Release notes](https://github.com/console-rs/indicatif/releases)
- [Commits](https://github.com/console-rs/indicatif/compare/0.17.3...0.17.4)

---
updated-dependencies:
- dependency-name: indicatif
  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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-05-30 10:34:01 -06:00
Jeff Washington (jwash) 6c520396cd
bank process_new_epoch takes parent_height (#31820) 2023-05-30 08:58:40 -05:00
Jeff Washington (jwash) 588a7a4e53
add RewardsStoreMetrics for partitioned rewards (#31819) 2023-05-30 08:58:00 -05:00
Jeff Washington (jwash) 0c64e26d53
partitioned rewards helper functions (#31818) 2023-05-30 08:57:31 -05:00
Jeff Washington (jwash) 03b260a29f
allow stake tests to wait for rewards payout (#31821) 2023-05-30 08:56:02 -05:00
Michael db8f118ec6
Add --active-stake-alert-threshold to watchtower (#31858)
* Add --active-stake-alert-threshold to watchtower

* Fix duplicate code

* Adjust CLI help comment

* Fmt

* Add percentage check to cli arg

* fix import

* fmt
2023-05-29 23:33:11 +00:00
samkim-crypto f7b34e46ce
[zk-token-sdk] Refactor `zk-token-elgamal` conversion code for `elgamal` and `pedersen` pod types (#31846)
* refactor `DecryptHandle` into `pod::elgamal` from `pod::pedersen`

* refactor conversion for elgamal

* refactor conversion for pedersen

* change variable names

* add brief description of the types

* fix variable names in comments
2023-05-29 12:32:53 +09:00
samkim-crypto 24a4563484
[zk-token-sdk] Update equality proof abbreviated module names to non-abbreviated names (#31851)
* rename `sigma_proof::ctxt_comm_equality_proof` to non-abbreviated name

* rename `sigma_proof::ctxt_ctxt_equality_proof` to non-abbreviated name

* rename `instruction::ctxt_ctxt_equality` to non-abbreviated name
2023-05-29 09:49:17 +09:00
bji 0957a50a34
Add snapshots arguments to the ledger tool command because numerous o… (#31847)
Add snapshots arguments to the ledger tool command because numerous operators
have been tripped up by not realizing that these arguments are needed for
fairly standard configs.  The additional arguments are harmless for those
who don't separate snapshots into separate dirs, but essential for those
who do.
2023-05-27 15:03:59 +00:00
samkim-crypto 2ebf38efd0
[zk-token-sdk] Add ciphertext-commitment equality proof instruction (#31808)
* add ciphertext-commitment proof data

* add ciphertext-commitment proof instruction

* update proof program processor for ciphertext-commitment equality proof

* cargo fmt

* update compute units

* rename submodule `ctxt_comm_equality` to `ciphertext_commitment_equality`

* update import statements

* fix mixed conflict

* remove `native_programs_consume_cu`
2023-05-27 11:25:29 +09:00
samkim-crypto 93efc13bbf
[zk-token-sdk] Add encryption error variant `SeedLengthTooShort` and remove variant `PubkeyDoesNotExist` (#31840) 2023-05-27 09:14:13 +09:00
dependabot[bot] e58ad81b64
Bump syn from 2.0.16 to 2.0.18 (#31843)
Bumps [syn](https://github.com/dtolnay/syn) from 2.0.16 to 2.0.18.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](dtolnay/syn@2.0.16...2.0.18)

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

Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: illia.bobyr@solana.com
2023-05-26 15:24:58 -07:00
samkim-crypto 8c7dc9306f
[zk-token-sdk] Use full variable names (#31828)
* update variable names in `auth_encryption`

* update variable names in `pedersen`
2023-05-27 06:32:13 +09:00
dependabot[bot] 90c8a3f909
Bump proc-macro2 from 1.0.58 to 1.0.59 (#31839)
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.58 to 1.0.59.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](dtolnay/proc-macro2@1.0.58...1.0.59)

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

Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: illia.bobyr@solana.com
2023-05-26 14:15:08 -07:00
alpharush 588172b66c
remove inaccurate comment about system instructions (#31829)
Update lib.rs
2023-05-26 20:54:44 +00:00
samkim-crypto 688fa0bf0f
[zk-token-sdk] Rename variable `tag` to `public_seed` in encryption key `new_from_signer` functions (#31835)
rename `tag` to `public_seed` in `new_from_signer` functions
2023-05-27 05:50:22 +09:00
samkim-crypto ad4d1e5ff2
[zk-token-sdk] Add aggregate range proof instructions (#31793)
* add aggregate range proof instructions data

* add aggregate range proof instruction

* update proof program processor for aggregate range proof instructions

* cargo fmt

* Update zk-token-sdk/src/instruction/aggregate_range_proof/aggregate_range_proof_256.rs

Co-authored-by: mvines <mvines@gmail.com>

* add remark in instruction description that context state account must be pre-allocated

* use `u64::BITS` and `u128::BITS`

* add proof description in `zk_token_proof_instruction.rs`

* rename instruction names to `VerifyBatchedRangeProofU{N}`

* rename module names from `aggregate` to `batched`

* add `tokio::test` that was lost in rebase

---------

Co-authored-by: mvines <mvines@gmail.com>
2023-05-27 05:46:11 +09:00
dependabot[bot] d4baddf8e8
Bump base64 from 0.21.1 to 0.21.2 (#31838)
Bumps [base64](https://github.com/marshallpierce/rust-base64) from 0.21.1 to 0.21.2.
- [Changelog](https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md)
- [Commits](marshallpierce/rust-base64@v0.21.1...v0.21.2)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: illia.bobyr@solana.com
2023-05-26 12:21:22 -07:00
dependabot[bot] 8214dc375f
Bump regex from 1.8.2 to 1.8.3 (#31837)
Bumps [regex](https://github.com/rust-lang/regex) from 1.8.2 to 1.8.3.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](rust-lang/regex@1.8.2...1.8.3)

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

Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: illia.bobyr@solana.com
2023-05-26 12:19:51 -07:00
dependabot[bot] 3af150d100
Bump quote from 1.0.27 to 1.0.28 (#31836)
Bumps [quote](https://github.com/dtolnay/quote) from 1.0.27 to 1.0.28.
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](dtolnay/quote@1.0.27...1.0.28)

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

Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: illia.bobyr@solana.com
2023-05-26 12:17:05 -07:00
samkim-crypto 6d28fd455b
[zk-token-sdk] Refactor `zk-token-elgamal` pod types (#31814)
* move `pod.rs` to separate submodule

* refactor `ElGamalCiphertext` and `ElGamalPubkey` to separate submodule

* refactor `PedersenCommitment` and `DecryptHandle` to separate submodule

* refactor pod sigma proof types to separate submodule

* refactor pod range proof types to separate submodule

* refactor `AeCiphertext` into a separate submodule

* refactor instruction-related pod types to separate submodule

* Apply suggestions from code review

Co-authored-by: Tyera <teulberg@gmail.com>

---------

Co-authored-by: Tyera <teulberg@gmail.com>
2023-05-26 17:59:12 +09: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 c0611cb574
Don't needlessly expose Slot from solana-poh (#31832) 2023-05-26 16:08:24 +09:00
samkim-crypto bf6e248bb9
[zk-token-sdk] Add function docs for authenticated encryption (#31811)
* add function docs for authenticated encryption

* Apply suggestions from code review

Co-authored-by: Tyera <teulberg@gmail.com>

---------

Co-authored-by: Tyera <teulberg@gmail.com>
2023-05-26 16:01:07 +09:00