761 Commits

Author SHA1 Message Date
sakridge
78f6ddc5b7
Fix spelling of verification in accounts_db (#8117)
automerge
2020-02-04 11:45:47 -08:00
Michael Vines
3bc9789e8d Remove support for 0.22.3 snapshots 2020-01-30 23:34:15 -07:00
Jack May
83718a3b3e
Cleanup runtime use syntax (#8002) 2020-01-28 17:03:20 -08:00
Michael Vines
912aafcefd Reduce epoch duration from 2 weeks to 2 days 2020-01-27 10:34:55 -07:00
Michael Vines
989355e885 Add ability to hard fork at any slot (#7801)
automerge
2020-01-24 17:27:04 -08:00
Ryo Onodera
2c7447b73e
Secure sysvars under hash by freezing all strictly (#7892)
* Secure sysvars under hash by freezing all strictly

* Fix hash's non-idempotnet and add new test

* Clean up

* More cleanups
2020-01-24 16:10:32 +09:00
Michael Vines
8b8033c72b Set BankRc slot correctly when restoring a bank snapshot 2020-01-23 13:37:13 -07:00
Michael Vines
25dfed207c Remove dead code (#7940)
automerge
2020-01-23 00:38:46 -08:00
Jack May
c95e5346a4
Boot the mut (#7926) 2020-01-22 17:54:06 -08:00
Jack May
8f79327190 Test account doesn't need RefCell (#7932)
automerge
2020-01-22 17:06:11 -08:00
Trent Nelson
964ff522be
Verb-noun-ify Nonce API (#7925)
* Verb-noun-ify Nonce API

* Unify instruction naming with API naming

The more verbose nonce_account/NonceAccount was chosen for clarity
that these instructions work on a unique species of system account
2020-01-22 16:31:39 -07:00
Michael Vines
934c32cbc6 Add mechanism to load v0.22.3 snapshots on newer Solana versions 2020-01-22 15:40:32 -07:00
Rob Walker
ce70d6eedc
Add redeem_vote_credits to runtime (#7910)
* Move redeem_vote_credits into runtime

* fixup

* test

* move stake manipulation to stake program

* chugga for less indentation
2020-01-22 12:21:31 -08:00
Jack May
023074650f
Allow the same account to be passed multiple times to a single instruction (#7795) 2020-01-22 09:11:56 -08:00
Greg Fitzgerald
3aabeb2b81
Rename bootstrap leader (#7906)
* Rename bootstrap leader to bootstrap validator

It's a normal validator as soon as other validators enter the
leader schedule.

* cargo fmt

* Fix build

Thanks @CriesofCarrots!
2020-01-22 09:22:09 -07:00
Rob Walker
470d9cd752
Add system_instruction::{allocate, allocate_with_seed, assign_with_seed}, (#7847)
* cleanup test checks cargo audit

* Add system_instruction allocate

* fixup

* fixup
2020-01-17 09:29:15 -08:00
Justin Starry
87598c7612 Consolidate tx error counters and update metrics dashboard (#7724)
automerge
2020-01-16 23:26:50 -08:00
Rob Walker
4c08184379
no check if no change (#7824) 2020-01-15 15:13:11 -08:00
Rob Walker
a6d083d69d
Remove create_account bandaid now that to's signature is required (#7776)
* Remove create account bandaid now that  requires signature

* shrink scope of this PR to bandaid
2020-01-15 13:03:22 -08:00
Ryo Onodera
b16c30b4c6
Fix cluster collapse due to no proper shifted read (#7797)
* Fix cluster collapse due to no proper shifted read

* Add test for bank hash mismatch

Co-authored-by: sakridge <sakridge@gmail.com>
2020-01-15 11:45:19 +09:00
Justin Starry
ff1ca1e0d3
Consolidate entry tick verification into one function (#7740)
* Consolidate entry tick verification into one function

* Mark bad slots as dead in blocktree processor

* more feedback

* Add bank.is_complete

* feedback
2020-01-15 09:15:26 +08:00
Jack May
5f4e0c7e3e Naming nits (#7798)
automerge
2020-01-14 13:38:17 -08:00
sakridge
3b78be83cf Add hash stats information to check hashes between validators (#7780)
automerge
2020-01-14 11:57:29 -08:00
Trent Nelson
81ae44f858 Nonce: Rename instructions with VerbNoun scheme (#7775)
automerge
2020-01-13 15:34:43 -08:00
Trent Nelson
9754fc789e
Manage durable nonce stored value in runtime (#7684)
* Bank: Return nonce pubkey/account from `check_tx_durable_nonce`

* Forward account with HashAgeKind::DurableNonce

* Add durable nonce helper for HashAgeKind

* Add nonce util for advancing stored nonce in runtime

* Advance nonce in runtime

* Store rolled back nonce account on TX InstructionError

* nonce: Add test for replayed InstErr fee theft
2020-01-10 16:57:31 -07:00
Jack May
08ba27627d
Direct entrypoint for execution (#7746) 2020-01-10 13:20:15 -08:00
Ryo Onodera
865c42465a
Cap file size for snapshot data files (#7182)
* save limit deserialize

* save

* Save

* Clean up

* rustfmt

* rustfmt

* Just comment out to please CI

* Fix ci...

* Move code

* Rustfmt

* Crean up control flow

* Add another comment

* Introduce predetermined constant limit on snapshot data files (deserialize side)

* Introduce predetermined constant limit on snapshot data files (serialize side)

* rustfmt

* Tweak message

* Revert dynamic memory limit

* Limit size of snapshot data file (de)serialization

* Fix test breakage

* Clean up

* Fix uses formatting

* Rename: deserialize_{for,from}_snapshot

* Simplify comment

* Use Slot

* Provide slot for status cache

* Align variable name with snapshot_status_cache_file_path

* Define serialize_snapshot_data_file_with_metrics

* Fix build.......

* De-marco serialize_snapshot_data_file_with_metrics

* Revert u64 => Slot
2020-01-10 09:49:36 +09:00
sakridge
73c93cc345
Print bank hash and hash inputs. (#7733) 2020-01-09 16:33:10 -08:00
Michael Vines
9720c894f1 Use commas to make a log message more readable 2020-01-06 22:31:01 -07:00
Ryo Onodera
e5425d4a27
Fix AppendVec test breakage... (#7693) 2020-01-07 09:21:59 +09:00
Ryo Onodera
58e6d4aabb
Sanitize AppendVec's file_size (#7373)
* Check append vec file size

* Don't use panic

* Clean up a bit

* Clean up

* Clean ups

* Change assertion into sanization check

* Remove...

* Clean up

* More clean up

* More clean up

* Use assert_matches
2020-01-07 08:14:56 +09:00
Michael Vines
e782c26908 Prune older epoch stakes 2020-01-04 09:34:27 -07:00
Trent Nelson
7e94cc2cc3 Move nonce into system program (#7645)
automerge
2020-01-03 16:34:58 -08:00
Rob Walker
63f185f9bf
Delete unused type (#7653) 2020-01-02 13:15:31 -08:00
Rob Walker
e1ebaa902b
Add base pubkey to create_account_with_seed (#7636) 2019-12-29 16:42:24 -08:00
Rob Walker
e0564f628e
Use lamports in genesis (#7631)
* Use lamports in genesis

* readability
2019-12-28 12:49:10 -08:00
Rob Walker
120c8f244c
Add slot_history for slashing (#7589)
* Add slot_history for slashing

* fixup

* fixup
2019-12-23 12:23:45 -08:00
Ryo Onodera
c8fe4043b6
Rename slot_hash => bank_hash in AcoountsDB (#7579)
* Rename slot_hash => bank_hash in AcoountsDB
2019-12-23 10:50:31 +09:00
sakridge
7dec934bb3
Optimize lock_accounts mutex use (#7593)
Use the lock for the whole batch instead of per-tx
Optimize the critical section to pre-generate the keys necessary
before taking the lock.
2019-12-21 10:43:22 -08:00
Ryo Onodera
3c361eb759
Check account hashes in snapshot (#7559)
* Check for incorrect hash value

* Finish up checking for incorrect hash value

* Fix comment a bit

Co-authored-by: sakridge <sakridge@gmail.com>
2019-12-20 09:39:30 +09:00
Tyera Eulberg
6aaf742dfe Extend getConfirmedBlock rpc to return account pre- and post-balances (#7543)
automerge
2019-12-18 09:56:29 -08:00
Ryo Onodera
629a4b5bf8
Strictly sanitize mmapped AppendVec file contents (#7464)
* Clean up align_to_8byte!

* small clean up

* Strictly sanitize mmapped AppendVec files

* Clean up

* Fix typo

* Rename align_to_8byte => u64_align

* Fix typo

* Clean up unsafe into methods of StoredAccount

* Made oddness more apparent

* Yet more clarification

* Promote a PR comment into a src comment

* Fix typo...

* Move ref_executable_byte out of tests impl
2019-12-18 14:10:36 +09:00
Trent Nelson
0ea2843ec9
Durable Nonce - Authorized Noncer (#7417)
* Durable Nonce: Add authorized noncer to initialize instruction

* CLI: Adapt to nonce authority

* Durable Nonce: Introduce Authorize instruction

* Specify who needs to sign  ix

* 'authorized-noncer' -> 'nonce-authority'

* Document signing authority for all instructions
2019-12-17 09:34:21 -05:00
Jack May
7c92bf15e2
Only return accounts that have changed since the bank's parent (#7520)
* Only return accounts that have changed since the bank's parent

* add test
2019-12-16 23:24:18 -08:00
Rob Walker
f05860672c
Add create-address-with-seed to solana-cli (#7472)
* Add create account with seed to cli

* clippy

* fixup
2019-12-14 04:38:24 -08:00
sakridge
9d5a07bac4
Move create_dir_all to AccountsDB::new (#7465)
AppendVec create doesn't need to try and create
paths every time and it can stall while snapshot
create is happening.
2019-12-13 16:46:16 -08:00
Rob Walker
777ae3c215
Add time since genesis to sysvar::clock (#7289)
* genesis timestamp

* remove clock::create_account()

* ..

* add configure-able creation time

* dividing by 1T, should be dividing by 1B
2019-12-12 14:03:43 -08:00
Rob Walker
ea0ba19089
Add SystemInstruction::CreateAccountWithSeed (#7390)
* address generator

* coverage

* fixups

* remove ascii restriction

* illustrate that utf-8 doesn't expand the space
2019-12-12 11:12:09 -08:00
Ryo Onodera
a1ab81a896
Include rent_epoch and executable into account hash (#7415)
* Clean a bit

* Add rent_epoch and executable into account hashing

* Remove comment and instead create an issue
2019-12-12 13:03:33 +09:00
sakridge
0aa4dc904e
Accounts index updates, remove pubkey when dead account (#7408) 2019-12-11 11:11:31 -08:00