Commit Graph

47 Commits

Author SHA1 Message Date
Michael Vines
aa5c008fa8 Add pico-inflation feature 2020-09-28 08:25:00 -07:00
Michael Vines
c10da16d7b Port instructions sysvar and secp256k1 program activation to FeatureSet 2020-09-25 11:40:36 -07:00
sakridge
22d8b3c3f8 Cleanup and feature gate instruction processing (#12359) 2020-09-20 10:58:12 -07:00
sakridge
f561eb917f Add way to look at tx instructions (#11943) 2020-09-19 12:17:46 -07:00
Kristofer Peterson
58ef02f02b 9951 clippy errors in the test suite (#10030)
automerge
2020-05-15 09:35:43 -07:00
Jack May
eb1acaf927 Remove archiver and storage program (#9992)
automerge
2020-05-14 18:22:47 -07:00
Grimes
9d667db634 SDK: Allow RecentBlockhashes to hold the entire BlockhashQueue (#8632)
automerge
2020-03-05 11:03:21 -08:00
Trent Nelson
fd00e5cb35 Store FeeCalculator with blockhash in nonce accounts (#8650)
* Copy current state version to v0

* Add `FeeCalculator` to nonce state

* fixup compile

* Dump v0 handling...

Since we new account data is all zeros, new `Current` versioned accounts
look like v0. We could hack around this with some data size checks, but
the `account_utils::*State` traits are applied to `Account`, not the
state data, so we're kind SOL...

* Create more representative test `RecentBlockhashes`

* Improve CLI nonce account display

Co-Authored-By: Michael Vines <mvines@gmail.com>

* Fix that last bank test...

* clippy/fmt

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-03-05 07:40:26 -07:00
Trent Nelson
561808cf90 SDK: Store FeeCalculator in recent_blockhashes sysvar (#8609)
* SDK: Store FeeCalculators in recent_blockhashes sysvar

* nits
2020-03-04 12:01:32 -07:00
Trent Nelson
1265afebbb SDK: Return a full RecentBlockhashes for tests (#8580)
automerge
2020-03-02 18:44:29 -08:00
Rob Walker
0e084358b4 Fix slot_hashes documentation 2020-02-06 10:06:16 -07:00
Jack May
b5a735878a Sysvar account_into return program error rather than option (#8121) 2020-02-04 14:54:41 -08:00
Jack May
b19f730527 Seperate RefCells lamports and data (#8021) 2020-01-29 21:15:04 -08:00
Rob Walker
e6803daf10 Remove support for stake redelegation (#7995)
* Remove support for stake redelegation

* fixup
2020-01-29 17:59:14 -08:00
Jack May
12eff5a2f9 Cleanup SDK use syntax (#8004) 2020-01-28 16:11:22 -08:00
Jack May
34ed93d57c Optimize account copies and use RefCell to handle duplicate accounts in BPF programs (#7958) 2020-01-24 10:54:26 -08:00
Ryo Onodera
e54bf563b5 Avoid unsorted recent_blockhashes for determinism (#7918)
* Avoid unsorted recent_blockhashes for determinism

* Add a test: test_create_account_unsorted
2020-01-23 10:51:22 +09:00
Jack May
023074650f Allow the same account to be passed multiple times to a single instruction (#7795) 2020-01-22 09:11:56 -08:00
Jack May
5f4e0c7e3e Naming nits (#7798)
automerge
2020-01-14 13:38:17 -08:00
Rob Walker
120c8f244c Add slot_history for slashing (#7589)
* Add slot_history for slashing

* fixup

* fixup
2019-12-23 12:23:45 -08:00
Rob Walker
2ebfab8e07 Remove duplicate def of MAX_SLOT_HASHES (#7574) 2019-12-19 21:24:12 -08:00
Rob Walker
777ae3c215 Add time since genesis to sysvar::clock (#7289)
* genesis timestamp

* remove clock::create_account()

* ..

* add configure-able creation time

* dividing by 1T, should be dividing by 1B
2019-12-12 14:03:43 -08:00
Trent Nelson
1ffd6b4b4d Add program and runtime support for Durable Transaction Nonces (#6845)
* Rework transaction processing result forwarding

Durable nonce prereq

* Add Durable Nonce program API

* Add runtime changes for Durable Nonce program

* Register Durable Nonce program

* Concise comments and bad math

* Fix c/p error

* Add rent sysvar to withdraw ix

* Remove rent exempt required balance from Meta struct

* Use the helper
2019-12-07 12:54:10 -07:00
Jack May
d8ead57fbb Use bs58 strings to declare IDs rather then raw bytes (#7082) 2019-11-21 16:34:40 -08:00
Rob Walker
efe260f12e sysvar trait (#6667)
* sysvar trait

* get the new guy in on it
2019-11-04 12:31:24 -08:00
Trent Nelson
5416c114cf SDK: Add sysvar to expose recent block hashes to programs (#6663)
* SDK: Add sysvar to expose recent block hashes to programs

* Blockhashes is one word

* Missed one

* Avoid allocs on update

* unwrap_or_else

* Use iterators

* Add microbench

* Revert "unwrap_or_else"

This reverts commit a8f8c3bfbe.

* Revert "Avoid allocs on update"

This reverts commit 486f01790c.
2019-11-04 10:51:15 -07:00
Rob Walker
111942a47d document clock (#6662) 2019-10-31 13:26:55 -07:00
Rob Walker
bc88180058 stake split (#6402)
* stake split

* stake split
2019-10-31 11:07:27 -07:00
Rob Walker
fa12a5f70b kill rent calculator (#6625) 2019-10-30 16:25:12 -07:00
Rob Walker
e58e48e919 make sysvar creation a bit more foolproof (#6294) 2019-10-09 23:22:33 -07:00
Rob Walker
7cf90766a3 add epoch_schedule sysvar (#6256)
* add epoch_schedule sysvar

* book sheesh!
2019-10-08 22:34:26 -07:00
Parth
92ea11fca1 make executable, vote and stake account rent exempt (#6017)
* add missing convenience method

* require vote account to be exempt

* make stake account rent exempt

* making executable rent exempt

* rent will be initialized in genesis

* add test for update_rent
2019-10-04 02:52:48 +05:30
Michael Vines
a60a3efc1a Revert "require stake, vote and executable accounts to be rent exempt (#5928)" (#6005)
This reverts commit 11e6197a83.
2019-09-20 14:10:39 -07:00
Parth
11e6197a83 require stake, vote and executable accounts to be rent exempt (#5928)
* require vote account to be exempt

* make stake account rent exempt

* add rent exempted system instruction

* use rent exemption instruction in vote and stake api

* use rent exempted account while creating executable account

* updating chacha golden hash as instruction data has changed

* rent will be initialized for genesis bank too
2019-09-20 16:52:17 +05:30
Parth
de4f564780 fix test name (#5932) 2019-09-18 01:14:44 +05:30
Parth
d63518a835 Rent tangential stuff (#5910)
* rename rent.rs to rent_calculator.rs

* add rent sysvar

* integrate rent_calculator with bank

* rent_calculator integration with genesis

* add test for rent sysvar
2019-09-17 17:12:55 +05:30
Jack May
1853771930 Add support for SDK sysvar types (#5876) 2019-09-10 18:53:02 -07:00
Jack May
61fe1aa9cf SDK cleanup to reduce featurization (#5856) 2019-09-09 16:38:52 -07:00
Jack May
a317e9513f Add sysvar support (#5838) 2019-09-09 10:55:35 -07:00
sakridge
b35c022629 More types (#5846)
automerge
2019-09-08 11:13:59 -07:00
Rob Walker
affcb5ec43 remove hashmap from stake_history (#5834) 2019-09-07 10:33:06 -07:00
Jack May
d3052d094c fmt does not work with cfg_if (#5829) 2019-09-06 15:33:58 -07:00
Jack May
e8d88f3237 Split SDK's timing.rs (#5823) 2019-09-06 14:30:56 -07:00
Rob Walker
07d11be6ab add global stake warmup (#5483)
* add global stake warmup

* integrate stake history into runtime

* fixup core tests

* fixup

* remove existing cooldown tests for now
2019-08-12 20:59:57 -07:00
Rob Walker
7b77fbd525 add stake_history sysvar (#5475) 2019-08-09 12:31:56 -07:00
Rob Walker
259a5130a8 whoops (#5083) 2019-07-12 19:08:51 -07:00
Rob Walker
d2b6c2e0ce syscall work, rename syscall to sysvar, rename current to clock (#5074)
* syscall work, rename syscall to sysvar, rename current to clock

* missed one

* nit
2019-07-12 16:38:15 -07:00