110 Commits

Author SHA1 Message Date
Pankaj Garg
f84593ad5f Revert "Disable accounts squash call from bank"
This reverts commit 7685ba2805.
2019-03-25 12:21:32 -07:00
Pankaj Garg
7685ba2805 Disable accounts squash call from bank
- It's asserting and killing testnet
- temporary solution for beacons
2019-03-21 16:01:43 -07:00
Carl
4df79b653b PR comments 2019-03-21 16:01:43 -07:00
Carl
a2c1fa7cb4 Modify bank_forks to support squashing/filtering new root and also don't remove parents from bank_forks when inserting, otherwise we lose potential fork points when querying blocktree for child slots 2019-03-21 16:01:43 -07:00
Rob Walker
3d5eeab6d9 stop copying Blooms (#3379)
* stop copying Blooms

* fixup

* clippy
2019-03-21 13:45:41 -07:00
Greg Fitzgerald
c60baf99f3 Rename userdata to data (#3282)
* Rename userdata to data

Instead of saying "userdata", which is ambiguous and imprecise,
say "instruction data" or "account data".

Also, add `ProgramError::InvalidInstructionData`

Fixes #2761
2019-03-14 13:04:42 -07:00
carllin
e666509409 Don't vote for empty leader transmissions (#3248)
* Don't vote for empty leader transmissions

* Add is_delta flag to bank to detect empty leader transmissions

* Plumb new is_votable flag through replay stage

* Fix PohRecorder tests

* Change is_delta to AtomicBool to avoid making Bank references mutable

* Reset start slot in poh_recorder when working bank is cleared, so that connsecutive TPU's will start from the correct place

* Use proper max tick height calculation

* Test for not voting on empty transmission

* tests for is_votable
2019-03-13 14:32:04 -07:00
Sagar Dhawan
78bb96ee51 Reduce bootstrap leader stake (#3218) 2019-03-11 13:29:44 -07:00
Rob Walker
195a880576 pass Pubkeys as refs, copy only where values needed (#3213)
* pass Pubkeys as refs, copy only where values needed

* Pubkey is pervasive

* fixup
2019-03-09 19:28:43 -08:00
Tyera Eulberg
b053bc2790 Load accounts by program owner for program subscriptions 2019-03-07 17:21:32 -07:00
Rob Walker
01fb76f4bd add epoch warmup (#3166)
add epoch warmup
2019-03-06 16:32:23 -08:00
Rob Walker
63a4ed74a4 consolidate logic for epoch and slot_index into Bank (#3144) 2019-03-06 14:44:21 -08:00
Pankaj Garg
9163e5b004 Fix sorting order of stakes in confirmation time calculations 2019-03-06 13:11:04 -08:00
Michael Vines
53f09c44f3 Rename tokens to lamports in sdk/ 2019-03-05 17:28:06 -08:00
Rob Walker
cb0560df92 remove dead code 2019-03-05 15:35:24 -08:00
Rob Walker
b9e878ee80 slot_height considered harmful (#3135)
* slot_height considered harmful
* fix test_tick_slot_epoch_indexes
2019-03-05 14:18:29 -08:00
Sagar Dhawan
9349f90a59 Inherit transaction count from parent (#3134) 2019-03-05 12:34:21 -08:00
Greg Fitzgerald
885eeec3ed Boot storage program from the SDK 2019-03-05 07:16:33 -07:00
Greg Fitzgerald
5e9f802d7d Boot token_program from the SDK 2019-03-05 07:16:33 -07:00
Rob Walker
43bab23651 remove duplicate child creation (#3100)
* remove duplicate child creation
* resurrect test for partial slot
* simplify blocktree_processor some more (no tick_height, yay!)
* ensure frozen
2019-03-04 19:22:23 -08:00
Rob Walker
794e961328 use Bank's notion of leader_id where possible (#3119) 2019-03-04 18:40:47 -08:00
Sagar Dhawan
dc42c12f2b Revert to more consistent naming (#3114) 2019-03-04 17:50:19 -08:00
Stephen Akridge
97274030b9 Add test with transaction with no signatures
Add checks for no signature
2019-03-04 16:42:52 -08:00
carllin
de1d7ce312 Cleanup staking utils to divide functionality between delegate and normal node utitliites. Also replaces vote_states() with more generalized vote_accounts() in Bank. (#3070) 2019-03-03 18:04:13 -08:00
Greg Fitzgerald
1edf6c361e Move Vote program out of the SDK 2019-03-02 16:44:36 -08:00
Sagar Dhawan
b99e3eafdd Fix stakes not being setup correctly 2019-03-02 16:44:36 -08:00
Greg Fitzgerald
e6486b2824 Move Budget out of the SDK 2019-03-02 16:44:36 -08:00
Sagar Dhawan
d22a13257e Refactor bank get vote accounts (#3052) 2019-03-02 16:44:36 -08:00
Michael Vines
a94880574b block_hash => blockhash 2019-03-02 12:13:30 -07:00
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
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