Commit Graph

600 Commits

Author SHA1 Message Date
Trent Nelson
b9eb6242f5 cli: struct the tuples 2021-10-22 23:45:33 -06:00
Jack May
bfbbc53dac Divorce the runtime from FeeCalculator (#20737) 2021-10-22 14:32:40 -07:00
Trent Nelson
5794bba65c cli: account for rpc nodes when considering feature set adoption 2021-10-18 22:17:37 -06:00
Kirill Fomichev
e9a427b9c8 Rpc: filters performance improvement (#20185)
* Add Base58,Base64,Bytes to MemcmpEncodedBytes

* Rpc: decode memcmp before filtering accounts

* Add deprecated attribute

* Add Memcmp::bytes

* Fix clippy for deprecated

* Another clippy fix

* merge RpcFilterError::DataTooLarge

* add deprecation for Base58DataTooLarge

* change filter data size limit

* strict data size len for base58

* add magic numbers

* fix tests
2021-10-14 12:43:27 -06:00
Jack May
da45be366a Remove blockhash from fee calculation (#20641) 2021-10-13 13:10:58 -07:00
Alexander Meißner
f30f3bddbb Refactor: Remove program_id from process_instruction() (#20540)
* Replaces usage of program_id parameter by invoke_context.get_caller()?.

* Removes "pubkey: &Pubkey" parameter from "process_instruction()".
2021-10-10 22:29:18 +02:00
Michael Vines
7027d56064 Resolve nightly-2021-10-05 clippy complaints 2021-10-06 10:37:58 -07:00
Justin Starry
0ddb34a0b4 Add struct and convenience methods to track stake activation status (#20392)
* Add struct and convenience methods to track stake activation status

* fix nits

* rename
2021-10-04 18:59:11 -04:00
Jack May
de8331eeaf Deploy error is buffer is too small (#20358)
* Deploy error is buffer is too small

* missing file
2021-10-01 02:47:26 +00:00
Justin Starry
53a810dbad cli: Stop topping up buffer balance (#20181) 2021-09-29 12:27:18 -04:00
Tyera Eulberg
15144fc923 Cli: check current authorities before attempting to change them (#19853)
* Stake-authorize: check account current authority

* Stake-set-lockup: check account current custodian

* Make helper fn pub(crate)

* Vote-authorize: check account current authority
2021-09-15 13:59:05 -06:00
Drew Taylor
2a29072019 Add solana-close-vote-account to CLI (#19756) 2021-09-13 08:13:59 -07:00
Justin Starry
24fd47a32d Speed up program deploys by writing larger chunks (#19654) 2021-09-07 10:20:17 -07:00
Michael Vines
b44ff347e2 Surface write transaction failures during program deployment 2021-09-04 21:04:47 -07:00
Michael Vines
787c62fb15 Generalize send_and_confirm_transactions_with_spinner() 2021-09-04 21:04:47 -07:00
Bryan Ischo
e288459cf2 Removed the --authorized-withdrawer argument from create-vote-account
The parameter is now a required third argument.  This is because authorized
withdrawer should never be the same as vote account keypair or validator
identity keypair for security reasons.

Added a --allow-unsafe-authorized-withdrawer to override this restriction if
necessary.
2021-09-03 16:45:06 -07:00
Tyera Eulberg
7c7640b462 Fix typos (#19448) 2021-08-26 13:05:05 -06:00
Jack May
57bbbb83a4 cli: show upgradeable program accounts (#19431) 2021-08-25 17:03:55 -07:00
Jack May
a89f180145 Allow closing upgradeable program accounts (#19319) 2021-08-24 10:05:54 -07:00
Jon Cinque
73aa004c59 stake: Remove v2 program references (#19308)
* stake: Remove v2 program references

* Remove stake v2 feature, along with stake rewrite
2021-08-20 01:08:44 -04:00
Jack May
0b50bb2b20 Deprecate FeeCalculator returning APIs (#19120) 2021-08-13 09:08:20 -07:00
Tyera Eulberg
5970083b4d Use last_valid_block_height in services and client apps (#19163)
* Add deprecated tag to Bank::get_blockhash_last_valid_slot

* Update SendTransactionService to use last_valid_block_height

* Update solana-tokens to use last_valid_block_height

* Remove dangling file

* Update solana program to use last_valid_block_height

* Update Banks crates to use last_valid_block_height
2021-08-11 01:04:00 -06:00
Alexander Meißner
0a63f65c03 Bumps solana_rbpf to v0.2.14 (#18869)
* Bumps solana_rbpf to v0.2.14

* Feature gate for verify_mul64_imm_nonzero as discussed in #17520.
2021-08-04 09:50:28 +02:00
Trent Nelson
21bc43ed58 nonce: Unify NonceError with SystemError 2021-07-30 14:47:14 -06:00
NearlyAlwaysThere
46fdf8a4d2 Tiny typo fix (#18978) 2021-07-29 14:07:10 -06:00
Tyera Eulberg
662ccfa558 Cli: app and wallet command reorg (#18955)
* Clean up wallet commands

* Move global args
2021-07-29 00:19:34 -06:00
theonekeyg
9d0a937a05 Auto-generate shell completions for solana-cli (issue #8879 and #14005) (#18931)
* Auto-generate shell completions for solana-cli (issue #8879 and #14005)

Implement `completion` SubCommand for solana-cli, which outputs
completion script to stdout and exits the process. The script generation
handled completely by clap.

In order to implement the generation, one minor design change was
necessary regarding the creation of clap `App`.

Previously: One part of App initialization was in the `app` function,
and some other arguments and subcommands were added later directly in
the `main` function.

Now: The whole construction of App was moved to `get_clap_app` function.

P.S. I wasn't sure if constructing App separately had visual importance,
so both constructing parts are still separate in `base_clap_app` and
`final_clap_app` functions. But they sure could be in one single
function.

* Dereplicode match expr, fix clippy warning.

* Move clap App construction into separate module

Also join two parts of the construction into a single function

* Fix tests

* Apply rustfmt lints
2021-07-28 09:43:32 -06:00
Tyera Eulberg
467c18e0d1 Add cli-output helpers (#18933)
* Add OutputFormat helper to reduce copy-pasta

* Add CliSignOnlyData constructor
2021-07-28 04:21:23 +00:00
Tyera Eulberg
aeb30fa873 Cli: Support checked stake and vote operations (#18449)
* Refactor VoteAuthorize to use SignerIndex and support vote-authorize-*-checked

* Add checked bool const and use in command parsing

* Add create-stake-account-checked handling

* Add stake-set-lockup-checked handling

* Remove unnecessary mut

* Add stake-authorized-checked handling
2021-07-15 16:45:03 -06:00
Trent Nelson
a4a24b6531 cli: allow returning more solana validators 2021-07-14 08:41:52 +00:00
Tyera Eulberg
8ad4ffdee5 Cli: expose last valid block height (#18620)
* Add Fees struct to client

* Add complete RpcClient::get_fees methods

* Switch cli to last_valid_block_height
2021-07-13 01:41:27 +00:00
Michael Vines
4098af3b5b Record vote account commission with voting/staking rewards and surface in RPC 2021-07-12 15:09:44 -07:00
Tyera Eulberg
f39ffa69f6 Remove dead solana airdrop parameters (#18520) 2021-07-08 18:18:44 +00:00
Alexander Meißner
8d5c04e257 Bump solana_rbpf to version 0.2.13 (#18068)
* Moves syscall_registry into the rbpf Executable constructor.

* Adds the reject_unresolved_syscalls flag which is only set when deploying programs via the CLI.
2021-07-07 09:50:11 +02:00
Tyera Eulberg
1dd730d685 Cli: expose --with-memo to nonce and stake commands (#18404)
* Fmt memo_arg

* Add --with-memo to nonce and stake cli commands
2021-07-03 11:46:52 -06:00
Michael Vines
52290dbd35 solana validators output now includes average skip rate 2021-06-30 22:08:26 +00:00
Tyera Eulberg
9d4428d3d8 Use timeout to allow RpcClient to retry initial transaction confirmation (#18311)
* Tidying: relocate function

* Use proper helper method for RpcClient commitment

* Add RpcClientConfig

* Add configurable confirm_transaction_initial_timeout

* Use default 5s timeout for initial tx confirmation
2021-06-30 01:08:45 +00:00
Tyera Eulberg
f2b0d562b0 Cli epoch-info: generate epoch-completed time from block times (#18258)
* Generate epoch-completed time from block times

* Add annotation when block times not available
2021-06-28 15:32:28 -06:00
Alexander Meißner
789f33e8db chore: cargo fmt 2021-06-18 10:42:46 -07: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
Jack May
39654d3fa5 Improve program deployment error message (#17717) 2021-06-03 15:52:36 -07:00
Tyera Eulberg
b7f98ea18a Cli: Decode known program custom errors returned from simulation (#17652) 2021-06-01 23:22:01 -06:00
dependabot[bot]
a43c29e858 Bump indicatif from 0.15.0 to 0.16.2 (#17628)
* Bump indicatif from 0.15.0 to 0.16.2

Bumps [indicatif](https://github.com/mitsuhiko/indicatif) from 0.15.0 to 0.16.2.
- [Release notes](https://github.com/mitsuhiko/indicatif/releases)
- [Commits](https://github.com/mitsuhiko/indicatif/compare/0.15.0...0.16.2)

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

* Fix message types

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 Eulberg <tyera@solana.com>
2021-06-01 17:38:02 +00:00
Trent Nelson
06a926f2f4 Improve missing default filepath signer error messaging 2021-05-28 20:10:36 -06:00
Trent Nelson
ca8c1c6c42 Revert "Improve missing default signer error messaging (#17486)"
This reverts commit 6d40d0d141.
2021-05-28 20:10:36 -06:00
Jack May
89ee8778bc Unify BPF verifiers (#17585) 2021-05-28 14:24:02 -07:00
Michael Vines
cbce440af4 simulateTransaction can now return accounts modified by the simulation 2021-05-26 14:20:23 -07:00
Tyera Eulberg
e9bc1c6b07 Add last valid block height to rpc Fees (#17506)
* Add last_valid_block_height to fees rpc

* Add getBlockHeight rpc

* Update docs
2021-05-26 07:26:19 +00:00
Jack May
6d40d0d141 Improve missing default signer error messaging (#17486) 2021-05-25 18:31:27 -07:00