Commit Graph

438 Commits

Author SHA1 Message Date
Michael Vines 6c36a2085f Add cargo-test-bpf 2020-11-05 14:29:17 -08:00
sakridge 55b0428ff7
Add store-tool (#13254) 2020-11-01 09:41:28 -08:00
Michael Vines 52a292a75b Add solana-program-test crate 2020-10-31 18:12:24 -07:00
Michael Vines 07a853d6cc Add cargo-build-bpf 2020-10-21 18:56:40 -07:00
Michael Vines 6858950f76 Remove frozen ABI modules from solana-sdk 2020-10-20 16:11:30 -07:00
Tyera Eulberg 359707c85e
Convert Blockstore Rewards cf to protobuf (#12860)
* Add Blockstore protobuf cf type

* Add Rewards message to proto and make generated pub

* Convert Rewards cf to ProtobufColumn

* Add bench

* Adjust tags

* Move solana proto definitions and conversion methods to new crate
2020-10-15 18:04:10 -06:00
Michael Vines 31696a1d72 Port BPFLoader2 activation to FeatureSet and rework built-in program activation 2020-09-28 12:50:19 -07:00
Trent Nelson 325a7e9f86 Move CLI cli_output module to its own crate 2020-09-23 15:58:44 -06:00
sakridge 3930cb865a
Add keccak-secp256k1 instruction (#11839)
* Implement keccak-secp256k1 instruction

Verifies eth addreses with ecrecover function

* Move secp256k1 test
2020-09-15 18:23:21 -07:00
Greg Fitzgerald bad486823c
Add a client for BankForks (#10728)
Also:
* Use BanksClient in solana-tokens
2020-08-07 08:45:17 -06:00
Michael Vines 9d2293bb32 ledger-storage-bigtable boilerplate 2020-08-05 14:27:12 -07:00
Michael Vines 6808a04abe Remove unmaintained btc programs 2020-07-25 06:04:07 +00:00
Greg Fitzgerald 8b1b392be9
Remove move_loader and librapay (#11184)
* Remove move_loader and librapay

* Remove Embedding Move from implemented proposals

* Remove Move variant from CI

* Remove move_loader ID
2020-07-23 15:08:59 -06:00
Tyera Eulberg d97850f1d9
Add account-decoder utilities (#10846)
* Fix comment and make less pub

* Add account-decoder crate and use to decode vote and system (nonce) accounts

* Update docs

* Rename RpcAccount struct

* s/Rpc/Display

* Call it jsonParsed and update docs

* Revert "s/Rpc/Display"

This reverts commit 6e7149f503f560f1e9237981058ff05642bb7db5.

* s/Rpc/Ui

* Add tests

* Ui more things

* Comments
2020-07-01 04:55:11 +00:00
sakridge 98621648cb
Add poh-bench (#10707) 2020-06-24 15:51:52 -07:00
Greg Fitzgerald 6013b4b2a7
Add clap-utils to workspace (#10340)
Without it, Rust Analyzer reports an error in the IDE
2020-05-30 11:26:26 -06:00
Michael Vines 417f0e41fa
Add stake-o-matic (#10044)
automerge
2020-05-20 16:15:03 -07:00
Tyera Eulberg fac854eb9d
Remove sdk-c (#10107) 2020-05-18 21:04:47 -06:00
Jack May eb1acaf927
Remove archiver and storage program (#9992)
automerge
2020-05-14 18:22:47 -07:00
Michael Vines 9ef9969d29
Remove notifier module duplication (#10051) 2020-05-14 17:32:08 -07:00
Greg Fitzgerald e09f517094
Add solana-tokens (#10011)
* Initial commit

* Execute transfers

* Refactor for testing

* Cleanup readme

* Rewrite

* Cleanup

* Cleanup

* Cleanup client

* Use a Null Client to move prints closer to where messages are sent

* Upgrade Solana

* Move core functionality into its own module

* Handle transaction errors

* Merge allocations

* Fixes

* Cleanup readme

* Fix markdown

* Add example input

* Add integration test - currently fails

* Add integration test

* Add metrics

* Use RpcClient in dry-run, just don't send messages

* More metrics

* Fix dry run with no keys

* Only require one approval if fee-payer is the sender keypair

* Fix bugs

* Don't create the transaction log if nothing to put into it;
  otherwise the next innvocation won't add the header

* Apply previous transactions to allocations with matching recipients

* Bail out of any account already has a balance

* Polish

* Add new 'balances' command

* 9 decimal places

* Add missing file

* Better dry-run; keypair options now optional

* Change field name from 'bid' to 'accepted'

Also, tolerate precision change from 2 decimal places to 4

* Write to transaction log immediately

* Rename allocations_csv to bids_csv

So that we can bypass bids_csv with an allocations CSV file

* Upgrade Solana

* Remove faucet from integration test

* Cleaner integration test

Won't work until this lands and is released:

https://github.com/solana-labs/solana/pull/9717

* Update README

* Add TravicCI script to build and test (#1)

* Add distribute-stake command (#2)

* Distribute -> DistributeTokens (#3)

* Cache cargo deps (#4)

* Add docs (#5)

* Switch to latest Solana 1.1 release (#7)

* distribute -> distribute-tokens (#9)

* Switch from CSV to a pickledb database (#8)

* Switch from CSV to a pickledb database

* Allow PickleDb errors to bubble up

* Dedup

* Hoist db

* Add finalized field to TransactionInfo

* Don't allow RPC client to resign transactions

* Remove dead code

* Use transport::Result

* Record unconfirmed transaction

* Fix: separate stake account per allocation

* Catch transport errors

* Panic if we attempt to replay a transaction that hasn't been finalized

* Attempt to fix CI

PickleDb isn't calling flush() or close() after writing to files.
No issue on MacOS, but looks racy in CI.

* Revert "Attempt to fix CI"

This reverts commit 1632394f636c54402b3578120e8817dd1660e19b.

* Poll for signature before returning

* Add --sol-for-fees option for stake distributions

* Add --allocations-csv option (#14)

* Add allocations-csv option

* Add tests or GTFO

* Apply review feedback

* apply feedback

* Add read_allocations function

* Update arg_parser.rs

* Fix balances command (#17)

* Fix balances command

* Fix readme

* Add --force to transfer to non-empty accounts (#18)

* Add --no-wait (#16)

* Add ThinClient methods to implement --no-wait

* Plumb --no-wait through

No tests yet

* Check transaction status on startup

* Easier to test

* Wait until transaction is finalized before checking if it failed with an error

It's possible that a minority fork thinks it failed.

* Add unit tests

* Remove dead code and rustfmt

* Don't flush database to file if doing a dry-run

* Continue when transactions not yet finalized (#20)

If those transactions are dropped, the next run will execute them.

* Return the number of confirmations (#21)

* Add read_allocations() unit-test (#22)

Delete the copy-pasted top-level test.

Fixes #19

* Add a CSV printer (#23)

* Remove all the copypasta (#24)

* Move resolve_distribute_stake_args into its own function

* Add stake args to token args

* Unify option names

* Move Command::DistributeStake into DistributeTokens

* Remove process_distribute_stake

* Only unique signers

* Use sender keypair to fund new fee-payer accounts

* Unify distribute_tokens and distribute_stake

* Rename print-database command to transaction-log (#25)

* Send all transactions as quickly as possible, then wait (#26)

* Send all transactions as quickly as possible, then wait

* Exit when finalized or blockhashes have expired

* Don't need blockhash in the CSV output

* Better types

CSV library was choking on Pubkey as a type. PickleDb doesn't have that problem.

* Resend if blockhash has not expired

* Attempt to fix CI

* Move log to stderr

* Add constructor, tuck away client (#30)

* Add constructor, tuck away client

* Fix unwrap() caught by CI

* Fix optional option flagged as required

* Bunch of cleanup (#31)

* Remove untested --no-wait feature

* Make --transactions-db an option, not an arg

So that in the future, we can make it optional

* Remove more untested features

Too many false positives in that santity check.  Use --dry-run
instead.

* Add dry-run mode to ThinClient

* Cleaner dry-run

* Make key parameters required

Just don't use them in --dry-run

* Add option to write the transaction log

--dry-run doesn't write to the database. Use this option if you
want a copy of the transaction log before the final run.

* Revert --transaction-log addition

Implement #27 first

* Fix CI

* Update readme

* Fix CI in copypasta

* Sort transaction log by finalized date (#33)

* Make --transaction-db option implicit (#34)

* Move db functionality into its own module (#35)

* Move db functionality into its own module

* Rename tokens module to commands

* Version bump

* Upgrade Solana

* Add solana-tokens to build

* Remove Cargo.lock

* Remove vscode file

* Remove TravisCI build script

* Install solana-tokens

Co-authored-by: Dan Albert <dan@solana.com>
2020-05-13 08:36:30 -06:00
Michael Vines 2521f75c18
Advertise node software version in gossip (#9981)
* Advertise node version in gossip

* Remove solana_clap_utils::version! macro
2020-05-11 15:02:01 -07:00
Michael Vines 124287a0ea Add ramp-tps 2020-04-17 22:29:35 -07:00
Greg Fitzgerald 8636ef5e24
Add solana-stake-accounts CLI tool (#9164)
automerge
2020-03-30 15:04:46 -07:00
Michael Vines 3ae6e0b8ab
Add solana-stake-monitor program (#9081) 2020-03-27 22:55:55 -07:00
sakridge b7b4aa5d4d
move rpc types from client to client-types crate (#9039)
* Separate client types into own crate, so ledger does not need it

Removes about 50 crates of dependency from ledger

* Drop Rpc name from transaction-status types
2020-03-26 13:29:30 -07:00
sakridge bca769111f
Dos all the things (#8914)
* Dos all the things

* Use solana-dos for gossip dos test
2020-03-20 12:55:38 -07:00
anatoly yakovenko 9cedeb0a8d
Pull streamer out into its own module. (#8917)
automerge
2020-03-17 23:30:23 -07:00
sakridge 2435c3ce0c
Add accounts-bench, a benchmark to test the accounts store speed (#8866) 2020-03-17 11:02:07 -07:00
sakridge 97986a5241
Move download code to download-utils crate (#8704) 2020-03-07 07:08:01 -08:00
Tyera Eulberg ed0c1d3b52
Ledger hardware wallet integration (#8068)
* Initial remote wallet module

* Add clap derivation tooling

* Add remote-wallet path apis

* Implement remote-wallet in solana-keygen

* Implement remote-wallet in cli for read-only pubkey usage

* Linux: Use udev backend; add udev rules tool

* Ignore Ledger live test

* Cli api adjustments
2020-02-07 11:26:56 -07:00
Tyera Eulberg fab8ef379f
Use solana-cli config keypair in solana-keygen (#8074)
* Use solana-cli config keypair in solana-keygen

* s/infile/keypair for consistency across modules and more generality across access methods

* Move config into separate crate
2020-01-31 19:27:37 -07:00
sakridge 8572b57834
Refactor chacha cuda to be able to test cuda crate but not in OpenCL (#7685)
* Refactor chacha cuda to be able to test cuda crate but not in OpenCL

chacha not implemeted in OpenCL

* Get off core::Error
2020-01-16 08:29:36 -08:00
Rob Walker 760a56964f
delete fixed_buf (#7644) 2019-12-30 16:45:43 -08:00
Tyera Eulberg 3513f4ee84
Rename drone to faucet (#7508) 2019-12-16 14:05:17 -07:00
Michael Vines 2db28cae41 Add solana-watchtower program 2019-12-12 12:03:13 -07:00
Greg Fitzgerald 62810d769a
Account for all tokens at genesis (#7350)
* Towards accounting for all tokens

* Move 5m tokens back into the big pool

* Flesh out batch 4

* Add a script to generate ValidatorInfo structs from a CSV file

* Remove commented out code and improve test
2019-12-08 09:17:42 -07:00
Jack May 9485eba73d
nudge (#7279) 2019-12-04 19:28:20 -08:00
Jack May 23c4a7dc49
nudge (#7280) 2019-12-04 19:28:00 -08:00
Jack May 703a5348e8
Relocate program tests (#7259) 2019-12-04 12:41:54 -08:00
Pankaj Garg 076e384bb5
Tool to tune system parameters like PoH service priority (#7155)
* New daemon to tune system parameters like PoH service priority

* fixes for Linux

* integrate with poh_service

* fixes

* address review comments

* remove `dead_code` directive
2019-12-02 16:46:46 -08:00
Greg Fitzgerald 92d485dd4d
Cleanup (#7176)
* Drop serde error instances

These were no longer needed after ToPrimitive instances were
added.

* Rename last of _api crates
2019-11-29 13:50:32 -07:00
Jack May 3415db9739
Merge api/program into single units (#7061) 2019-11-20 16:32:19 -08:00
Jack May d184d3a732
Merge native programs parts into one unit (#7047) 2019-11-20 10:12:43 -08:00
Greg Fitzgerald bfa2535ea1
Add non-fungible token program (#7007)
* Add non-fungible token program

* Remove issuer and id from state

* Boot NftInstruction and NftState

* Rename NFT to Ownable

Maybe this should be "Owned" to avoid confusion with an Ownable trait?

* Rename directory

* Delete unreachable branch

* Don't use copy_from_slice - need an error, not a panic.

* Rename contract_pubkey to account_pubkey
2019-11-18 18:09:42 -07:00
Pankaj Garg 5f38fa379c
Tool to partition network and induce packet drops/delays (#6933)
* Tool to partition network and induce packet drops/delays

* clippy fixes

* review comments
2019-11-13 13:59:55 -08:00
Michael Vines 2fd2140f64
🍢banking-bench/, genesis-programs/ and local-cluster/ (#6920)
* git mv genesis_programs genesis-programs

* git mv local_cluster local-cluster

* git mv banking_bench banking-bench
2019-11-12 22:20:48 -07:00
Ryo Onodera 3faeb7fa79 Rename solana-netutil to solana-net-utils for consistency (#6895)
* sed -i -e 's/netutil/net_utils/g' $(git grep --files-with-matches netutil :**.rs)

* sed -i -e 's/netutil/net-utils/g' $(git grep --files-with-matches netutil)

* git mv netutil/ net-utils

* Tweak a bit

* Fix rustfmt & clippy
2019-11-12 13:37:13 -07:00
anatoly yakovenko b825d04597 Pull perf into a separate module. (#6718)
automerge
2019-11-04 20:13:43 -08:00
Pankaj Garg 2e30926ac3
New program to process `iftop` log output (#6668)
* New program to process iftop log output

* fixes

* fix shellcheck

* address review comments

* more review comments
2019-10-31 18:22:57 -07:00
TristanDebrunner b4dc1a7263 Remove move feature (#6605)
automerge
2019-10-29 17:14:07 -07:00
Greg Fitzgerald 9232057e95
Rename replicator to archiver (#6464)
* Rename replicator to archiver

* cargo fmt

* Fix grammar
2019-10-21 11:29:37 -06:00
Greg Fitzgerald 5468be2ef9 Add solana-ledger crate (#6415)
automerge
2019-10-18 09:28:51 -07:00
Michael Vines d865f1f0c5 Add vest program to genesis 2019-10-17 14:07:09 -07:00
Greg Fitzgerald fb39bd45d7
Revert "Rename solana-runtime to sealevel (#6239)" (#6247)
This reverts commit 2e921437cd.
2019-10-04 19:33:29 -06:00
Greg Fitzgerald 2e921437cd Rename solana-runtime to sealevel (#6239)
automerge
2019-10-04 15:02:44 -07:00
Greg Fitzgerald 5617162cb6 Add Vest program (#5987)
automerge
2019-10-04 14:43:50 -07:00
Jack May 054deb809b
Remove token program (#6217) 2019-10-02 14:07:23 -07:00
Michael Vines b4da83a3ab
Remove CUDA feature (#6094) 2019-09-26 13:36:51 -07:00
Michael Vines 5f079137e5 Remove kvstore (#6075)
automerge
2019-09-24 19:59:32 -07:00
Michael Vines 1d0be265d9
Add explicit validator-cuda crate (#5985) 2019-09-19 20:50:34 -07:00
Sagar Dhawan c1d788880d
Limit Rayon threadpool threads (#5871) 2019-09-12 11:39:39 -07:00
Jack May 176c7d8b13
Pull all the Rust BPF tests into a single workspace so they share dependencies (#5878) 2019-09-11 14:55:58 -07:00
Patrick Amato 2b696ac8dc
Bitcoin Payment Verification Program (#5153)
* btc_spv program directories

* add spv-instruction spv-state

* added spv_processor file

* cargo.tomls - bump versions, rm unneccessary deps

* add btc_spv_bin and top lvl workspace entry

* hex_decode util & errors

* add header parsing test

* update dependencies

* rustfmt

* refactor Requests

* fix dependencies/versions

* clippy fixes

* test improvements

* add gitignores

Add framework for the rest of the BTC-SPV stuff to be built on top of. This PR defines the components, data structures, accessors, etc. but is not quite complete. It still needs the headerstore component finished along with some of the validation utils, hashing stuff, and more tests.
2019-09-03 19:16:02 -06:00
Tyera Eulberg 0d20bc5e14
Move solana-validator-info into cli (#5768)
* Move solana-validator-info into cli

* Remove solana-validator-info and update docs

* Update test to use app()
2019-09-03 10:38:12 -07:00
Michael Vines 643d0b0868 Make the world flat again; remove utils/ subdirectory (#5752)
automerge
2019-08-30 11:57:39 -07:00
sakridge 34155fc36f
Long-running banking benchmark (#5075) 2019-08-30 11:10:32 -07:00
Michael Vines a273ddcd97 Rename fixed_buf to fixed-buf (#5665)
automerge
2019-08-26 20:31:59 -07:00
Michael Vines 1207664bbb
Rename solana-wallet program to just solana (#5604)
* Rename wallet/ to cli/

* Rename the solana-wallet crate to solana-cli

* Rename solana-wallet program to solana

* cargo fmt
2019-08-22 13:51:16 -07:00
Rob Walker a252acf539
move netutil (#5552) 2019-08-17 15:52:12 -07:00
Rob Walker 25403e61ed
add fixed_buf (#5546) 2019-08-17 11:11:59 -07:00
Rob Walker fd443d85c4
update config_api with initialization and recovery utilities (#5523)
* update config_api with initialization and recovery utilities

* nits

* move tests to config_tests to eliminate config_api solana_runtime dependency

* fixups
2019-08-14 15:54:31 -07:00
TristanDebrunner 687818aad6
Run sdk-c through clippy separately (#5504) 2019-08-12 16:41:17 -06:00
sakridge 238aa2133d
Move local_cluster tests into own crate (#5465) 2019-08-08 11:04:33 -07:00
Michael Vines 0f5acb86d3
wallet: Refuse to delegate stake to a vote account with a stale root slot (#5282)
* Refuse to delegate stake to a vote account with a stale root slot

* Remove sdk-c from the virtual manifest temporarily

For an unknown reason |cargo clippy| is getting stuck in CI
intermittently when trying to build this crate.
2019-08-01 21:08:24 -07:00
Jack May d09afdbefe
Synchronize and cleanup instruction processor lists (#5356) 2019-07-31 14:28:14 -07:00
sakridge c209718a6f
Add libray_api (#5304)
Simple move-based payment api
2019-07-27 12:11:51 -07:00
Greg Fitzgerald 64c770275b
Integrate Move VM into main build (#5229)
* Integrate Move VM into top-level build

* Switch to protoc-free libra
2019-07-27 06:59:46 -06:00
Greg Fitzgerald 186b514ebb Embed Move (#5150)
automerge
2019-07-22 12:01:52 -07:00
TristanDebrunner 6b86f85916
Add C API (#5072) 2019-07-15 13:17:17 -06:00
Tyera Eulberg 2c8d6f87e6
Add validator-info CLI (#4970)
* Add validator-info CLI

* Add GetProgramAccounts method to solana-client

* Update validator-info args, and add get subcommand

* Update ValidatorInfo lengths

* Add account filter for get --all

* Update testnet participation doc to reflect validator-info

* Flesh out tests

* Review comments
2019-07-11 12:38:52 -06:00
sakridge a89589a1d5
Add Measure abstraction over measuring time intervals (#4851)
Allows one to swap in different implementations. This provides
the normal Insant::now() -> .elapsed() path.
2019-06-29 15:34:49 +02:00
Pankaj Garg 30592f2b12
Integration tests for stake API (#4811)
* more tests for rewards redemption

* break circular deps

* code review
2019-06-25 23:00:35 -07:00
Trent Nelson 06c547094a Add Merkle Tree implementation (#4749)
automerge
2019-06-21 10:22:21 -07:00
Jack May 0dcdc37fec
Split BPF loader to match the rest of the programs (#4636) 2019-06-12 08:49:59 -07:00
Michael Vines 0dbe5ee559
Add chacha-sys crate (#4620)
* af9ff9c7f9/src/cpu-crypt

* Add chacha-sys crate

* Remove chacha feature

* Remove erasure feature

* Add .gitignore
2019-06-10 07:14:02 -07:00
Michael Vines fb2eac20bb
Rename solana-fullnode to solana-validator (#4411) 2019-05-23 15:06:01 -07:00
Tyera Eulberg 3fd9aada8b
Add missing modules to workspace (#4183) 2019-05-06 22:40:54 -06:00
Greg Fitzgerald 51a2988bb2
Revert "Rename programs to instruction_processors (#3789)" (#3824)
This reverts commit 34344982a9.
2019-04-17 15:05:49 -06:00
Jack May 2518e95fb0
Add bench-exchange (#3826) 2019-04-17 11:28:26 -07:00
Amr Ali 34344982a9
Rename programs to instruction_processors (#3789)
* Rename programs to instruction_processors

* Updates around the code base to support instruction_processors rename

* Kabab instruction_processors

* Update Cargo.toml files and scripts to use instruction-processors

* Update Cargo.toml to use instruction-processors

* Update CI scripts to use instruction-processors
2019-04-16 22:39:00 +02:00
Tyera Eulberg af97ad3d68 Add solana-gossip module 2019-04-01 23:05:25 -06:00
Rob Walker 25a2f08f8d
add passive staking and rewards (#3579)
* add stake stuff

* more generic

* test decode bail cases

* favor early returns
2019-04-01 16:45:53 -07:00
Jack May 6505221629
Add exchange program (#3444) 2019-03-22 21:07:36 -07:00
Greg Fitzgerald d0761f57e8 Add _program suffix to directories of crates with _program suffix 2019-03-21 16:24:06 -06:00
Greg Fitzgerald 2b00a42b06 Boot Rewards program 2019-03-21 12:07:20 -06:00
Michael Vines 63aadc4905 Turn top-level Cargo.toml into a virtual manifest 2019-03-21 08:47:58 -07:00
Rob Walker c70412d7bb
move core tests to core (#3355)
* move core tests to core

* remove window

* fix up flaky tests

* test_entryfication needs a singly-threaded banking_stage

* move core benches to core

* remove unnecessary dependencies

* remove core as a member for now, test it like runtime

* stop running tests twice

* remove duplicate runs of tests in perf
2019-03-18 22:08:21 -07:00
Mark 656fb173f9
Extract kvstore into separate crate (#3327)
* extract kvstore into new crate

* add kvstore crate to CI publishing list
2019-03-15 18:42:47 -05:00
Michael Vines 5f58e9cd6e Config program - useful for storing/updating simple config items on chain 2019-03-15 16:39:45 -07:00