Commit Graph

244 Commits

Author SHA1 Message Date
anatoly yakovenko 1e20d449ce
`bank_height / slot` is the block drop rate (#3816)
* bank_height/slot would give is the block drop rate

* use metrics
2019-04-16 19:35:38 -07:00
anatoly yakovenko f73d38739a
Split AccountsDB from Accounts (#3808)
Split AccountsDB from Accounts
2019-04-16 13:32:22 -07:00
anatoly yakovenko a4b5493ba1
Document unsafe usage in AppendVec (#3804)
* document unsafe usage

* clippy
2019-04-16 10:53:37 -07:00
anatoly yakovenko 0ff2bfdd0c
Fewer unsafe hacks for AppendVec (#3801)
* storage account changes

* cleanup

* checks

* comments

* clippy

* tests

* woot!

* comments

* benches
2019-04-16 08:50:05 -07:00
anatoly yakovenko 68fc303b9b
Rework Accounts for fast squash, hashing state and checkpoint recovery. (#3613)
* accounts rewrite

* ignore grow tests

* skip duplicate roots

* allow for a root race

* logger

* accounts_index tests

* tests

* tests
2019-04-15 17:15:50 -07:00
Greg Fitzgerald 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
Rob Walker de52747950
remove max_tick_height replicode (#3765) 2019-04-14 19:15:31 -07:00
Sagar Dhawan 1e8f83a74a Use a better name for new api 2019-04-12 14:58:22 -07:00
Sagar Dhawan 1db80d79fc Update get recent blockhashes to return confirmed blockhashes only 2019-04-12 14:58:22 -07:00
anatoly yakovenko 8b08fe265a
AppendVec PR with using "/tmp" as the default directory and a random file (#3743)
* AppendVec with raw pointers
* fixed test target directory
2019-04-12 04:30:17 -07:00
Greg Fitzgerald 485013b7ce Revert "AppendVecs that can return references and read/append without locks (#3713)"
This reverts commit f669ae5868.
2019-04-11 14:47:30 -07:00
Tyera Eulberg d31989f878 CustomError from Vec->u32 2019-04-11 13:59:48 -07:00
anatoly yakovenko f669ae5868
AppendVecs that can return references and read/append without locks (#3713)
* AppendVec with raw pointers

* appendvecs

* imports

* review

* review comments

* clippy
2019-04-11 13:16:56 -07:00
Greg Fitzgerald a28c3b0e9a Consume Bank in BankClient
This will allow BankClient to spin up a thread to use the Bank.
It'll also ease the transaction from BankClient to ThinClient since
it won't let you depend on Bank.

Drawback, you the transition from Bank to BankClient will be harder
because the Bank methods are inaccessible.
2019-04-11 12:16:33 -07:00
carllin 787dc5748a
Fixed DuplicateSigs (#3727)
* Fixed DuplicateSigs by not recording errors in signature cache of bank
2019-04-11 11:51:34 -07:00
Greg Fitzgerald 8ada4bfd1f Remove test now covered by Vote crate 2019-04-11 10:53:11 -07:00
Greg Fitzgerald 5d4624e75f Use Bank::add_instruction_processor to bypass manual build step 2019-04-11 10:53:11 -07:00
Jack May d0f46d6a8a
Cleanup client traits and create super trait (#3728) 2019-04-11 00:25:14 -07:00
Rob Walker f1e7237c09
vote_api cleanup (#3710)
* vote_api cleanup

* fixups

* fixup

* remove unused code

* revert removal of serialize and deserialize

* ...

* increase coverage, bootstrap staking

* Sagar's STAKE to my VOTE
2019-04-10 17:52:47 -07:00
Sagar Dhawan c0808d01f8 Add tests 2019-04-10 15:51:00 -07:00
Sagar Dhawan 7fd5e51168 Make sure bank 0 is votable and correctly designate signer 2019-04-10 15:51:00 -07:00
Sathish 7b2abf2087 Update count for the right store (#3683) 2019-04-09 13:48:13 -07:00
Rob Walker d30049b8eb
test for debit of TX fees on full process_transaction() (#3643)
* fix double debit of TX fees

* add test that fails when removing that line

* put that line back in

* comments
2019-04-05 16:55:58 -07:00
Rob Walker a5b5248a09
move vote_accounts up (#3647) 2019-04-05 14:23:00 -07:00
Rob Walker 9f046a023e
move transaction_count up (#3618)
* move transaction_count up

* fixup
2019-04-05 10:42:25 -07:00
Greg Fitzgerald 46e6911ec1 Add get_signature_status() to SyncClient
And move bank::Result to transaction module.
2019-04-05 10:22:05 -07:00
Greg Fitzgerald d3844ef32a Add AsyncClient 2019-04-05 10:22:05 -07:00
Greg Fitzgerald 1598a02a7a Wrap all client errors with TransportError 2019-04-04 12:00:19 -06:00
Greg Fitzgerald 167f5bdc58 Add get_balance() and get_account_data() to SyncClient
Migrate tests to use them.
2019-04-04 12:00:19 -06:00
Greg Fitzgerald 5cd7bccdf3 Add SyncClient and use from BankClient 2019-04-04 12:00:19 -06:00
Greg Fitzgerald 35298e01a8 Remove Instruction wrapper structs and name functions after enum fields 2019-04-03 13:34:27 -07:00
Greg Fitzgerald 867f6f107b Rename SystemInstruction::Move to SystemInstruction::Transfer 2019-04-03 08:35:57 -06:00
Greg Fitzgerald 43bb813cbe Rename 'new_account' to 'new_user_account'
And 'new_program_account' to 'new_account'
2019-04-02 21:24:42 -06:00
Greg Fitzgerald 4c0bc1fd88 Add program_ids() methods
Added CompiledInstruction::program_id() so that we don't need to pass
around instruction indexes just for Message::program_id().

Also added Message.program_ids() that returns a slice so that we
can move those pubkeys into Message::account_keys.
2019-04-02 19:00:35 -06:00
Greg Fitzgerald a0041cec97 Rename Runtime to MessageProcessor 2019-04-02 12:49:26 -06:00
Greg Fitzgerald fa1c1e3734 Rename native programs to native instruction processors 2019-04-02 10:36:19 -06:00
Greg Fitzgerald 947cdd8748 Rename system_program to system_instrution_processor 2019-04-02 10:36:19 -06:00
Greg Fitzgerald 0a9f063d3e Rename native_program.rs to instruction_processor_utils.rs
Prefer the term "instruction processor" over "program". Reserve
the term "native" for the loader and shared object it loads.
Compiling an instruction processor to BPF shouldn't imply changing
to a non-native entrypoint.
2019-04-02 10:36:19 -06:00
carllin d228b6467c
Implement finalizer so that all locked accounts are dropped (#3585)
* Implement finalizer so that all locked accounts are dropped when finalizer goes out of scope

* Add test for tx error with lock conflict

* Fix double unlock from destructor running after a call to unlock
2019-04-02 03:55:42 -07:00
Sathish Ambley 3152090a66 update with review comments 2019-04-01 15:54:53 -06:00
Sathish Ambley f853c39169 remove unused member 2019-04-01 15:54:53 -06:00
Sathish Ambley 75ad1305c0 Cache vote accounts and optimize squash 2019-04-01 15:54:53 -06:00
Greg Fitzgerald fcef54d062 Add a constructor to generate random pubkeys 2019-03-31 16:23:18 -06:00
carllin 8660c3581e
Add squashing metrics (#3573) 2019-03-29 21:21:59 -07:00
Greg Fitzgerald 5646daa820 Delete lots of fee parameters
So many zeros!
2019-03-29 19:21:51 -06:00
Greg Fitzgerald 7896e8288d Replace Transaction::fee with a FeeCalculator 2019-03-29 19:21:51 -06:00
Greg Fitzgerald 3b516c0710 Fix build 2019-03-29 14:56:29 -06:00
Greg Fitzgerald 8e04fadb05 Cleanup magic numbers
Rename `num_signatures` to `num_required_signatures` to
disambiguate it from `tx.signatures.len()`.
2019-03-29 13:03:29 -07:00
Greg Fitzgerald 31f8b6d352 Integrate Message into Transaction 2019-03-29 13:03:29 -07:00
anatoly yakovenko 10239c3b3c
Replace recursive status cache with a single global fast status cache (#3541)
Fast Status Cache
2019-03-29 10:03:55 -07:00