Commit Graph

992 Commits

Author SHA1 Message Date
Tyera 68928bb7d6
solana-cli: format strings (#34288)
* Format strings in solana-cli

* Restore some wallet.rs strings that were better before

* Fixup vote.rs string

* Fixup stake.rs string

* Fixup program.rs strings

* Fixup some address_lookup_table.rs strings

* Fixup clap_app.rs string

* Clarify validator_info help

* Fixup cluster_query.rs
2023-12-01 09:00:14 +00:00
Justin Starry 34f5c68416
cli: add solana program extend subcommand (#34043) 2023-11-16 09:52:41 +08:00
Brooks 725ab37bf4
clippy: Replaces .get(0) with .first() (#34048) 2023-11-13 17:22:17 -05: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
Pierre e1a9f8ef17
CLI remove unwrap_or_default() on rpc calls (#33782) 2023-10-20 14:27:31 +02:00
Pankaj Garg 1155d46266
Add CLI command to show/dump v4 programs (#33693) 2023-10-13 12:13:45 -07:00
Pankaj Garg 4c664a8d31
Cargo registry service for deploying programs (#33570) 2023-10-09 14:32:35 -07:00
Andrew Fitzgerald 973df825b7
log signature after successful feature activation (#33488) 2023-10-06 09:46:26 -07:00
Pankaj Garg ef47c977dc
Decouple program-v4 command processors from CliConfig (#33554) 2023-10-06 03:53:55 -07:00
sakridge 83b49daf29
Fix CLI help text for `solana stake-account` (#33387)
Fix help text
2023-10-05 17:23:41 +00:00
Jon Cinque fa968da32e
cli: Don't skip preflight when interacting with programs (#33426)
* cli: Don't skip preflight when closing a program

* Don't skip preflight anywhere for program deploys, fix test
2023-09-28 15:08:11 +02:00
sakridge 3b1cbaec72
Add csv output option to stake and vote account rewards (#32360)
* Add csv option to vote-account

* Add CSV format to solana stake command

Csv rename
2023-09-21 19:23:37 +02:00
Tyera bca41edf20
Make active stake consistent in split (#33295)
* Add feature gate

* Add helper fn

* Require split destination to be rent-exempt if it is active

* Update cli to prefund split accounts

* cli: require rent param with sign-only

* Update tokens to prefund split accounts

* Update split tests with sysvar accounts

* Fix test_split_to_account_with_rent_exempt_reserve

* Fix test_staked_split_destination_minimum_balance

* Fix test_split_more_than_staked

* Fix test_split_minimum_stake_delegation and remove misleading StakeState::Initialized case

* Fix test_split_from_larger_sized_account

* Add test for pre-/post-activation behavior splitting some or all of stake account

* Assert active stake

* Fix runtime test

* Ignore stake-pool downstream

* Review comments

* Feature gate sysvar reads
2023-09-20 06:00:51 +00:00
Pankaj Garg 62888d297a
Implement CLI front-end for loader-v4 commands (#33289)
* Implement CLI front-end for loader-v4 commands

* remove dead_code clippy overrides

* Add unit tests
2023-09-19 08:27:35 -07:00
Pankaj Garg 5dbc19ccbf
Processors to compile and send LoaderV4 CLI commands (#33228)
* Processors to compile and send LoaderV4 CLI commands

* suppress unused code warning

* clippy fixes

* redeploy program using source buffer

* unify deploy and redeploy to a single function

* clippy fixes

* fixes after testing the CLI frontend
2023-09-18 06:43:33 -07:00
bji bdf7207eec
Implement timely vote credits feature. (#32957) 2023-09-12 10:40:04 -07:00
Alexander Meißner bbb57be0a5
Refactor - Move interfaces of address-lookup-table into the program SDK (#33165)
* Adds a module `address_lookup_table` to the SDK.

* Adds a module `address_lookup_table::instruction` to the SDK.

* Adds a module `address_lookup_table::error` to the SDK.

* Adds a module `address_lookup_table::state` to the SDK.

* Moves AddressLookupTable into SDK as well.

* Moves AddressLookupTableAccount into address_lookup_table.

* Adds deprecation messages.

* Disentangles dependencies across cargo files.
2023-09-11 21:10:40 +02: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
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
behzad nouri 4ec5ea6f7b
replaces assert!(matches!(...)) with assert_matches!(...) (#33068)
assert_matches!(...) provides more informative error message when it
fails and it is part of nightly rust:
https://doc.rust-lang.org/std/assert_matches/macro.assert_matches.html
2023-08-30 13:48:27 -04:00
Trent Nelson b8dc5daedb
preliminaries for bumping nightly to 2023-08-25 (#33047)
* remove unnecessary hashes around raw string literals

* remove unncessary literal `unwrap()`s

* remove panicking `unwrap()`

* remove unnecessary `unwrap()`

* use `[]` instead of `vec![]` where applicable

* remove (more) unnecessary explicit `into_iter()` calls

* remove redundant pattern matching

* don't cast to same type and constness

* do not `cfg(any(...` a single item

* remove needless pass by `&mut`

* prefer `or_default()` to `or_insert_with(T::default())`

* `filter_map()` better written as `filter()`

* incorrect `PartialOrd` impl on `Ord` type

* replace "slow zero-filled `Vec` initializations"

* remove redundant local bindings

* add required lifetime to associated constant
2023-08-29 23:05:35 +00:00
Alexander Meißner 67d6d688cc
Refactor - Demotes `Arc` to `Rc`. (#32982)
Demotes `Arc` to `Rc`.
2023-08-25 00:54:06 +02:00
Alexander Meißner a8be70fa7a
General cleanup (#32980)
* Fixes `cargo::` in build.rs

* Fixes overshadowing reexports.

* Removes unnecessary `as *const u8`.

* Removes unnecessary `.into_iter()`.

* cargo clippy
2023-08-24 21:44:19 +02:00
steviez 427b8b1332
Revert "Implement timely vote credits feature (#31291)" (#32890)
This reverts commit 35ec7bf804.
2023-08-18 17:04:20 +00:00
Jon Cinque 0f8a871fc0
client: Rename confrim -> confirm (#32861)
* client: Rename confrim -> confirm

* Rebase fix
2023-08-17 19:05:30 +02:00
galactus 1999138e12
Using new method to deploy the programs (#32638)
Using new method to deploy the programs, making blockheight comparison similar to previous implementation.
2023-08-16 18:02:34 -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 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
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
Ashwin Sekar fa3506631a
stake: deprecate on chain warmup/cooldown rate and config (#32723)
* stake: deprecate on chain warmup/cooldown rate and config

* Pr feedback: Deprecate since 1.16.7

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

---------

Co-authored-by: Jon Cinque <me@jonc.dev>
2023-08-07 13:23:24 -07:00
steviez 1844c423a7
Add required cluster argument to solana feature activate subcommand (#32693)
This extra argument serves as an extra guardrail to ensure that the
feature key holder is activating the feature on the intended cluster,
and not solely using a default or config-file stored RPC url to
determine which cluster the feature will be activated on.
2023-08-04 08:28:01 -06:00
HaoranYi 17af3ab10a
Add stake_flags to stake state (#32524)
add stake_flags to stake state

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-07-24 09:09:40 -05:00
behzad nouri cfb028819a
deprecates Signature::new in favor of Signature::{try_,}from (#32481) 2023-07-14 22:51:12 +00:00
Brooks 7143667dbe
Removes unnecessary mut (#32476) 2023-07-13 13:14:33 -04:00
ananas-block 724e0fe4ac
cli: fix program deployment elf verification issue (#32448)
cli: fix progam deployment read_and_verify_elf
2023-07-12 14:56:23 +02:00
HaoranYi 2e9aeff8dd
Enable partitioned epoch reward by feature id (#32174)
enable partitioned epoch reward feature by feature id
update stake rewards tests with partitioned epoch rewards feature enable

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-20 12:12:50 -05:00
CanardMandarin 2b5594a409
Fix minimum balance when deploying program (#32129) 2023-06-14 17:44:20 +00:00
Michael 2f4a189d47
Hide Keybase and replace with URL (#31852) 2023-06-06 06:22:55 -07:00
Jeff Washington (jwash) 03b260a29f
allow stake tests to wait for rewards payout (#31821) 2023-05-30 08:56:02 -05:00
behzad nouri 9281ab7d97
separates out connection-cache metrics for different protocols (#31803) 2023-05-25 14:48:22 +00:00
Alexander Meißner 691b12c693
Cleanup - merge_nonce_error_into_system_error (#31773)
* merge_nonce_error_into_system_error

* more cleanup

---------

Co-authored-by: Trent Nelson <trent@solana.com>
2023-05-24 18:05:07 +02:00
Andrew Fitzgerald 5448d0b1e8
Remove redundant clones (#31685)
* broadcast_stage remove redundant clone

* broadcast_fake_shreds_run remove redundant clone

* wallet remove redundant clone

* cluster_query remove redundant clone

* accounts remove redundant clones
2023-05-23 09:42:05 -07: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
Saad Talaat 08bb6f7070
process_get_epoch_info resulting in duration value underflow (#31712) 2023-05-18 23:08:14 +00:00
bji c8b85177a8
Allow leader schedule up to one epoch in the future to be fetched, to… (#31538)
Allow leader schedule up to one epoch in the future to be fetched, to cover all available leader schedules.
2023-05-15 16:32:14 -07:00
Alexander Meißner 5c8b5a2a68
Bump solana_rbpf to v0.4.0 (#31594)
* Moves "disable_deploy_of_alloc_free_syscall" parameter inside create_loader().

* Removes the "is_abi_v2" flag.

* Bumps solana_rbpf to v0.4.0
2023-05-12 18:07:13 +02:00
Tyera 9af7009bb4
Add new CreateVoteAccount instruction-set builders (#31330)
* Add failing test

* Add config struct for vote-account creation

* Add create-vote-account ix builders that use CreateVoteAccountConfig

* Test now passes; add case to demonstrate failure after activation

* Deprecate existing ix builders

* Use new builders in solana-cli

* Query feature status to use correct VoteState size in solana-cli

* Fix tests and clippy warnings

* Improve ugly conditional block
2023-04-27 11:14:39 -06:00
sakridge 719de094a4
Add time field to solana vote-account rewards output (#31260)
Add block time into vote epoch rewards output
2023-04-20 23:54:26 +02:00