Commit Graph

327 Commits

Author SHA1 Message Date
Sagar Dhawan 80a89b5e6d Revert "Revert "Add inflation to epoch phases (#6787)" (#6802)" (#6806)
automerge
2019-11-07 18:33:14 -08:00
Sagar Dhawan d89271528e Revert "Add inflation to epoch phases (#6787)" (#6802)
automerge
2019-11-07 16:43:09 -08:00
Jack May a9c4cd6cbe
Add inflation to epoch phases (#6787) 2019-11-07 10:53:04 -08:00
Justin Starry e420800aeb
Update terminology for block height and genesis block (#6782) 2019-11-06 23:09:03 -05:00
carllin 24102a7435
Allow voting on empty banks (#6719)
* Allow votes on empty banks

* Remove making first bank is_delta true, no longer necessary for idling

* Remove votable from ledger tool
2019-11-06 01:02:26 -08:00
Tyera Eulberg c6931dcb07
Remove credit-only account handling (#6726)
* Renaming
- credit-only/credit-debit to read-only/read-write
- debitable to writable

* Remove credit handling, making credit-only accounts read-only

* Update programs to remove deprecated credit-only account designation

* Use readonly and writable instead of underscored types
2019-11-05 09:38:35 -07:00
anatoly yakovenko f54cfcdb8f
Store and persists full stack of tower votes in gossip (#6695)
* vote array

wip

wip

wip

update

gossip index should match tower index

tests build

clippy

test index after expired vote

test

bank specific last vote sync time

* verify

* we are likely to see many more warnings about old votes now
2019-11-04 16:19:54 -08:00
Rob Walker efe260f12e
sysvar trait (#6667)
* sysvar trait

* get the new guy in on it
2019-11-04 12:31:24 -08:00
Rob Walker b9b535c30f
move system_instruction::transfer() `to` credit-debit (#6677)
* transfer no credit only

* use a credit-only transfer in the credit-only test
2019-11-04 12:30:59 -08:00
Trent Nelson 5416c114cf
SDK: Add sysvar to expose recent block hashes to programs (#6663)
* SDK: Add sysvar to expose recent block hashes to programs

* Blockhashes is one word

* Missed one

* Avoid allocs on update

* unwrap_or_else

* Use iterators

* Add microbench

* Revert "unwrap_or_else"

This reverts commit a8f8c3bfbe0d88e2229e67a29e9d2b489b93ff62.

* Revert "Avoid allocs on update"

This reverts commit 486f01790c271cf09ac3dbffba0e40e526e81324.
2019-11-04 10:51:15 -07:00
Michael Vines 3938142535
keygen: add dedicated `solana-keygen grind` command (#6697)
* Remove dead code

* Speed up vanity key grinding
2019-11-03 19:41:26 -08:00
Michael Vines 50a17fc00b Use Slot and Epoch type aliases instead of raw u64 (#6693)
automerge
2019-11-02 00:38:30 -07:00
Justin Starry e8e5ddc55d
Verify number of hashes for each block of entries (#6262)
* Verify number of hashes for each block of entries

* Fix blocktree processor tick check

* Rebase once more
2019-10-31 16:38:50 -04:00
Rob Walker fa12a5f70b
kill rent calculator (#6625) 2019-10-30 16:25:12 -07:00
Rob Walker b4119c454a
credit_only credits forwarding (#6509)
* credit_only_credits_forwarding

* whack transfer_now()

* fixup

* bench should retry the airdrop TX

* fixup

* try to make bench-exchange a bit more robust, informative
2019-10-23 22:01:22 -07:00
sakridge f1172617cc
Purge accounts with lamports=0 on rooted forks (#6315) 2019-10-23 12:46:48 -07:00
Michael Vines 35cc74ef25
Add GenesisBlock::OperatingMode to control how cluster features are activated (#6430) 2019-10-23 11:50:10 -07:00
Michael Vines 3fb70b8d47
Ban XXX, TBD, FIXME comments (#6486) 2019-10-21 16:43:11 -07:00
Greg Fitzgerald 9232057e95
Rename replicator to archiver (#6464)
* Rename replicator to archiver

* cargo fmt

* Fix grammar
2019-10-21 11:29:37 -06:00
Justin Starry 09abbd93b1
Cleanup register_tick special handling (#6462) 2019-10-21 10:51:02 -04:00
Rob Walker e2c316d2d0
system_instruction_processor updates (#6448)
* zero lamport account creation

* whack create_user_account, take 2

* target->to

* ..

* ..

* update chacha golden

* update chacha golden

* ..

* ..
2019-10-19 18:23:27 -07:00
Sagar Dhawan 7ae5ff838b
Revert "collect rent from accounts (take:2) (#6360)" (#6400)
This reverts commit c1b401a04a.
2019-10-16 13:31:21 -07:00
Justin Starry 7e6e7e8406
Remove special handling of first ledger tick (#6263)
* Remove special handling of first ledger tick

* Fix subtraction overflow

* @garious feedback

* Back to height

* More tick_height name changes

* Fix off-by-one

* Fix leader tick error

* Fix merge conflict

* Fix recently added test
2019-10-16 15:53:11 -04:00
Ryo Onodera e267dfacdd Stabilize some banking stage tests (#6251)
* Stabilize some banking stage tests

Fixes #5660

* Fix CI...

* clean up

* Fix ci

* Address review nits

* Use bank.max_tick_height due to off-by-one for no PohRecord's clearing bank

* Fix CI...

* Use bank.max_tick_height() instead for clarity
2019-10-16 12:37:27 -07:00
Greg Fitzgerald ee099b0880 Delete ref annotations (#6394)
automerge
2019-10-16 09:27:49 -07:00
Justin Starry 996c8cf2eb
Don't add bogus native loader if loader account already exists (#6377)
* Don't add bogus native loader account if it already exists

* Add assert for native loader account owner
2019-10-16 00:33:15 -04:00
Parth c1b401a04a
collect rent from accounts (take:2) (#6360)
* collect rent from credit debit accounts

* collect rent from credit only account

* rent_collector now can deduct partial rent + no mem copy + improved design

* adding a test to test credit only rent

* add bank level test for rent deduction

* add test to check if hash value changes or not

* adding test scenario for lamport circulation
2019-10-16 07:45:47 +05:30
Rob Walker 9803f167bd Revert "collect rent from the accounts (#6181)" (#6356)
automerge
2019-10-14 16:16:44 -07:00
Parth e210e76bd5
collect rent from the accounts (#6181)
* collect rent from credit-debit account

* collect rent from credit only account

* improved design for rent collection

* only process if collected rent is non zero

* rent_collector now can deduct partial rent + no mem copy

* adding a test to test credit only rent

* add bank level test for rent deduction

* add test to check if hash value changes or not

* adding test scenario for lamport circulation

* combining rent debtors into credit only locks
2019-10-15 02:00:29 +05:30
Rob Walker 7cf90766a3
add epoch_schedule sysvar (#6256)
* add epoch_schedule sysvar

* book sheesh!
2019-10-08 22:34:26 -07:00
Michael Vines c34cc4918f Prevent repeated accounts in genesis to avoid breaking account hashing 2019-10-07 08:12:18 +09:00
Greg Fitzgerald fb39bd45d7
Revert "Rename solana-runtime to sealevel (#6239)" (#6247)
This reverts commit 2e921437cd.
2019-10-04 19:33:29 -06:00
Greg Fitzgerald 2e921437cd Rename solana-runtime to sealevel (#6239)
automerge
2019-10-04 15:02:44 -07:00
Ryo Onodera ffae4662bc Use AtomicU64 now that it's stabilized (#6222) 2019-10-03 20:02:28 -07:00
Parth 92ea11fca1
make executable, vote and stake account rent exempt (#6017)
* add missing convenience method

* require vote account to be exempt

* make stake account rent exempt

* making executable rent exempt

* rent will be initialized in genesis

* add test for update_rent
2019-10-04 02:52:48 +05:30
Justin Starry 8d0236e3f1
Rename bank height to block_height and expose method (#6199)
* Rename bank bank_height to block_height

* Expose block_height method
2019-10-01 14:55:39 -04:00
Justin Starry 2f92b92a8a
Expose current stake accounts of a bank for use in cli tooling (#6184) 2019-09-30 21:57:49 -04:00
Parth 67d07254c2
Add rent estimation rpc (#6109)
* server side new rpc endpoint

* client side rpc

* take data_len as usize

Co-Authored-By: Tyera Eulberg <teulberg@gmail.com>

* add test and documentation
2019-09-26 23:27:13 +05:30
Rob Walker 43795193c4
add authorized parameters to vote api (#6072)
* add authorized parameters to vote api

* code review
2019-09-25 13:53:49 -07:00
Sagar Dhawan e987d0094f
Move status cache serialization to the Snapshot Packager service (#6081)
* Move status cache serialization to the Snapshot Packager service

* Minor comment updates

* use ok_or_else instead of ok_or

* satus cache

* Remove assert when snapshot format is wrong

* Fix compile

* Remove slots_to_snapshot from bank forks

* Address review comment

* Remove unused imports
2019-09-25 13:42:19 -07:00
carllin 261ea00efb
Fix race between observing tick height being set to last tick and blockhash being observed on a bank (#6013) 2019-09-23 12:54:39 -07:00
carllin 8240d1fe0a
Confidence implementation (#5993)
* Change confidence parameters

* Add status_cache_ancestors to get all relevant ancestors of a bank including roots from status cache

* Fix and add tests

* Clippy
2019-09-20 19:38:56 -07:00
Michael Vines a60a3efc1a
Revert "require stake, vote and executable accounts to be rent exempt (#5928)" (#6005)
This reverts commit 11e6197a83.
2019-09-20 14:10:39 -07:00
sakridge 19ae556857
hash account state on store (#5573) 2019-09-20 13:21:12 -07:00
Parth 11e6197a83
require stake, vote and executable accounts to be rent exempt (#5928)
* require vote account to be exempt

* make stake account rent exempt

* add rent exempted system instruction

* use rent exemption instruction in vote and stake api

* use rent exempted account while creating executable account

* updating chacha golden hash as instruction data has changed

* rent will be initialized for genesis bank too
2019-09-20 16:52:17 +05:30
Rob Walker 5cbd1190b2
transaction batch (#5962)
* transaction batch

* fixup
2019-09-19 10:06:08 -07:00
Michael Vines e26f68fe62
Get transactions from LockedAccountsResults when possible (#5923) 2019-09-17 08:41:56 -07:00
Parth d63518a835
Rent tangential stuff (#5910)
* rename rent.rs to rent_calculator.rs

* add rent sysvar

* integrate rent_calculator with bank

* rent_calculator integration with genesis

* add test for rent sysvar
2019-09-17 17:12:55 +05:30
Michael Vines f10438d530
Respect randomized transaction order when unlocking accounts (#5918) 2019-09-16 21:45:16 -07:00
Jack May 1853771930
Add support for SDK sysvar types (#5876) 2019-09-10 18:53:02 -07:00