Commit Graph

666 Commits

Author SHA1 Message Date
Jack May
63429507b2 Add syscall feature activation test (#14890) 2021-01-27 17:21:25 -08:00
Alexander Meißner
5700e835ef Refactors tuple of TransactionLoadResult into a struct. (#14773) 2021-01-25 10:35:08 +01:00
carllin
c77461e428 Remove unnecesary flushes in previous roots (#14596)
Co-authored-by: Carl Lin <carl@solana.com>
2021-01-23 04:02:44 -08:00
Michael Vines
072e5e54d8 Add generalized voting process to enable full inflation 2021-01-20 23:37:21 -08:00
sakridge
907f518f6d Add load/execute/store timings (#14561) 2021-01-14 14:14:16 -08:00
carllin
6dfad0652f Cache account stores, flush from AccountsBackgroundService (#13140) 2021-01-11 17:00:23 -08:00
Tyera Eulberg
b0e6e29527 Update timestamp max allowable drift to 50% of PoH (#14531)
* Repurpose warp-timestamp feature for general bump

* Change max_allowable_drift to 50%

* Fill in PR#

* Fix rpc test setup
2021-01-11 23:27:30 +00:00
Jack May
58487c6360 Add buffer authority to upgradeable loader (#14482) 2021-01-08 09:37:57 -08:00
Jack May
0619805806 Upgradeable programs needs program account's address as program id (#14417) 2021-01-04 21:45:05 +00:00
carllin
5affd8aa72 Add secondary indexes (#14212) 2020-12-31 18:06:03 -08:00
Trent Nelson
5b903318b2 vote: Add helper for creating current-versioned states 2020-12-22 19:37:26 -07:00
behzad nouri
a14cfd660a removes &Arc<Self> receivers (#14234) 2020-12-22 23:51:53 +00:00
Jack May
ab205b682a Upgradeable programs called same as non-upgradeable (#14239)
* Upgradeable programs called same as non-upgradeable

* nudge
2020-12-22 09:26:55 -08:00
sakridge
baa9602411 Add shrink paths (#14238) 2020-12-21 21:33:37 -08:00
behzad nouri
7b08cb1f0d improves performance in replay-stage (#14217)
bank::vote_accounts returns a hash-map which is slow to iterate, but all uses
only require an iterator:
https://github.com/solana-labs/solana/blob/b3dc98856/runtime/src/bank.rs#L4300-L4306
Similarly, calculate_stake_weighted_timestamp takes a hash-map whereas it only
requires an iterator:
https://github.com/solana-labs/solana/blob/b3dc98856/sdk/src/stake_weighted_timestamp.rs#L21-L28
2020-12-21 19:18:19 +00:00
Tyera Eulberg
e15f95a36f Fix timestamp handling on ledger warp (#14210)
* Reset timestamp for slot and epoch-start on warp

* Fix genesis timestamp metric source

* Remove check that timestamp > unix_timestamp_from_genesis

Default to previous timestamp, not genesis timestamp

* Move timestamp metrics to report even on warp

* Initialize slot 0 timestamps correctly

* Add feature gate to warp testnet timestamp

* Review suggestion: simplify warp-timestamp slot check
2020-12-20 21:36:56 +00:00
behzad nouri
d6d76219b6 caches staked nodes computed from vote-accounts (#13929) 2020-12-17 21:22:50 +00:00
Michael Vines
efc091e28a Add transactionCount field to GetEpochInfo 2020-12-17 12:29:50 -08:00
carllin
75e9e321de Fix race between setting tick height and calculating accounts hash (#14101)
Co-authored-by: Carl Lin <carl@solana.com>
2020-12-15 12:45:40 -08:00
Jack May
d513b0c4ca Add Program loader/environment instruction errors (#14120) 2020-12-15 09:54:07 -08:00
sakridge
5294f70189 Remove some non-warnings (#14115) 2020-12-14 16:26:17 -08:00
Michael Vines
e907510a1a clippy 2020-12-14 13:11:50 -08:00
Michael Vines
7143aaa89b Clippy 2020-12-14 08:03:29 -08:00
Ryo Onodera
de9ac43ebf Simple cap by including sysvars and native programs (#13884)
* Simpler cap by including sysvars and native programs

* Fix tests

* Add comment

* revert some unrelated code

* Update test_bank_update_sysvar_account for cap.

* Test cap. for add_native_program using new helper

* Improve the cap adjustment with new tests

* Fix typo...

* Adjust test for improved code coverage

* Rename simpler_capitalization => simple_capitalization

* More rename and bonus commenting
2020-12-14 21:03:24 +09:00
carllin
55fc963595 Move slot cleanup to AccountsBackgroundService (#13911)
* Move bank drop to AccountsBackgroundService

* Send to ABS on drop instead, protects against other places banks are dropped

* Fix Abi

* test

Co-authored-by: Carl Lin <carl@solana.com>
2020-12-13 01:22:34 +00:00
Tyera Eulberg
d6eff3d62c Filter out stake and vote accounts with incorrect owners (#14062)
* Add failing test

* Check stake/vote accounts for validity

* Feature gate change

* Add datapoint

* Add test realism
2020-12-11 12:21:25 -07:00
Ryo Onodera
09bd412b13 Wrong rpc inflation rate (#14063)
* Fix wrong inflation calculation in rpc

* Reorder

* Fix test
2020-12-11 07:42:39 +00:00
Ryo Onodera
164b7895b3 Tiny add_native_program bug fixes with cleanups (#14042)
* Tiny add_native_program bug fixes with cleanups

* Fix typo
2020-12-11 11:03:31 +09:00
Jack May
5ea80e673f Fix priv escalation test (#14046) 2020-12-10 22:36:33 +00:00
Ryo Onodera
28b014ccf4 Add tests for store_account_and_update_capitalization (#14008) 2020-12-09 00:46:28 +09:00
Alexander Meißner
a706706572 Validator CLI option to enable just-in-time compilation of BPF (#13789)
* Adds a CLI option to the validator to enable just-in-time compilation of BPF.

* Refactoring to use bpf_loader_program instead of feature_set to pass JIT flag from the validator CLI to the executor.
2020-12-07 09:49:55 +01:00
Jack May
882d033233 Don't use stale executor cache (#13966) 2020-12-05 05:54:42 +00:00
Trent Nelson
17defbff13 Make Accounts::is_non_loader_key() a method on Message 2020-12-02 20:10:08 +00:00
Trent Nelson
404fc1570d runtime: Replace HashAgeKind with NonceRollbackInfo 2020-12-02 20:10:08 +00:00
Trent Nelson
8df2a4bac0 runtime: Factor out DurableNoncePartial finishing logic and add tests 2020-12-02 20:10:08 +00:00
behzad nouri
e1793e5a13 caches vote-state de-serialized from vote accounts (#13795)
Gossip and other places repeatedly de-serialize vote-state stored in
vote accounts. Ideally the first de-serialization should cache the
result.

This commit adds new VoteAccount type which lazily de-serializes
VoteState from Account data and caches the result internally.

Serialize and Deserialize traits are manually implemented to match
existing code. So, despite changes to frozen_abi, this commit should be
backward compatible.
2020-11-30 17:18:33 +00:00
Ryo Onodera
6048342c57 Enhance ledger-tool for multi-epoch rewards (#13837)
* Support ledger-tool for multi-epoch rewards

* nits

* Ensure not to skip some records in csv
2020-11-27 04:20:47 +00:00
Michael Vines
4ef2da0ff0 Add solana logs command 2020-11-25 11:44:41 -08:00
sakridge
b70abdc645 Nonce updates (#13799)
* runtime: Add `FeeCalculator` resolution method to `HashAgeKind`

* runtime: Plumb fee-collected accounts for failed nonce tx rollback

* runtime: Use fee-collected nonce/fee account for nonced TX error rollback

* runtime: Add test for failed nonced TX accounts rollback

* Fee payer test

* fixup: replace nonce account when it pays the fee

* fixup: nonce fee-payer collect test

* fixup: fixup: clippy/fmt for replace...

* runtime: Test for `HashAgeKind::fee_calculator()`

* Clippy

Co-authored-by: Trent Nelson <trent@solana.com>
2020-11-24 23:53:51 -08:00
Tyera Eulberg
c930f92411 Restore bank feature used to deprecate Rewards sysvar (#13786) 2020-11-24 10:22:31 -07:00
Michael Vines
60ce6f1a9b Truncate logs immediately upon collection. Also reduce limit from 100k to 10k 2020-11-23 17:20:02 -08:00
carllin
791fb17437 Prevent scans on unrooted slots from seeing partial clean (#13628)
Co-authored-by: Carl Lin <carl@solana.com>
2020-11-20 13:01:04 -08:00
Michael Vines
62fa8b0ed8 Demote bank-process_transactions-error counters to info! 2020-11-20 10:43:07 -08:00
Tyera Eulberg
c75d97e3f2 Add new inflation feature-ids (#13671)
* Add new inflation feature-ids, and full_inflation default values

* Compute inflation start from full_inflation activation

* Include pico_inflation in inflation start computation

* Add full-inflation constructor

* Align inflation taper with rewards accrual start and catch overflow edge case
2020-11-20 09:54:41 -07:00
Ryo Onodera
b74d7b5758 Fix fragile tests in prep of stake rewrite pr (#13654)
* Fix fragile tests in prep of stake rewrite pr

* Restore BOOTSTRAP_VALIDATOR_LAMPORTS where appropriate

* Further clean up

* Further clean up

* Aligh with other call site change

* Remove false warn!

* fix ci!
2020-11-20 17:21:03 +09:00
Ryo Onodera
43d5e47ea9 Rewrite stake accounts for clear migration (#13461)
* Reduce overage stake by rewritng stake accounts

* Write tests and finish implemention

* Create and use new feature gate

* Clean up logging

* Fix typo

* Simplify enable_rewrite_stake

* Fix typo...

* Even simplify gating

* Add metrics
2020-11-20 05:15:06 +09:00
carllin
110acd20dc Check for overflow in rent partition calculation (#13569)
Co-authored-by: Carl Lin <carl@solana.com>
2020-11-19 04:17:00 -08:00
Tyera Eulberg
645598e615 Improve monitoring of timestamp correction and bounding (#13656)
* Include rejuvenated field in Clock parsing

* Expand timestamp-correction logging info
2020-11-17 21:51:43 +00:00
carllin
6276360468 Prevent scans from seeing root updates/clean (#13464)
Co-authored-by: Carl Lin <carl@solana.com>
2020-11-16 17:23:11 -08:00
Ryo Onodera
bcd303a447 ledger-tool cap: delegation owner and stake v2 flag (#13602)
* Output delegation owner as well

* Add --enable-stake-program-v2

* Small cleanup and add sanity assertion

* Fix typo...
2020-11-15 19:38:46 +00:00