Commit Graph

22681 Commits

Author SHA1 Message Date
Sean Young 7ad43f5653
Update Solang Solidity compiler to v0.3.0 (#31756) 2023-05-23 12:58:02 +01:00
Yueh-Hsuan Chiang d9d2120d32
Make reconstruct_single_storage() returns SnapshotError (#31748)
#### Problem
The return error type -- io::Error used in reconstruct_single_storage()
isn't suitable to describe all possible errors inside the function such as
AccountsFileError.

#### Summary of Changes
This PR makes it return SnapshotError which can better handle
both AccountsFileError and io::Error.
2023-05-23 02:18:23 -07:00
dependabot[bot] 7ef4b776ea
Bump regex from 1.8.1 to 1.8.2 (#31754)
Bumps [regex](https://github.com/rust-lang/regex) from 1.8.1 to 1.8.2.
- [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.1...1.8.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: illia.bobyr@solana.com
2023-05-23 00:32:59 -07:00
dependabot[bot] 558447f825
Bump ctrlc from 3.2.5 to 3.3.0 (#31739)
Bumps [ctrlc](https://github.com/Detegr/rust-ctrlc) from 3.2.5 to 3.3.0.
- [Release notes](https://github.com/Detegr/rust-ctrlc/releases)
- [Commits](Detegr/rust-ctrlc@3.2.5...3.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: illia.bobyr@solana.com
2023-05-22 22:04:47 -07:00
dependabot[bot] 6cb2505dc8
Bump digest from 0.10.6 to 0.10.7 (#31733)
Bumps [digest](https://github.com/RustCrypto/traits) from 0.10.6 to 0.10.7.
- [Commits](RustCrypto/traits@digest-v0.10.6...digest-v0.10.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: illia.bobyr@solana.com
2023-05-22 20:45:05 -07:00
Yueh-Hsuan Chiang 586fd407bf
Refactor SnapshotError related code (#31632)
#### Problem
Part of the snapshot-related code uses io::Error while other parts use SnapshotError.

#### Summary of Changes
As SnapshotError can be created from io::Error, this PR makes snapshot-related
code to use SnapshotError instead.
2023-05-22 15:33:11 -07:00
Yueh-Hsuan Chiang c79a6e74e2
Add new error type AccountsFileError (#31631)
#### Problem
AccountsFile- and AppendVec-related code uses io::Error for their main error type.  However, there're many errors under AccountsFile that don't belong to io::Error.

#### Summary of Changes
This PR introduces AccountsFileError and makes minimum changes to keep the PR small.
Subsequent changes related to this will be in separate PRs.
2023-05-22 14:09:09 -07:00
vadorovsky bea062b1e6
Add alt_bn128 syscall tests (and fix related issues) (#31436)
* Fix C headers (the name of the syscall was incorrect).
* Add C SBF tests using the alt_bn128 syscall.
* Fix the Rust SBF program:
  * Do not use serde and array-bytes, provide test cases as byte arrays
    directly.
  * Use the `custom_heap_default` macro.
  * Replace `bpf` with `sbf` in the crate name.
* Execute both previously existing Rust tests and new C tests in
  `programs/sbf/tests`, so they are actually tested on CI.
2023-05-22 14:05:10 -07:00
Steven Luscher bc4d53c7ff
fix: `addressTableLookups` no longer serialized unless version set (#31729) 2023-05-22 10:29:18 -07:00
Lijun Wang 917f3d2586
Use unwrap_or_else for efficiency (#31747)
Use unwrap_or_else for efficiency.
2023-05-22 09:58:24 -07:00
dependabot[bot] 2549bff59c
Bump base64 from 0.21.0 to 0.21.1 (#31744)
* Bump base64 from 0.21.0 to 0.21.1

Bumps [base64](https://github.com/marshallpierce/rust-base64) from 0.21.0 to 0.21.1.
- [Changelog](https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md)
- [Commits](https://github.com/marshallpierce/rust-base64/commits)

---
updated-dependencies:
- dependency-name: base64
  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-22 10:33:21 -06:00
dependabot[bot] 3b876ea816
Bump hidapi from 2.3.2 to 2.3.3 (#31742)
Bumps [hidapi](https://github.com/ruabmbua/hidapi-rs) from 2.3.2 to 2.3.3.
- [Release notes](https://github.com/ruabmbua/hidapi-rs/releases)
- [Commits](https://github.com/ruabmbua/hidapi-rs/commits)

---
updated-dependencies:
- dependency-name: hidapi
  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-22 10:17:28 -06:00
dependabot[bot] f4b8975ac7
Bump console from 0.15.6 to 0.15.7 (#31745)
* Bump console from 0.15.6 to 0.15.7

Bumps [console](https://github.com/console-rs/console) from 0.15.6 to 0.15.7.
- [Changelog](https://github.com/console-rs/console/blob/master/CHANGELOG.md)
- [Commits](https://github.com/console-rs/console/compare/0.15.6...0.15.7)

---
updated-dependencies:
- dependency-name: console
  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-22 10:16:20 -06:00
Pankaj Garg 29904bb06b
More metrics for LoadedPrograms cache (#31735) 2023-05-22 07:53:54 -07:00
ripatel-jump adbabe2c34
rbpf-cli: fix deprecation notice (#31743)
Co-authored-by: Richard Patel <ripatel@jumptrading.com>
2023-05-22 04:47:05 -05:00
samkim-crypto 065a81e560
[zk-keygen] import `SeedDerivable` trait (#31738)
import `SeedDerivable` trait
2023-05-21 21:33:23 +09:00
samkim-crypto fd69ae77ff
[zk-keygen] create cli utility and add `new` command (#31641)
* create `solana-zk-keygen` cli util

* add `new` key generation command

* add basic tests

* add Cargo.toml for `zk-keygen`

* replace `KeyType::Symmetric` to `KeyType::Aes128` and update crate description

* remove shortopts for key type

* use stderr for status update

* add clap `debug_assert` tests

* drop all shortopts

* drop unnecessary tests

* remove config file args since it is not needed

* Update zk-keygen/src/main.rs

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>

* clippy

* add shortopt for `outfile`

* move `silent` match to outer scope

* change `--key-type` arg to `--type`

* Update zk-keygen/Cargo.toml

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

---------

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
Co-authored-by: Tyera <teulberg@gmail.com>
2023-05-21 11:29:27 +09:00
Alexander Meißner 83f692ce67
Refactor - Share RBPF config and syscall registry globally (#31727)
* Adds LoadedPrograms::program_runtime_environment_v1.

* No need to explicitly remove precompiles from program_accounts_map.
2023-05-20 20:28:00 +02:00
samkim-crypto 4796e2fd84
[zk-token-sdk] Generate proof transcript directly from proof contexts (#31725)
* generate transcript directly from proof contexts

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

Co-authored-by: Jon Cinque <joncinque@pm.me>

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

Co-authored-by: Jon Cinque <joncinque@pm.me>

---------

Co-authored-by: Jon Cinque <joncinque@pm.me>
2023-05-20 07:08:40 +09:00
Tyera 359eaad4e7
Bump regex to v1.8.1 (#31731) 2023-05-19 13:49:04 -07:00
dependabot[bot] f85cf889f4
Bump memoffset from 0.8.0 to 0.9.0 (#31724)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Co-authored-by: Tyera <tyera@solana.com>
2023-05-19 13:47:14 -07:00
Pankaj Garg 32072da36b
Adjust mmap and FD count for net scripts (#31728)
Adjust mmap and fd count for net scripts
2023-05-19 18:13:11 +00:00
Maximilian Schneider 4eea22cf5f
improve pubsub error handling (#31669)
Co-authored-by: Maximilian Schneider <max@mango.markets>
2023-05-19 16:46:09 +00:00
Pankaj Garg 8fbe471cc8
Remove special handling of builtin while pruning (#31719) 2023-05-19 09:35:48 -07:00
Lijun Wang a8e2b82e38
Expect errors when opening 2nd stream due to connection limit (#31706) 2023-05-19 08:24:52 -07:00
Pankaj Garg e6d490708a
Do not overwrite builtin program in the same slot (#31718) 2023-05-19 05:26:31 -07:00
Ashwin Sekar fb09cba8ed
local-cluster: use feature flag for size for vote accounts (#31723) 2023-05-18 19:39:28 -07:00
samkim-crypto fd049847a3
[keygen] Use workspace version for `tempfile` (#31722)
use workspace version for `tempfile`
2023-05-19 10:50:00 +09:00
Pankaj Garg 68eb257f21
Resolve remote $HOME in net.sh (#31702) 2023-05-18 18:07:23 -07:00
dependabot[bot] 472fd6ecff
Bump console from 0.15.5 to 0.15.6 (#31715)
* Bump console from 0.15.5 to 0.15.6

Bumps [console](https://github.com/console-rs/console) from 0.15.5 to 0.15.6.
- [Changelog](https://github.com/console-rs/console/blob/master/CHANGELOG.md)
- [Commits](https://github.com/console-rs/console/compare/0.15.5...0.15.6)

---
updated-dependencies:
- dependency-name: console
  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-18 18:28:24 -06:00
Tyera 12f91e39b5
Bump url to v2.3.1 (#31721) 2023-05-18 18:26:07 -06:00
Jeff Biseda 97293fe506
update frozen_abi dev workflow in docs (#31705) 2023-05-18 16:23:59 -07:00
Saad Talaat 08bb6f7070
process_get_epoch_info resulting in duration value underflow (#31712) 2023-05-18 23:08:14 +00:00
Jon Cinque 936d2cf3c2
banks-client: Add `get_fee_for_message` (#31703) 2023-05-18 23:31:02 +02:00
steviez a544553ac7
Remove redundant counter from ServeRepair (#31713)
The value reported by the removed counter is also reported as the
self_repair field in serve_repair-requests_received datapoint.
2023-05-18 16:05:58 -05:00
Trent Nelson a0850a7501
runtime: rename executor cache datapoint (#31716) 2023-05-18 20:37:01 +00:00
Andrew Fitzgerald d391e75a60
Performance: Allowed forced inline update_index (no thread pool) (#31455) 2023-05-18 13:32:41 -07:00
Alexander Meißner 520c647918
Refactor - Merges `BuiltinPrograms` into `LoadedPrograms` (#31654)
* Merges BuiltinPrograms into LoadedPrograms.

* Prevents built-ins from being pruned.
2023-05-18 22:18:28 +02:00
Illia Bobyr a57fe0c23d
Bump block-buffer from 0.9.0 to 0.10.4 (#31606)
buffer-buffer` removed the "block-padding" feature in this PR:

  RustCrypto/utils#671
2023-05-18 11:47:27 -07:00
dependabot[bot] 189f6530ce
Bump proc-macro2 from 1.0.57 to 1.0.58 (#31711)
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.57 to 1.0.58.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](dtolnay/proc-macro2@1.0.57...1.0.58)

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

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: illia.bobyr@solana.com
2023-05-18 11:20:02 -07:00
Jeff Washington (jwash) 9fd6f09984
remove redundant `mut`s (#31696) 2023-05-18 11:08:13 -07:00
Tao Zhu e84613b54c
update test for both feature gate status (#31708) 2023-05-18 12:37:58 -05:00
Tao Zhu 039991e780
update comment for clarification (#31700) 2023-05-18 12:37:09 -05:00
Jeff Washington (jwash) 3ac5bb2a60
deserialize epoch_reward_status into BankFieldsToDeserialize (#31698) 2023-05-18 07:14:59 -07:00
Jeff Washington (jwash) 0291454876
persist EpochRewardStatus::Active (#31697)
persist `EpochRewardStatus::Active`
2023-05-18 07:14:41 -07:00
steviez c5d72fc480
Condense and rename pubsub counters into a single datapoint (#31691)
Condense and rename pubsub counters into a single datapoint

The counters have been combined into fields within a struct that are
accumulated locally and submitted on a set interval (10s). Doing so
decreases overhead on the system as well as makes it easier to compare
these similar fields in the metrics explorer by having them all under
the same measurement.
2023-05-18 01:25:39 -05:00
samkim-crypto f9b0691eb4
[zk-token-sdk] rename and restructure `CloseAccount` and `WithdrawWithheld` proof instructions (#31608)
* rename and restruct ProofInstruction::VerifyCloseAccount to ProofInstruction::VerifyZeroBalance

* rename `PubkeySigmaProof` to `PubkeyValidityProof`

* refactor equality proofs into separate modules

* rename and restructure ProofInstruction::VerifyWithdrawWithheld to ProofInstruction::VerifyCiphertextCiphertextEquality

* add and reorg documentation for the proof instructions

* generalize ciphertext-ciphertext equality proof data constructor

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

Co-authored-by: Jon Cinque <joncinque@pm.me>

---------

Co-authored-by: Jon Cinque <joncinque@pm.me>
2023-05-18 08:43:00 +09:00
Ryo Onodera bd8289e114
Temporarily use stable clippy for redundant_clone (#31692) 2023-05-17 21:09:23 +00:00
Jeff Washington (jwash) 3f625e47df
working towards persistence for EpochRewardStatus (#31678) 2023-05-17 13:23:20 -07:00
Jeff Washington (jwash) 8ed4962229
refactor serialization tuple into an enum (#31679) 2023-05-17 10:53:28 -07:00