Commit Graph

23936 Commits

Author SHA1 Message Date
Pankaj Garg 9d42cd7efe
Initialize fork graph in program cache during bank_forks creation (#33810)
* Initialize fork graph in program cache during bank_forks creation

* rename BankForks::new to BankForks::new_rw_arc

* fix compilation

* no need to set fork_graph on insert()

* fix partition tests
2023-10-23 09:32:41 -07:00
HaoranYi 669bc43bcd
Buffer account's fields for hash (#33788)
* buffer accounts field for hash

* use smallvec to allocate hash buffer on stack

* sort deps

* more opt

* clippy

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-10-23 09:48:17 -05:00
Jeff Washington (jwash) a41b24f185
fix some ancient stats (#33791) 2023-10-23 07:23:47 -07:00
Jeff Washington (jwash) 34103e0913
typo in variable name (#33801) 2023-10-23 07:23:11 -07:00
Yihau Chen 7d56c3484c
test: check the existence of target_path_parent before detelting (#33812) 2023-10-23 14:14:34 +00:00
dependabot[bot] cb736123b2
build(deps): bump ahash from 0.8.3 to 0.8.4 (#33814)
* build(deps): bump ahash from 0.8.3 to 0.8.4

Bumps [ahash](https://github.com/tkaitchuck/ahash) from 0.8.3 to 0.8.4.
- [Release notes](https://github.com/tkaitchuck/ahash/releases)
- [Commits](https://github.com/tkaitchuck/ahash/commits)

---
updated-dependencies:
- dependency-name: ahash
  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-10-23 14:04:45 +00:00
dependabot[bot] 071fa5ab9d
build(deps): bump socket2 from 0.5.4 to 0.5.5 (#33794)
* build(deps): bump socket2 from 0.5.4 to 0.5.5

Bumps [socket2](https://github.com/rust-lang/socket2) from 0.5.4 to 0.5.5.
- [Release notes](https://github.com/rust-lang/socket2/releases)
- [Changelog](https://github.com/rust-lang/socket2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/socket2/compare/v0.5.4...v0.5.5)

---
updated-dependencies:
- dependency-name: socket2
  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-10-23 14:04:04 +00:00
dependabot[bot] f6369f5c76
build(deps): bump thiserror from 1.0.49 to 1.0.50 (#33781)
* build(deps): bump thiserror from 1.0.49 to 1.0.50

Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.49 to 1.0.50.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.49...1.0.50)

---
updated-dependencies:
- dependency-name: thiserror
  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-10-23 14:03:41 +00:00
Pankaj Garg abf3b3e527
Custom debug impl for LoadedPrograms cache (#33808) 2023-10-22 05:51:14 -07:00
Dmitri Makarov 8260ffc1ef
Bump platform-tools to v1.39 (#33804) 2023-10-21 16:22:16 -04:00
Tao Zhu af9c754690
Crates have identical build.rs to frozen-abi can just be symlink (#33787)
crates have identical build.rs to frozen-abi can just be symlink
2023-10-21 13:33:10 -05:00
steviez 56ccffdaa5
Replace get_tmp_ledger_path!() with self cleaning version (#33702)
This macro is used a lot for tests to create a ledger path in order to
open a Blockstore. Files will be left on disk unless the test remembers
to call Blockstore::destroy() on the directory. So, instead of requiring
this, use the get_tmp_ledger_path_auto_delete!() macro that creates a
TempDir (which automatically deletes itself when it goes out of scope).
2023-10-21 11:38:31 +02:00
Ryo Onodera 5a963529a8
Add BankWithScheduler for upcoming scheduler code (#33704)
* Add BankWithScheduler for upcoming scheduler code

* Remove too confusing insert_without_scheduler()

* Add doc comment as a bonus

* Simplify BankForks::banks()

* Add derive(Debug) on BankWithScheduler
2023-10-21 15:56:43 +09:00
Illia Bobyr 01f1bf2799
zeroize: Allow versions newer than 1.3 for `aes-gcm-siv` (#33618)
`aes-gcm-siv` v0.10.3 has a constraints on maximum `zeroize` version,
set to be 1.3 or below.

At the same time, `cargo` does not want to construct a dependency graph
with duplicate instances of a crate, when the first non-zero version of
those instances are the same.  That is, it refuses to build a workspace
with both 1.3 and 1.4 versions of `zeroize`.

`zeroize` is actually backward compatible, and `aes-gcm-siv` restriction
is overly pessimistic.  This package lifted this restriction in a newer
versions, but we still depend on older versions and can not immediately
update.

In order to be able to use a version of `zeroize` newer than 1.3 we need
to remove a similar restriction from `curve25519-dalek` as well.
2023-10-20 18:20:51 -07:00
Pankaj Garg 6fd0dcb3eb
Add support for fetching program in cargo registry (#33759)
* Rename publisher.rs to crate_handler.rs

* support for fetching program in cargo registry
2023-10-20 15:41:24 -07:00
behzad nouri e0b59a6f53
prunes turbine QUIC connections (#33663)
The commit implements lazy eviction for turbine QUIC connections.
The cache is allowed to grow to 2 x capacity at which point at least
half of the entries with lowest stake are evicted, resulting in an
amortized O(1) performance.
2023-10-20 21:52:37 +00:00
samkim-crypto dd2b1bb5a0
[zk-token-sdk] Limit max seed length for key derivations (#33700)
* limit max seed length for elgamal keypairs

* limit max seed length for authenticated encryption keys

* Apply suggestions from code review

Co-authored-by: Jon Cinque <me@jonc.dev>

* rename `SeedLengthTooLarge` to `SeedLengthTooLong`

---------

Co-authored-by: Jon Cinque <me@jonc.dev>
2023-10-20 13:02:37 -07:00
Alexander Meißner a5c7c999e2
Bump solana_rbpf to v0.8.0 (#33679)
* Bumps solana_rbpf to v0.8.0

* Adjustments:
Replaces declare_syscall!() with declare_builtin_function!().
Removes Config::encrypt_runtime_environment.
Simplifies error propagation.
2023-10-20 21:39:50 +02:00
behzad nouri dc3c827299
prunes repair QUIC connections (#33775)
The commit implements lazy eviction for repair QUIC connections.
The cache is allowed to grow to 2 x capacity at which point at least
half of the entries with lowest stake are evicted, resulting in an
amortized O(1) performance.
2023-10-20 17:50:54 +00:00
Thomas P 96052d230a
Docker images > 1.17.0 are broken because of wrong baseimage (#33709)
fix(dockerfile): make sure to use the bullseye image for building

Solana's release image is based on bullseye, make sure we compile Solana with the same environment
2023-10-21 01:17:03 +08:00
Jeff Washington (jwash) e13756133a
ancient: add many_refs_this_is_newest_alive (#33741)
* add many_refs_this_is_newest_alive

* fix pathological case, add comments

* add log

* update comments

* add log when we fail to pack

* use with_capacity

* fix log comment

* clippy
2023-10-20 09:55:37 -07:00
Will Hickey e5dfc9cb27
Add check for CHANGELOG.md change when changelog label applied to PR (#33675)
* Add check for CHANGELOG.md change when changelog label applied to PR

* Update changelog
2023-10-20 11:01:52 -05:00
Pankaj Garg 59cb3b57ee
Set a global fork graph in program cache (#33776)
* Set a global fork graph in program cache

* fix deadlock

* review feedback
2023-10-20 08:47:03 -07:00
steviez c98c24bd6d
Revert "Split compute budget instructions process from struct itself … (#33784)
Revert "Split compute budget instructions process from struct itself (#33513)"

This reverts commit c73bebe984. This
was found to be a consensus breaking change.
2023-10-20 15:53:45 +02:00
Pierre e1a9f8ef17
CLI remove unwrap_or_default() on rpc calls (#33782) 2023-10-20 14:27:31 +02:00
Nishit Mehta 092c2132d6
Fixed typing errors (#33778) 2023-10-20 11:33:41 +02:00
ripatel-fd 6798e05b0a
Fix typo in feature_set.rs (#33777)
Co-authored-by: Richard Patel <ripatel@jumptrading.com>
2023-10-20 10:26:13 +02:00
Joe C 6b1e9b8974
SDK: update error variants in `Feature::from_account_info` (#33750) 2023-10-20 07:35:22 +02:00
Joe C 37d093a30e
program error: add `ArithmeticOverflow` (#33767) 2023-10-20 07:33:21 +02:00
ripatel-fd fb80288f88
zk-token-sdk: Fix incorrect mention of OsRng in docs (#33774)
Co-authored-by: Richard Patel <ripatel@jumptrading.com>
2023-10-20 01:14:01 +02:00
Brooks ce8ad77373
Uses AccountHash in AppendVec (#33764) 2023-10-19 17:38:09 -04:00
steviez 383aef218d
Make Blockstore populate TransactionStatusIndex entries (#33756)
A previous change removed logic that populated the
TransactionStatusIndex entries at each of the legacy primary index keys
(0 and 1). While these entries will not be read or written in the
future, these entries are necessary for backwards compatibility. Namely,
branches <= v1.17 expect these entries to be present and .unwrap()'s
could fail if they are not.

So, add the initialization of these entries back into Blockstore logic.
We can remove initialization of these entries once our stable and beta
branches are both versions that do not expect these entries to be
present (should be v1.18).
2023-10-19 23:28:53 +02:00
Jeff Washington (jwash) f13c78b7c8
add ancient append vec test (#33762)
* add ancient append vec test

* Update accounts-db/src/ancient_append_vecs.rs

Co-authored-by: Brooks <brooks@prumo.org>

* add some comments

---------

Co-authored-by: Brooks <brooks@prumo.org>
2023-10-19 09:50:38 -07:00
Joe C 4cb5065e0d
program error: add `InvalidAccountOwner` (#33766) 2023-10-19 18:15:51 +02:00
Tao Zhu c73bebe984
Split compute budget instructions process from struct itself (#33513)
* Split compute budget instruction processing from ComputeBudget struct itself, allow compute_budget_instructions be processed elsewhere without having to instantiate ComputeBudget

* updated tests
2023-10-19 11:10:42 -05:00
Brooks 4e5c545e23
Uses AccountHash in tiered storage (#33763) 2023-10-19 11:52:36 -04:00
behzad nouri 8becb72b3e
separates out routing shreds from establishing connections (#33599)
Currently each outgoing shred will attempt to establish a connection if
one does not already exist. This is very wasteful and consumes many
tokio tasks if the remote node is down or unresponsive.

The commit decouples routing packets from establishing connections by
adding a buffering channel for each remote address. Outgoing packets are
always sent down this channel to be processed once the connection is
established. If connecting attempt fails, all packets already pushed to
the channel are dropped at once, reducing the number of attempts to make
a connection if the remote node is down or unresponsive.
2023-10-19 15:44:15 +00:00
Surav Shrestha 1fb4d3bd61
docs: fix typo in watchtower/README.md (#33771) 2023-10-19 17:28:04 +02:00
behzad nouri 7aa0faea96
separates out routing repair requests from establishing connections (#33742)
Currently each outgoing repair request will attempt to establish a
connection if one does not already exist. This is very wasteful and
consumes many tokio tasks if the remote node is down or unresponsive.

The commit decouples routing packets from establishing connections by
adding a buffering channel for each remote address. Outgoing packets are
always sent down this channel to be processed once the connection is
established. If connecting attempt fails, all packets already pushed to
the channel are dropped at once, reducing the number of attempts to make
a connection if the remote node is down or unresponsive.
2023-10-19 13:25:53 +00:00
Brooks c1353e172c
Removes cap_accounts_data_allocations_per_transaction featurization (#33754) 2023-10-19 07:01:15 -04:00
Brooks 0fcc0a0941
Returns AccountHash from get_filler_account() (#33758) 2023-10-18 20:29:40 -04:00
Justin Starry 3bfa0d291a
feature flag cleanup: cap_bpf_program_instruction_accounts (#33746) 2023-10-19 08:15:35 +08:00
Brooks d6aba9dc48
Upgrades dashmap dependency to v5.5.3 (#33659) 2023-10-18 19:00:11 -04:00
Brooks 1045548606
Uses AccountHash in StorableAccountsWithHashesAndWriteVersions (#33751) 2023-10-18 18:58:19 -04:00
Brooks 93d882f158
Moves solana-store-tool into the accounts-db crate (#33755) 2023-10-18 16:16:38 -04:00
Brooks 3a580f4df6
StorableAccounts::hash() returns &AccountHash (#33748) 2023-10-18 15:41:26 -04:00
Jon Cinque d33758171b
token-2022: Update to use program build with zk-ops enabled (#33747)
token-2022: Update to use version with zk-ops enabled
2023-10-18 21:39:01 +02:00
Yueh-Hsuan Chiang 94273434ce
[TieredStorage] HotStorageReader::get_account_meta_from_offset() (#33724)
#### Problem
HotStorageReader currently only implements get_footer().  It does not
have a function to obtain the account meta.

#### Summary of Changes
This PR implements HotStorageReader::get_account_meta_from_offset().
A function that returns the account meta located at the specified offset.
This will be the helper function that will be later used to obtain the account
meta when the offset is available from the index block of a hot storage file. 

#### Test Plan
A new test is included in this PR.
2023-10-18 12:27:39 -07:00
behzad nouri afd044e296
removes redundant ClusterInfo::drain_push_queue (#33753) 2023-10-18 18:53:58 +00:00
behzad nouri 2465abce5c
simplifies pull-responses handling (#33743)
Following:
https://github.com/solana-labs/solana/pull/33722
from pubkey in PullResponse is no longer used in processing
pull-responses and so the code can be simplified.
2023-10-18 18:06:14 +00:00