Commit Graph

263 Commits

Author SHA1 Message Date
Justin Starry 0fde19239b
Rate limit counter metrics points to one per second (#5496)
* Rate limit counter metrics points to one per second

* Remove old env var

* Test that metrics counter is incrementing

* Fix typo
2019-08-12 18:15:34 -04:00
Rob Walker ed093f86f9
harmonize percentage members (#5459)
* harmonize percentage members

* update tests

* update capitalization when burning fees

* verify capitalization in fee burn

* fixup
2019-08-09 13:58:46 -07:00
Justin Starry 4f86c0b74a
Rate limit transaction counters (#5447)
* Rate limit transaction counters

* @sakridge feedback

* Set default high metrics rate for multinode demo

* Fix tests

* Swap defaults and fix env var tests

* Only set metrics rate if not already set
2019-08-08 17:05:06 -04:00
Sagar Dhawan 9dcf3347f5 Refactor status cache and remove complex serialize/deserialize (#5335)
automerge
2019-08-06 18:47:30 -07:00
carllin 1dbb5c8647
Deserialize snapshots (#5417)
* Deserialize snapshots
2019-08-05 22:53:19 -07:00
sakridge 832dfd4ab0
Change bank to not create default (#5409) 2019-08-02 14:46:53 -07:00
Rob Walker f7d3f55566
fix epoch_stakes again (#5396) 2019-08-01 14:27:47 -07:00
carllin 6cb2040a1b
Snapshot Packaging Service (#5262)
* Snapshot serialization and packaging
2019-07-31 17:58:10 -07:00
Rob Walker 9278201198
fix epoch_stakes (#5355)
* fix epoch_stakes

* fix stake_state to use stakers_epoch

* don't allow withdrawal before deactivation
2019-07-31 15:13:26 -07:00
Justin Starry 84368697af
Fix metrics when leader does not report metrics (#5291) 2019-07-30 16:18:33 -04:00
Rob Walker 4a57cd3300
Update bank.rs 2019-07-30 11:33:06 -07:00
Rob Walker 8537da19bb
groom accounts_db (#5283) 2019-07-25 22:59:28 -07:00
Sagar Dhawan a233a1c822
Fix poh recorder not flushing virtual ticks immediately (#5277)
* Fix poh not flushing virtual ticks immediately

* Fix test_would_be_leader_soon
2019-07-25 11:08:44 -07:00
Rob Walker 8a12ed029c
make accounts_db own the directory paths (#5230)
* change paths to something accounts_db (the singleton) owns, fixes SIGILL

* fail deserialize if paths don't work
serialize paths, too

* test that paths are populated from a bank snapshot
2019-07-23 13:47:48 -07:00
sakridge b505a0df22
Throw more threads at hash_internal_state (#5023) 2019-07-16 16:58:30 -07:00
Rob Walker fe87c05423
fix transaction_count (#5110)
* fix transaction_count

* add sig count to bank hash
2019-07-15 13:42:59 -07:00
Rob Walker 16b6576839
use precalculated max_tick_height (#5084) 2019-07-12 22:25:48 -07:00
Rob Walker d2b6c2e0ce
syscall work, rename syscall to sysvar, rename current to clock (#5074)
* syscall work, rename syscall to sysvar, rename current to clock

* missed one

* nit
2019-07-12 16:38:15 -07:00
carllin 22315d88e7
Fix credit only commit_credits race (#5028)
* Fix credit only drain race

* Refactor commit credits for tests

* Fix tests to use commit_credits_unsafe
2019-07-11 18:46:49 -07:00
Tyera Eulberg b2c776eabc
Fix getProgramAccounts RPC (#5024)
* Use scan_accounts to load accounts by program_id

* Add bank test

* Use get_program_accounts in RPC
2019-07-11 12:58:28 -06:00
Sagar Dhawan b8e7736af2 Move SLOTS_PER_SEGMENT to genesis (#4992)
automerge
2019-07-09 16:48:40 -07:00
Rob Walker 49250f62aa
make commit_credits one trip through the rwlock (#4969) 2019-07-08 20:46:21 -07:00
Rob Walker eb4edd75e6
make bank commit_credits non public (#4944)
* make bank commit_credits non pub

* track down create() failure

* move bank_client to process_transaction(), which commits credits
2019-07-08 15:37:54 -07:00
TristanDebrunner 091999a17e
fix Instruction and CompiledInstruction field names (#4895)
* s/program_ids_index/program_id for Instruction

* s/program_ids_index/program_id_index for CompiledInstruction
2019-07-01 18:34:22 -06:00
carllin 0c8f187993
remove syscall tick height (#4891) 2019-07-01 16:21:51 -07:00
sakridge a89589a1d5
Add Measure abstraction over measuring time intervals (#4851)
Allows one to swap in different implementations. This provides
the normal Insant::now() -> .elapsed() path.
2019-06-29 15:34:49 +02:00
Tyera Eulberg 66552d7047
Credit-Only Accounts: Cache account balance for thread-safe load/store (#4691)
* Implement CreditOnlyLocks

* Update credit-only atomic on account load

* Update credit-only atomic after bank.freeze_lock; store credits if all credit-only lock references are dropped

* Commit credit-only credits on bank freeze

* Update core to CreditAccountLocks

* Impl credit-only in System Transfer

* Rework CreditAccountLocks, test, and fix bugs

* Review comments: Pass CreditAccountLocks by reference; Tighten up insert block

* Only store credits on completed slot

* Check balance in bench_exchange funding to ensure commit_credits has completed

* Add is_debitable info to KeyedAccount meta to pass into programs

* Reinstate CreditOnlyLocks check on lock_account

* Rework CreditAccountLocks to remove strong_count usage

* Add multi-threaded credit-only locks test

* Improve RwLocks usage

* Review comments: panic if bad things happen; tighter code

* Assert lock_accounts race does not happen

* Revert panic if bad things happen; not a bad thing
2019-06-27 17:25:10 -04:00
carllin 97c97db97e
Fix early exit clearing all buffered packets (#4810) 2019-06-26 22:39:50 -07:00
Sagar Dhawan 8cea650535
Handle NaN and inifinite point values (#4839) 2019-06-26 18:33:52 -07:00
Sagar Dhawan df1c473341
Add storage point tracking and tie in storage rewards to economics (#4824)
* Add storage point tracking and tie in storage rewards to epochs and economics

* Prevent validators from updating their validations for a segment

* Fix test

* Retain syscall scoping for readability

* Update Credits to own epoch tracking
2019-06-26 10:40:03 -07:00
Rob Walker 8a64e1ddc3
add fee burning (#4818) 2019-06-26 10:13:21 -07:00
Sathish 9e7f618cff Set proper count value for account stores (#4797)
* set count values for store accounts

* Use AppendVecId type
2019-06-25 07:21:45 -07:00
anatoly yakovenko 29611fb61d
tower consensus naming (#4598)
s/locktower/tower/g
2019-06-24 13:41:23 -07:00
Rob Walker a49f5378e2
rewrite vote credits redemption to eat from rewards_pools on an epoch-sensitive basis (#4775)
* move redemption to rewards pools

* rewrite redemption, touch a few other things

* re-establish test coverage
2019-06-21 20:43:24 -07:00
Rob Walker 1f0f947ed2
add validator rewards pools (#4742)
* add validator rewards pools

* populate rewards syscall
2019-06-20 12:22:29 -07:00
Rob Walker 7ea522e851
add rewards syscall, groom some others (#4740) 2019-06-19 19:46:47 -07:00
Rob Walker 41fbdc6e08
use stake (#4721) 2019-06-19 11:54:52 -07:00
Sathish Ambley 8b41a5d725 periodically save config in separate folders 2019-06-17 22:48:27 -07:00
Sathish Ambley 7fd879b417 Restart validator nodes from snapshots 2019-06-17 22:48:27 -07:00
Rob Walker d86358eedc
add Account::new_data (#4701)
* add account_new_data

* fixup

* fixup
2019-06-17 15:58:05 -07:00
Rob Walker 3fe5f886d7
change store to store_account (#4689) 2019-06-14 13:34:15 -07:00
Rob Walker 4c6a6d63bf
add MiningPools, fund validator MiningPools from inflation (#4676)
* add MiningPool fund validator MinigPools from inflation

* fixup

* finish rename of MINIMUM_SLOT_LENGTH to MINIMUM_SLOTS_PER_EPOCH

* deterministic miningpool location

* point_value, not credit_value... use f64
2019-06-14 11:38:37 -07:00
Greg Fitzgerald c6b4a3a706
Witness account data in Budget (#4650)
* Add support for contracts based on account data to Budget

* Add program_id to account constraints

* No longer require a signature for the account data witness

* Rename bank::store to store_account

* fmt

* Add a doc

* clippy
2019-06-13 18:20:28 -07:00
sakridge 9e3758983d
Find max root and purge roots below it. (#4645)
* Test for forking accounts

* Find max root and purge roots below it.
2019-06-13 17:35:16 -07:00
Tyera Eulberg 8abf22f34b
Temporarily revert: Convert System Transfer accounts to credit-only (#4670) 2019-06-13 11:01:09 -06:00
Rob Walker 767efab941
add inflation to genesis (#4652)
* add inflation to genesis

* avoid having to write new()
2019-06-11 21:42:31 -07:00
Rob Walker 575a897ffc
track market cap (#4643)
* track market cap

* fixup, rebase

* prettier
2019-06-11 17:04:13 -07:00
Rob Walker 3217a1d70c
use highest staked node as bootstrap leader, remove bootstrap_leader from genesis_block (#4635)
* use highest staked node as bootstrap leader, remove bootstrap_leader from genesis_block

* clippy

* fixup

* fixup
2019-06-11 11:44:58 -07:00
Rob Walker e56430c9fb
make runtime depend on bpf_loader (#4601)
* make runtime depend on bpf_loader

* remove vote redundancy, move bpf_loader to genesis, export program\! from bpf_loader crate

* move bpf_loader specification into genesis

* bpf tests to use genesis with bpf

* need to avoid depending on programs, except for macros
2019-06-11 10:27:22 -07:00
Michael Vines e4d8ea11ac
Make lamports_per_signature dynamic based on cluster load (#4562)
* Make lamports_per_signature dynamic based on cluster load

* Move transaction-fees.md to implemented
2019-06-10 22:18:32 -07:00