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
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
Michael Vines
baa6b3a261
Add stable program logging for BPF and native programs
2020-11-14 08:26:01 -08:00
Jack May
48dd9f7efd
Move secp256k1 instruction helper to the sdk ( #13560 )
2020-11-12 16:58:40 -08: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
behzad nouri
73ac104df2
propagates errors out of Packet::from_data ( #13445 )
...
Packet::from_data is ignoring serialization errors:
https://github.com/solana-labs/solana/blob/d08c3232e/sdk/src/packet.rs#L42-L48
This is likely never useful as the packet will be sent over the wire
taking bandwidth but at the receiving end will either fail to
deserialize or it will be invalid.
This commit will propagate the errors out of the function to the
call-site, allowing the call-site to handle the error.
2020-11-08 15:10:03 +00: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
Tyera Eulberg
4260b3b416
Sample votes from ancestors back to root
2020-10-31 21:30:42 -07:00
Tyera Eulberg
90778615f6
Use bounded timestamp-correction when feature enabled
2020-10-31 21:30:42 -07:00
Tyera Eulberg
80db6c0980
Add bounded timestamp-estimation method
2020-10-31 21:30:42 -07:00
Tyera Eulberg
96b8aa8bd1
Add bounding feature
2020-10-31 21:30:42 -07:00
Michael Vines
8acc47ee1b
MockInvokeContext::get_programs() implementation
2020-10-31 18:12:24 -07:00
Michael Vines
4b65e32f22
Move Feature struct to solana-program
2020-10-30 17:57:51 -07:00