Commit Graph

14519 Commits

Author SHA1 Message Date
Pierre 97ef9b2bc3
feat: add convenience methods to EpochSchedule (#17810)
* first try, failing test

* fix implementation and tests

* lint:fix

* move method tests to seperate test

* lint fix

* apply starry's comments and grab the bonus points

* minor fixes after starry's second review

Co-authored-by: Arrowana <8245419+Arrowana@users.noreply.github.com>
2021-06-09 22:47:54 -07:00
Trent Nelson e0d679b319 programs/config: Disallow duplicate signers 2021-06-09 23:09:09 -06:00
Dmitri Makarov 2fe211c5e0
Remove O2 option for compiling BPF programs (#17865)
rustc default compiler optimization level is O3. This change removes
the option that overrides the default optimization level, because it
is safe to do so.  The code generation is incorrect in some cases
because of link-time optimizations, which remain disabled for
compiling BPF programs.  In addition, this commit updates the expected
instruction counts for assert_instruction_count test.
2021-06-10 05:04:17 +00:00
Lijun Wang 269d995832
Make account shrink configurable #17544 (#17778)
1. Added both options for measuring space usage using total accounts usage and for individual store shrink ratio using an enum. Validator CLI options: --accounts-shrink-optimize-total-space and --accounts-shrink-ratio
2. Added code for selecting candidates based on total usage in a separate function select_candidates_by_total_usage
3. Added unit tests for the new functions added
4. The default implementations is kept at 0.8 shrink ratio with --accounts-shrink-optimize-total-space set to true

Fixes #17544
2021-06-09 21:21:32 -07:00
Jack May a1fab0c5ca
Log more info on runtime account verification errors (#17861) 2021-06-09 16:27:00 -07:00
Tao Zhu ae27fcbcda
replay stage feed back program cost (#17731)
* replay stage feeds back realtime per-program execution cost to cost model;

* program cost execution table is initialized into empty table, no longer populated with hardcoded numbers;

* changed cost unit to microsecond, using value collected from mainnet;

* add ExecuteCostTable with fixed capacity for security concern, when its limit is reached, programs with old age AND less occurrence will be pushed out to make room for new programs.
2021-06-09 17:10:59 -05:00
Justin Starry 050bb5446d
Add local cluster tests that broadcast duplicate slots (#13995)
* Add duplicate node local cluster test

* fix clippy

* remove dupe test
2021-06-09 15:01:48 -07:00
carllin 84f121881e
Ignore flaky test (#17858) 2021-06-09 13:50:41 -07:00
dependabot[bot] 2c591ebaab
chore: bump nix from 0.19.0 to 0.20.0 (#17853)
* chore: bump nix from 0.19.0 to 0.20.0

Bumps [nix](https://github.com/nix-rust/nix) from 0.19.0 to 0.20.0.
- [Release notes](https://github.com/nix-rust/nix/releases)
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/compare/v0.19.0...v0.20.0)

---
updated-dependencies:
- dependency-name: nix
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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>
2021-06-09 18:01:26 +00:00
dependabot[bot] fcad558ae3
chore:(deps): bump @types/react from 17.0.9 to 17.0.11 in /explorer (#17859)
Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 17.0.9 to 17.0.11.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-09 17:06:59 +00:00
dependabot[bot] 9a2ca8dd2f
chore: bump rustc_version from 0.2.3 to 0.4.0 (#17854)
* chore: bump rustc_version from 0.2.3 to 0.4.0

Bumps [rustc_version](https://github.com/Kimundi/rustc-version-rs) from 0.2.3 to 0.4.0.
- [Release notes](https://github.com/Kimundi/rustc-version-rs/releases)
- [Commits](https://github.com/Kimundi/rustc-version-rs/compare/v0.2.3...v0.4.0)

---
updated-dependencies:
- dependency-name: rustc_version
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* Make versions consistent

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-06-09 16:57:39 +00:00
dependabot[bot] a8d4b6d363
chore:(deps): bump @types/react-dom from 17.0.6 to 17.0.7 in /explorer (#17856)
Bumps [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) from 17.0.6 to 17.0.7.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

---
updated-dependencies:
- dependency-name: "@types/react-dom"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-09 08:32:58 +00:00
Dmitri Makarov d7a0fd8afa
Print commands output in cargo-build-bpf if verbose option is set (#17845) 2021-06-08 20:55:33 +00:00
Jeff Washington (jwash) 576e3d95f7
refactor: create type (#17818) 2021-06-08 14:49:08 -06:00
Jeff Washington (jwash) 2a9b127029
Pass iterator for SortedStorages::new_with_slots (#17811)
Co-authored-by: Carl Lin <carl@solana.com>
2021-06-08 13:59:50 -06:00
Jeff Washington (jwash) 01ef2a5c4a
test: simple CalculateHashIntermediate refactoring (#17813) 2021-06-08 13:54:10 -06:00
Alfonso Subiotto Marques 7ee5b02bc5 Put is_x86_feature_detected behind a target_arch check
This change adds a target arch check so that cargo build can be run from an
Apple M1 mac.
2021-06-08 12:09:34 -07:00
Alfonso Subiotto Marques 8a9b7f5ef2 Disable reed-solomon-erasure/simd-accel feature on aarch64 (Apple M1)
This feature requires clang to support -march=native on M1. Before this change,
cargo build would output a build error when building for aarch64.
2021-06-08 12:09:34 -07:00
Michael Vines 193813d49a Add more info about how to safely change the identity of a staked validator 2021-06-08 12:08:15 -07:00
Michael Vines e5e7390d44 Wrap long lines 2021-06-08 12:05:29 -07:00
dependabot[bot] 5c72fef85a
chore: bump signal-hook from 0.1.15 to 0.2.3 (#17827)
Bumps [signal-hook](https://github.com/vorner/signal-hook) from 0.1.15 to 0.2.3.
- [Release notes](https://github.com/vorner/signal-hook/releases)
- [Changelog](https://github.com/vorner/signal-hook/blob/v0.2.3/CHANGELOG.md)
- [Commits](https://github.com/vorner/signal-hook/compare/v0.1.15...v0.2.3)

---
updated-dependencies:
- dependency-name: signal-hook
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-08 12:12:17 -06:00
Arthur Greef 28fdfed1ba
Blake3 syscall (#17358) 2021-06-08 11:04:10 -07:00
Tyera Eulberg 7b58dcac14
chore: update commented devnet urls (#17837) 2021-06-08 15:58:34 +00:00
Tyera Eulberg 2dfb5b7579
Update a dangling devnet endpoint doc (#17836) 2021-06-08 15:57:25 +00:00
dependabot[bot] 03f4eb3ed1
chore: bump hex from 0.4.2 to 0.4.3 (#17829)
* chore: bump hex from 0.4.2 to 0.4.3

Bumps [hex](https://github.com/KokaKiwi/rust-hex) from 0.4.2 to 0.4.3.
- [Release notes](https://github.com/KokaKiwi/rust-hex/releases)
- [Commits](https://github.com/KokaKiwi/rust-hex/compare/v0.4.2...v0.4.3)

---
updated-dependencies:
- dependency-name: hex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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>
2021-06-08 09:34:04 -06:00
Jeff Washington (jwash) 58fe1d0764
add min to roots_tracker (#17806) 2021-06-08 08:32:16 -06:00
Dmitri Makarov 6f193bf357 Add separate rules to generate dependencies files for C BPF build 2021-06-08 05:34:40 -07:00
dependabot[bot] 86850ceac4
chore:(deps): bump @types/node from 15.12.1 to 15.12.2 in /explorer (#17830)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 15.12.1 to 15.12.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-08 09:28:48 +00:00
dependabot[bot] 6964bf0a8c
chore:(deps): bump @solana/spl-token-registry in /explorer (#17828)
Bumps [@solana/spl-token-registry](https://github.com/solana-labs/token-list) from 0.2.121 to 0.2.123.
- [Release notes](https://github.com/solana-labs/token-list/releases)
- [Changelog](https://github.com/solana-labs/token-list/blob/main/CHANGELOG.md)
- [Commits](https://github.com/solana-labs/token-list/compare/v0.2.121...v0.2.123)

---
updated-dependencies:
- dependency-name: "@solana/spl-token-registry"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-08 08:15:39 +00:00
Govlzkoy e0ab5ee4f8
update dependence version for gag to latest support windows (#17801)
* update dependence version for gag to leatest support windows

* fix compile on windows

* add Cargo.lock
2021-06-07 23:17:16 -07:00
dependabot[bot] de9012ce36
chore: bump @types/node from 15.12.1 to 15.12.2 in /web3.js (#17821)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 15.12.1 to 15.12.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-08 01:22:23 +00:00
Tyera Eulberg a66566e75b
Remove budget program (#17816) 2021-06-08 01:20:17 +00:00
dependabot[bot] e76c275867
chore: bump rollup from 2.50.6 to 2.51.0 in /web3.js (#17820)
Bumps [rollup](https://github.com/rollup/rollup) from 2.50.6 to 2.51.0.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v2.50.6...v2.51.0)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-08 01:02:46 +00:00
dependabot[bot] 18434f17fe
chore: bump @typescript-eslint/parser from 4.26.0 to 4.26.1 in /web3.js (#17819)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.26.0 to 4.26.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.26.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-08 00:41:42 +00:00
dependabot[bot] f1ba5c509c
chore: bump start-server-and-test from 1.12.4 to 1.12.5 in /web3.js (#17817)
Bumps [start-server-and-test](https://github.com/bahmutov/start-server-and-test) from 1.12.4 to 1.12.5.
- [Release notes](https://github.com/bahmutov/start-server-and-test/releases)
- [Commits](https://github.com/bahmutov/start-server-and-test/compare/v1.12.4...v1.12.5)

---
updated-dependencies:
- dependency-name: start-server-and-test
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-08 00:18:26 +00:00
dependabot[bot] 7f8252fa07
chore: bump @typescript-eslint/eslint-plugin in /web3.js (#17815)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.26.0 to 4.26.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.26.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-07 23:37:06 +00:00
dependabot[bot] 165a99f48f
chore: bump prettier from 2.3.0 to 2.3.1 in /web3.js (#17814)
Bumps [prettier](https://github.com/prettier/prettier) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.3.0...2.3.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-07 22:59:17 +00:00
dependabot[bot] 8d978a35d2
chore:(deps): bump @solana/web3.js from 1.16.1 to 1.17.0 in /explorer (#17788)
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 1.16.1 to 1.17.0.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Changelog](https://github.com/solana-labs/solana-web3.js/blob/master/.releaserc.json)
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v1.16.1...v1.17.0)

---
updated-dependencies:
- dependency-name: "@solana/web3.js"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-07 15:45:30 -07:00
dependabot[bot] d5613899d9
chore: bump @types/node from 15.12.0 to 15.12.1 in /web3.js (#17786)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 15.12.0 to 15.12.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-07 15:45:21 -07:00
dependabot[bot] cb086ae492
chore: bump borsh from 0.8.1 to 0.9.0 (#17780)
* chore: bump borsh from 0.8.1 to 0.9.0

Bumps [borsh](https://github.com/near/borsh-rs) from 0.8.1 to 0.9.0.
- [Release notes](https://github.com/near/borsh-rs/releases)
- [Changelog](https://github.com/near/borsh-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/near/borsh-rs/compare/v0.8.1...v0.9.0)

---
updated-dependencies:
- dependency-name: borsh
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* Clean bump and cargo-for-all-lock-files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-06-07 21:11:38 +00:00
behzad nouri cab30e2356
parallelizes gossip packets receiver with processing of requests (#17647)
Gossip packet processing is composed of two stages:
  * The first is consuming packets from the socket, deserializing,
    sanitizing and verifying them:
    https://github.com/solana-labs/solana/blob/7f0349b29/gossip/src/cluster_info.rs#L2510-L2521
  * The second is actually processing the requests/messages:
    https://github.com/solana-labs/solana/blob/7f0349b29/gossip/src/cluster_info.rs#L2585-L2605

The former does not acquire any locks and so can be parallelized with
the later, allowing better pipelineing properties and smaller latency in
responding to gossip requests or propagating messages.
2021-06-07 18:36:06 +00:00
Tyera Eulberg 2e998ed11d
Bump jsonrpc crates (#17797)
* Bump jsonrpc crates

* Update error text

* gitignore for rpc
2021-06-07 18:03:20 +00:00
Jeff Washington (jwash) 817d48be21
binary search in slices for hashing (#17755) 2021-06-07 12:09:17 -05:00
Dmitri Makarov 910ac94a8c
Fix handling of stale links to bpf-tools in cargo-build-bpf (#17772) 2021-06-07 16:26:01 +00:00
dependabot[bot] 0a24cff30e
chore: bump tokio-stream from 0.1.2 to 0.1.6 (#17784)
* chore: bump tokio-stream from 0.1.2 to 0.1.6

Bumps [tokio-stream](https://github.com/tokio-rs/tokio) from 0.1.2 to 0.1.6.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-stream-0.1.2...tokio-stream-0.1.6)

---
updated-dependencies:
- dependency-name: tokio-stream
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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>
2021-06-07 09:44:50 -06:00
dependabot[bot] 43b8d98055
chore: bump generic-array from 0.14.3 to 0.14.4 (#17782)
* chore: bump generic-array from 0.14.3 to 0.14.4

Bumps [generic-array](https://github.com/fizyk20/generic-array) from 0.14.3 to 0.14.4.
- [Release notes](https://github.com/fizyk20/generic-array/releases)
- [Changelog](https://github.com/fizyk20/generic-array/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fizyk20/generic-array/compare/0.14.3...0.14.4)

---
updated-dependencies:
- dependency-name: generic-array
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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>
2021-06-07 09:06:34 -06:00
Jeff Washington (jwash) b5bb91b50f
rework hash calculation to not keep slot and write version (#17685)
* rework hash calculation to not keep slot and write version

* refactor functions and add tests

* always use multiple slot code path
2021-06-07 09:01:16 -05:00
dependabot[bot] 60024d13c9
chore:(deps): bump @solana/spl-token-registry in /explorer (#17783)
Bumps [@solana/spl-token-registry](https://github.com/solana-labs/token-list) from 0.2.120 to 0.2.121.
- [Release notes](https://github.com/solana-labs/token-list/releases)
- [Changelog](https://github.com/solana-labs/token-list/blob/main/CHANGELOG.md)
- [Commits](https://github.com/solana-labs/token-list/compare/v0.2.120...v0.2.121)

---
updated-dependencies:
- dependency-name: "@solana/spl-token-registry"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-07 09:27:28 +00:00
dependabot[bot] d94942a31f
chore:(deps): bump @types/node from 15.12.0 to 15.12.1 in /explorer (#17781)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 15.12.0 to 15.12.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-07 09:23:14 +00:00
Justin Starry 18ec6756e4
docs: add airdrop example (#17770) 2021-06-06 12:20:14 -07:00