Commit Graph

223 Commits

Author SHA1 Message Date
steviez d9802027cb
genesis: Skip inserting genesis accounts for Development clusters (#35266)
solana-genesis currently includes a list of accounts that exist in
MainnetBeta genesis. These accounts are added for all cluster types,
including Development clusters.

There is no need for these accounts to get added to dev clusters so
skip adding them for ClusterType::Development case
2024-02-22 14:42:35 -06:00
Andrew Fitzgerald 2294801954
Do not derive Copy for EpochSchedule and Rent (#32767) 2023-12-01 07:57:25 -08:00
Alessandro Decina 16ea141402
sdk: put AccountSharedData::set_data() behind feature="dev-context-only-utils" (#33086)
set_data() is deprecated in favor of set_data_from_slice().
2023-09-01 21:02:14 +07:00
Alexander Meißner 9e703f85de
Upgrades Rust to 1.72.0 & nightly-2023-08-25 (#32961)
* allow pedantic invalid cast lint

* allow lint with false-positive triggered by `test-case` crate

* nightly `fmt` correction

* adapt to rust layout changes

* remove dubious test

* Use transmute instead of pointer cast and de/ref when check_aligned is false.

* Renames clippy::integer_arithmetic to clippy::arithmetic_side_effects.

* bump rust nightly to 2023-08-25

* Upgrades Rust to 1.72.0

---------

Co-authored-by: Trent Nelson <trent@solana.com>
2023-09-01 07:26:13 +00:00
Jon Cinque c73a56faf8
stake: Rename `StakeStateWithFlags` -> `StakeStateV2` (#32795) 2023-08-11 01:07:21 +02:00
Pankaj Garg f4287d70bb
Move accounts-db code to its own crate (#32766) 2023-08-09 13:03:36 -07: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 d54b6204be
removes instances of clippy::manual_let_else (#32417) 2023-07-09 21:41:36 +00:00
Illia Bobyr 43c0f05ca0
Bumps base64 from 0.13.1 to 0.21.0. (#31522)
Changes:

  marshallpierce/rust-base64@v0.13.1...v0.21.0

`base64::{encode,decode}` are now deprecated in favor of an API that
explicitly selects an `Engine`.  Migrated all calls to the new API.
2023-05-11 11:34:58 -07:00
kirill lykov 5631685d30
replaced chunks with tuples in validator (#30499)
* replaced chunks with tuples in test validator

* update Cargo.lock

* replaced chunks with tuples in genesis

* Update Cargo.lock
2023-03-07 14:32:42 +01:00
Tyera 1c5ac41577
solana-genesis help nit: bpf->sbf (#30411)
nit: bpf->sbf
2023-02-20 17:07:47 -07:00
Tyera 24905432c4
solana-genesis: add support for initializing upgradeable programs (#29994) 2023-01-31 11:15:42 -07:00
Tyera bec97d3c6b
solana-genesis: fix bpf-program value_name (#29903)
Fix clap arg value
2023-01-25 13:05:35 -07:00
behzad nouri 272e667cb2
deprecates Pubkey::new in favor of Pubkey::{,try_}from (#29805)
The commit deprecates Pubkey::new which lacks type-safety and instead
implements TryFrom<&[u8]> and TryFrom<Vec<u8>> for Pubkey.
2023-01-21 18:06:27 +00:00
behzad nouri 9524c9dbff patches errors from clippy::uninlined_format_args
https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
2022-12-06 19:32:15 +00:00
Dmitri Makarov 34865d032c chore: update Solana docs and code comments that specify "BPF" to "SBF" 2022-10-31 14:14:25 -04:00
Tyera Eulberg 235da8c538
chore: bump serde_yaml from 0.8.26 to 0.9.13 (#28388)
* chore: bump serde_yaml from 0.8.26 to 0.9.13 (#27970)

* chore: bump serde_yaml from 0.8.26 to 0.9.13

Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.8.26 to 0.9.13.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.8.26...0.9.13)

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

* Prepend ---

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>
2022-10-14 22:02:39 -06:00
behzad nouri 9ee53e594d
patches clippy errors from new rust nightly release (#28028) 2022-09-23 20:57:27 +00:00
Yueh-Hsuan Chiang 5b67960c76
(Refactor) Move blocktore options related stuff to blockstore_options.rs (#25509)
#### Problem
blockstore_db.rs has a mutual dependency between blockstore_metrics.rs.

#### Summary of Changes
This PR removes the mutual dependency by moving the option-related stuff
out from blockstore_db.rs to its new home --- blockstore_options.rs.

By doing this, we address the mutual dependency and also make the code cleaner.
2022-05-26 16:59:26 -07:00
Michael Vines 533eadd024 Remove StakeState::get_rent_exempt_reserve() 2022-04-25 21:43:04 -07:00
Yueh-Hsuan Chiang f999eef452
(LedgerStore) Rename BlockstoreAdvancedOptions to LedgerColumnOptions (#23764)
This PR renames BlockstoreAdvancedOptions to LedgerColumnOptions, as we will
pass-down this struct to LedgerColumn to allow it to perform metric reporting.
2022-03-18 11:13:35 -07:00
steviez e7cf84a593
Remove AccessType arg from create_new_ledger (#23591)
Creating a new ledger implicitly means that no other process could have
previously held access to it. Additionally, creating a new ledger
implicitly requires writing, so it follows that Primary access is
required and we can drop access type as an argument.
2022-03-15 00:07:16 -05:00
Yueh-Hsuan Chiang 1e20bd8f9a
(LedgerStore) Include storage type as a tag in RocksDB metric reporting (#23523)
#### Summary of Changes
This PR further enables group by operation on storage type in blockstore_rocksdb_cfs metrics.
Such group-by allows us to further compare the performance metrics between rocks-level and
rocks-fifo.

To make things extensible, this PR introduces BlockstoreAdvancedOptions and move shred_storage_type. 
All fields in BlockstoreAdvancedOptions will support group-by operation in blockstore_rocksdb_cfs.

Dependency: #23580
2022-03-11 15:17:34 -08:00
Yueh-Hsuan Chiang 634f4eb37d
(LedgerStore) Use different path for different blockstore storage type. (#23236)
#### Summary of Changes
To avoid mixing the use of different shred storage types, each shred storage type
will have its blockstore in a different directory.

This PR still keeps the RocksFifo setting hidden.  The default ShredStorageType and
blockstore directory are still RocksLevel and `rocksdb`.

Will follow-up with PRs on making FIFO option public in ledger-tool and validator.

#### Test Plan
* Added a new test to verify the existence of `rocksdb-fifo` directory when FIFO compaction is used.
* Updated existing test to verify the current setting still store ledger under `rocksdb` directory.
* Manually ran ledger_cleanup_test with both level and fifo compaction and verified the resulting ledger.
* Ran a validator with this PR.
2022-03-02 18:30:22 -08:00
Michael Vines 6d5bbca630 Pacify clippy 2022-01-21 19:12:57 -08:00
Michael Vines b8837c04ec Reformat imports to a consistent style for imports
rustfmt.toml configuration:
  imports_granularity = "One"
  group_imports = "One"
2021-12-03 09:19:13 -08:00
sakridge 7f2254225e
Move entry/poh to own crate to speed up poh bench build (#18225) 2021-07-14 14:16:29 +02:00
Justin Starry cfece66403
Remove unused exchange program and bench client (#18463) 2021-07-12 21:59:11 -05:00
Alexander Meißner 6514096a67 chore: cargo +nightly clippy --fix -Z unstable-options 2021-06-18 10:42:46 -07:00
Jon Cinque 1b1d34da59
Refactor stake program into solana_program (#17906)
* Move stake state / instructions into solana_program

* Update account-decoder

* Update cli and runtime

* Update all other parts

* Commit Cargo.lock changes in programs/bpf

* Update cli stake instruction import

* Allow integer arithmetic

* Update ABI digest

* Bump rust mem instruction count

* Remove useless structs

* Move stake::id() -> stake::program::id()

* Re-export from solana_sdk and mark deprecated

* Address feedback

* Run cargo fmt
2021-06-15 18:04:00 +02:00
Tyera Eulberg a66566e75b
Remove budget program (#17816) 2021-06-08 01:20:17 +00:00
Jeff Washington (jwash) 82e11588a5
lamports -> lamports() (#16915) 2021-04-28 14:55:55 -05:00
Jeff Washington (jwash) 69bfbf9e98
AccountSharedData.set_executable (#16836) 2021-04-27 09:56:50 -05:00
Jeff Washington (jwash) 6d160768d7
delete vest program (#16795) 2021-04-26 08:50:46 -05:00
Michael Vines a911ae00ba clippy 2021-04-18 20:55:02 -07:00
Jeff Washington (jwash) db3eecf1e9
set target hash/sec to half of capability for auto (#16096) 2021-03-24 14:48:38 -05:00
Michael Vines c06ff47a90 Add --slots-per-epoch validator 2021-03-17 22:56:41 +00:00
Jeff Washington (jwash) 952c3bcbb7
AccountSharedData construction (#15790) 2021-03-11 18:09:04 -06:00
Jeff Washington (jwash) 3419a5446e
AccountSharedData.set_data (#15781)
* account.set_data and resize_data

* remove data_resize
2021-03-11 16:40:45 -06:00
Jeff Washington (jwash) 8a3135d17b
Account->AccountSharedData (#15691) 2021-03-09 15:06:07 -06:00
Trent Nelson 7f7370c306 Re-allow clippy::integer_arithmetic at crate-level 2021-02-17 13:55:08 -07:00
Jeff Washington (jwash) 773b21b34e
consolidate DEFAULT_HASHES_PER_TICK (#14463) 2021-01-07 09:49:42 -06:00
Michael Vines 7143aaa89b Clippy 2020-12-14 08:03:29 -08:00
Ryo Onodera 82c75c3786
genesis, ledger-tool: --inflation/--vote-commission-percentaage (#13989) 2020-12-07 16:21:16 +00:00
Michael Vines 4069e7b663 Use default client keypair if --faucet-keypair is not provided 2020-11-16 11:00:40 -08:00
Michael Vines 959880db60 Remove unused pubkey::Pubkey imports 2020-10-21 19:08:13 -07:00
Michael Vines 7bc073defe Run `codemod --extensions rs Pubkey::new_rand solana_sdk::pubkey::new_rand` 2020-10-21 19:08:13 -07:00
Michael Vines a88223eca6 Avoid panic when --bootstrap-validator-stake-lamports is set to a value larger than 500m SOL 2020-10-20 20:53:52 -07:00
Michael Vines 31696a1d72 Port BPFLoader2 activation to FeatureSet and rework built-in program activation 2020-09-28 12:50:19 -07:00
Michael Vines 93259f0bae Runtime feature activation framework 2020-09-25 11:40:36 -07:00