Greg Fitzgerald
d357640fbf
Centralize decentralized timing constants
2019-02-18 19:46:58 -08:00
Greg Fitzgerald
905b1e2775
Add notify_subscribers()
2019-02-18 20:04:30 -07:00
Greg Fitzgerald
377d45c9dd
Pull RpcSubscriptions out of the Bank
2019-02-18 20:04:30 -07:00
Greg Fitzgerald
90684483e2
Make Bank::hash_internal_state() work with checkpoints
2019-02-18 12:47:10 -07:00
Greg Fitzgerald
2f7911b62a
Boot BankError::MaxHeightReached
2019-02-17 16:30:01 -07:00
Anatoly Yakovenko
54dfe708c1
use ref for new_from_parent; test that transactions don't leak to parent
2019-02-17 15:02:08 -07:00
Anatoly Yakovenko
64f1d93cc3
Use the accounts list from parents up to finalized bank for Account::load apis.
...
Borrow checker
query the previous parents accounts
cleanup!
s/tree/parents
Tests! Last_ids need to be inherited as well otherwise nothing works.
new_from_parent
2019-02-17 15:02:08 -07:00
Greg Fitzgerald
50d3fa7437
Move RpcSubscriptions into its own module
2019-02-17 12:20:05 -07:00
Greg Fitzgerald
9f7fc5f054
Boot unused trait
...
Some ambitious unit-testing plans unimplemented?
2019-02-17 12:20:05 -07:00
anatoly yakovenko
c8c794e340
Use the accounts and status cache from parents up to finalized bank for calls. ( #2798 )
...
* Use the accounts list from parents up to finalized bank for Account::load apis.
* Borrow checker
* query the previous parents accounts
* cleanup!
* s/tree/parents
* Tests! Last_ids need to be inherited as well otherwise nothing works.
2019-02-17 08:01:31 -08:00
Greg Fitzgerald
9fa8105ae8
Add a way to make a DAG of checkpointed Banks
2019-02-16 21:49:06 -07:00
anatoly yakovenko
f71cd2c6f3
Status cache runs out of space in the bloom filter ( #2796 )
...
The cache is designed for 1m statuses, about 1 second worth of transactions at full capacity. Refresh the cache every 1 second worth of ticks.
2019-02-16 16:41:03 -08:00
Greg Fitzgerald
e39094ac37
Hoist Slot Leader dependencies up to BankingStage
2019-02-16 15:36:31 -07:00
Greg Fitzgerald
b539389741
Move all Validator dependencies from Bank to blocktree_processor
2019-02-16 15:01:26 -07:00
Greg Fitzgerald
ac35fe9ed1
Flip the dependency; Create bank before scheduler
2019-02-16 14:16:48 -07:00
Greg Fitzgerald
3d70afc578
Boot leader scheduler from the bank
...
Functional change: the leader scheduler is no longer implicitly
updated by PohRecorder via register_tick(). That's intended to
be a "feature" (crossing fingers).
2019-02-16 14:16:48 -07:00
Greg Fitzgerald
b919b3e3b2
Bank no longer updates a leader scheduler by default
2019-02-16 14:16:48 -07:00
Greg Fitzgerald
7a7349f2ff
Don't update the leader scheduler in bank's default constructor
2019-02-16 14:16:48 -07:00
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