Commit Graph

23571 Commits

Author SHA1 Message Date
Andrew Fitzgerald 527a4bbf00
TransactionScheduler: TransactionStateContainer (#33002)
Co-authored-by: Tao Zhu <82401714+taozhu-chicago@users.noreply.github.com>
2023-09-09 09:51:23 -07:00
Jeff Washington (jwash) a145ade564
stat for time spent copying generate index contents (#33187)
* stat for time spent copying generate index contents

* rework to move stat to generate_index

* fix fmt
2023-09-08 12:55:54 -07:00
Jeff Washington (jwash) dc6b1eb653
in shrink, get stores prior to shrink starting (#33194) 2023-09-08 08:45:32 -07:00
dependabot[bot] b588bebce0
build(deps): bump chrono from 0.4.29 to 0.4.30 (#33191)
* build(deps): bump chrono from 0.4.29 to 0.4.30

Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.29 to 0.4.30.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.29...v0.4.30)

---
updated-dependencies:
- dependency-name: chrono
  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-09-08 12:25:44 +00:00
dependabot[bot] 70f17ceb9f
build(deps): bump bytes from 1.4.0 to 1.5.0 (#33190)
* build(deps): bump bytes from 1.4.0 to 1.5.0

Bumps [bytes](https://github.com/tokio-rs/bytes) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/tokio-rs/bytes/releases)
- [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/bytes/compare/v1.4.0...v1.5.0)

---
updated-dependencies:
- dependency-name: bytes
  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-09-08 12:25:25 +00:00
samkim-crypto ece376fdec
[zk-token-proof] Add public compute unit variables for instructions (#33129)
add public compute unit variables
2023-09-07 20:55:56 -07:00
Jeff Washington (jwash) 0083e426b2
ShrinkCandidates only holds slot (#33173) 2023-09-07 12:28:05 -07:00
Lijun Wang d54ee35103
Improve plugin load/reload unit tests (#33126)
* Improve plugin load/reload unit tests
* check expectations after reload
2023-09-07 11:31:23 -07:00
Will Hickey 350caaeec0
Add release-with-debug profile (#33096) 2023-09-07 13:16:43 -05:00
behzad nouri 9ff0b35f29
adds QUIC endpoint for repair service (#33057)
Working towards using QUIC protocol for repair, the commit adds a QUIC
endpoint for repair service.

Outgoing local requests are sent as

    struct LocalRequest {
        remote_address: SocketAddr,
        bytes: Vec<u8>,
        num_expected_responses: usize,
        response_sender: Sender<(SocketAddr, Vec<u8>)>,
    }

to the client-side of the endpoint. The client opens a bidirectional
stream with the LocalRequest.remote_address and once received the
response, sends it down the LocalRequest.response_sender channel.

Incoming requests from remote nodes are received from bidirectional
streams and sent as

    struct RemoteRequest {
        remote_pubkey: Option<Pubkey>,
        remote_address: SocketAddr,
        bytes: Vec<u8>,
        response_sender: Option<OneShotSender<Vec<Vec<u8>>>>,
    }

to the repair-service. The response is received from the receiver end of
RemoteRequest.response_sender channel and send back to the remote node
using the send side of the bidirectional stream.
2023-09-07 18:00:25 +00:00
Jeff Washington (jwash) e331275178
remove coupling of ShrinkCandidates to HashMap (#33176) 2023-09-07 09:07:37 -07:00
behzad nouri 528a03f32a
removes outdated matches crate from dependencies (#33172)
removes outdated matches crate from the dependencies

std::matches has been stable since rust 1.42.0.
Other use-cases are covered by assert_matches crate.
2023-09-07 12:52:57 +00:00
Brooks f4816dc0cf
Moves CacheHashData test-only methods into tests module (#33170) 2023-09-06 15:25:58 -04:00
Pankaj Garg 377b6003a8
Check loader-v4::id() as a valid program owner (#33167) 2023-09-06 11:54:18 -07:00
Yihau Chen 5d15380132
Bump solana_rbpf to v0.7.1 (#33168)
bump solana_rbpf to 0.7.1
2023-09-07 02:47:36 +08:00
Brooks a3dc3eb37c
Takes inner HashSet when dropping CacheHashData (#33169) 2023-09-06 18:19:01 +00:00
Brooks a80819b029
PrunedBanksRequestHandler::handle_request() is only pub with dcou (#33155) 2023-09-06 17:02:52 +00:00
behzad nouri 88ee8f5820
replaces once_cell::sync::OnceCell with std::sync::OnceLock (#33140)
std::sync::OnceLock has become stable since rust 1.70.0 and there is no
longer a need for an external crate dependency.
2023-09-06 16:46:51 +00:00
Yihau Chen 0c896c6076
ci: trigger client_targets pipeline when the cargo file changes (#33163) 2023-09-07 00:19:00 +08:00
HaoranYi a8bc6ebe38
Use `write_all` for binned account hash file writes (#33095)
write_all

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-09-06 11:03:05 -05:00
Brooks 9e156f88f4
Removes invariant `is_serialized_with_abs` param (#33154) 2023-09-06 12:00:18 -04:00
Brooks d921b9a44e
Adds metrics when purging banks with the same slot (#33153) 2023-09-06 11:38:30 -04:00
Tao Zhu 904b2a7672
finalize prioritization_fee_cache after oc-ed bank is frozen (#33100) 2023-09-06 09:58:58 -05:00
steviez 224eea42d5
Add unit test for Bank::register_hard_fork() (#32902) 2023-09-06 09:07:09 -05:00
dependabot[bot] 865276f0ed
build(deps): bump bytemuck from 1.13.1 to 1.14.0 (#33161)
* build(deps): bump bytemuck from 1.13.1 to 1.14.0

Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.13.1 to 1.14.0.
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.13.1...v1.14.0)

---
updated-dependencies:
- dependency-name: bytemuck
  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-09-06 12:33:55 +00:00
dependabot[bot] 47d828cd71
build(deps): bump chrono from 0.4.28 to 0.4.29 (#33160)
* build(deps): bump chrono from 0.4.28 to 0.4.29

Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.28 to 0.4.29.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.28...v0.4.29)

---
updated-dependencies:
- dependency-name: chrono
  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-09-06 12:33:00 +00:00
Kevin Ji 51b2b2d745
docs(contributing): fix syntax highlighting (#32928) 2023-09-06 07:29:48 -05:00
Alexander Meißner 424666e341
Bump solana_rbpf to v0.7.0 (#33104)
* Upgrades RBPF in Cargo.toml

* Adjustments to updated interfaces.
2023-09-06 10:54:15 +02:00
Yihau Chen 903c615559
ci: use codecov command line tool (#33132)
* ci: install codecov to nigthly image

* ci: use codecov command line tool
2023-09-06 16:49:08 +08:00
Ashwin Sekar a8e83c8720
replay: send duplicate proofs from blockstore to state machine (#32962)
* replay: send duplicate proofs from blockstore to state machine

* pr feedback: bank.slot() -> slot

* pr feedback
2023-09-05 21:29:53 -07:00
Illia Bobyr d077b13efa
accounts-db: test_hash_stored_account: Avoid UB. (#33083)
unsafe { transmute }` in the test is generating undefined behavior, as it
assigns a value into `bool` that is neither 0 nor 1.

We see discrepancy between release and debug builds due to this.

It is better to avoid `unsafe` blocks if there alternatives that let the
compiler check everything.
2023-09-05 20:30:17 -07:00
Pankaj Garg a3399d0164
Add loader-v4 instruction constructors (#33151)
* Add loader-v4 instruction constructors

* address review comments

* clippy fixes
2023-09-05 18:01:18 -07:00
Andrew Fitzgerald f8d304c610
Drop poh_service to avoid unwanted ticking (#33150) 2023-09-05 16:08:48 -07:00
Tyera 17b1b5646d
rpc: turn off getStakeActivation epoch parameter (#33156)
* Return error on past-epoch parameter

* Update docs
2023-09-05 16:52:49 -06:00
Alexander Meißner 05622c17da
Refactor - Minor fixes in the error handling of executing tombstones (#33145)
Minor fixes in the error handling of executing tombstones.
2023-09-05 23:57:25 +02:00
Tyera efb6846fe7
Boot solana-test-validator without enable_partitioned_epoch_reward feature (#33146) 2023-09-05 15:24:17 -06:00
Brooks 2cf53b6293
Purge banks, with the same slot, sequentially (#33149) 2023-09-05 17:06:35 -04:00
steviez 3b108564f9
Demote Arc<Bank> parameter to &Bank (#33130) 2023-09-05 21:04:39 +02:00
Alessandro Decina 25d3db0c18
Fix CI (#33139)
* programs/sbf: fix invalid_reference_casting errors in tests

* programs/sbf: enable dev-context-only-utils on solana-sdk

* programs/sbf: switch to clippy::arithmetic_side_effects

* solana-program: fix formatting
2023-09-05 18:01:20 +00:00
Yihau Chen 3a91d3cc6a
ci: remove -f from cargo install rustfilt (#33143) 2023-09-06 01:20:42 +08:00
Andrew Fitzgerald d36ded20fc
Make TimedTracedEvent accessible outside banking_trace.rs (#32985) 2023-09-05 08:54:32 -07:00
Proph3t 3dee9cb489
Fix a typo & phrasing of `bpf_loader_upgadeable` docs (#33141)
* Fix a typo & phrasing of `bpf_loader_upgradeable` docs

Originally, I was just going to fix the typo, replacing 'the' with
'that.' But I thought that the sentence was phrased awkwardly anyway, so
I tried to correct that as well.

* Fix second typo

Co-authored-by: ripatel-fd <ripatel+git@jumptrading.com>

---------

Co-authored-by: ripatel-fd <ripatel+git@jumptrading.com>
2023-09-05 08:05:34 -07:00
Callum McIntyre 19306bac74
Correct docs for getMultipleAccounts RPC (#32684) 2023-09-05 13:35:48 +00:00
Alexander Meißner e9542200e8
Fix - Superfluous `if` condition for overwriting `environments` in feature activation code (#33138)
Removes the `if` block around the overwriting of the `environments`.
2023-09-05 15:01:20 +02:00
dependabot[bot] 9ab5c34543
build(deps): bump thiserror from 1.0.47 to 1.0.48 (#33134)
* build(deps): bump thiserror from 1.0.47 to 1.0.48

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

---
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-09-05 12:44:50 +00:00
dependabot[bot] bd61ff72aa
build(deps): bump ctrlc from 3.4.0 to 3.4.1 (#33131)
Bumps [ctrlc](https://github.com/Detegr/rust-ctrlc) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/Detegr/rust-ctrlc/releases)
- [Commits](https://github.com/Detegr/rust-ctrlc/compare/3.4.0...3.4.1)

---
updated-dependencies:
- dependency-name: ctrlc
  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-09-05 12:30:06 +00:00
dependabot[bot] 170ad08cc8
build(deps): bump regex from 1.9.4 to 1.9.5 (#33133)
* build(deps): bump regex from 1.9.4 to 1.9.5

Bumps [regex](https://github.com/rust-lang/regex) from 1.9.4 to 1.9.5.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.9.4...1.9.5)

---
updated-dependencies:
- dependency-name: regex
  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-09-05 12:28:00 +00:00
dependabot[bot] 552dc83511
build(deps): bump syn from 2.0.29 to 2.0.31 (#33135)
* build(deps): bump syn from 2.0.29 to 2.0.31

Bumps [syn](https://github.com/dtolnay/syn) from 2.0.29 to 2.0.31.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.29...2.0.31)

---
updated-dependencies:
- dependency-name: syn
  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-09-05 12:25:39 +00:00
Alessandro Decina 6679153ca1
CPI: improve test coverage (#31986)
* programs/sbf: add TEST_[FORBID|ALLOW]_WRITE_AFTER_OWNERSHIP_CHANGE*

* programs/sbf: add tests for the AccessViolation -> InstructionError mapping

* cpi: add more tests

* programs/sbf: add tests for immutable AccountInfo pointers

* programs/sbf: add tests for verification of SolAccountInfo pointers too

* programs/sbf: add tests for ref_to_len_in_vm handling in CPI

Add TEST_FORBID_LEN_UPDATE_AFTER_OWNERSHIP_CHANGE_MOVING_DATA_POINTER
and TEST_FORBID_LEN_UPDATE_AFTER_OWNERSHIP_CHANGE that exercise the new
logic.

* cpi: tweak tests

Remove some copy pasta and rename two tests to better describe what they're doing

* cpi: add tests that check that CPI updates all accounts at once

* direct mapping: test that writes to executable accounts trigger ExecutableDataModified

* programs/sbf: add explicit tests for when an account's data allocation changes
2023-09-05 14:27:26 +07:00
Brooks adee97fe38
Ledger-tool CLI can specify accounts hash cache path (#33118) 2023-09-02 16:17:03 -04:00