Commit Graph

23368 Commits

Author SHA1 Message Date
Pankaj Garg c17b938204
Integrate program loader-v4 with bank (#32832)
* Integrate program loader-v4 with bank

* fix tests

* new struct for ProgramRuntimeEnvironments

* remove environment from program_runtime_environment_v

* move find_program_in_cache() to invoke_context

* cleanup
2023-08-16 10:50:23 -07:00
steviez d5d4732f17
ledger-tool: Consolidate ledger-tool specific directories (#32851)
When ledger-tool runs, it may create secondary directories for things
like accounts, accounts-index, etc as not to potentially interfere with
solana-validator's directories. These would show as multiple directories
with ".ledger-tool" appended to the typical directory name.

To more clearly group these items, make the default directories for
snapshots, accounts and accounts-index all within a common "ledger-tool"
directory.
2023-08-16 12:27:55 -05:00
hana 5e5b6f7d33
remove clean_up_delegation_errors feature (#32848) 2023-08-16 09:15:43 -07:00
dependabot[bot] aad3390372
Bump anyhow from 1.0.73 to 1.0.74 (#32853)
* Bump anyhow from 1.0.73 to 1.0.74

Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.73 to 1.0.74.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.73...1.0.74)

---
updated-dependencies:
- dependency-name: anyhow
  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-08-16 13:10:18 +00:00
Yihau Chen bc5ad1d2ab
ci: re-enable SPL downstream project test on Github Action (#32677)
* ci: init spl downstream project on Github Action

* ci: fix spl downstream project doesn't use cargo-test-sbf

* ci: move nightly build to another individual file

* ci: get more space for runners on Github Action

* ci: trun off fali-fast

* Update .github/workflows/downstream-project-spl.yml

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

* ci: separate all spl programs

* use reusable workflow

* add error reporting for nightly build

* update test method

* add build and test

* only build required program

* remove other branches

* Update .github/workflows/downstream-project-spl.yml

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

* Update .github/workflows/downstream-project-spl.yml

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

* add check

* update build and test

* add lacking programs

* remove unnecessary programs

---------

Co-authored-by: Jon Cinque <me@jonc.dev>
2023-08-16 11:12:15 +00:00
Andrew Fitzgerald 0996b5e245
BenchTPS: Allow a fixed compute-unit-price (#32775) 2023-08-15 15:20:04 -07:00
Lijun Wang b44c9bca89
Reduce max staked streams count to avoid fragmentations (#32771)
Reduce max staked concurrent streams to 512 from 2048.
2023-08-15 12:02:58 -07:00
behzad nouri 0de8ccfda9
adds socket address for repair service over QUIC (#32834)
Working towards migrating repair to QUIC.
2023-08-15 17:09:09 +00:00
Ryo Onodera e700dde617
dcou: Update qualifier_attr to 0.2.2 (#32838)
Update qualifier_attr to 0.2.2
2023-08-15 13:10:47 +00:00
dependabot[bot] 84b0fd840c
Bump flate2 from 1.0.26 to 1.0.27 (#32841)
* Bump flate2 from 1.0.26 to 1.0.27

Bumps [flate2](https://github.com/rust-lang/flate2-rs) from 1.0.26 to 1.0.27.
- [Release notes](https://github.com/rust-lang/flate2-rs/releases)
- [Commits](https://github.com/rust-lang/flate2-rs/compare/1.0.26...1.0.27)

---
updated-dependencies:
- dependency-name: flate2
  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-08-15 12:36:50 +00:00
dependabot[bot] 169227ad95
Bump thiserror from 1.0.44 to 1.0.45 (#32840)
* Bump thiserror from 1.0.44 to 1.0.45

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

---
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-08-15 12:36:16 +00:00
dependabot[bot] 36663529af
Bump anyhow from 1.0.72 to 1.0.73 (#32839)
* Bump anyhow from 1.0.72 to 1.0.73

Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.72 to 1.0.73.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.72...1.0.73)

---
updated-dependencies:
- dependency-name: anyhow
  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-08-15 12:35:57 +00:00
behzad nouri 35ed7122f6
reuses old TVU-forwards socket tag for TVU over QUIC (#32828)
The commit revises socket tag for TVU over QUIC to reuse old
TVU-forwards socket tag. This avoids gaps in socket tags which wastes
space in ContactInfo.cache.
The change is backward compatible because TVU-forwards is not used any
more and TVU over QUIC is not released yet.
2023-08-15 12:19:10 +00:00
Brooks e316db2ab4
dcou: set_accounts_hash() (#32829) 2023-08-15 07:18:59 -04:00
steviez 6bbf514e78
Add ability to output components that go into Bank hash (#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
2023-08-15 00:12:05 -05:00
Joe C de4eee15c8
JSON RPC API docs updates (#32747) 2023-08-14 22:24:27 -05:00
Illia Bobyr 21c6ac61ac
local-cluster: tests/common/mod.rs -> src/test.rs (#32821)
Putting code into `tests` does not match the testing layout set by
cargo.  Details in `src/intergation_tests.rs`.
2023-08-14 17:08:16 -07:00
behzad nouri 52616cf7aa
removes repair socket from gossip ContactInfo (#32831)
Repair responses are sent back to the address the repair request came
from and there is no need to gossip repair socket address.
https://github.com/solana-labs/solana/blob/9212ac347/core/src/repair/serve_repair.rs#L519
2023-08-14 20:01:18 +00:00
Brooks ce57cac370
Use update_accounts_hash() in AccountsHashVerifier (#32830) 2023-08-14 13:11:23 -04:00
HaoranYi bf77a6c7f2
Fix write cache size grow/shrink bug (#32788)
fix write cache size bug

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-08-14 10:11:09 -07:00
Jeff Washington (jwash) 9212ac347c
accounts hash sort_slot_storage_scan sorts in place (#32810) 2023-08-14 07:47:33 -07:00
dependabot[bot] e0de0685cb
Bump log from 0.4.19 to 0.4.20 (#32824)
* Bump log from 0.4.19 to 0.4.20

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

---
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-08-14 13:16:14 +00:00
dependabot[bot] 74617c8b4d
Bump async-trait from 0.1.72 to 0.1.73 (#32825)
* Bump async-trait from 0.1.72 to 0.1.73

Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.72 to 0.1.73.
- [Release notes](https://github.com/dtolnay/async-trait/releases)
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.72...0.1.73)

---
updated-dependencies:
- dependency-name: async-trait
  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-08-14 12:44:27 +00:00
Jon Cinque 760559157c
program-test: Fix realloc in native mode (#32818) 2023-08-14 13:56:03 +02:00
Ryo Onodera ce63640d6d
dcou: make internal function `pub` conditionally (#32822)
dcou: make internal function pub conditionally
2023-08-13 14:12:20 +09:00
Jeff Biseda 58cca78067
sanity check metrics configuration (#32799) 2023-08-11 14:38:33 -07:00
Trent Nelson b83cef43fc
ci: allow local bypass of stale Cargo.lock check with custom variable instead of `CI` (#32798)
ci: don't use `CI` envvar to skip local stale Cargo.lock check

to enable
```bash
echo "export SOLANA_CI_ALLOW_STALE_CARGO_LOCK=" >> ~/.profile
```
2023-08-11 13:53:16 -06:00
Trent Nelson 2ea88b41fb
cli: skip delegate-stake current voter check for unstaked voters (#32787)
* cli: use `getVoteAccounts` for delegate-stake current voter check

* cli: skip delegate-stake current voter check for unstaked voters

* cli: refactor delegate-stake current voter check
2023-08-11 13:24:14 -06:00
Pankaj Garg a1a0829a8b
Initialize and store PRv2 environment in cache (#32812)
* Initialize and store PRv2 environment in cache

* address review comments
2023-08-11 18:58:22 +00:00
Jon Cinque 194c959aa8
program-test: Prohibit setting the compute unit limit past `i64::MAX` (#32807)
program-test: Prohibit setting the compute unit limit past the max
2023-08-11 18:30:22 +02:00
Jeff Washington (jwash) 4e6fb8e343
removed unused accounts hash code (#32791) 2023-08-11 06:49:07 -07:00
Jon Cinque c73a56faf8
stake: Rename `StakeStateWithFlags` -> `StakeStateV2` (#32795) 2023-08-11 01:07:21 +02:00
bji 35ec7bf804
Implement timely vote credits feature (#31291) 2023-08-10 14:07:51 -07:00
HaoranYi d26e3ff22b
Extract read-only cache stats (#32789)
* extract read-only cache stat

* rename stats

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-08-10 13:42:09 -05:00
Jeff Washington (jwash) c9f7cb5b7e
keep active stats lock held (#32763) 2023-08-10 08:56:00 -07:00
Ashwin Sekar eae455c34b
rpc: get_feature_activation_slot should not error for inactive features (#32778) 2023-08-09 18:28:47 -07:00
Ashwin Sekar 85a9ebc0af
stake: pub use config constants for api backwards compatibility (#32769)
* stake: pub use config constants for api backwards compatibility

* Add deprecate

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

---------

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
2023-08-09 15:45:02 -07:00
behzad nouri b06500ee66
adds extensions to contact-info (#32309)
The commit adds a Vec<Extension> to ContactInfo so that future additions
to ContactInfo can be done by only adding new Extensions instead of
modifying the entire ContactInfo.
2023-08-09 22:01:20 +00:00
Brooks 6ff390802b
Uses fold+reduce in de_dup_accounts() (#32765) 2023-08-09 17:27:04 -04:00
Pankaj Garg f4287d70bb
Move accounts-db code to its own crate (#32766) 2023-08-09 13:03:36 -07:00
steviez b97c451200
ledger-tool: Relax ledger requirements for program subcommand (#32770)
Several of the program command subcommands do not require a ledger as
they act solely on the program object. So, defer checking the ledger
path until we know we need to load. Additionally, remove genesis arg
from these commands that do not load a genesis.bin
2023-08-09 14:13:25 -05:00
Jon Cinque 31b6b64070
stake: Set the Delegation's warmup / cooldown to the correct default (#32768) 2023-08-09 17:45:26 +02:00
carllin d5faa6e8aa
Local Cluster Duplicate Switch Test (#32614)
* Add test for broken behavior in same batch

* tests

* redo test

* Important fixes to not immediately duplicate confirm by adding extra node

* Fixup merge

* PR comments

* Redo stakes

* clippy

* fixes

* Resolve conflicts

* add thread logging

* Fixup merge

* Fixup bugs

* Revert "add thread logging"

This reverts commit 9dc22401054b8f91f2b2aa3033e482996913febb.

* Hide scope

* Fixes

* Cleanup test_faulty_node

* More fixes

* Fixes

* Error logging

* Fix duplicate confirmed

* done

* PR comments

* Revert "Error logging"

This reverts commit 18953c36a5e865ecdd38bbf49b8d0502448087d2.

* PR comments

* nit
2023-08-08 19:29:39 -04:00
Jon Cinque 8e4a9a94ed
sdk: Add new version of `StakeState` to avoid breaking downstream users (#32736)
* sdk: Rename `StakeState` -> `StakeStateWithFlags`

* Add back `StakeFlags` with a deprecation warning
2023-08-09 00:05:40 +02:00
behzad nouri ef318c23ae
bumps criterion to 0.5.1 (#32760)
Current version throws warning:

  warning: the following packages contain code that will be rejected by
  a future version of Rust: criterion v0.3.5
2023-08-08 14:33:15 +00:00
Jeff Washington (jwash) 7c1cf298aa
add active stats for pieces of hash calc (#32750) 2023-08-08 07:16:10 -07:00
Jeff Washington (jwash) 32cb381f69
remove some stats that are no longer kept (#32751)
* remove some stats that are no longer kept

* Update runtime/src/accounts_hash.rs

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

* reorder to remove drop

---------

Co-authored-by: Brooks <brooks@prumo.org>
2023-08-08 07:15:37 -07:00
Jeff Washington (jwash) 21b8b70bee
add metrics around purge_exact (#32752) 2023-08-08 07:15:21 -07:00
dependabot[bot] e2843d3fd0
Bump tar from 0.4.39 to 0.4.40 (#32759)
* Bump tar from 0.4.39 to 0.4.40

Bumps [tar](https://github.com/alexcrichton/tar-rs) from 0.4.39 to 0.4.40.
- [Commits](https://github.com/alexcrichton/tar-rs/compare/0.4.39...0.4.40)

---
updated-dependencies:
- dependency-name: tar
  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-08-08 12:28:23 +00:00
Ikko Eltociear Ashimine 626e7dcfae
docs: Fix typo in off-chain-message-signing.md (#32758)
specfied -> specified
2023-08-08 13:00:46 +02:00