947 Commits

Author SHA1 Message Date
Michael Vines
258cf21416 Purge remaining last_id (now called block_hash) 2019-03-02 12:13:30 -07:00
Michael Vines
2bfad87a5f Rename Bank.last_id() to Bank.last_block_hash() 2019-03-02 12:13:30 -07:00
Michael Vines
0743f54dfe Rename LastIdNotFound to BlockHashNotFound 2019-03-02 12:13:30 -07:00
Michael Vines
176d5e0d37 Rename Transaction last_id field to recent_block_hash 2019-03-02 12:13:30 -07:00
Stephen Akridge
16b71a6be0 Cleanup fork id generation
Accounts could end up with id collision depending on how
banks are created, this shouldn't happen.
2019-03-02 10:34:41 -08:00
Michael Vines
d5de5bec4f Register a new last_id once per slot 2019-03-02 08:47:31 -08:00
Michael Vines
61beb42797 Decouple tick counting from hash queue 2019-03-02 08:47:31 -08:00
Michael Vines
e5be3e1dca HashQueue no longer hard codes max_entries 2019-03-02 08:47:31 -08:00
Greg Fitzgerald
49b7e67585 Return program error from process_transaction()
Our unit-test helper `process_transaction()` wasn't returning
program errors, which made testing programs tedious and
counter-intuitive.
2019-03-02 07:50:32 -07:00
Rob Walker
54417acfba
changed vote_states to vote_accounts, more useable (#3047) 2019-03-01 17:22:49 -08:00
Rob Walker
29d12d9ff1
remove new_bank_from_parent_with_id() (#3039) 2019-03-01 16:39:23 -08:00
Stephen Akridge
4ee857ab7d More vote account fixes
vote_index not being maintained correctly during a squash.
The tokens==0 shielding accounts were being inserted with
owner=default Pubkey so they didn't know they are vote accounts
and should update the vote accounts set.
2019-03-01 16:25:14 -08:00
Rob Walker
a7c18cc0b4 Fnbool_to_FnOptionT 2019-03-01 14:12:50 -08:00
Michael Vines
e30e4cc603 Remove get_confirmation_timestamp() from HashQueue 2019-03-01 13:38:17 -08:00
Michael Vines
fdc31e99df Clean up type casts 2019-03-01 13:38:17 -08:00
Michael Vines
a72325dbc2 entry_id -> entry 2019-03-01 13:38:17 -08:00
Michael Vines
67b6be66c8 Rename MAX_ENTRY_IDS 2019-03-01 13:38:17 -08:00
Michael Vines
8ec13d557f Generalize tick_height to hash_height 2019-03-01 13:38:17 -08:00
Michael Vines
31f570a9f4 Remove unused functions 2019-03-01 13:38:17 -08:00
Rob Walker
38273427ad
have banks save vote_state by epoch to support stable leader schedules (#3019)
have banks save vote_state by epoch to support stable leader schedules
2019-03-01 11:54:28 -08:00
Michael Vines
46fb0b1b94 Rename last_id to last_hash within HashQueue 2019-03-01 11:48:09 -08:00
Michael Vines
224b705f8d Rename genesis_block.last_id() to genesis_block.hash() 2019-03-01 11:48:09 -08:00
Michael Vines
a57fb00584 Rename last_id_queue.rs to hash_queue.rs 2019-03-01 09:50:51 -08:00
Michael Vines
360055ad70 Rename LastIdQueue to HashQueue 2019-03-01 09:50:51 -08:00
Greg Fitzgerald
c53c351759 Rename erc20 to token-program
Everything it uses already had that name, just the crate was never
renamed.
2019-03-01 10:47:38 -07:00
Pankaj Garg
b41286919d
Rename bank.id to bank.slot (#3018) 2019-02-28 18:02:45 -08:00
Sagar Dhawan
20e4edec61
Refactor Vote Program Account setup (#2992) 2019-02-28 17:08:45 -08:00
Stephen Akridge
1c44b738fe Fix vote_accounts test 2019-02-28 15:22:47 -08:00
carllin
217f30f9c3
Add get_supermajority_slot() function (#2976)
* Moved supermajority functions into new module, staking_utils

* Move staking functions out of bank, and into staking_utils, change get_supermajority_slot to only use state from epoch boundary

* Move bank slot height in staked_nodes_at_slot() to be bank id
2019-02-28 13:15:25 -08:00
Sathish Ambley
0f2226901d Fix transaction count after squash 2019-02-27 23:21:49 -08:00
Michael Vines
dad1511484 test_bank_squash: validate transaction_count() before/after squashing 2019-02-27 23:21:49 -08:00
Rob Walker
d23f8a3e99
increase accounts coverage (#2993) 2019-02-27 21:42:14 -08:00
Michael Vines
0dc5af62ff Standardize on 'use log::*' for easy access to all log level macros 2019-02-27 21:16:23 -08:00
Michael Vines
855f1823a4 Include solana-logger for use by tests 2019-02-27 21:16:23 -08:00
Rob Walker
7fd40f1eb9
add failing test for #2994 (#2995) 2019-02-27 20:46:26 -08:00
Stephen Akridge
95f2f05f45 Refactor account serialize in appendvec
Remove dupe code and see how this compares to bincode.
Add benchmarks to justify custom serialize and also experiment with
safe solutions.
2019-02-27 19:57:50 -08:00
Rob Walker
163874d4da
remove purge parameter to accounts (#2990) 2019-02-27 16:06:06 -08:00
Michael Vines
b6ccb475f1
Clarify FIXME source 2019-02-27 10:37:48 -08:00
Sathish Ambley
ca0f16ccc0 Fix test failure 2019-02-27 08:22:52 -08:00
Stephen Akridge
c241a56fb0 Remove extraneous print. 2019-02-27 08:22:52 -08:00
Sathish Ambley
4149f7fd1c Fix review comments 2019-02-27 08:22:52 -08:00
Sathish Ambley
96b349dcbb Performance optimizations 2019-02-27 08:22:52 -08:00
Stephen Akridge
5216952691 Change benchmark path to target/ or OUT_DIR
Also reduce some code duplication with cleanup_dirs fn.
2019-02-27 08:22:52 -08:00
Sathish Ambley
c46b2541fe - Fix lock/unlock of accounts
- Fix format check warnings
2019-02-27 08:22:52 -08:00
Stephen Akridge
2158ba5863 tx count per fork 2019-02-27 08:22:52 -08:00
Stephen Akridge
180d297df8 Rebase and panic with no accounts
Add Accounts::has_accounts function for hash_internal_state calculation.
2019-02-27 08:22:52 -08:00
Sathish Ambley
c276375a0e Persistent account storage across directories 2019-02-27 08:22:52 -08:00
Sathish Ambley
130563cd4c AppendVec 2019-02-27 08:22:52 -08:00
carllin
033a04129a Add lockouts to vote program (#2944)
* Add lockouts to vote program

* Rename MAX_VOTE_HISTORY TO MAX_LOCKOUT_HISTORY, change process_vote() to only pop votes after MAX_LOCKOUT_HISTORY + 1 votes have arrived

* Correctly calculate serialized size of an Option, rename root_block to root_slot
2019-02-26 22:19:31 -07:00
Stephen Akridge
72214b2b68 Squash test to test parent bank after squash 2019-02-26 15:15:34 -08:00