792 Commits

Author SHA1 Message Date
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
Michael Vines
da9548fd12 de-mut some InvokeContext methods 2020-10-30 09:20:09 +00:00
Michael Vines
da361afbb9 Revert "Updates rbpf to v0.2.0, (#12951)"
This reverts commit 6606590b8132e56dab9e60b3f7d20ba7412a736c.
2020-10-29 21:45:24 -07:00
Michael Vines
7d686b72a0 Add Bank::set_bpf_compute_budget() 2020-10-29 21:45:24 -07:00
Michael Vines
66e51a7363 Add sol_log_compute_units syscall 2020-10-29 21:45:24 -07:00
Michael Vines
225bed11c7 Remove Entrypoint type 2020-10-29 21:45:24 -07:00
Michael Vines
df8dab9d2b Native/builtin programs now receive an InvokeContext 2020-10-29 21:45:24 -07:00
Jack May
c458d4b213
move Account to solana-sdk (#13198) 2020-10-28 22:01:07 -07:00
Ryo Onodera
7d2962135d
Use pico inflation for ledger-tool capitalization --enable-inflation (#13215)
* Use pico inflation for ledger-tool capitalization --enable-inflation

* rust fmt
2020-10-28 15:30:39 +09:00
Jack May
26eba5ac7d
Fix pr crossing for sysvar keyed-accounts (#13189) 2020-10-26 21:59:32 -07:00
Michael Vines
1b343665a1 Move KeyedAccount out of solana-program. Native programs are not supported by solana-program 2020-10-26 18:54:54 -07:00
Michael Vines
c4fb77f057
Delete .lib.rs.swo 2020-10-26 16:01:25 -07:00
Michael Vines
0cc9c94c43 Rename "everything" feature to "full" 2020-10-24 17:26:11 +00:00
Michael Vines
a4956844bd Update frozen_abi hashes
The movement of files in sdk/ caused ABI hashes to change
2020-10-24 08:37:55 -07:00
Michael Vines
dd711ab5fb Rename solana-program-sdk to solana-program 2020-10-24 08:37:55 -07:00
Michael Vines
63db324204 Initial population of solana-program-sdk 2020-10-24 08:37:55 -07:00
Michael Vines
959880db60 Remove unused pubkey::Pubkey imports 2020-10-21 19:08:13 -07:00
Michael Vines
7bc073defe Run codemod --extensions rs Pubkey::new_rand solana_sdk::pubkey::new_rand 2020-10-21 19:08:13 -07:00
Michael Vines
76f11c7dae Add hash_new_rand(), mark Hash::new_rand() as deprecated 2020-10-21 19:08:13 -07:00
Michael Vines
0e68ed6a8d Add pubkey_new_rand(), mark Pubkey::new_rand() deprecated 2020-10-21 19:08:13 -07:00
Tyera Eulberg
46d0019955
Parse stake and system instructions (#13035)
* Fix token account check

* Add helper to check num accounts

* Add parse_stake

* Add parse_system

* Fix AuthorizeNonce docs

* Remove jsonParsed unstable markers

* Clippy
2020-10-20 21:02:17 -06:00
Michael Vines
6858950f76 Remove frozen ABI modules from solana-sdk 2020-10-20 16:11:30 -07:00
sakridge
83c53ae4b5
Fix secp256k1 instruction indexing and add tests (#13026) 2020-10-20 14:13:24 -07:00
Michael Vines
c5e16383b0 Add everything feature 2020-10-19 17:21:52 -07:00
Michael Vines
9c53e1dfb2 Add SyscallStubs to enable syscall interception when building programs for non-BPF 2020-10-19 21:00:17 +00:00
Ryo Onodera
54517ea454
Follow up to persistent tower with tests and API cleaning (#12350)
* Follow up to persistent tower

* Ignore for now...

* Hard-code validator identities for easy reasoning

* Add a test for opt. conf violation without tower

* Fix compile with rust < 1.47

* Remove unused method

* More move of assert tweak to the asser pr

* Add comments

* Clean up

* Clean the test addressing various review comments

* Clean up a bit
2020-10-19 16:37:03 +09:00
Jack May
3f9e6a600b
program log pubkey as base58 (#12901) 2020-10-15 09:11:54 -07:00
Jack May
969f7b015b
Respect RefCell when calling invoke (#12858)
* Respect RefCell when calling invoke

* nudge
2020-10-15 01:06:41 +00:00
Jack May
d4e953277e
Expose program error constants (#12861) 2020-10-14 00:38:08 -07:00
Jack May
56211378d3
terminology update, nonce to bump seed (#12840) 2020-10-13 10:11:08 -07:00
Eric Williams
1ab36203de
Retry inflation parameter update along with documentation updates (#12778)
* update initial inflation parameter

* update economics section of docs
2020-10-12 13:10:57 -07:00
Michael Vines
403790760c Default to 50% rent burn 2020-10-09 21:52:31 -07:00
Jack May
9ac8db3533
document program address collisions (#12774) 2020-10-09 23:19:41 +00:00
Tyera Eulberg
b028c47d2b
Correct Bank timestamp drift every slot (#12737)
* Move timestamp helper to sdk

* Add Bank method for getting timestamp estimate

* Return sysvar info from Bank::clock

* Add feature-gated timestamp correction

* Rename unix_timestamp method to be more descriptive

* Review comments

* Add timestamp metric
2020-10-09 21:53:41 +00:00
carllin
c879e7c1ad
Fix fee mismatch on snapshot deserialize (#12697)
Co-authored-by: Carl Lin <carl@solana.com>
2020-10-08 23:44:41 -07:00
Michael Vines
2c38865e70 Revert "Inflation cli fix and parameter update (#12709)"
This reverts commit b3f695c83f11cae6fb46de4f6da1bdac5d52e89b.
2020-10-07 19:43:15 -07:00
Jack May
dd7fae4afb
Fix syscall featurization (#12714)
* Fix syscall featurization

* nudge
2020-10-07 18:38:38 -07:00
Eric Williams
b3f695c83f
Inflation cli fix and parameter update (#12709)
update initial inflation parameter to reflect current design
2020-10-07 17:12:32 -07:00
Jack May
41ad3dd8f0
Remove skip-no-mangle entirely (#12696) 2020-10-07 09:13:48 -07:00