Commit Graph

11386 Commits

Author SHA1 Message Date
db3f154b3f Fix nonces (#13800)
Co-authored-by: Trent Nelson <trent@solana.com>
2020-11-24 23:54:02 -08:00
b0e5da40a9 Add stake calculation tests with inflation/slashing (#13605) (#13797)
* Add stake calculation tests with inflation/slashing

* Clean up the test

(cherry picked from commit 42421e77a9)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-11-25 04:59:20 +00:00
0c2433d796 Cap split stake at source stake when splitting entire balance (#13754) (#13765)
(cherry picked from commit f0f99ffc7e)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-11-23 18:23:58 +00:00
de03a5092d ledger-tool cap: output credits_observed (#13746) (#13747)
(cherry picked from commit 3bc7d85986)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-11-21 17:31:03 +00:00
fd39a09eae stake: Don't pay out rewards for epochs where inflation was not enabled (#13744)
(cherry picked from commit 13aa38d307)

Co-authored-by: Trent Nelson <trent@solana.com>
2020-11-21 05:28:08 +00:00
0ad7b64961 sanitizes bloom filters to avoid division by zero (#13714) (#13717)
Pull requests received over the wire can cause a validator to panic
because of division by zero in bloom filters:
https://github.com/solana-labs/solana/blob/af08ba93e/runtime/src/bloom.rs#L86-L88

(cherry picked from commit a8c29505f0)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2020-11-20 00:53:23 +00:00
c9d6fde7cf Allow GNUSparse for genesis.bin (#13704) (#13706)
(cherry picked from commit 397cf726fc)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-11-19 21:47:13 +00:00
4462eabd8c Check for overflow in rent partition calculation (#13569) (#13695)
Co-authored-by: Carl Lin <carl@solana.com>
(cherry picked from commit 110acd20dc)

Co-authored-by: carllin <wumu727@gmail.com>
2020-11-19 13:28:16 +00:00
e675ef85ce RPC: Demote missing block error to warning (#13684)
It frightens the tourists

(cherry picked from commit f2a1a0ac5c)

Co-authored-by: Trent Nelson <trent@solana.com>
2020-11-19 06:57:08 +00:00
1f693c5925 audit: Ignore RUSTSEC-2020-0071, potential SEGV in time 2020-11-18 22:30:28 -07:00
fc20597cbc Update Initialized split rent-exempt value (#13646) (#13652)
(cherry picked from commit 39932d7664)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-11-17 20:34:07 +00:00
0aab403cbc Remove overflow opportunities (#13649) (#13650)
(cherry picked from commit a7bed62af0)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-11-17 20:15:43 +00:00
b0523dc236 Fix assertion failure (#13626) (#13630)
Co-authored-by: Carl Lin <carl@solana.com>
(cherry picked from commit afc1b59475)

Co-authored-by: carllin <wumu727@gmail.com>
2020-11-17 09:33:02 +00:00
02d36d0be0 Quiet notification logs when no subscriptions (#13629) (#13636)
(cherry picked from commit 3e4acba72f)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-11-17 08:22:12 +00:00
b1e8e8a966 Improve TestValidator instantiation (bp #13627) (#13634)
* Improve TestValidator instantiation (#13627)

* Add TestValidator::new_with_fees constructor, and warning for low bootstrap_validator_lamports

* Add logging to solana-tokens integration test to help catch low bootstrap_validator_lamports in the future

* Reasonable TestValidator mint_lamports

(cherry picked from commit ef99689592)

# Conflicts:
#	tokens/Cargo.toml
#	tokens/tests/commands.rs

* Fix conflicts

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2020-11-17 01:08:36 -07:00
e12cb457fb Reject faked stake/vote accounts in stake mgmt. (bp #13615) (#13620)
* Reject faked stake/vote accounts in stake mgmt. (#13615)

* Reject faked stake/vote accounts in stake mgmt.

* Use clearer name

(cherry picked from commit 2b3faa1947)

# Conflicts:
#	programs/stake/src/stake_instruction.rs

* Fix conflict

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-11-16 22:05:31 +00:00
29ac8f5164 ledger-tool cap: delegation owner and stake v2 flag (bp #13602) (#13606)
* 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...

(cherry picked from commit bcd303a447)

* Fix compilation error

* rustfmt

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-11-16 01:33:04 +00:00
c6818f8faf Disable the PubSub vote subscription by default (#13599)
The --rpc-pubsub-enable-vote-subscription flag may be used to enable it.
The current vote subscription is problematic because it emits a
notification for *every* vote, so hundreds a second in a real cluster.
Critically it's also missing information about *who* is voting,
rendering all those notifications practically useless.

Until these two issues can be resolved, the vote subscription is not
much more than a potential DoS vector.

(cherry picked from commit 5d72e52ad0)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-11-14 21:51:15 +00:00
965e6dfc9a Add counter metrics to rpc-subscriptions (#13596) (#13597)
(cherry picked from commit 88ae321d3f)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-11-14 20:53:38 +00:00
41eab22117 Send pubsub metrics to metrics server (#13584) (#13585)
(cherry picked from commit 34bf80ba9c)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-11-13 20:44:59 +00:00
ea2daf0cfa Bump version to 1.3.22 2020-11-13 18:03:30 +00:00
5a61827702 Fix overflow in entry tick verification (bp #13572) (#13580)
* Fix overflow in entry hash count verification

(cherry picked from commit d611337394)

* clippy

(cherry picked from commit 01a4889b53)

Co-authored-by: Justin Starry <justin@solana.com>
v1.3.21
2020-11-13 16:33:03 +00:00
a997c723b5 Small cleaning update_epoch_stakes (#13576) (#13577)
(cherry picked from commit c97a7d1105)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-11-13 12:28:51 +00:00
8b026ba829 ip-echo-server: Don't use framed decoder, it can't be read-limited (#13570)
(cherry picked from commit 6dc735e996)

Co-authored-by: Trent Nelson <trent@solana.com>
2020-11-13 09:16:06 +00:00
05f2b64a6a --gossip-host may now be specified with --entrypoint (#13566)
(cherry picked from commit 328f59ebef)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-11-13 07:32:16 +00:00
e341a0b0f2 fix bpf lddw check (#13554) (#13557)
(cherry picked from commit 30ef53cb13)

Co-authored-by: Jack May <jack@solana.com>
2020-11-12 22:25:33 +00:00
51a48ae507 Bound ip-echo-server reply read (bp #13543) (#13545)
* ip-echo-server: Name the header length magic number

(cherry picked from commit aab5f24518)

* ip-echo-server: Add helper to compute reply length

(cherry picked from commit 7481ba5618)

* ip-echo-server: Limit socket read to expected reply length

(cherry picked from commit d2cfeb31b9)

Co-authored-by: Trent Nelson <trent@solana.com>
2020-11-12 07:03:28 +00:00
b34895db37 Fix slow/stuck unstaking due to toggling in epoch (bp #13501) (#13534)
* Fix slow/stuck unstaking due to toggling in epoch (#13501)

* Fix slow/stuck unstaking due to toggling in epoch

* nits

* nits

* Add stake_program_v2 feature status check to cli

Co-authored-by: Tyera Eulberg <tyera@solana.com>
(cherry picked from commit 89b474e192)

* Fix conflict

* PartialEq<Vec<T>> is not impl for &[T] on rust v1.45.1

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2020-11-12 01:20:52 +00:00
3e6398caec Validator: Periodically log what we're waiting for during --wait-for-supermajority (#13530)
(cherry picked from commit 38f15e41b5)

Co-authored-by: Trent Nelson <trent@solana.com>
2020-11-11 21:18:00 +00:00
b9555116ec Increment version to v1.3.21 (#13528) 2020-11-11 19:30:46 +00:00
81a4769de7 Fix parsing CreateAccountWithSeed instructions (#13513) (#13516)
* 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>
v1.3.20
2020-11-11 01:01:38 +00:00
9ee741e021 watchtower: Fix all clear duration message (#13509)
(cherry picked from commit 2a96e722b4)

Co-authored-by: Justin Starry <justin@solana.com>
2020-11-10 19:01:13 +00:00
74c228a9d4 Bump SPL Token version fetched for localnet (bp #13490) (#13505)
* Bump token version fetched for localnet (#13490)

(cherry picked from commit 3282334741)

# Conflicts:
#	fetch-spl.sh

* Fix conflict, ie bump loader to be consistent with devnet/mainnet-beta

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2020-11-10 18:03:53 +00:00
320140fe8e Fix signature access (#13491) (#13502)
(cherry picked from commit 70c4626efe)

Co-authored-by: sakridge <sakridge@gmail.com>
2020-11-10 18:03:10 +00:00
dfcd0c41ec Make testnet section less ambiguous (#13504) (#13507)
(cherry picked from commit 599dae8f09)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-11-10 17:12:52 +00:00
d217ea2afc Clean up Delegation::stake_activating_and_deactivating (#13471) (#13472)
(cherry picked from commit 5306eb93cc)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-11-09 09:52:34 +00:00
553209f64c Clean up Delegation::stake_and_activating (#13460) (#13468)
(cherry picked from commit 737d3e376d)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-11-08 09:31:14 +00:00
4fcf19e414 Output more inflation calc details in ledger-tool (bp #13345) (#13466)
* Output more inflation calc details in ledger-tool (#13345)

* Output more inflation calc details in ledger-tool

* Fix broken ci...

* Rename confusing variables

* Fix panic by wrapping PointValue with Opiton...

* Minor modifications

* Remove explict needless flush; Drop already does

* Yet another csv field adjustments

* Add data_size and rename epochs to earned_epochs

* Introduce null_tracer

* Unwrap Option in new_from_parent_with_tracer

* Don't shorten identifiers

* Allow irrefutable_let_patterns temporalily

* More null_tracer

* More field adjustments

(cherry picked from commit a81e7e7749)

# Conflicts:
#	runtime/src/bank.rs

* Fix conflict

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-11-08 09:03:09 +00:00
e57e632870 Add builtin mem tests (bp #13429) (#13436)
* Add builtin mem tests (#13429)


(cherry picked from commit 84b139cc94)

* resolve crate version

* port to v1.3 conventions

* nudge

Co-authored-by: Jack May <jack@solana.com>
2020-11-07 01:23:14 +00:00
20678cf5ef Fix stake split rent-exempt adjustment (#13357) (#13452)
* 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 21:55:08 +00:00
0a05bbca2f Fix stake redelegate (bp #13358) (#13449)
* stake: Add redelegation failing test

(cherry picked from commit 491ad59d2e)

* stake: Consider withdraws we redelegating

(cherry picked from commit fe1e08b9ad)

Co-authored-by: Trent Nelson <trent@solana.com>
2020-11-06 20:27:06 +00:00
ab7dff16a2 Feature-gate stake program (bp #13394) (#13438)
* Feature-gate stake program (#13394)

* 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)

# Conflicts:
#	runtime/src/builtins.rs
#	runtime/src/feature_set.rs

* Fix conflicts

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2020-11-06 14:00:37 +00:00
5e16e80993 CI: Check monorepo for consistent crate versions (bp #13431) (#13432)
* increment-cargo-version.sh: Add check subcommand

(cherry picked from commit 5d4015358a)

* CI: Check monorepo for consistent crate versions

(cherry picked from commit 7a4e293b3b)

Co-authored-by: Trent Nelson <trent@solana.com>
2020-11-06 02:27:51 +00:00
a388b5a356 docs: Clarify the commitment levels based on questions (#13387) (#13425)
* Clarify the commitment levels based on questions

Many people have asked about what commitment levels mean, and which to
choose.  This update includes some of the language at
`sdk/src/commitment_config.rs` and a recommendation for different use
cases.

Additionally, the preflight commitment documentation was out of date,
specifying that "max" was always used, and this is no longer the case.

* Update docs/src/developing/clients/jsonrpc-api.md

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

* Update docs/src/developing/clients/jsonrpc-api.md

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

* Update docs/src/developing/clients/jsonrpc-api.md

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

* Fix typo

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
(cherry picked from commit ede891a6c6)

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2020-11-05 19:38:59 +00:00
ef776c0a0e Allow feature builtins to overwrite existing builtins (bp #13403) (#13419)
* Allow feature builtins to overwrite existing builtins (#13403)

* Allow feature builtins to overwrite existing builtins

* Add feature_builtin ActivationType

* Correctly retain idempotent for replacing case

* Fix test

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
(cherry picked from commit bc62313c66)

# Conflicts:
#	ledger/src/builtins.rs
#	runtime/src/bank.rs

* Fix conflicts

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2020-11-05 17:53:03 +00:00
a899d75d2d Fix duplicate records of inner instructions (#13380) (#13412)
* Fix duplicate records of inner instructions

* fix tests

* fix clippy

* Remove bad_inner_instructions

(cherry picked from commit c24fbb6f8b)

Co-authored-by: Justin Starry <justin@solana.com>
2020-11-05 08:44:16 +00:00
27733bb4d7 Bump low end validator RAM requirement (#13406) 2020-11-05 15:24:26 +08:00
0b9c87b6ec Docs: Clarify validator disk requirements 2020-11-05 15:24:26 +08:00
df1e62f23f Update docs to latest processors (#11613) 2020-11-05 15:24:26 +08:00
f697a86d1e Comment Stakes::clone_with_epoch (#13388) (#13389)
(cherry picked from commit b0d1ae1d8b)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-11-04 13:49:48 +00:00