Commit Graph

1223 Commits

Author SHA1 Message Date
Jeff Washington (jwash) e7f53182e2
fix merge conflict (#15085) 2021-02-04 09:20:50 -06:00
Jeff Washington (jwash) 600ff0d915
calculate hash from store instead of index (#15034)
* calculate hash from store instead of index

* restore update hash in abs
2021-02-04 09:00:33 -06:00
carllin 2970b59853
Don't load all accounts into memory for capitalization check (#14957)
* Don't load all accounts into memory for capitalization check
2021-02-03 15:00:42 -08:00
Jon Cinque 8e93a784f3
program-test: Add ability to warp to the future (#14998)
* program-test: Add ability to warp to the future

* Make `start_local_server` take by value

* Remove clear_invoke_context
2021-02-03 23:31:36 +01:00
sakridge 2b9a0311d3
Don't reset accounts if the remove_account comes from a clean (#15022)
Store may be in-use with a snapshot creation, so don't disturb
it's state.
2021-02-03 13:06:28 -08:00
sakridge 37aac5a12d
Cleanup v1 shrink path (#15009)
move legacy functions to another impl block
2021-02-02 13:29:46 -08:00
Jeff Washington (jwash) 22800054e6
streamline calculate_accounts_hash (#14980) 2021-02-02 10:58:19 -06:00
Ryo Onodera 31168fe343
Disable AppendVec warn! for now (#14996)
* Disable AppendVed warn! for now

* Fix version...

* Update append_vec.rs
2021-02-02 14:52:30 +00:00
dependabot[bot] 1df93fa2be
chore: bump serde from 1.0.112 to 1.0.118 (#14828)
* chore: bump serde from 1.0.112 to 1.0.122

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.112 to 1.0.122.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.112...v1.0.122)

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

* Update frozen_abi digest following serde update

* Revert "chore: bump serde from 1.0.112 to 1.0.122"

This reverts commit a3ef4442a4c985144ae2bd7ceaf8899a7ab8d7c0.

* Revert "[auto-commit] Update all Cargo lock files"

This reverts commit c41c3b005fb1ccade55155302c52cd5736c4b55f.

* chore: bump serde from 1.0.112 to 1.0.118

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.112 to 1.0.118.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.112...v1.0.118)

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

* Remove serum-dex pinning

* blind commit!

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2021-02-02 23:28:16 +09:00
Jack May 73d9186502
More rich runtime logging (#14938) 2021-02-01 11:40:49 -08:00
sakridge 63c44bd690
Use helper for count() in accountsDB (#14953) 2021-01-31 09:32:02 -08:00
Jack May 07cef5a557
Buffer authority must match upgrade authority for deploys and upgrades (#14923) 2021-01-29 12:43:42 -08:00
sakridge 65315fa4c2
Use already-generated key set to populate dirty keys for clean (#14905)
Don't need to scan the stores again when we already found the key
set of updates per slot. Just insert it earlier.
2021-01-29 11:44:43 -08:00
Trent Nelson 85b5dbead6 Add feature for pending SPL Token self-transfer fix 2021-01-29 04:19:33 +00:00
Jack May 0b1015f7d3
Richer runtime failure logging (#14875) 2021-01-28 10:04:54 -08:00
sakridge a53b8558cd
Only mmap file from snapshot once (#14815) 2021-01-28 08:15:33 -08:00
Jack May 63429507b2
Add syscall feature activation test (#14890) 2021-01-27 17:21:25 -08:00
carllin 72f10f5f29
Aggregate purge and shrink metrics (#14763)
Co-authored-by: Carl Lin <carl@solana.com>
2021-01-27 01:39:47 -08:00
carllin daddcd361a
Snapshots missing slots from accounts cache clean optimization (#14852)
Co-authored-by: Carl Lin <carl@solana.com>
2021-01-26 20:08:55 -08:00
Tyera Eulberg ffa5c7dcc8
Deprecate commitment variants (#14797)
* Deprecate commitment variants

* Add new CommitmentConfig builders

* Add helpers to avoid allowing deprecated variants

* Remove deprecated transaction-status code

* Include new commitment variants in runtime commitment; allow deprecated as long as old variants persist

* Remove deprecated banks code

* Remove deprecated variants in core; allow deprecated in rpc/rpc-subscriptions for now

* Heavier hand with rpc/rpc-subscription commitment

* Remove deprecated variants from local-cluster

* Remove deprecated variants from various tools

* Remove deprecated variants from validator

* Update docs

* Remove deprecated client code

* Add new variants to cli; remove deprecated variants as possible

* Don't send new commitment variants to old clusters

* Retain deprecated method in test_validator_saves_tower

* Fix clippy matches! suggestion for BPF solana-sdk legacy compile test

* Refactor node version check to handle commitment variants and transaction encoding

* Hide deprecated variants from cli help

* Add cli App comments
2021-01-26 19:23:07 +00:00
Michael Vines 2b50433099 Remove legacy_stake program 2021-01-25 19:34:40 -08:00
Jeff Washington (jwash) 1b85114a9c
remove legacy merkle root (#14772)
* remove legacy merkle root
f78197a

* clippy

* compile error

* borrow error

* derministic results

* clippy

* borrow
2021-01-25 15:26:08 -06:00
Alexander Meißner 5700e835ef
Refactors tuple of TransactionLoadResult into a struct. (#14773) 2021-01-25 10:35:08 +01:00
sakridge 0d32a0e0f4
Partial clean (#14800)
* Revert "Revert "Partial accounts clean (#14652)" (#14777)"

This reverts commit ad2e10e17b.

* Remove squashed uncleaned keys
2021-01-24 09:50:19 -08:00
Michael Vines cbffab7850 Upgrade to Rust v1.49.0 2021-01-23 19:16:36 -08:00
sakridge 96b27ca0cb
Remove zero_lamport_pubkeys reference (#14808) 2021-01-23 18:31:55 +00:00
sakridge 424bb797a6
Speed up generate_index (#14792) 2021-01-23 08:05:05 -08: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 bf1943e489 Add solana-test-validator --warp-slot argument 2021-01-22 21:17:02 -08:00
Michael Vines dd5a2ef05f Add convenience function to create a snapshot archive out of any Bank 2021-01-22 21:17:02 -08:00
sakridge ad2e10e17b
Revert "Partial accounts clean (#14652)" (#14777)
This reverts commit ca7914aa3d.
2021-01-22 18:05:49 -08:00
Jack May 77572a7c53
Track account writable deescalation (#14626) 2021-01-22 15:28:01 -08:00
Jeff Washington (jwash) 18bd0c9a5b
speed up merkle calculation (#14710) 2021-01-22 09:21:50 -06:00
sakridge ca7914aa3d
Partial accounts clean (#14652)
Clean less keys by tracking the two cases:
* Touched keys per slot in uncleaned_keys derived from
accounts delta hash operation.
* Set of keys with any zero-lamport updates.
2021-01-21 11:01:53 -08:00
Michael Vines 072e5e54d8 Add generalized voting process to enable full inflation 2021-01-20 23:37:21 -08:00
carllin 2745b79b74
Parallel cache scan (#14544)
* Parallel cache scan

* PR comments

* PR comments

Co-authored-by: Carl Lin <carl@solana.com>
2021-01-20 08:50:17 +00:00
Jack May e3bd9e5300
Prevent the invoke and upgrade of programs in the same tx batch (#14653)
* Prevent the invoke and upgrade of programs in the same tx batch

* Pass program address as writable in the upgrade instruction
2021-01-19 16:24:44 -08:00
carllin 5f14f45282
More generic accounts purge functions (#14595)
Co-authored-by: Carl Lin <carl@solana.com>
2021-01-17 20:31:03 -08:00
Jack May 66b54b852d
Update-executable flag in pre-accounts (#14622) 2021-01-15 17:48:29 -08:00
sakridge 907f518f6d
Add load/execute/store timings (#14561) 2021-01-14 14:14:16 -08:00
Jack May 6e8a1ba7de
Load executable accounts from invoke context (#14574) 2021-01-14 00:19:22 -08:00
carllin 6dfad0652f
Cache account stores, flush from AccountsBackgroundService (#13140) 2021-01-11 17:00:23 -08:00
Michael Vines 4a66e3eddc Use standard tmp-snapshot- file prefix for the "new_state" archive for better cleanup/consistency 2021-01-11 16:51:26 -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 8ad5931bfc
Check native account owner (#14535) 2021-01-11 22:36:52 +00:00
Michael Vines 872a249e97 Restore snapshot hard linking 2021-01-11 12:11:25 -08:00
Michael Vines a95675a7ce
Avoid tmp snapshot backlog in SnapshotPackagerService under high load (#14516) 2021-01-11 10:21:15 -08:00
Michael Vines 7be6770808 Rename CompressionType to ArchiveFormat 2021-01-09 09:07:49 -08:00
Michael Vines 141e6706e6 Rename AccountsPackage::root to AccountsPackage::slot 2021-01-09 09:07:49 -08:00
Michael Vines 9f70f7dc3e Reduce TempDir exposure 2021-01-09 09:07:49 -08:00
Michael Vines f2a7f561a0 Replace incorrect symlink_dir usage with symlink_file 2021-01-09 09:07:49 -08:00
Michael Vines fe0ba4a429 Create account paths once 2021-01-09 09:07:49 -08:00
Jack May 58487c6360
Add buffer authority to upgradeable loader (#14482) 2021-01-08 09:37:57 -08:00
Ryo Onodera c9df6134fa
Save 7G mem on mainnet fixing AccIndex overalloc. (#14435) 2021-01-06 09:48:59 +09:00
Jack May a8b5a32b50
Gate cpi program account passing (#14443) 2021-01-05 21:53:41 +00:00
sakridge 53d65009a0
Lower recycle store count (#14429)
Too many stores can cause swap usage which
is detrimental to account store times.
2021-01-05 12:21:17 -08:00
Jack May 0619805806
Upgradeable programs needs program account's address as program id (#14417) 2021-01-04 21:45:05 +00:00
Michael Vines db6ee289c9 Don't bother restoring snapshots, they're never used 2021-01-02 17:26:33 -08:00
Michael Vines b6dcdb90e8 Remove dead code 2021-01-02 17:26:33 -08:00
carllin 5affd8aa72
Add secondary indexes (#14212) 2020-12-31 18:06:03 -08:00
sakridge 1c61d005b5
Re-enable shrink test (#14331) 2020-12-30 08:25:45 -08:00
Ryo Onodera 7893e2e307
Remove Testnet-specific old code (#14305) 2020-12-29 05:11:46 +09:00
Ryo Onodera addffd7694
Log error from AppendVec removal & a panic clean (#14302) 2020-12-29 04:59:09 +09:00
sakridge c693ffaa08
Fix subtraction overflow in metrics (#14290) 2020-12-27 16:26:22 -08:00
behzad nouri 49019c6613
obtains staked-nodes from the root-bank (#14257)
... as opposed to the working bank
2020-12-27 13:28:05 +00:00
Jack May ee0a80a092
Prevent bpf loader impersonators (#14278) 2020-12-24 03:04:48 +00:00
Jack May b1d702a618
Don't use caller passed executable account (#14276) 2020-12-23 14:34:14 -08:00
Jack May 5945305b1d
Save cloning program account data (#14251) 2020-12-23 10:18:14 -08:00
Trent Nelson 5b903318b2 vote: Add helper for creating current-versioned states 2020-12-22 19:37:26 -07:00
Trent Nelson 3881ae10fb Deinitialize nonce data upon zero balance 2020-12-22 19:37:26 -07:00
behzad nouri a14cfd660a
removes &Arc<Self> receivers (#14234) 2020-12-22 23:51:53 +00:00
Tyera Eulberg c276513b84
Ignore long/hanging test (#14261) 2020-12-22 16:13:03 -07:00
Tyera Eulberg 7042f11791
Feature-gate stake-program-v3 (#14232)
* Remove deprecated legacy stake program

* Add legacy stake program

* Strip out duplicative legacy code

* Feature-deploy stake-program-v3

* Add ownership check in stake processor
2020-12-22 11:20:38 -07: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
Michael Vines 93ae177503 Do not delete ALL other snapshots before downloading a new snapshot 2020-12-21 08:58:52 +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
Jack May e8cc0bef6c
Add CPI support for upgradeable loader (#14193) 2020-12-17 15:39:49 -08: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 53fe0bb5eb
Remove regular expressions, speeds up untar (#14119) 2020-12-15 08:48:21 -08:00
sakridge 5294f70189
Remove some non-warnings (#14115) 2020-12-14 16:26:17 -08:00
Jack May 9e90394583
Upgradeable loader (#13689) 2020-12-14 15:35:10 -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
Ryo Onodera 5788e75188
Shrink slots by sparseness of written data size (#14072) 2020-12-14 02:58:38 +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
Trent Nelson edff62af3d Switch to memmap2 fork 2020-12-11 23:44:03 +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 2d3a337200
Increase another snapshot limit: UNPACKED_COUNT (#14071) 2020-12-11 11:01:22 +00:00
Ryo Onodera 7078a6ac61
Add more comments in Stakes::store for its subtlety (#14065)
* Add more comments in Stakes::store for its subtlety

* more comment tweak
2020-12-11 18:13:36 +09: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
Michael Vines 0a9ff1dc9d Initial solana-test-validator command-line program 2020-12-11 04:17:38 +00:00
Jack May 83fda2d972
Clean invoke in prep for native invoke (#14055) 2020-12-10 18:25:57 -08: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 7abd8084b6
Add get_minimum_balance_for_rent_excemption to Client (#14048) 2020-12-10 16:39:28 -08:00
Jack May 5ea80e673f
Fix priv escalation test (#14046) 2020-12-10 22:36:33 +00:00
sakridge 68109a46e0
Lower priority for hashing threads. (#14043) 2020-12-10 12:26:47 -08:00
Ryo Onodera 14e241be35
Increase snapshot file size limits (#14024)
* Increase snapshot file size limits

* Fix test

* Reorder code a bit
2020-12-10 02:46:33 +09:00
Ryo Onodera 28b014ccf4
Add tests for store_account_and_update_capitalization (#14008) 2020-12-09 00:46:28 +09:00
Jack May dca579851c
Cannot change owner if account is executable (#13977) 2020-12-07 11:37:07 -08: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
carllin 5dceddd21d
Remove associated functions on AccountsDb, replace with methods (#13953)
Co-authored-by: Carl Lin <carl@solana.com>
2020-12-03 17:53:42 -08: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 be7760caa1 accounts: Replace nonce_rollback unreachable block with descriptive panic 2020-12-02 20:10:08 +00:00
Trent Nelson 47af5933ca accounts: Don't assume fee-payer is the first account 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
Michael Vines 73111b005f Reduce the number of snapshots 2020-12-01 11:13:37 -08:00
Michael Vines 254790f8c8 Fully clean up temporary snapshot staging directories 2020-11-30 19:40:06 -08: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
Jack May ce4304cc9a
Add extra checks to verify_and_update (#13848)
* Add extra checks to verify_and_update

* nudge
2020-11-29 10:06:43 +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
carllin 955b99cf69
Fix roots_and_ref_count (#13827)
Co-authored-by: Carl Lin <carl@solana.com>
2020-11-26 13:09:20 -08:00
Michael Vines 43b82b31e5 More TestValidator cleanup 2020-11-26 08:56:25 +00:00
Michael Vines b5f7e39be8 TestValidator public interface cleanup 2020-11-25 17:04:37 -08: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
Michael Vines 11e92f0c9f Snapshot archives are now cleaned up when `--snapshot-compression none` is used 2020-11-20 08:41:17 -08: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
behzad nouri a8c29505f0
sanitizes bloom filters to avoid division by zero (#13714)
Pull requests received over the wire can cause a validator to panic
because of division by zero in bloom filters:
https://github.com/solana-labs/solana/blob/af08ba93e/runtime/src/bloom.rs#L86-L88
2020-11-19 23:35:22 +00:00
Ryo Onodera 397cf726fc
Allow GNUSparse for genesis.bin (#13704) 2020-11-19 20:29:19 +00: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
Michael Vines baa6b3a261 Add stable program logging for BPF and native programs 2020-11-14 08:26:01 -08:00
Ryo Onodera c97a7d1105
Small cleaning update_epoch_stakes (#13576) 2020-11-13 11:16:38 +00:00
joshua-maros a8a77614fe
Fix potential undefined behavior (#13555)
* Switch to ouroboros 0.5.1

* Update other lock files
2020-11-13 18:12:41 +09:00
Ryo Onodera 89b474e192
Fix slow/stuck unstaking due to toggling in epoch (#13501)
* Fix slow/stuck unstaking due to toggling in epoch

* nits

* nits

* Add stake_program_v2 feature status check to cli

Co-authored-by: Tyera Eulberg <tyera@solana.com>
2020-11-11 14:11:57 -07:00
carllin 2c2432fddc
Refactor function (#13294)
Co-authored-by: Carl Lin <carl@solana.com>
2020-11-10 17:20:35 -08:00
Tyera Eulberg 91f4e99b4c
Fix parsing CreateAccountWithSeed instructions (#13513)
* Reduce required num_system_accounts and handle 2-account instructions properly

* Update CreateAccountWithSeed account docs to be correct

* Add CreateAccountWithSeed test
2020-11-10 23:51:53 +00:00
Tyera Eulberg c0e2ef06dc
Fix Bank accounts hash mismatch related to Clock::unix_timestamp (#13477)
* Test for different ancestors with mismatch bank hash

* Test cleanup

* Remove nondeterministic ancestor check

* Update timestamp bounding feature key

* Update design doc

* Filter recent_timestamps to nodes voting within the last epoch

Co-authored-by: Stephen Akridge <sakridge@gmail.com>
2020-11-10 02:10:09 +00:00
Ryo Onodera a81e7e7749
Output more inflation calc details in ledger-tool (#13345)
* Output more inflation calc details in ledger-tool

* Fix broken ci...

* Rename confusing variables

* Fix panic by wrapping PointValue with Opiton...

* Minor modifications

* Remove explict needless flush; Drop already does

* Yet another csv field adjustments

* Add data_size and rename epochs to earned_epochs

* Introduce null_tracer

* Unwrap Option in new_from_parent_with_tracer

* Don't shorten identifiers

* Allow irrefutable_let_patterns temporalily

* More null_tracer

* More field adjustments
2020-11-08 16:43:50 +09:00
Tyera Eulberg 1b1d9f6b0c
Feature-gate stake program (#13394)
* Add legacy stake-program handling

* Strip out duplicative legacy code

* Add feature for stake-program-fix

* Feature-deploy new stake program

* Expand comment
2020-11-06 08:08:11 +00:00
behzad nouri 8f0796436a
shares the lock on gossip when processing prune messages (#13339)
Processing prune messages acquires an exclusive lock on gossip:
https://github.com/solana-labs/solana/blob/55b0428ff/core/src/cluster_info.rs#L1824-L1825
This can be reduced to a shared lock if active-sets are changed to use
atomic bloom filters:
https://github.com/solana-labs/solana/blob/55b0428ff/core/src/crds_gossip_push.rs#L50
2020-11-05 15:42:00 +00:00
Tyera Eulberg bc62313c66
Allow feature builtins to overwrite existing builtins (#13403)
* Allow feature builtins to overwrite existing builtins

* Add feature_builtin ActivationType

* Correctly retain idempotent for replacing case

* Fix test

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-11-05 15:37:07 +00:00
Justin Starry c24fbb6f8b
Fix duplicate records of inner instructions (#13380)
* Fix duplicate records of inner instructions

* fix tests

* fix clippy

* Remove bad_inner_instructions
2020-11-05 15:23:52 +08:00
sakridge 43053dcc90
Re-use accounts stores (#12885)
* Re-use accounts_db stores

Creating files and dropping mmap areas can be expensive

* Add test for storage finder

Can encounter an infinite loop when the store is too small, but
smaller than the normal store size.

* Fix storage finding

* Check for strong_count == 1

* try_recycle helper
2020-11-04 09:17:05 -08:00