Commit Graph

1360 Commits

Author SHA1 Message Date
549a3107cb chore: bump env_logger from 0.7.1 to 0.8.2 (#14093)
* chore: bump env_logger from 0.7.1 to 0.8.2

Bumps [env_logger](https://github.com/env-logger-rs/env_logger) from 0.7.1 to 0.8.2.
- [Release notes](https://github.com/env-logger-rs/env_logger/releases)
- [Changelog](https://github.com/env-logger-rs/env_logger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/env-logger-rs/env_logger/compare/v0.7.1...v0.8.2)

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2020-12-13 05:59:54 +09:00
a9185d4ea1 chore: bump rustversion from 1.0.3 to 1.0.4 (#14022)
* chore: bump rustversion from 1.0.3 to 1.0.4

Bumps [rustversion](https://github.com/dtolnay/rustversion) from 1.0.3 to 1.0.4.
- [Release notes](https://github.com/dtolnay/rustversion/releases)
- [Commits](https://github.com/dtolnay/rustversion/compare/1.0.3...1.0.4)

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2020-12-13 03:56:27 +09:00
546c6a4531 Override yanked miow crate to 0.2.2 2020-12-11 23:44:03 +00:00
277b6790c7 Override yanked net2 0.2.37 2020-12-11 23:44:03 +00:00
edff62af3d Switch to memmap2 fork 2020-12-11 23:44:03 +00:00
83fda2d972 Clean invoke in prep for native invoke (#14055) 2020-12-10 18:25:57 -08:00
5ea80e673f Fix priv escalation test (#14046) 2020-12-10 22:36:33 +00:00
201637b326 Updates rbpf to v0.2.2 (#14036)
* Updates rbpf to v0.2.2
2020-12-10 16:32:54 +01:00
e1a4251b07 Cap CPI signers (#14021) 2020-12-09 02:14:53 -08:00
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
882d033233 Don't use stale executor cache (#13966) 2020-12-05 05:54:42 +00:00
f1fd999bb0 Translate data length as mutable (#13956) 2020-12-04 05:47:22 +00:00
661ca52135 Cap seeds not signers (#13941) 2020-12-03 09:58:25 -08:00
1c51711c75 Invoke with empty account slice (#13931) 2020-12-03 07:06:26 -08:00
3f841df7cf Cap number of program address seeds (#13924) 2020-12-02 22:25:06 +00:00
841c7a0f71 Cleanup memory translation APIs (#13921) 2020-12-02 20:03:36 +00:00
85bec37be4 Translate data length and owner as writable (#13914) 2020-12-02 09:05:42 -08:00
aebc3a17ce Fix undefined symbol "custom panic" in BPF test programs (#13840)
* Implements missing "custom_panic" symbol
2020-12-01 16:52:20 +01:00
733fcbaa6c Check that the program was granted access to program_id (#13890) 2020-12-01 07:35:07 -08:00
6705b5a98c Add msg! macro for program logging, deprecate info! macro 2020-11-30 20:39:42 -08:00
2d62f2ad03 Re-fix arithmetic overflow and add better test (#13870) 2020-11-30 22:39:03 +00:00
40dd46680e Cleanup bpf test's Cargo.toml files (#13867)
* Cleanup bpf test's Cargo.toml files

* lock file
2020-11-30 21:16:37 +00:00
b47bd0a296 Add program id spoof tests (#13866) 2020-11-30 21:06:11 +00:00
e81c2c826c Don't reset credits_observed due to stale voters (#13836)
* Don't reset credits_observed due to stale voters

* Add tests

* Fix comment
2020-11-30 22:47:34 +09:00
cc78667118 Record instructions after account translation 2020-11-28 10:54:09 -08:00
6048342c57 Enhance ledger-tool for multi-epoch rewards (#13837)
* Support ledger-tool for multi-epoch rewards

* nits

* Ensure not to skip some records in csv
2020-11-27 04:20:47 +00:00
42421e77a9 Add stake calculation tests with inflation/slashing (#13605)
* Add stake calculation tests with inflation/slashing

* Clean up the test
2020-11-25 12:49:35 +09:00
c833ede4af Rbpf v0.2.1 (#13732)
* Refactoring to match rbpf-v0.2.1 and add JIT compilation caching.

* Removes obsolete bpf-trace.py which has been replaced by the rbpf CLI tool.
2020-11-24 18:00:19 +01:00
e3a92d6905 Prevent splitting when either source or split stake will equal zero (#13775) 2020-11-24 02:48:56 +00:00
488ce982f0 stake: Disallow stakes merging with themselves 2020-11-23 14:32:02 -07:00
6b9a019c0a stake: Remove disused test helper function 2020-11-23 14:32:02 -07:00
8e73187990 stake: Allow compatible, fully-active stake accounts to be merged 2020-11-23 14:32:02 -07:00
bb2772d068 stake: Cosmetic - rename variable 2020-11-23 14:32:02 -07:00
dc7f89715a stake: De-replicode mergable info extraction 2020-11-23 14:32:02 -07:00
38a3ed96bb Fail stake init if account data is the wrong size (#13767) 2020-11-23 20:13:38 +00:00
f0f99ffc7e Cap split stake at source stake when splitting entire balance (#13754) 2020-11-23 10:11:10 -07:00
3bc7d85986 ledger-tool cap: output credits_observed (#13746) 2020-11-21 16:13:07 +00:00
13aa38d307 stake: Don't pay out rewards for epochs where inflation was not enabled 2020-11-21 04:16:27 +00:00
2cb006fa44 Use info for failed to match slot vote error (#13715) 2020-11-19 16:01:37 -08:00
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
15057b087c Expand CPI returning error test (#13672) 2020-11-18 22:18:49 +00:00
39932d7664 Update Initialized split rent-exempt value (#13646) 2020-11-17 19:03:00 +00:00
a7bed62af0 Remove overflow opportunities (#13649) 2020-11-17 12:01:11 -07:00
3a9dca0c67 Add back BPF error logging (#13633)
* Add back BPF error logging

* Update programs/bpf_loader/src/lib.rs

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-11-17 08:10:14 +00:00
8c922a0198 fix arithmetic overflow in slice translation (#13624)
* fix arithmetic overflow in slice translation

* nudge
2020-11-17 00:13:01 +00:00
2b3faa1947 Reject faked stake/vote accounts in stake mgmt. (#13615)
* Reject faked stake/vote accounts in stake mgmt.

* Use clearer name
2020-11-17 05:42:59 +09:00
bcd303a447 ledger-tool cap: delegation owner and stake v2 flag (#13602)
* Output delegation owner as well

* Add --enable-stake-program-v2

* Small cleanup and add sanity assertion

* Fix typo...
2020-11-15 19:38:46 +00:00
baa6b3a261 Add stable program logging for BPF and native programs 2020-11-14 08:26:01 -08:00
a8a77614fe Fix potential undefined behavior (#13555)
* Switch to ouroboros 0.5.1

* Update other lock files
2020-11-13 18:12:41 +09:00
48dd9f7efd Move secp256k1 instruction helper to the sdk (#13560) 2020-11-12 16:58:40 -08:00