Commit Graph

22982 Commits

Author SHA1 Message Date
Brooks b8ed614bfc
Deprecates --accounts-hash-interval-slots (#31987)
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
2023-06-20 19:55:52 -04:00
samkim-crypto 1bc101252c
[zk-token-sdk] Use `TryFrom<&[T]>` for `&[T]` instead of `arrayref` (#31959)
* remove `arrayref` from `auth_encryption`

* remove `arrayref` from `sigma_proofs`

* refactor `canonical_scalar_from_slice`

* remove `arrayref` from `Cargo.toml`

* cargo lock
2023-06-21 06:14:18 +09:00
samkim-crypto 91ec92cd76
[zk-token-sdk] Make `AeCiphertext` inner fields be private (#32188)
make `AeCiphertext` fields and types be private
2023-06-21 06:07:58 +09:00
samkim-crypto 1616123b84
[zk-token-sdk] Make inner scalar and ristretto point of `PedersenOpening` and `PedersenCommitment` private (#32187)
* make `PedersenOpening` inner scalar private

* make `PedersenCommitment` inner point private
2023-06-21 06:07:40 +09:00
behzad nouri 469661d217
removes outdated tvu_forward socket (#32101)
Shreds are no longer sent to tvu_forward socket.
2023-06-20 20:50:16 +00:00
HaoranYi 203544293b
Add epoch_rewards to sysvar cache (#32155)
add epoch_rewards to sysvar cache

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-20 15:01:34 -05:00
Brooks bfaf073ecf
Tests get snapshot archive format from snapshot config (#32209) 2023-06-20 15:44:03 -04:00
dependabot[bot] 5c679e458b
Bump serde from 1.0.163 to 1.0.164 (#32028)
* Bump serde from 1.0.163 to 1.0.164

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.163 to 1.0.164.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.163...v1.0.164)

---
updated-dependencies:
- dependency-name: serde
  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-06-20 19:43:23 +00:00
dependabot[bot] ad96860a7f
Bump sha2 from 0.10.6 to 0.10.7 (#32202)
* Bump sha2 from 0.10.6 to 0.10.7

Bumps [sha2](https://github.com/RustCrypto/hashes) from 0.10.6 to 0.10.7.
- [Commits](https://github.com/RustCrypto/hashes/compare/sha2-v0.10.6...sha2-v0.10.7)

---
updated-dependencies:
- dependency-name: sha2
  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-06-20 12:53:14 -06:00
dependabot[bot] fcac1c06e8
Bump serde_json from 1.0.96 to 1.0.97 (#32203)
* Bump serde_json from 1.0.96 to 1.0.97

Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.96 to 1.0.97.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.96...v1.0.97)

---
updated-dependencies:
- dependency-name: serde_json
  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-06-20 12:50:27 -06:00
Ashwin Sekar 4ba78de8cb
Add metrics for invalid vote timestamps (#32206) 2023-06-20 17:29:13 +00:00
HaoranYi 2e9aeff8dd
Enable partitioned epoch reward by feature id (#32174)
enable partitioned epoch reward feature by feature id
update stake rewards tests with partitioned epoch rewards feature enable

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-20 12:12:50 -05:00
Yueh-Hsuan Chiang c56d0bc6a6
[TieredStorage] Make AccountMetaFlags::new_from pub (#32194)
#### Summary of Changes
The newly introduced AccountMetaFlags::new_from must be pub
in order to make the tiered storage writer able to use it.
2023-06-21 00:00:59 +08:00
Logan Yu 24ffc113bb
fix errors in lookup tables code example (#32055)
* fix errors in lookup tables code example

* Update lookup-tables.md

* add missing = and change variable name to txid
2023-06-20 13:56:56 +00:00
Yihau Chen ce929bead2
chore: remove unused code (#32195) 2023-06-20 10:48:44 +08:00
samkim-crypto d654715adf
[zk-token-sdk] remove non-pod structs `TransferPubkeys` and `TransferWithFeePubkeys` (#32042)
* remove decoded `TransferWithFeePubkeys`

* remove decoded `TransferPubkey`

* rename `TransferPubkeys` and `TransferWithFeePubkeys` fields

* relocate `TransferPubkeys` and `TransferWithFeePubkeys`

* reorder proof verify parameters for transfer and transfer with fee

* clippy
2023-06-20 07:07:30 +09:00
Tyera 748223c928
Use workspace serde dependency in program-runtime (#32196)
Use workspace serde dependency
2023-06-19 19:36:05 +00:00
dependabot[bot] 5326b0db5b
Bump blake3 from 1.3.3 to 1.4.0 (#32041)
* Bump blake3 from 1.3.3 to 1.4.0

Bumps [blake3](https://github.com/BLAKE3-team/BLAKE3) from 1.3.3 to 1.4.0.
- [Release notes](https://github.com/BLAKE3-team/BLAKE3/releases)
- [Commits](https://github.com/BLAKE3-team/BLAKE3/compare/1.3.3...1.4.0)

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

---------

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-06-19 12:53:51 -06:00
dependabot[bot] eb380bead9
Bump js-sys from 0.3.63 to 0.3.64 (#32089)
* Bump js-sys from 0.3.63 to 0.3.64

Bumps [js-sys](https://github.com/rustwasm/wasm-bindgen) from 0.3.63 to 0.3.64.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

---
updated-dependencies:
- dependency-name: js-sys
  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-06-19 12:52:37 -06:00
dependabot[bot] 7cd3c1e8a6
Bump wasm-bindgen from 0.2.86 to 0.2.87 (#32120)
* Bump wasm-bindgen from 0.2.86 to 0.2.87

Bumps [wasm-bindgen](https://github.com/rustwasm/wasm-bindgen) from 0.2.86 to 0.2.87.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/compare/0.2.86...0.2.87)

---
updated-dependencies:
- dependency-name: wasm-bindgen
  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-06-19 12:52:25 -06:00
dependabot[bot] 66040df0fa
Bump proc-macro2 from 1.0.59 to 1.0.60 (#32027)
* Bump proc-macro2 from 1.0.59 to 1.0.60

Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.59 to 1.0.60.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.59...1.0.60)

---
updated-dependencies:
- dependency-name: proc-macro2
  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-06-19 12:51:06 -06:00
dependabot[bot] 96319dbc94
Bump log from 0.4.18 to 0.4.19 (#32070)
* Bump log from 0.4.18 to 0.4.19

Bumps [log](https://github.com/rust-lang/log) from 0.4.18 to 0.4.19.
- [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.18...0.4.19)

---
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-06-19 12:10:57 -06:00
Alessandro Decina 8757f8df73
programs/sbf: c/float: work on stack values (#32192)
Before this change the program was writing into the realloc region.
Direct mapping is going to  enforce permissions on the realloc region,
and the program doesn't have permissions to write, so move to working on
the stack to avoid access violation errors.
2023-06-19 18:04:19 +02: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
samkim-crypto 428283c9ef
[zk-token-sdk] Refactor pod `FeeParameters` conversion and remove manual byte conversion for the type (#32149)
* replace `decoded::TransferAmountCiphertext` to `DecodedTransferAmountCiphertext`

* refactor pod convert logic for fee parameters

* remove manual byte conversions for `FeeParameters`

* fix error from rebase
2023-06-18 07:51:49 +09:00
Brooks de024bf98d
Adds `--boot-from-local-state` to validator (#32168) 2023-06-16 16:29:04 -04:00
galactus 2ceabd9368
Simd 47 syscall sysvar last restart slot (#31957)
* add sysvar and logic for last restart slot

* cleanup

* add test for getting last restart slot from account

* format code

* add some basic rustdoc

* copy+paste error

* feature flag for last_restart_slot

* add to sysvars.md

* updated wording in sysvars.md

* rename sol_get_last_restart_slot_sysvar > sol_get_last_restart_slot

* create sbf C header for sol_get_last_restart_slot

* cleanup imports

* reverted hardened_unpack workaround

* cleanup imports

* cleanup logs + blank lines

* Implementing ui changes for last restart slot, nit

* Some more nit change and implementing the UI for sysvar

* fixing the CI

* Minor clippy fix

* format changes

* changes suggested by mvines and lichtso

* increase timeout in local_cluster test

* fix code format

* use keypair for feature flag from mvines

* delete test.json file

* Revert "increase timeout in local_cluster test"

This reverts commit a67465ae22.

* last restart slot should be always less than or equal to current slot

* fixing bug

* changes after  steviez comments

* format issue fixed

* fixing the comment on premature application of future hardfork

* nit change in test

Co-authored-by: steviez <steven@solana.com>

* reverting sysvar_cache.rs because change was not necessary

---------

Co-authored-by: steve-gg <grooviegermanikus@gmail.com>
Co-authored-by: steviez <steven@solana.com>
2023-06-16 20:14:02 +00:00
behzad nouri 987e8eeeaf
removes feature gate code dropping redundant turbine path (#32075) 2023-06-16 19:53:05 +00:00
Jeff Washington (jwash) 174ceba82b
rename to stake_rewards_by_partition for clarity (#32165) 2023-06-16 19:28:53 +00:00
Brooks f720ca3339
`bank_forks_from_snapshot()` always returns starting snapshot hashes (#32178) 2023-06-16 14:38:03 -04:00
Brooks 2aac9fca35
Adds --boot-from-local-state to ledger-tool create-snapshot (#32032) 2023-06-16 12:58:57 -04:00
HaoranYi 39d9f8974d
Revert "add test for is_partitioned_rewards_feature_enabled (#32158)" (#32176)
This reverts commit d06b099ecb.

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-16 11:56:05 -05:00
HaoranYi d06b099ecb
add test for is_partitioned_rewards_feature_enabled (#32158)
* add set_partitioned_rewards_enabled_for_test fn

* reveiws

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-16 11:07:07 -05:00
HaoranYi ec9fdbf2c3
Add epoch reward feature id (#32051)
* add epoch reward feature id

* add feature gate issue id

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-16 08:41:08 -05:00
HaoranYi af7b7f1436
Refactor reward block calculation fn (#32167)
refactor reward block calculation fn

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-16 08:40:23 -05:00
samkim-crypto 37f51e8376
[zk-token-sdk] Define `FeeEncryption` as a wrapper around `GroupedElGamalCiphertext` (#32144)
* define `FeeEncryption` as a wrapper around `GroupedElGamalCiphertext`

* define pod `FeeEncryption` as a wrapper around `GroupedElGamalCiphertext2Handles`

* update proof data computation

* add comments about unwraps
2023-06-16 17:53:36 +09:00
Brooks 47ff3cecc9
Enables creating snapshots after booting from local state (#32137) 2023-06-15 22:54:32 -04:00
Jeff Washington (jwash) b1b7ae5e09
cleanup math in distribute_partitioned_epoch_rewards (#32164) 2023-06-15 16:17:38 -07:00
Jeff Washington (jwash) b4265217e6
update begin_partitioned_rewards to include sysvar (#32151)
* update begin_partitioned_rewards to include sysvar

* cleanup
2023-06-15 14:00:24 -07:00
Andrew Fitzgerald a875562ccd
Funding transactions must specify data limit (#32131) 2023-06-15 18:53:04 +00:00
Jeff Washington (jwash) d79b565c72
connect `begin_partitioned_rewards` to bank (#32152) 2023-06-15 11:51:10 -07:00
Andrew Fitzgerald 90812fac76
bench-tps tests use bank w/ all features enabled (#32142) 2023-06-15 17:38:39 +00:00
Ashwin Sekar 01d3546de0
Increment timestamp on refreshed votes (#31908) 2023-06-15 10:38:22 -07:00
Jeff Washington (jwash) e7a676dc01
add distribute_partitioned_epoch_rewards (#32124)
* add distribute_partitioned_epoch_rewards

* reviews

* reanme

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-15 11:32:44 -05:00
Jeff Washington (jwash) 988bff93c8
deactivate_epoch_rewards_status burns sysvar (#32143)
* deactivate_epoch_reward_status burns sysvar

* warn to info

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-15 10:36:50 -05:00
Raza eabe107066
[docs] Add beginner-friendly intro to Solana guide (#31861)
* Docs: Create intro to Solana guide

* Docs: Fix formatting on getstarted/overview

* Docs: Fix linter errors on getstarted/overview
2023-06-14 21:35:19 -05:00
Jon Cinque bd4196b084
Revert "Bump borsh from 0.10.3 to 0.11.0 (#31964)" (#32145)
This reverts commit 902d8b73fe.
2023-06-15 02:36:37 +02:00
hana b60d12418f
impl Signers for Arc<dyn Signer> arrays (#32136) 2023-06-14 17:20:09 -07:00
Jeff Washington (jwash) 00b5c40122
add partitioned rewards sysvar fns (#32128) 2023-06-14 16:08:15 -07:00
Brooks ae65b35d9b
Removes StakeInstruction::GetMinimumDelegation featurization (#32121) 2023-06-14 19:01:17 -04:00