Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Valuecmp #1

Open
wants to merge 1,876 commits into
base: master
Choose a base branch
from
Open

Valuecmp #1

wants to merge 1,876 commits into from

Conversation

0xripleys
Copy link
Owner

Problem

Summary of Changes

Fixes #

samkim-crypto and others added 30 commits May 27, 2023 05:46
)

* 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 <[email protected]>

* 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 <[email protected]>
…ey `new_from_signer` functions (solana-labs#31835)

rename `tag` to `public_seed` in `new_from_signer` functions
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/[email protected])

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

Co-authored-by: dependabot-buildkite <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: [email protected]
* update variable names in `auth_encryption`

* update variable names in `pedersen`
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/[email protected])

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

Co-authored-by: dependabot-buildkite <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: [email protected]
…olana-labs#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`
solana-labs#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.
…abbreviated names (solana-labs#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
…al` and `pedersen` pod types (solana-labs#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
* Add --active-stake-alert-threshold to watchtower

* Fix duplicate code

* Adjust CLI help comment

* Fmt

* Add percentage check to cli arg

* fix import

* fmt
* 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](console-rs/indicatif@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] <[email protected]>

* [auto-commit] Update all Cargo lock files

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <[email protected]>
…abs#31881)

Bump borsh to 0.10.3 (solana-labs#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

(cherry picked from commit 8c73a2c)

Co-authored-by: Kevin Ji <[email protected]>
…olana-labs#31880)

Clean up Spl type conversions (solana-labs#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

(cherry picked from commit 6bd4ae6)

Co-authored-by: Tyera <[email protected]>
… authenticated encryption, range proof, and sigma proof types (backport of solana-labs#31855) (solana-labs#31887)

[zk-token-sdk] Refactor `zk-token-elgamal` conversion code for authenticated encryption, range proof, and sigma proof types (solana-labs#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 <[email protected]>

---------

Co-authored-by: Tyera <[email protected]>
(cherry picked from commit e4fe933)

Co-authored-by: samkim-crypto <[email protected]>
…na-labs#31848) (solana-labs#31904)

[zk-token-sdk] Refactor transfer instruction (solana-labs#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

(cherry picked from commit 9216ff8)

Co-authored-by: samkim-crypto <[email protected]>
…es (backport of solana-labs#31879) (solana-labs#31907)

Relax gossip to banking stage filtering to allow refreshed votes (solana-labs#31879)

(cherry picked from commit 1b79875)

Co-authored-by: Ashwin Sekar <[email protected]>
…ges (backport of solana-labs#31903) (solana-labs#31912)

* ledger-tool: Rename load_frozen_forks() and adjust error messages (solana-labs#31903)

This function has morphed as it has been updated, and the existing
function name is a bit of misnomer. Update the function name to use
terminology that I think is more clear and more consistent with what we
use core/src/validator.rs. Additionally, adjust the error messages to be
more clear about what exactly is wrong for when we can't process.

(cherry picked from commit 1d6b033)

# Conflicts:
#	ledger-tool/src/ledger_utils.rs

* Merge resolution

---------

Co-authored-by: steviez <[email protected]>
…s#31894) (solana-labs#31917)

ci: fix publish crate version checking (solana-labs#31894)

* ci: fix publish crate version checking

* ci: add warning when publish crates don't use worksapce version

(cherry picked from commit 405db3e)

Co-authored-by: Yihau Chen <[email protected]>
…na-labs#31915) (solana-labs#31924)

Geyser plugin thread would never shutdown correctly, as it is using an
exit flag that is never set.

(cherry picked from commit e0389ba)
…nd `VerifyBatchedGroupedCiphertext2HandlesValidity` proof instructions (backport of solana-labs#31816) (solana-labs#31918)

[zk-token-sdk] Add `VerifyGroupedCiphertext2HandlesValidity` and `VerifyBatchedGroupedCiphertext2HandlesValidity` proof instructions (solana-labs#31816)

* add grouped ciphertext validity proof data

* add batched grouped ciphertext validity proof data

* rename proof contexts and data for consistency

* add grouped ciphertext validity proof instructions

* Update zk-token-sdk/src/instruction/batched_grouped_ciphertext_validity.rs

Co-authored-by: Tyera <[email protected]>

---------

Co-authored-by: Tyera <[email protected]>
(cherry picked from commit 0495051)

Co-authored-by: samkim-crypto <[email protected]>
mergify bot and others added 26 commits October 20, 2023 10:25
…ckport of solana-labs#33651) (solana-labs#33716)

* Change getHealth to compare optimistically confirmed slots (solana-labs#33651)

The current getHealth mechanism checks a local accounts hash slot vs.
those of other nodes as specified by --known-validator. This is a
very coarse comparison given that the default for this value is 100
slots. More so, any nodes using a value larger than the default
(ie --incremental-snapshot-interval 500) will likely see getHealth
return status behind at some point.

Change the underlying mechanism of how health is computed. Instead of
using the accounts hash slots published in gossip, use the latest
optimistically confirmed slot from the cluster. Even when a node is
behind, it is able to observe cluster optimistically confirmed by slots
by viewing votes published in gossip.

Thus, the latest cluster optimistically confirmed slot can be compared
against the latest optimistically confirmed bank from replay to
determine health. This new comparison is much more granular, and not
needing to depend on individual known validators is also a plus.

(cherry picked from commit 8bd0e4c)

# Conflicts:
#	rpc/src/rpc.rs

* Resolve merge conflicts

---------

Co-authored-by: steviez <[email protected]>
…labs#33830) (solana-labs#33834)

Update Solang Solidity compiler to v0.3.3 (solana-labs#33830)

Signed-off-by: Sean Young <[email protected]>
(cherry picked from commit 8e0acf4)

Co-authored-by: Sean Young <[email protected]>
…na-labs#33904) (solana-labs#33906)

ci: fixed sccache version for sccache-action (solana-labs#33904)

(cherry picked from commit 1ce91a5)

Co-authored-by: Yihau Chen <[email protected]>
…ort of solana-labs#33383) (solana-labs#33977)

Add --release-with-debug option to cargo-install-all.sh (solana-labs#33383)

* Add --canary option to cargo-install-all for building with separate debug symbols

* lint

* Remove debug-assertions

* switch flag from --canary to --release-with-debug

(cherry picked from commit 87b4dc6)

Co-authored-by: Will Hickey <[email protected]>
…solana-labs#33967) (solana-labs#33983)

ci: add the ability to use GCS backend for sccache (solana-labs#33967)

(cherry picked from commit 5efba1f)

Co-authored-by: Yihau Chen <[email protected]>
…t of solana-labs#33850) (solana-labs#34069)

validator: deprecates `--disable-accounts-disk-index` (solana-labs#33850)

* validator: deprecates `--disable-accounts-disk-index`

* Fix checks failure

* Move disable_accounts_disk_index arg to alphabetical order

---------

Co-authored-by: Will Hickey <[email protected]>
(cherry picked from commit c55a6e5)

# Conflicts:
#	validator/src/cli.rs

Co-authored-by: Trent Nelson <[email protected]>
…4113) (solana-labs#34116)

cli: Hides the filler accounts args (solana-labs#34113)

(cherry picked from commit b4c652e)

Co-authored-by: Brooks <[email protected]>
…bs#32632) (solana-labs#34257)

* Add ability to output components that go into Bank hash (solana-labs#32632)

When a consensus divergance occurs, the current workflow involves a
handful of manual steps to hone in on the offending slot and
transaction. This process isn't overly difficult to execute; however, it
is tedious and currently involves creating and parsing logs.

This change introduces functionality to output a debug file that
contains the components go into the bank hash. The file can be generated
in two ways:
- Via solana-validator when the node realizes it has diverged
- Via solana-ledger-tool verify by passing a flag

When a divergance occurs now, the steps to debug would be:
- Grab the file from the node that diverged
- Generate a file for the same slot with ledger-tool with a known good
  version
- Diff the files, they are pretty-printed json

(cherry picked from commit 6bbf514)

# Conflicts:
#	Cargo.lock
#	ledger-tool/src/args.rs
#	ledger-tool/src/main.rs
#	programs/sbf/Cargo.lock
#	runtime/Cargo.toml
#	runtime/src/accounts_db.rs
#	validator/src/main.rs

* Merge conflict

* Reorder base_wotking with accounts_hash to match other branches

---------

Co-authored-by: steviez <[email protected]>
…backport of solana-labs#34256) (solana-labs#34302)

Output BankHashDetails file when leader drops its' own block (solana-labs#34256)

Currently, the file is generated when a node drops a block that was
produced by another node. However, it would also be beneficial to see
the account state when a node drops its' own block.

Output the file in this additional failure codepath

(cherry picked from commit 935e06f)

Co-authored-by: steviez <[email protected]>
… of solana-labs#33118) (solana-labs#34306)

* Ledger-tool CLI can specify accounts hash cache path (solana-labs#33118)

(cherry picked from commit adee97f)

---------

Co-authored-by: Brooks <[email protected]>
…tage (backport of solana-labs#34338) (solana-labs#34344)

patches slots_per_epoch vs last_slot ordering in shred_fetch_stage (solana-labs#34338)

(cherry picked from commit b1c701e)

Co-authored-by: behzad nouri <[email protected]>
…olana-labs#34374)

tokens: fix url clap arg name (solana-labs#34371)

Fix url clap arg name

(cherry picked from commit e8945d2)

Co-authored-by: Tyera <[email protected]>
…backport of solana-labs#34382) (solana-labs#34383)

* Add metrics for locking the blockhash queue in banking stage (solana-labs#34382)

(cherry picked from commit 2971e84)

# Conflicts:
#	core/src/banking_stage/consume_worker.rs

* resolve conflicts

---------

Co-authored-by: Justin Starry <[email protected]>
Co-authored-by: Justin Starry <[email protected]>
…ana-labs#34387)

* ci: add macos clippy test (solana-labs#34272)

* ci: add clippy test for macos and windows

* ci: remove windows from clippy test

* ci: cancel cargo clippy on Github Actions when new commits comming

* ci: set -e for .github/scripts/cargo-clippy-before-script.sh

(cherry picked from commit 4832b4e)

* scripts/cargo-clippy.sh: Extract our non-trivial cargo clippy command (manual backport of solana-labs#33982)

---------

Co-authored-by: Yihau Chen <[email protected]>
Co-authored-by: yihau <[email protected]>
…rograms (backport of solana-labs#34319) (solana-labs#34431)

* Fix tx_usage_counter use fetch_add.

* loaded_programs: fix tx_usage_counter for tombstone entries

---------

Co-authored-by: Alexander Meißner <[email protected]>
)

* Fixes BankForks::new_from_banks() not setting the root of LoadedPrograms.

---------

Co-authored-by: Alexander Meißner <[email protected]>
…_by_deployment_slot bug (solana-labs#34434)

* Makes sure only LoadedPrograms::remove_programs_with_no_entries() does remove first level entries.

* Adds explicit SecondLevel structure to LoadedPrograms.

---------

Co-authored-by: Alexander Meißner <[email protected]>
…olana-labs#34430) (solana-labs#34464)

* CI: add check for explicit spl-token-cli version (solana-labs#34430)

* Add script to specify spl-token-cli version

* Add check for spl-token-cli version to CI

* Add minor release branch cleanup instruction to unblock CI on the new stable branch

---------

Co-authored-by: Will Hickey <[email protected]>
(cherry picked from commit e6e191f)

* Set spl-token-cli version for installs

---------

Co-authored-by: Tyera <[email protected]>
…olana-labs#34457)

* Refactors contol flow in LoadedPrograms::extract() to have one path for found and one path for missing entries.

* Refactors LoadedPrograms::extract() to use a mutable parameter instead of returning the list of missing entries.

* Refactors Bank::replenish_program_cache() to support multiple extract iterations.

---------

Co-authored-by: Alexander Meißner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.