Rob Walker
c9cea2152b
optimize verify_instruction ( #6539 )
2019-10-25 21:47:16 -07:00
Jack May
d68e2c4d06
Revert "Make instruction data opaque to runtime ( #6470 )" ( #6564 )
...
This reverts commit 6eeca9c6f1
.
2019-10-25 16:22:41 -07:00
Jack May
6eeca9c6f1
Make instruction data opaque to runtime ( #6470 )
2019-10-24 22:38:57 -07:00
Rob Walker
f46a2cec3c
owner and executable checks ( #6526 )
...
* owner_checks
* only system program may assign owner, and only if pre.owner is system
* moar coverage!
* moar coverage, allow re-assignment IFF data is zeroed
2019-10-24 11:06:00 -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
Jack May
1fd84cb52b
Enforce only system program can allocate accounts ( #6386 )
2019-10-16 10:47:45 -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
Greg Fitzgerald
ae41c88eb2
Boot the Builder pattern from GenesisBlock ( #6364 )
2019-10-15 13:52:44 -06:00
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
Greg Fitzgerald
ba46bc4624
Fix system program blind derefs ( #6317 )
...
automerge
2019-10-10 16:43:49 -07:00
Rob Walker
f8b36f4658
smaller fix for system_instruction_processor's blind indexing ( #6322 )
...
automerge
2019-10-10 15:43:32 -07:00
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
Tyera Eulberg
0c3ff6b75c
Cli refactor: vote and storage program functionalities ( #6242 )
...
automerge
2019-10-04 14:18:19 -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
Michael Vines
f9f5bc2eb5
More clippy
2019-10-02 21:21:07 -07:00
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
Jack May
520f7c3e18
Optimize BPF logs ( #6186 )
2019-09-30 14:21:29 -07:00
Rob Walker
a964570b1a
add authorities to stake init ( #6104 )
...
* add authorities to stake init
* fixups
* code review
2019-09-26 13:29:29 -07: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
carllin
35365974bf
Remove serializing all ForkHashes ( #6110 )
2019-09-26 02:01:25 -07:00
carllin
701d90a41d
Remove some AccountStorage Serialization ( #6047 )
...
* Remove serialization of AccountStorageEntry fields
* Add metric for evaluating BankRc serialization time
* Serialize AppendVec current len
* Add dashboard metrics
* Move flush of AppendVecs to packaging thread
2019-09-25 18:07:41 -07:00
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
sakridge
093b5b5267
Prune fork_hashes with dead forks ( #6085 )
2019-09-25 11:16:14 -07:00
Justin Starry
b6a8268da3
Fix BPF program static linking ( #5992 )
2019-09-24 07:09:53 -04:00
Rob Walker
72fb52ec60
rename balance ( #5984 )
2019-09-23 15:20:45 -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
Sagar Dhawan
c1d788880d
Limit Rayon threadpool threads ( #5871 )
2019-09-12 11:39:39 -07:00
Jack May
1853771930
Add support for SDK sysvar types ( #5876 )
2019-09-10 18:53:02 -07:00
Rob Walker
b881029de3
make voter_pubkey a function of epoch ( #5830 )
...
* make voter_pubkey a function of epoch
* fixups
2019-09-09 18:17:32 -07:00
Jack May
61fe1aa9cf
SDK cleanup to reduce featurization ( #5856 )
2019-09-09 16:38:52 -07:00
Jack May
a317e9513f
Add sysvar support ( #5838 )
2019-09-09 10:55:35 -07:00
sakridge
b35c022629
More types ( #5846 )
...
automerge
2019-09-08 11:13:59 -07:00
Jack May
e8d88f3237
Split SDK's timing.rs ( #5823 )
2019-09-06 14:30:56 -07:00
Michael Vines
1f9fde5f7b
ThinClient internal name grooming ( #5800 )
2019-09-06 09:07:40 -07:00
Rob Walker
933e835838
add stake lockup ( #5782 )
...
* add stake lockup
* fixup
2019-09-04 13:34:09 -07:00
Parth
7dfb735db9
randomize tx ordering ( #4978 )
...
Summary of Changes:
This change adds functionality to randomize tx execution for every entry. It does this by implementing OrderedIterator that iterates tx slice as per the order specified. The order is generated randomly for every entry.
2019-08-28 21:08:32 +05:30
Sunny Gleason
34ab25a88b
feat: getInflation() endpoint ( #5681 )
2019-08-27 18:17:03 -04:00
Rob Walker
e2ecacc141
runtime checks for rent_epoch ( #5629 )
...
* runtime checks for rent_epoch
* add actual test
* bigger timeout
* backout 90 min timeout
* new noop
2019-08-26 11:04:20 -07:00
Michael Vines
4e827af392
Remove unnecessary trailing semicolons ( #5636 )
2019-08-23 22:47:54 -07:00
Rob Walker
0ffe7a9c8f
plumb some rent ( #5610 )
...
* plumb some rent
* nits
* fixups
* fixups
* fixups
2019-08-23 14:04:53 -07:00
Michael Vines
3fc5009ef2
Snapshot pipefitting through the validator cli ( #5617 )
...
* Handle 404 errors better
* Snapshot pipefitting through the validator cli
* Add download progress bar
* Log the current entrypoint slot
2019-08-23 13:02:07 -07:00
Rob Walker
52f6da5cee
upgrade rust to 1.37 ( #5611 )
2019-08-23 08:55:51 -07:00
carllin
087c43b9ef
Add snapshotting integration test ( #5519 )
...
* Add snapshotting integration test
* Update ContactInfo on restart in local cluster nodes
2019-08-21 23:59:11 -07:00
Michael Vines
faafee6b42
to to/the the ( #5590 )
2019-08-21 17:46:59 -07:00
Rob Walker
a8b82a0b68
optimize store_accounts ( #5557 )
2019-08-19 13:00:37 -07:00
Rob Walker
814af378a7
stake cooldown ( #5553 )
...
* stake cooldown
* fixups
* sheesh
2019-08-17 18:12:30 -07:00
Michael Vines
8258532791
System program is now registered like all other native programs ( #5526 )
2019-08-15 21:07:00 -07:00
Rob Walker
94f1132fb6
fix single node testnet, remove bootstrap vote ( #5534 )
2019-08-15 18:58:46 -07:00
Rob Walker
88ea950652
add stake_api config account ( #5531 )
2019-08-15 14:35:48 -07:00
carllin
d791c70d90
Snapshot optimizations ( #5518 )
...
* Limit slots_since_snapshot size, only package latest snapshot, refactor tests
* Add test checking status_cache.roots == bank_forks.slots_since_snapshot after bank_forks.set_root()
2019-08-13 22:39:29 -07:00
Sagar Dhawan
1d0608200c
Restore blob size fix ( #5516 )
...
* Revert "Revert "Fix gossip messages growing beyond blob size (#5460 )" (#5512 )"
This reverts commit 97d57d168b
.
* Fix Crds filters
2019-08-13 18:04:14 -07:00
carllin
cd14a940d8
Allow process_blocktree() to start processing from any root ( #5484 )
...
* Remove unnecessary entry_height from BankInfo
* Refactor process_blocktree to support process_blocktree_from_root
* Refactor to process blocktree after loading from snapshot
* On restart make sure bank_forks contains all the banks between the root and the tip of each fork, not just the head of each fork
* Account for 1 tick_per_slot in bank 0 so that blockhash of bank0 matches the tick
2019-08-13 17:20:14 -07:00
carllin
58d4e32c97
Remove serialization of future AppendVecs and serialize AccountStorage correctly ( #5510 )
2019-08-13 16:05:37 -07:00
Sagar Dhawan
97d57d168b
Revert "Fix gossip messages growing beyond blob size ( #5460 )" ( #5512 )
...
This reverts commit a8eb0409b7
.
2019-08-13 10:29:26 -07:00
Rob Walker
07d11be6ab
add global stake warmup ( #5483 )
...
* add global stake warmup
* integrate stake history into runtime
* fixup core tests
* fixup
* remove existing cooldown tests for now
2019-08-12 20:59:57 -07:00
Greg Fitzgerald
a43922ccbf
Boot hashbrown ( #5505 )
...
As of Rust 1.36.0, hashbrown now implements the HashMap in std (which
implements HashSet).
https://blog.rust-lang.org/2019/07/04/Rust-1.36.0.html#a-new-hashmapk,-v%3E-implementation
2019-08-12 16:46:49 -06:00
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
Sagar Dhawan
a8eb0409b7
Fix gossip messages growing beyond blob size ( #5460 )
...
* fixed bloom filter math
* Add split each pull request into multiple pulls with different filters
* Rework CrdsFilter to generate all possible masks to cover the keyspace
* Limit the bloom sizes such that each pull request is no larger than mtu
2019-08-12 13:51:29 -07: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
sakridge
e30ca01999
Only create more append_vecs when the account number grows ( #5454 )
...
We only need many append_vecs if the number of accounts is high,
so only create opportunistic ones as accounts are created.
2019-08-07 16:43:52 -07: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
sakridge
c2fc0f2418
Plumb libra accounts to genesis ( #5333 )
...
* Plumb move_loader to genesis
* Remove core dependency on genesis-programs
2019-07-31 16:10:55 -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
Jack May
d09afdbefe
Synchronize and cleanup instruction processor lists ( #5356 )
2019-07-31 14:28:14 -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
50a991fdf9
add executable checks to verify_instruction ( #5326 )
2019-07-29 15:29:20 -07:00
sakridge
c209718a6f
Add libray_api ( #5304 )
...
Simple move-based payment api
2019-07-27 12:11:51 -07:00
Rob Walker
8537da19bb
groom accounts_db ( #5283 )
2019-07-25 22:59:28 -07:00