Greg Fitzgerald
07b57735b1
Move leader scheduler test out of bank
2019-02-16 14:16:48 -07:00
Greg Fitzgerald
3bfe2e75b5
Boot new_with_leader_scheduler_config
...
Only used in one place. Easy enough to use the one with the shared
leader scheduler.
2019-02-16 10:55:58 -07:00
Greg Fitzgerald
97c93629a5
Don't use the Bank's LeaderScheduler
2019-02-16 10:55:58 -07:00
Greg Fitzgerald
643384e1ec
Add LeaderScheduler constructor to Bank
...
By passing a config and not a Arc'ed LeaderScheduler, callers
need to use `Bank::leader_scheduler` to access the scheduler.
By using the new constructor, there should be no incentive to
reach into the bank for that object.
2019-02-16 10:55:58 -07:00
Greg Fitzgerald
1809277e05
Encapsulate Bank accounts
...
That way we don't need to TODOs saying "don't forget to iterate
over checkpoints too". It should be assumed that when the bank
references its previous checkpoint all its methods would
acknowledge it.
2019-02-16 08:41:35 -07:00
Greg Fitzgerald
7981865fd2
Boot unused confirmation-time from Bank
...
This broken metric is already submitted to influx. Why make it
available via RPC too? If so, why store it in the bank and not
in the RPC service?
2019-02-16 08:11:43 -07:00
Greg Fitzgerald
4467d5eb4c
Extract process_ledger from Bank
...
Fullnode was the only real consumer of process_ledger and it was
only there to process a Blocktree. Blocktree is a tree, and a
ledger is a sequence, so something's clearly not right here.
Drop all other dependencies on process_ledger (only one test) so
that it can be fixed up in isolation.
2019-02-16 08:07:26 -07:00
Greg Fitzgerald
4a0009365e
Use Account::owner as loader for executable accounts
2019-02-14 13:26:46 -07:00
Greg Fitzgerald
48671a1728
Let native_loader own native executable accounts
2019-02-13 20:55:36 -08:00
Greg Fitzgerald
72b6ec4aa8
Add native program account constructor
2019-02-13 20:55:36 -08:00
Sagar Dhawan
e26cd2eb26
Make Genesis block handle extra tokens for the leader ( #2743 )
2019-02-12 15:49:23 -08:00
Pankaj Garg
144d321193
Remove Box for RPC pubsub subscriptions
2019-02-11 15:47:29 -08:00
Michael Vines
7dec40ff05
slot 0 now contains the same number of ticks as all subsequent slots
2019-02-10 16:34:10 -08:00
Tyera Eulberg
3c6af52a71
Fix pay-to-self Accounts bug ( #2682 )
...
* Add failing tests
* Fix tests
* Plumb AccountLoadedTwice error
* Fixup budget cancel actions to not depend on duplicate accounts
* Use has_duplicates
* Update budget-based golden
2019-02-07 12:14:10 -07:00
Greg Fitzgerald
5128d7d6c3
Move runtime.rs into its own crate
2019-02-07 09:46:06 -08:00
Greg Fitzgerald
d1945c29d7
Don't depend on solana_native_loader for IDs in the SDK
2019-02-07 08:23:44 -08:00
Michael Vines
d9e2b94d7a
bank::new_with_leader_scheduler_config() - remove Option<>
2019-02-06 19:47:09 -08:00
Michael Vines
c5a74ada05
leader_scheduler: remove bootstrap_height
2019-02-06 14:23:10 -08:00
Greg Fitzgerald
dad0bfe447
Replace transaction traits with structs
...
Also:
* SystemTransaction::new -> new_account
* SystemTransaction::new_create -> new_program_account
2019-02-01 11:38:25 -08:00
Carl
b6b179af97
Fix bad merge
2019-01-31 20:15:04 -08:00
carllin
37003da854
Fix potential of checking tvu bank for truth when its behind ( #2614 )
...
* Fix race between tpu and tvu, where tvu bank is not caught up to tpu bank
* Add test
* Cleanup Fullnode tests
2019-01-31 19:21:02 -08:00
Rob Walker
8ba1d5f426
treat genesis special ( #2615 )
...
* treat genesis special
* fix poh_recorder to understand new world order
2019-01-31 13:53:08 -08:00
anatoly yakovenko
2754ceec60
StatusDeque split into separate objects with their own root checkpoint strategy ( #2613 )
...
Split up StatusDeque into different modules
* LastIdQueue tracks last_ids
* StatusCache keeps track of signature statuses
* StatusCache stores success as a bit in a bloom filter
* Overhead for 1m Ok transactions is 4mb in memory
* Less concurrency between the objects, last_id and status_cache are read and written to at different points in the pipeline
* Each object has its own strategy for merging into the root checkpoint
2019-01-31 06:53:52 -08:00
Michael Vines
c01290438f
Move virtual genesis tick into the ledger proper as entry 0
2019-01-30 14:02:07 -08:00
Anatoly Yakovenko
1c0758e3bd
Accounts refactoring for forking.
...
* Move last_id and signature dup handling out of Accounts.
* Accounts that handle overlays.
2019-01-30 11:36:49 -08:00
Rob Walker
a0bed5375d
remove println!, add check to keep it out ( #2585 )
...
* remove debugging prints
* remove println!, add check to keep it out
2019-01-29 16:02:03 -08:00
Michael Vines
a2c3369713
storage_state field doesn't actually exist
2019-01-29 12:34:59 -08:00
Rob Walker
1f9ab7f58f
copy bank for TPU
2019-01-29 12:11:48 -08:00
Anatoly Yakovenko
3e1a926aa6
wip
2019-01-29 12:11:48 -08:00
Michael Vines
bfaf5634a1
.unwrap() in tests instead of assert!()ing .is_ok() for a better failure message
2019-01-28 16:10:32 -08:00
Stephen Akridge
53afa64634
Remove storage_state from the bank
...
Construct in TVU and pass to RPC and StorageStage instead.
2019-01-28 15:41:41 -08:00
Rob Walker
c9bf9ce094
eliminate re-use of a TX here, we're testing for empty account balance ( #2576 )
2019-01-28 15:21:08 -08:00
Greg Fitzgerald
1e43fb587e
Rename the module that now contains only GenKeys
2019-01-26 06:57:24 -08:00
Sagar Dhawan
d65e7b9fcc
Speedup rotation ( #2468 )
...
Speedup leader to validator transitions
2019-01-26 13:58:08 +05:30
Michael Vines
4bb6549895
Genesis block is now a json file
2019-01-25 09:05:15 -08:00
Pankaj Garg
81c82b5af9
Add test for ignore ProgramErrors in process_entries ( #2544 )
2019-01-24 13:37:12 -08:00
Pankaj Garg
a9b083e585
Set fetch stage socket non blocking to false while during recv ( #2542 )
...
* Set fetch stage socket non blocking to false while during recv
* remove ProgramError changes from this PR
2019-01-24 12:46:40 -08:00
Greg Fitzgerald
aba9df8457
Remove get_stake placeholder
2019-01-23 17:03:20 -08:00
Michael Vines
122a5b2f69
dedup the
2019-01-22 09:47:43 -08:00
Pankaj Garg
7204bb40bf
Don't fail process_entries with ProgramErrors ( #2509 )
2019-01-21 15:26:06 -08:00
Rob Walker
e6030d66eb
split load+execute from commit in bank, insert record between them in TPU code ( #2487 )
...
* split load+execute from commit in bank, insert record between them in TPU code
* clippy
* remove clear_signatures() race with commit_transactions()
* add #[test] back
2019-01-21 10:17:04 -08:00
Pankaj Garg
6611188edf
Move subscriptions to rpc_pubsub ( #2490 )
...
* Move subscriptions to rpc_pubsub
- this helps avoid recreating pubsub_service on node's role change
* fixed tests and addressed review comments
* fix clippy errors
* address review comments
2019-01-21 09:59:09 -08:00
Stephen Akridge
abbb037888
Implement storage contract logic
2019-01-21 08:36:49 -08:00
Michael Vines
2073188345
Fullnode no longer fails to process a ledger with ProgramErrors in it
2019-01-18 21:06:50 -08:00
Michael Vines
e74574706e
Record Transactions with program errors in the ledger, they paid the fee
2019-01-17 13:55:56 -08:00
Greg Fitzgerald
9328ee4f63
Revert "Revert "Delete unused code and its tests""
...
This reverts commit d6b3991d49
.
2019-01-11 14:54:17 -07:00
Michael Vines
d6b3991d49
Revert "Delete unused code and its tests"
...
This reverts commit e713ba06f1
.
2019-01-11 07:30:28 -08:00
Greg Fitzgerald
e713ba06f1
Delete unused code and its tests
2019-01-10 23:19:38 -07:00
Stephen Akridge
491bca5e4b
Remove ledger.rs
...
Split into entry.rs for entry-constructing functions and EntrySlice
trait and db_ledger.rs for ledger helper test functions.
2019-01-09 15:15:47 -08:00
Stephen Akridge
ebd676faaa
Rename Block to EntrySlice
2019-01-09 15:15:47 -08:00