Commit Graph

116 Commits

Author SHA1 Message Date
behzad nouri d2d5f36a3c
adds validator flag to allow private ip addresses (#18850) 2021-07-23 15:25:03 +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
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
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
Michael Vines 96cde36784 SetLockup now requires the authorized withdrawer when the lockup is not in force 2021-05-21 11:49:01 -07:00
Tao Zhu 0781fe1b4f
Upgrade Rust to 1.52.0 (#17096)
* Upgrade Rust to 1.52.0
update nightly_version to newly pushed docker image
fix clippy lint errors
1.52 comes with grcov 0.8.0, include this version to script

* upgrade to Rust 1.52.1

* disabling Serum from downstream projects until it is upgraded to Rust 1.52.1
2021-05-19 09:31:47 -05:00
Greg Fitzgerald 3805874c86
Add --no-wait option to CLI's stake-authorize command (#17244) 2021-05-17 16:54:33 +00:00
Michael Vines cf779c63c5 Add ALL support to withdraw-stake subcommand 2021-04-26 11:03:37 -07:00
Michael Vines ba9a502e7e Add --seed support to delegate-stake and withdraw-stake commands 2021-04-21 20:25:01 +00:00
Tyera Eulberg 7dfb51c0b4
Cli: move airdrop to rpc requests (#16557)
* Add recent_blockhash to requestAirdrop

* Move tx confirmation to separate method

* Add RpcClient airdrop methods

* Request cli airdrop via RpcClient

* Pass optional faucet_addr into TestValidator and fix tests

* Update client/src/rpc_client.rs

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

Co-authored-by: Michael Vines <mvines@gmail.com>
2021-04-15 06:25:23 +00:00
Tyera Eulberg 03d3ae1cb9
Faucet: repurpose cap and slice args to apply to single IPs (#16381)
* Single use stmt

* Log request IP

* Switch cap and slice to apply per IP

* Use SOL in logs, error msgs

* Use thiserror instead of overloading io::Error

* Return memo transaction for requests that exceed per-request-cap

* Handle faucet memos in cli

* Add some docs, esp about memo transaction

* Use SOL symbol & standardize memo

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

* Differentiate faucet tx-length errors

* Populate signature in cli airdrop memo case

Co-authored-by: Michael Vines <mvines@gmail.com>
2021-04-06 07:01:05 +00:00
bji 364af3a3e0
issue #10831: added --with-memo option to all cli commands that submit (#16291)
* issue #10831: added --with-memo option to all cli commands that submit
transactions.  Also, improve the block command to show UTF-8 string instead
of integer values for memo program data.

* Fixed tests and changed some syntax according to feedback.

* Use spl_memo id (all versions where applicable) instead of hardcoding id.

* Update Cargo.toml in programs/bpf.

* Update formatting via cargo fmt.

* Update to use spl_memo version 3.0.1, which simplifies package imports
2021-04-05 20:53:50 +00:00
Michael Vines 3dff5c9dee transfer now requires --allow-unfunded-recipient if the recipient doesn't exist 2021-03-23 02:31:39 +00:00
Jack May 7f500d610c
Add Close instrruction and tooling to upgradeable loader (#15887) 2021-03-17 21:39:29 -07:00
Trent Nelson 672e9c640f CLI: Support dumping the TX message in sign-only mode 2021-03-16 19:20:54 -06:00
Jack May d73af9c1dd
cli: don't overallocate upgradeable buffer accounts (#15603) 2021-03-02 00:45:53 -08:00
Trent Nelson 700685c223 CLI: Add hidden support for `SystemInstruction::TransferWithSeed` 2021-02-19 23:20:40 +00:00
Justin Starry f5c564bc6c
cli: Speed up program deploys (#15347)
* Speed up deploys

* fix test
2021-02-17 09:00:47 +08:00
HowJMay 9c7b3dc1b5 style: Fix the typos 2021-02-13 12:34:21 -07:00
Jack May 210514b136
Add cli deploy tests (#15116) 2021-02-05 09:57:44 -08:00
Jack May 9c6d899efb
cli: add command to dump the upgradeable program to a file (#15029) 2021-02-02 22:33:03 -08:00
Tyera Eulberg 52f0de3207
Impl OutputFormat for solana program (#14911) 2021-02-01 10:39:37 -07:00
Tyera Eulberg af04a265dd
Manually camelCase solana program json (#14907) (#14936) 2021-01-29 22:52:26 +00:00
Jack May 07cef5a557
Buffer authority must match upgrade authority for deploys and upgrades (#14923) 2021-01-29 12:43:42 -08:00
Michael Vines 8993ac0c74 Surface faucet start failures to the user of solana-test-validator 2021-01-28 22:35:58 +00:00
Michael Vines 119e2c75dd cli now supports a custodian for stake authorize operations 2021-01-26 11:48:28 -08:00
Tyera Eulberg ffa5c7dcc8
Deprecate commitment variants (#14797)
* Deprecate commitment variants

* Add new CommitmentConfig builders

* Add helpers to avoid allowing deprecated variants

* Remove deprecated transaction-status code

* Include new commitment variants in runtime commitment; allow deprecated as long as old variants persist

* Remove deprecated banks code

* Remove deprecated variants in core; allow deprecated in rpc/rpc-subscriptions for now

* Heavier hand with rpc/rpc-subscription commitment

* Remove deprecated variants from local-cluster

* Remove deprecated variants from various tools

* Remove deprecated variants from validator

* Update docs

* Remove deprecated client code

* Add new variants to cli; remove deprecated variants as possible

* Don't send new commitment variants to old clusters

* Retain deprecated method in test_validator_saves_tower

* Fix clippy matches! suggestion for BPF solana-sdk legacy compile test

* Refactor node version check to handle commitment variants and transaction encoding

* Hide deprecated variants from cli help

* Add cli App comments
2021-01-26 19:23:07 +00:00
Tyera Eulberg 4964b0fe61
Cli: default to single gossip (#14673)
* Init cli RpcClient with chosen commitment; default to single_gossip

* Fill in missing client methods

* Cli tests: make RpcClient commitment specific

* Simply rpc_client calls, using configured commitment

* Check validator vote account with single-gossip commitment
2021-01-19 15:33:03 -07:00
Jack May 638f225dc4
Add cli command to query upgradeable account authorities (#14491) 2021-01-08 14:43:36 -08:00
Jack May 58487c6360
Add buffer authority to upgradeable loader (#14482) 2021-01-08 09:37:57 -08:00
Jack May 3316e7166c
Rework upgradeable loader cli (#14209) 2020-12-21 13:02:53 -08:00
Jack May 9e90394583
Upgradeable loader (#13689) 2020-12-14 15:35:10 -08:00
Michael Vines 7143aaa89b Clippy 2020-12-14 08:03:29 -08:00
Michael Vines bbad3fe501 TestValidator now implements Drop, no need to close() it 2020-12-11 04:17:38 +00:00
Michael Vines 0a9ff1dc9d Initial solana-test-validator command-line program 2020-12-11 04:17:38 +00:00
Michael Vines 43b82b31e5 More TestValidator cleanup 2020-11-26 08:56:25 +00:00
Michael Vines b5f7e39be8 TestValidator public interface cleanup 2020-11-25 17:04:37 -08:00
Tyera Eulberg ef99689592
Improve TestValidator instantiation (#13627)
* Add TestValidator::new_with_fees constructor, and warning for low bootstrap_validator_lamports

* Add logging to solana-tokens integration test to help catch low bootstrap_validator_lamports in the future

* Reasonable TestValidator mint_lamports
2020-11-16 23:27:36 -07:00
Tyera Eulberg 4669fa0f98
Add deploy err if program-account balance is too high (#13091)
* Add deploy err if program-account balance is too high

* Review comments

* Add system-program check

* Rename and unhide flag
2020-10-22 22:42:35 -06: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
Tyera Eulberg cca318f805
Revert "CLI: Put `deploy` ephemeral keypair behind a flag" (#12983)
This reverts commit 5a5b7f39c1.
2020-10-19 12:44:32 -06:00
Trent Nelson 5a5b7f39c1 CLI: Put `deploy` ephemeral keypair behind a flag 2020-10-16 05:00:53 +00:00
Trent Nelson 7cab638297 Factor the rest of CLI offline module out to clap-utils and cli-output crates 2020-09-23 15:58:44 -06:00
Trent Nelson 325a7e9f86 Move CLI cli_output module to its own crate 2020-09-23 15:58:44 -06:00
Trent Nelson ba353c2b1d Move CLI blockhash_query module into client crate 2020-09-23 15:58:44 -06:00
Trent Nelson a6533c3a21 Move CLI nonce account helpers in client 2020-09-23 15:58:44 -06:00
Michael Vines 208dd1de3a Move TestValidator into its own module 2020-09-19 08:35:26 -07:00
Michael Vines de736e00ad Add (hidden) --use-deprecated-loader flag to `solana deploy` 2020-08-17 19:57:44 -07:00