Commit Graph

1033 Commits

Author SHA1 Message Date
Carl Lin 3848f73bdc Add mint index 2020-12-19 18:21:49 -08:00
sakridge 91a2d03f28
Update version to 1.4.19 (#14196) 2020-12-18 00:36:20 +00:00
mergify[bot] 238b596773
cargo-build-bpf: Create a random `-keypair.json` file alongside the program deploy artifact for easy upgrades (bp #14162) (#14164)
* Use AsRef

(cherry picked from commit 9993d2c6236987ec02f70e40b047b52ce1867e83)

* Create a random `-keypair.json` file alongside the program deploy artifact for easy upgrades

(cherry picked from commit 636a455790f43c66a6d1719132336127d6cbf5bf)

* Update Cargo.toml

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-12-16 21:21:22 +00:00
sakridge 82add14782
Bump version to v1.4.18 (#14144) 2020-12-16 04:15:05 +00:00
Michael Vines 539f108ea6 Bump version to 1.4.17 2020-12-14 15:57:53 -08:00
mergify[bot] 87a578a1f9
Simple cap by including sysvars and native programs (#13884) (#14110)
* 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

(cherry picked from commit de9ac43ebffec502472c690ba519bba852176c86)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-12-14 13:29:09 +00:00
mergify[bot] a7e6cd56e9
Filter out stake and vote accounts with incorrect owners (#14062) (#14080)
* Add failing test

* Check stake/vote accounts for validity

* Feature gate change

* Add datapoint

* Add test realism

(cherry picked from commit d6eff3d62ca88c83356f6de4cefffe52daa1002c)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-12-12 02:13:50 +00:00
Trent Nelson 277d4c9ae4 Switch to memmap2 fork 2020-12-12 00:16:37 +00:00
mergify[bot] 980c7cdf64
Retry inflation parameter update (bp #12778) (#14060)
* Retry inflation parameter update along with documentation updates (#12778)

* update initial inflation parameter

* update economics section of docs

(cherry picked from commit 1ab36203de)

# Conflicts:
#	docs/docusaurus.config.js
#	docs/package-lock.json

* Revert doc changes

* Revert doc changes

Co-authored-by: Eric Williams <ericlwilliams@gmail.com>
Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-12-11 05:19:51 +00:00
mergify[bot] 13527fc937
Tiny add_native_program bug fixes with cleanups (#14042) (#14057)
* Tiny add_native_program bug fixes with cleanups

* Fix typo

(cherry picked from commit 164b7895b3b0b400be1f16a4794e15407d541b5d)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-12-10 18:46:57 -08:00
mergify[bot] bfc9932b17
Add get_minimum_balance_for_rent_excemption to Client (#14048) (#14052)
(cherry picked from commit 7abd8084b668764aa4079ef6748c229e9b9e054d)

Co-authored-by: Jack May <jack@solana.com>
2020-12-11 02:03:18 +00:00
mergify[bot] 0039861984
Add message helpers to get program info (#14047) (#14053)
(cherry picked from commit d9655ea507f6a111b31a92673905e40658b1674c)

Co-authored-by: Jack May <jack@solana.com>
2020-12-10 17:43:06 -08:00
Michael Vines fb3e88bb7e
Bump version to v1.4.16 (#14054) 2020-12-10 17:04:34 -08:00
mergify[bot] c01bff61f8
Fix priv escalation test (#14046) (#14049)
(cherry picked from commit 5ea80e673fb92ca30acd7ba612c01e179bbc3ee1)

Co-authored-by: Jack May <jack@solana.com>
2020-12-11 00:08:21 +00:00
mergify[bot] fb9f35d2f0
Rent account passed to loader can be read-only (#13997) (#14000)
(cherry picked from commit 20c0e8793e589385059f76a61f1dbe6fcb92db23)

Co-authored-by: Jack May <jack@solana.com>
2020-12-09 07:52:49 +00:00
mergify[bot] 871066fb8d
Bump criterion to v2.3.3 (#14002) (#14004)
(cherry picked from commit 1dc71fb5aaa75c9dd752c7b98e57f7515a5e9838)

Co-authored-by: Jack May <jack@solana.com>
2020-12-07 23:05:46 +00:00
Jack May be0f9d4837
Bump rust-sysroot to v0.13 (#14001) 2020-12-07 13:26:12 -08:00
Michael Vines 38d7d7df50 Bump version to v1.4.15 2020-12-03 01:55:39 +00:00
Jack May e6f54ffd56
Cap number of program address seeds (#13925)
* Cap number of program address seeds

* fmt

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-12-02 23:01:58 +00:00
mergify[bot] da1796f97a
Nonce cleanup followup (bp #13868) (#13922)
* runtime: Factor out `DurableNoncePartial` finishing logic and add tests

(cherry picked from commit 8df2a4bac0954b004556c2fc2e5c6bb7b86d1028)

* accounts: Don't assume fee-payer is the first account

(cherry picked from commit 47af5933caea0e03930e2ed03d18160903a832a7)

* accounts: Replace nonce_rollback unreachable block with descriptive panic

(cherry picked from commit be7760caa1725020290a25023046772c7b5dc733)

* sdk: Check owner when verifying nonce accounts

(cherry picked from commit 274312ebb59ffeac4a8a40f42375c2c6eedb03e7)

* runtime: Replace `HashAgeKind` with `NonceRollbackInfo`

(cherry picked from commit 404fc1570d722709344876dc91799edd576056bf)

* Make `Accounts::is_non_loader_key()` a method on `Message`

(cherry picked from commit 17defbff13fab30210c0b454adb5296f44bd4243)

Co-authored-by: Trent Nelson <trent@solana.com>
2020-12-02 21:34:21 +00:00
mergify[bot] 3955778cb6
Add msg! macro for program logging, deprecate info! macro (#13885)
(cherry picked from commit 6705b5a98c)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-12-01 06:05:31 +00:00
mergify[bot] 3559062c00
caches vote-state de-serialized from vote accounts (#13795) (#13862)
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.

(cherry picked from commit e1793e5a13)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2020-11-30 18:36:23 +00:00
sakridge cea722ac09
Bump version to v1.4.14 (#13852) 2020-11-29 18:20:19 +00:00
Michael Vines f5eb5a3ba6 Bump version to v1.4.13 2020-11-26 06:59:28 +00:00
Tyera Eulberg fd9e003ae1
Bump version to 1.4.12 (#13792) 2020-11-24 22:53:36 +00:00
mergify[bot] fdcf589f7c
Restore bank feature used to deprecate Rewards sysvar (#13786) (#13788)
(cherry picked from commit c930f92411)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-11-24 18:57:26 +00:00
Tyera Eulberg 7099d07fd3
Bump version to 1.4.11 (#13780) 2020-11-24 06:30:35 +00:00
mergify[bot] 3743e44fb3
Add new inflation feature-ids (#13671) (#13736)
* 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

(cherry picked from commit c75d97e3f2)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-11-20 18:08:57 +00:00
mergify[bot] 640f4a1ec7
Rewrite stake accounts for clear migration (#13461) (#13705)
* 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

(cherry picked from commit 43d5e47ea9)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-11-19 21:29:42 +00:00
mergify[bot] c929e8e02b
Disable publishing of cargo-build-bpf/cargo-test-bpf to crates.io (#13669)
(cherry picked from commit f25c969ad8)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-11-18 20:23:05 +00:00
Tyera Eulberg 855cf9a362
Bump version to 1.4.10 (#13657) 2020-11-18 01:29:58 +00:00
Michael Vines b4deeb8e36 Add stable program logging for BPF and native programs 2020-11-14 08:26:54 -08:00
Trent Nelson b838aba840 Bump version to 1.4.9 2020-11-13 17:50:10 -07:00
mergify[bot] e7106278e9
add missing c logging stubs (#13511) (#13515)
(cherry picked from commit 23c558510a)

Co-authored-by: Jack May <jack@solana.com>
2020-11-13 22:14:05 +00:00
mergify[bot] 1072bd7640
Add --offline flag (#13564)
(cherry picked from commit 9f95704706)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-11-13 05:18:44 +00:00
Ryo Onodera e14c2f94f4
Bump version to v1.4.8 (#13552) 2020-11-12 17:43:31 +00:00
Jack May 2374664e95
Custom heap is BPF only (#13537) 2020-11-11 16:37:18 -08:00
mergify[bot] 70c87d1a23
Add stubs and heap region definitions (#13521) (#13523)
* Add stubs and heap region definitions

* nudge

(cherry picked from commit e390c8cb7f)

Co-authored-by: Jack May <jack@solana.com>
2020-11-11 06:48:02 +00:00
mergify[bot] 055eb360c2
Add printf declaration (#13514) (#13518)
(cherry picked from commit 9ca8e98525)

Co-authored-by: Jack May <jack@solana.com>
2020-11-11 01:50:42 +00:00
mergify[bot] 25cd1ceeeb
Fix parsing CreateAccountWithSeed instructions (#13513) (#13517)
* Reduce required num_system_accounts and handle 2-account instructions properly

* Update CreateAccountWithSeed account docs to be correct

* Add CreateAccountWithSeed test

(cherry picked from commit 91f4e99b4c)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-11-11 01:13:12 +00:00
Tyera Eulberg c9e646b86b
Bump version to v1.4.7 (#13488) 2020-11-10 05:55:26 +00:00
mergify[bot] 7c47db1e3d
align cluster and sim logging as hex (#13484) (#13486)
(cherry picked from commit c280d40b40)

Co-authored-by: Jack May <jack@solana.com>
2020-11-10 03:58:19 +00:00
Tyera Eulberg ccd48923a0
Fix Bank accounts hash mismatch related to Clock::unix_timestamp (#13477) (#13485)
* 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>

Co-authored-by: Stephen Akridge <sakridge@gmail.com>
2020-11-10 03:35:22 +00:00
mergify[bot] 9627bfced3
propagates errors out of Packet::from_data (#13445) (#13470)
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.

(cherry picked from commit 73ac104df2)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2020-11-08 16:25:36 +00:00
Michael Vines e738bf1c9a Bump version to v1.4.6 2020-11-07 02:49:14 +00:00
mergify[bot] 049ca18dc5
Fix stake split rent-exempt adjustment (#13357) (#13453)
* Add failing tests

* Fix stake split

* Calculate split rent-exempt-reserve and use

* Add comment in rent.rs

* Add tests for edge cases when splitting to larger accounts, and reject overflow splits

* Reframe InsufficientFunds checks in terms of lamports var

* Test hardening review comments

(cherry picked from commit 4c5f345798)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-11-06 22:05:57 +00:00
mergify[bot] 495c64556e
cargo-build-bpf/cargo-test-bpf now support --workspace/--all (#13451)
(cherry picked from commit 0ea795caa8)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-11-06 21:43:12 +00:00
mergify[bot] 6d4f6e79b0
cargo-test-bpf now sets the "test-bpf" feature for crate tests (#13447)
The feature allows for tests to distinguish between `cargo test` and
`cargo test-bpf` primarily for the purpose of excluding CPI tests that
require the system program under `cargo test`, as the path to enabling
CPI in `cargo test`-based testing is unclear

(cherry picked from commit 1a70a2a25b)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-11-06 19:39:18 +00:00
mergify[bot] 98e9f34704
Feature-gate stake program (#13394) (#13439)
* Add legacy stake-program handling

* Strip out duplicative legacy code

* Add feature for stake-program-fix

* Feature-deploy new stake program

* Expand comment

(cherry picked from commit 1b1d9f6b0c)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-11-06 09:25:34 +00:00
Michael Vines 9ead7ca11a Define BPF_OUT_DIR for program-test, also handle -- arguments better 2020-11-05 22:42:35 +00:00