Commit Graph

586 Commits

Author SHA1 Message Date
Michael Vines 6858950f76 Remove frozen ABI modules from solana-sdk 2020-10-20 16:11:30 -07:00
Ryo Onodera c0675968b1
Support Debug Bank (#13017) 2020-10-21 01:05:45 +09:00
Michael Vines 4b04ed86b6 Don't report RewardType::Fee when none was awarded 2020-10-14 09:06:20 -07:00
Jack May c24da1ee16
fix native_loader behavior for invalid accounts (#12814) 2020-10-12 13:40:04 -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
Ryo Onodera 2f5bb7e507
Move no-0-rent rent dist. behavior under feature (#12804) 2020-10-12 08:47:52 +00:00
Michael Vines 1fc7c1ecee Don't bother paying 0 rent 2020-10-10 17:02:26 +00:00
Michael Vines c5c8da1ac0 Expose all rewards (fees, rent, voting and staking) in RPC getConfirmedBlock and the cli 2020-10-09 21:54:13 -07:00
Michael Vines 403790760c Default to 50% rent burn 2020-10-09 21:52:31 -07: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 c8807d227a Add inflation_kill_switch feature 2020-10-08 21:31:31 -07:00
Josh 8f5431551e
Store program logs in blockstore / bigtable (TransactionWithStatusMeta) (#12678)
* introduce store program logs in blockstore / bigtable

* fix test, transaction logs created for successful transactions

* fix test for legacy bincode implementation around log_messages

* only api nodes should record logs

* truncate transaction logs to 100KB

* refactor log truncate for improved coverage
2020-10-08 12:06:15 -07:00
carllin adf6f748c0
Disable rent in flaky test (#12658)
* Disable rent in test

Co-authored-by: Carl Lin <carl@solana.com>
2020-10-03 12:44:03 -07:00
Ryo Onodera e3773d919c
Avoid overflow when computing rent distribution (#12112)
* Avoid overflow when computing rent distribution

* Use assert_eq!....

* Fix tests

* Add test

* Use FeatureSet

* Add comments

* Address review comments

* Tweak a bit.

* Fix fmt
2020-10-01 11:59:28 +09:00
Tyera Eulberg c31a34fbcb
Include post balance information for rewards (#12598)
* Include post balance information for rewards

* Add post-balance to stored Reward struct

* Handle extended Reward in bigtable

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-09-30 17:57:06 -06:00
Trent Nelson 3c7b9c2938 Move remaining nonce utils from runtime to SDK 2020-09-30 05:45:42 +00:00
Trent Nelson 65b868f4eb Move nonced tx helpers to SDK 2020-09-30 05:45:42 +00:00
Michael Vines f57af4fec2 epoch_rewards datapoint now includes the correct rewards epoch (previous epoch) 2020-09-29 22:44:02 -07:00
Michael Vines 82848d6c73 Include active stake in 'epoch_rewards' datapoint 2020-09-29 16:50:10 -07:00
Jack May 74fcb184b2
Pipe FeatureSet though InvokeContext (#12536)
* Pipe FeatureSet though InvokeContext

* gate program size cap

* nit
2020-09-29 21:36:30 +00:00
Jack May 2ff983647f
Move process_instruction defs to runtime (#12507) 2020-09-29 01:36:46 -07:00
carllin 06f84c65f1
Fix rooted accounts cleanup, simplify locking (#12194)
Co-authored-by: Carl Lin <carl@solana.com>
2020-09-28 16:04:46 -07:00
Michael Vines 833ad20b01 Add Builtin AbiExample 2020-09-28 12:50:19 -07:00
Michael Vines 31696a1d72 Port BPFLoader2 activation to FeatureSet and rework built-in program activation 2020-09-28 12:50:19 -07:00
Michael Vines f9a74b51ef Add feature to resolve spl-token v2 multisig bug 2020-09-28 09:25:48 -07:00
Michael Vines aa5c008fa8 Add pico-inflation feature 2020-09-28 08:25:00 -07:00
Jack May 965f653471
Add copy-on-write executor cache (#12502)
* Add copy-on-write executor cache

* Add remove_executor function to the bank
2020-09-26 17:54:11 +00:00
Michael Vines a36252bfa0 Remove continues from compute_active_feature_set() 2020-09-26 06:10:50 +00:00
Michael Vines b15d6148dd Deerror 2020-09-25 22:18:43 -07:00
Michael Vines e50386f928 Add epoch rewards metric datapoint 2020-09-26 01:05:57 +00:00
Michael Vines 5d6410c1cb Port fix_recent_blockhashes_sysvar_delay to FeatureSet 2020-09-25 15:07:25 -07:00
Michael Vines e39fac9f01 Rename active() to is_active() 2020-09-25 11:40:36 -07:00
Michael Vines 199940d683 cargo fmt 2020-09-25 11:40:36 -07:00
Michael Vines 92406cf9a0 FeatureSet test 2020-09-25 11:40:36 -07:00
Michael Vines cc6ba1e131 Remove id field 2020-09-25 11:40:36 -07:00
Michael Vines c10da16d7b Port instructions sysvar and secp256k1 program activation to FeatureSet 2020-09-25 11:40:36 -07:00
Michael Vines 93259f0bae Runtime feature activation framework 2020-09-25 11:40:36 -07:00
Justin Starry 1c970bb39f
Pre-construct cpi instruction recorders before message processing (#12467) 2020-09-25 20:42:28 +08:00
Justin Starry 6601ec8f26
Record and store invoked instructions in transaction meta (#12311)
* Record invoked instructions and store in transaction meta

* Enable cpi recording if transaction sender is some

* Rename invoked to innerInstructions
2020-09-24 22:36:22 +08:00
sakridge 68e5a2ef56
Add RPC notify and banking keys debug (#12396) 2020-09-23 18:46:42 -07:00
sakridge 22d8b3c3f8
Cleanup and feature gate instruction processing (#12359) 2020-09-20 10:58:12 -07:00
Ryo Onodera cb8661bd49
Persistent tower (#10718)
* Save/restore Tower

* Avoid unwrap()

* Rebase cleanups

* Forcibly pass test

* Correct reconcilation of votes after validator resume

* d b g

* Add more tests

* fsync and fix test

* Add test

* Fix fmt

* Debug

* Fix tests...

* save

* Clarify error message and code cleaning around it

* Move most of code out of tower save hot codepath

* Proper comment for the lack of fsync on tower

* Clean up

* Clean up

* Simpler type alias

* Manage tower-restored ancestor slots without banks

* Add comment

* Extract long code blocks...

* Add comment

* Simplify returned tuple...

* Tweak too aggresive log

* Fix typo...

* Add test

* Update comment

* Improve test to require non-empty stray restored slots

* Measure tower save and dump all tower contents

* Log adjust and add threshold related assertions

* cleanup adjust

* Properly lower stray restored slots priority...

* Rust fmt

* Fix test....

* Clarify comments a bit and add TowerError::TooNew

* Further clean-up arround TowerError

* Truly create ancestors by excluding last vote slot

* Add comment for stray_restored_slots

* Add comment for stray_restored_slots

* Use BTreeSet

* Consider root_slot into post-replay adjustment

* Tweak logging

* Add test for stray_restored_ancestors

* Reorder some code

* Better names for unit tests

* Add frozen_abi to SavedTower

* Fold long lines

* Tweak stray ancestors and too old slot history

* Re-adjust error conditon of too old slot history

* Test normal ancestors is checked before stray ones

* Fix conflict, update tests, adjust behavior a bit

* Fix test

* Address review comments

* Last touch!

* Immediately after creating cleaning pr

* Revert stray slots

* Revert comment...

* Report error as metrics

* Revert not to panic! and ignore unfixable test...

* Normalize lockouts.root_slot more strictly

* Add comments for panic! and more assertions

* Proper initialize root without vote account

* Clarify code and comments based on review feedback

* Fix rebase

* Further simplify based on assured tower root

* Reorder code for more readability

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-09-19 14:03:54 +09:00
sakridge 3930cb865a
Add keccak-secp256k1 instruction (#11839)
* Implement keccak-secp256k1 instruction

Verifies eth addreses with ecrecover function

* Move secp256k1 test
2020-09-15 18:23:21 -07:00
Ryo Onodera 629572831b
Enable retirement of rent collect in Bank::deposit() on testnet (#12223) 2020-09-15 06:49:26 +00:00
Ryo Onodera 7d48339b7c
Enable eager-rent-collect-across-gapped-epochs bugfix (#12219) 2020-09-15 14:13:40 +09:00
Ryo Onodera c1e76fd5f7
Fix build breakage (#12220) 2020-09-15 13:04:04 +09:00
Jack May 3278d78f08
Cache re-usable work performed by the loader (#12135) 2020-09-14 17:42:37 -07:00
Jack May daba17a95c
Nit, short name (#12195) 2020-09-12 01:32:38 +00:00
Ryo Onodera de4a613610
Check bank capitalization (#11927)
* Check bank capitalization

* Simplify and unify capitalization calculation

* Improve and add tests

* Avoid overflow and inhibit automatic restart

* Fix test

* Tweak checked sum for cap. and add tests

* Fix broken build after merge conflicts..

* Rename to ClusterType

* Rename confusing method

* Clarify comment

* Verify cap. in rent and inflation tests

Co-authored-by: Stephen Akridge <sakridge@gmail.com>
2020-09-12 01:48:06 +09:00