Commit Graph

586 Commits

Author SHA1 Message Date
492cc93850 Limit short_vec length to u16, usize is overkill for our usage (#4588) 2019-06-06 20:18:41 -07:00
fd9fd43e83 add solana_name_id, reassociate names with modules, modularize id tests (#4580) 2019-06-06 19:27:49 -07:00
64e8a21d73 Add tick height syscall (#4497)
* Remove tick_height from entrypoint signature

* Impl tick_height syscall and use in storage program

* Properly remove tick height from bpf handling
2019-05-31 16:29:21 -06:00
028e111fbc remove payer from vote instructions (#4475) 2019-05-31 11:45:17 -07:00
1de805e7cd Add fees syscall to expose cluster fees into programs (#4472) 2019-05-30 15:18:48 -07:00
c05c3e69ca add tests and groom naming (#4467) 2019-05-29 10:08:03 -07:00
9843c3a5cb Restrict transaction fee payers to system accounts (#4198)
automerge
2019-05-24 13:06:55 -07:00
cfe5afd34c _id => _pubkey variable renaming (#4419)
* wallet: rename *_account_id to *_account_pubkey

* s/from_id/from_pubkey/g

* s/node_id/node_pubkey/g

* s/stake_id/stake_pubkey/g

* s/voter_id/voter_pubkey/g

* s/vote_id/vote_pubkey/g

* s/delegate_id/delegate_pubkey/g

* s/account_id/account_pubkey/g

* s/to_id/to_pubkey/g

* s/my_id/my_pubkey/g

* cargo fmt

* s/staker_id/staker_pubkey/g

* s/mining_pool_id/mining_pool_pubkey/g

* s/leader_id/leader_pubkey/g

* cargo fmt

* s/funding_id/funding_pubkey/g
2019-05-23 23:20:04 -07:00
943cd0a24a Add credit-only info to AccountMetadata (#4405)
* Add credit-only flag to AccountMeta, default to false

* Sort keys by is_credit_only within signed/unsigned groupings

* Process and de-dupe program keys along with other account keys

* Add message helper functions

* Fix test

* Improve comment

* s/is_credit_only/is_debitable

* Add InstructionKeys helper struct, and simplify program_position method
2019-05-23 18:19:53 -04:00
7ada8510c4 add slot_hashes to bank, remove phony slot_hashes_from_vote_instruction (#4401) 2019-05-22 19:07:56 -07:00
99d2428041 Transaction format changes toward Credit-Only accounts (#4386)
* Add num_readonly_accounts slice

* Impl programs in account_keys

* Emulate current account-loading functionality using program-account_keys (breaks exchange_program_api tests)

* Fix test

* Add temporary exchange faucet id

* Update chacha golden

* Split num_credit_only_accounts into separate fields

* Improve readability

* Move message field constants into Message

* Add MessageHeader struct and fixup comments
2019-05-22 18:23:16 -04:00
578c2ad3ea add bank hash to votes (#4381) 2019-05-21 21:45:38 -07:00
41a377013f fix spelling (#4378)
automerge
2019-05-21 17:13:21 -07:00
58295b825d introduce syscalls (#4373) 2019-05-21 15:19:41 -07:00
f079a78c5e Remove fee arg from system_transaction::* (#4346)
automerge
2019-05-20 10:03:19 -07:00
392a39dd54 Poh subsystem cleanup, genesis plumbing, enable real PoH on edge testnet (#4292)
* Remove unused PohServiceConfig::Step

* Clarify variable name

* Poh::hash() now takes an iteration counter

* man -> max

* Inline functions with single call site

* Move PohServiceConfig into GenesisBlock

* Add plumbing to enable real PoH on testnets

* Batch hashes to improve PoH hash rate

* Ensure a constant hashes_per_tick

* Remove PohEntry mixin field

* Poh/PohEntry no longer maintains tick_height

* Ensure a constant hashes_per_tick

* ci/localnet-sanity.sh: Use real PoH

* Rework Poh/PohService to keep PohRecorder unlocked as much as possible while hashing
2019-05-18 14:01:36 -07:00
431cc82032 add Transaction::partial_sign() (#4333)
* add partial sign

* nits
2019-05-17 18:55:57 -07:00
7bfb60f82e add impl FromStr for Signature (#4315)
automerge
2019-05-16 14:54:31 -07:00
fff1631a8b Return a better error when a program account isn't found (#4310) 2019-05-16 11:32:27 -06:00
c9b86018c6 Filter out all unprocessed transactions before forwarding them (#4266)
* Filter out all unprocessed transactions before forwarding them

* fix clippy
2019-05-13 14:40:05 -07:00
a2e3a92b01 Extend GetBlockHash RPC API to include the fee scehdule for using the returned blockhash (#4222) 2019-05-13 12:49:37 -07:00
1b68da7572 Use solana-ed25519-dalek v0.2.0 (#4264)
automerge
2019-05-13 09:51:59 -07:00
133be2df51 Check for transaction forwarding delay to detect an expired transaction before forwarding it (#4249)
Also refactored code for forwarding packets, and added test for it
2019-05-10 14:28:38 -07:00
06a93dcb43 Move to solana-ed25519-dalek (#4248) 2019-05-10 15:26:46 -06:00
5f72650c7f add derive Debug to Keypair (#4236) 2019-05-09 11:41:11 -07:00
994515d0f2 add impl PartialEq for Keypair (#4233)
* add-impl-PartialEq-for-Keypair

* clippy

* do the TODO, improve wrapper comments
2019-05-09 11:03:14 -07:00
f7680752e7 make gen_keypair_file take &str (#4232)
automerge
2019-05-08 23:00:48 -07:00
7609a007c6 Add FeeCalculator to the genesis block (#4196) 2019-05-07 20:28:41 -07:00
d10bde656a Pass payer key into get_keys() (#4203) 2019-05-07 18:48:31 -07:00
d9e18a71ec Pay program loading fees from a system account (#4190) 2019-05-07 15:00:54 -07:00
8e400fc4bd rework genesis (passive staking groundwork) (#4187)
* rework genesis

* fixup
2019-05-07 11:16:22 -07:00
675a78aaa1 get vote_instruction off bank for tests (#4086)
* get vote_instruction off bank for tests

* clippy
2019-04-30 15:11:08 -07:00
18e398131d Fix issues with bench-tps (#4005) 2019-04-27 08:39:29 -07:00
e71ab55288 Rename in-tree program_ids to be base-58 human readable (#4001) 2019-04-25 17:58:49 -07:00
a3c302c36a Add signature polling to SyncClient (#3996)
automerge
2019-04-25 12:46:40 -07:00
5a79676b8a Custom error decoder (#3783)
automerge
2019-04-25 10:29:44 -07:00
29698fcd38 Cleanup stragglers from move-to-transfer rename (#3947) 2019-04-23 13:30:42 -06:00
e0acd48944 Write bench-tps in terms of client (#3904)
* Write bench-tps in terms of client

* Add transactions_addr method for logging

* Move cluster config outside do_bench_tps

* Add BankClient test
2019-04-19 15:04:36 -06:00
f4e40d2c41 Add bench-exchange tx send metrics (#3890) 2019-04-18 22:31:25 -07:00
a9cfae486c Revert-revert migrate to ed25519-dalek crate (#3877)
* Revert "Revert "Migrate from ring to ed25519-dalek, take 2 (#3844)" (#3868)"

This reverts commit 6a878602f2.

* Fix Signature::verify method
2019-04-18 14:37:20 -06:00
6a878602f2 Revert "Migrate from ring to ed25519-dalek, take 2 (#3844)" (#3868)
This reverts commit e9b82bacda.
2019-04-18 11:47:34 -06:00
e9b82bacda Migrate from ring to ed25519-dalek, take 2 (#3844)
* Migrate from ring to ed25519-dalek

* Move gen_keypair_file test to a more appropriate location

* Fixup bench-exchange and add helper fn for single deterministic keypair

* Update golden
2019-04-18 10:38:32 -06:00
80f3568062 Upgrade to Rust 1.34.0 (#3781)
* Upgrade to Rust 1.34.0

* Remove redundant closures

Thanks Clippy!
2019-04-15 15:56:08 -06:00
d31989f878 CustomError from Vec->u32 2019-04-11 13:59:48 -07:00
d0f46d6a8a Cleanup client traits and create super trait (#3728) 2019-04-11 00:25:14 -07:00
4f232cbc27 Make MAX_RECENT_BLOCKHASHES <= MAX_HASH_AGE_IN_SECONDS (#3679)
* Make MAX_RECENT_BLOCKHASHES == MAX_HASH_AGE_IN_SECONDS
2019-04-09 11:45:25 -07:00
90c1300bb6 Plumb TransactionError through Rpc 2019-04-05 22:09:29 -06:00
46e6911ec1 Add get_signature_status() to SyncClient
And move bank::Result to transaction module.
2019-04-05 10:22:05 -07:00
d3844ef32a Add AsyncClient 2019-04-05 10:22:05 -07:00
0b23af324b Refactor Storage Program (#3622)
* Refactor Storage Program

* Replace KeyedAccount trait with StorageAccount struct

* Implement State for Account, not StorageAccount

* Make State trait more generic

* Move validation check into function
2019-04-04 12:01:09 -07:00