Commit Graph

962 Commits

Author SHA1 Message Date
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
DimAn 7d556a110d
Cli: add `find-program-derived-address` command (#30370)
* Add find-program-address solana cli command

* clippy

* clippy after rebase

* rename find-program-address -> find-program-derived-address

* rename is_complex_seed -> is_structured_seed

* add validator is_structured_seed to clap-v3-utils

* return CliError::BadParameter for PROGRAM_ID arg in case of incorrect parsing

* improve help for SEEDS arg

* extend About for create-address-with-seed command

* fix SEED help
2023-04-17 16:17:40 +09:00
Alexander Meißner a0c7fde90e
Cleanup - mock InvokeContext (#31007)
* Turns with_mock_invoke_context() into a macro.

* Removes prepare_mock_invoke_context().

* Replaces InvokeContext::new_mock() with with_mock_invoke_context().

* Removes InvokeContext::new_mock().

* Removes Cow from InvokeContext::sysvar_cache.

* Removes override parameters from mock_process_instruction().

* cargo fmt
2023-04-03 17:23:24 +02:00
Tyera 0291e8c702
cli: require one or more authority params in `stake-authorized-checked` (#30863)
* Require one or more authority params

* Add auth list len check
2023-03-23 04:13:56 +00:00
Ryo Onodera 721719d776
Add solana_clap_utils::hidden_unless_forced() (#30843)
* Add solana_clap_utils::hidden_unless_forced()

* Use more descriptive env name

Co-authored-by: mvines <mvines@gmail.com>

---------

Co-authored-by: mvines <mvines@gmail.com>
2023-03-22 08:59:17 +00:00
Tyera 0cdb315b5b
Make redelegate signer more optional (#30734) 2023-03-15 22:59:56 -06:00
Yihau Chen df3ef111f7
chore: workspace inheritance (#29893)
* introduce workspace.package

* introduce workspace.dependencies

* read version from root cargo.toml

* pass check when version = { workspace = true }

* don't bump version when version = { workspace = true }

* including workspace Cargo.toml when bump version

* programs/sbf use workspace inheritance

* fix increasing cargo version ignore program/sbf/Cargo.toml
2023-02-23 22:01:54 +08:00
Michael Vines 5136ed3448
Update homepage value for all crates (#30444) 2023-02-23 02:20:18 +00:00
Tyera a095f5f229
Cli: support json output for transaction-history (#30376)
* Add cli-output structs for transaction-history

* Support json output for transaction history

* Use pre-existing CliTransactionConfirmation
2023-02-21 22:47:22 -07:00
Alexander Meißner 4bfcbf75eb
Bump solana_rbpf to v0.2.39 (#30398)
* Bump solana_rbpf to v0.2.39

* Adds MemoryRegion::vm_addr_end.
2023-02-21 18:43:34 +01:00
Tyera 319efe5d8d
Cli: expose until param in solana transaction-history (#30372)
Expose until param
2023-02-16 21:36:28 +00:00
Kevin Ji a36e1b211d
Simplify some comparisons using (a1, a2).cmp(&(b1, b2)) (#30321) 2023-02-15 05:11:48 +00:00
Lijun Wang 84fbf9273b
Refactor thin client (#30229)
Make client/thin_client a thin wrapper and forward calls to the thin-client/thin_client
2023-02-10 09:55:13 -08:00
behzad nouri 1ad69cfc38
removes dynamic cast and dynamic dispatch from connection-cache (#30128)
Dynamic dispatch forces heap allocation and adds extra overhead.
Dynamic casting as in the ones below, lacks compile-time type safety:
https://github.com/solana-labs/solana/blob/eeb622c4e/quic-client/src/lib.rs#L172-L175
https://github.com/solana-labs/solana/blob/eeb622c4e/udp-client/src/lib.rs#L52-L55

The commit removes all instances of Any, Box<dyn ...>, and Arc<dyn ...>,
and instead uses generic and associated types.

There are only two protocols QUIC and UDP; and the code which has to
work with both protocols can use a trivial thin enum wrapper.

With respect to connection-cache specifically:
* connection-cache/ConnectionCache is a single protocol cache which
  allows to use either QUIC or UDP without any build dependency on the
  other protocol.
* client/ConnectionCache is an enum wrapper around both protocols and
  can be used in the code which has to work with both QUIC and UDP.

Co-authored-by: Tyera Eulberg <tyera@solana.com>
2023-02-09 00:50:44 +00:00
Lijun Wang a24363bb04
Refactor tpu_client -- remove duplicate code (#30104)
Removed implementation in client/tpu_client and make it a thin wrapper to forward calls to the backend TpuClient. There is some minor change to coerce the client/ConnectionCache to connection-cache/ConnectionCache.
2023-02-03 17:47:50 -08:00
Lijun Wang ada6136a6c
Refactor connection cache to support generic msgs (#29774)
tpu-client/tpu_connection_cache is refactored out the module and moved to connection-cache/connection_cache and the logic in client/connection_cache is consolidated to connection-cache/connection_cache as well. client/connection_cache only has a thin wrapper which forward calls to connection-cache/connection_cache and deal with constructions of quic/udp connection cache for clients using them both.2.

The TpuConnection is refactored to ClientConnection to make it generic and functions renamed to be proper for other workflows. eg. tpu_addr -> server_addr, send_transaction --> send_data and etc...

The enum dispatch is removed so that we can make the bulk of code of quic and udp agnostic of each other. The client is possible to load quic or udp only into its runtime.

The generic type parameter in the tpu-client/tpu_connection_cache is removed in order to create both quic and udp connection cache and use the object to send transactions with multiple branching when sending data. The generic type parameters and associated types are dropped in other types in order to make the trait "object safe" for this purpose.

I have annotated the code explaining the reasoning and the refactoring source -> destination.

There is no functional changes

bench-tps has been performed for rpc-client, thin-client and tpu-client. And it is found the performance number largely match the ones before the refactoring.
2023-02-01 18:10:06 -08:00
dependabot[bot] 232e252014
Bump serde from 1.0.144 to 1.0.152 (#29696)
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>
Co-authored-by: Tyera <tyera@solana.com>
2023-02-01 16:27:17 -07:00
Andrew Fitzgerald d944c657a2
Use RangeBounds for is_within_range (#29763) 2023-02-01 09:17:12 -08:00
Will Hickey 04a6a631bc
Bump version to v1.16 (#30028) 2023-01-31 17:48:33 -06:00
joeaba a12bf8c003
Update maintainers references (#29997)
* update maintainers references

* chore: update maintainers reference
2023-01-31 08:07:13 -05:00
steviez a9287ab4c6
Restore compatibility for solana rent --output json command (#29953) 2023-01-27 10:22:12 -06:00
Yihau Chen 9193b4221d
Revert "chore: workspace inheritance (#29509)" (#29892)
This reverts commit a67d239dde.
2023-01-25 15:50:41 +08:00
Yihau Chen a67d239dde
chore: workspace inheritance (#29509)
* introduce workspace.package

* introduce workspace.dependencies

* read version from root cargo.toml

* pass check when version = { workspace = true }

* don't bump version when version = { workspace = true }

* including workspace Cargo.toml when bump version

* programs/sbf use workspace inheritance

* fix increasing cargo version ignore program/sbf/Cargo.toml
2023-01-25 13:59:59 +08:00
Michael d53f02ec51
Remove lamports-per-byte-year and lamports-per-epoch from rent as all… (#29731)
Remove lamports-per-byte-year and lamports-per-epoch from rent as all accounts must be rent exempt
2023-01-24 00:04:54 -06: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
dependabot[bot] fadf027851
Bump semver from 1.0.14 to 1.0.16 (#29645)
* Bump semver from 1.0.14 to 1.0.16

Bumps [semver](https://github.com/dtolnay/semver) from 1.0.14 to 1.0.16.
- [Release notes](https://github.com/dtolnay/semver/releases)
- [Commits](https://github.com/dtolnay/semver/compare/1.0.14...1.0.16)

---
updated-dependencies:
- dependency-name: semver
  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-01-11 10:07:58 -07:00
behzad nouri d87128e02c
fixes errors from clippy::needless_borrow (#29535)
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
2023-01-05 18:21:56 +00:00
Tyera 71ba409bc2
Cli: the authority passed to `solana program write-buffer` must be a proper signer (#29476)
* Fix upgrade signer parsing in program deploy (noop)

* Fix buffer-authority signer parsing in program write-buffer (error on Pubkey input)
2023-01-03 07:32:04 +00:00
Tyera 660596f30f
Cli: refactor program code slightly (#29477)
* Remove unused messages Vecs

* Remove superfluous Option in check_payer and send_deploy_messages

* Remove superfluous Option in do_process_program_write_and_deploy

* Remove unnecessary block-wrapping in do_process_program_write_and_deploy
2023-01-02 23:44:22 -07:00
Tyera d33129193f
Add fee-payer arg to solana feature activate (#29367) 2022-12-22 10:07:56 -07:00
0xripleys ec06cf7311
"solana program set-upgrade-authority" uses SetAuthorityChecked instruction by default (#29190)
* set-upgrade-authority uses checked instruction by default

* remove print statements

* PR fixes
2022-12-16 06:59:54 +00:00