792 Commits

Author SHA1 Message Date
Stakeconomy.com
4ba9e39941 Update feature_set.rs 2021-01-30 10:04:50 -08:00
Michael Vines
15baf43d1e Template for an Inflation Candidate nomination
To submit your nomination:
1. Replace all instances of "my_name" with a suitable alternative then address the "TODO" code comments
2. Submit a new Github pull request and work with the project contributors to merge your pull request
2021-01-30 10:04:50 -08:00
nampdn
f98889adc0 style(spacing): reformat tab spacing 2021-01-29 23:08:24 -08:00
Michael Vines
a7ff1684f5 Template for an Inflation Candidate nomination
To submit your nomination:
1. Replace all instances of "my_name" with a suitable alternative then address the "TODO" code comments
2. Submit a new Github pull request and work with the project contributors to merge your pull request
2021-01-29 23:08:24 -08:00
Jack May
07cef5a557
Buffer authority must match upgrade authority for deploys and upgrades (#14923) 2021-01-29 12:43:42 -08:00
Trent Nelson
85b5dbead6 Add feature for pending SPL Token self-transfer fix 2021-01-29 04:19:33 +00: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
Jack May
74c83e6854
Rotate feature key: use loaded executable accounts (#14838) 2021-01-25 15:34:45 -08:00
Michael Vines
cbffab7850 Upgrade to Rust v1.49.0 2021-01-23 19:16:36 -08:00
sakridge
191193289f
Upgrade sha2 to 0.9.3 (#14746) 2021-01-22 22:25:22 -08:00
Jack May
e505a9b209
Revert disabling script (#14788) 2021-01-23 01:08:06 +00:00
Jack May
77572a7c53
Track account writable deescalation (#14626) 2021-01-22 15:28:01 -08:00
Michael Vines
3c6dbd21d2 Add ic_msg()/ic_logger_msg() macros 2021-01-21 21:41:33 +00:00
Michael Vines
072e5e54d8 Add generalized voting process to enable full inflation 2021-01-20 23:37:21 -08:00
Trent Nelson
2783aee483 SDK: Sanitize base58 signature input 2021-01-20 23:59:26 +00:00
Tyera Eulberg
a7086a0f83
Cli: promote commitment to a global arg + config.yml (#14684)
* Make commitment a global arg

* Add commitment to solana/cli/config.yml

* Fixup a couple Display/Verbose bugs
2021-01-20 09:48:10 -07: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
behzad nouri
c6ae0667e6
feature gates turbine retransmit peers patch (#14631) 2021-01-19 04:16:19 +00:00
Jack May
6e8a1ba7de
Load executable accounts from invoke context (#14574) 2021-01-14 00:19:22 -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
ec48631fc5
Bail on all CPI errors (#14500)
* Bail on all CPI errors

* whitespace
2021-01-09 02:27:39 +00:00
Jack May
a8b5a32b50
Gate cpi program account passing (#14443) 2021-01-05 21:53:41 +00:00
Ryo Onodera
aa4da339ff
Improve solana catchup (#14313)
* Improve solana catchup

* Overidable port, retry, args error clean up

* print cleanup

* Reduce diff

* Tweak warns a bit
2021-01-05 10:10:27 +09: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
Jack May
2d8dacb72b
Gate CPI authorized programs (#14361) 2020-12-30 18:13:37 -08:00
Jack May
5524938a50
Limit CPI instruction size (#14317) 2020-12-29 01:14:17 +00:00
Trent Nelson
3881ae10fb Deinitialize nonce data upon zero balance 2020-12-22 19:37:26 -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
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
079424d7d1
Warp-timestamp pr# 2020-12-21 10:52:18 -07: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
Michael Vines
efc091e28a Add transactionCount field to GetEpochInfo 2020-12-17 12:29:50 -08:00
Michael Vines
9993d2c623 Use AsRef 2020-12-16 19:51:16 +00:00
Jack May
ab98c1f2d4
Add try_find_program_address syscall (#14118) 2020-12-15 08:15:01 -08:00
Jack May
9e90394583
Upgradeable loader (#13689) 2020-12-14 15:35:10 -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
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
Michael Vines
0a9ff1dc9d Initial solana-test-validator command-line program 2020-12-11 04:17:38 +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
7abd8084b6
Add get_minimum_balance_for_rent_excemption to Client (#14048) 2020-12-10 16:39:28 -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
Trent Nelson
274312ebb5 sdk: Check owner when verifying nonce accounts 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
Tyera Eulberg
c930f92411
Restore bank feature used to deprecate Rewards sysvar (#13786) 2020-11-24 10:22:31 -07: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