Commit Graph

11989 Commits

Author SHA1 Message Date
bc334427e3 stake: Don't pay out rewards for epochs where inflation was not enabled (#13745)
(cherry picked from commit 13aa38d307)

Co-authored-by: Trent Nelson <trent@solana.com>
2020-11-21 05:41:53 +00:00
d0cac2a2ea Prevent scans on unrooted slots from seeing partial clean (#13628) (#13741)
Co-authored-by: Carl Lin <carl@solana.com>
(cherry picked from commit 791fb17437)

Co-authored-by: carllin <wumu727@gmail.com>
2020-11-20 22:14:51 +00:00
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
f5ef999b31 Snapshot archives are now cleaned up when --snapshot-compression none is used (#13733)
(cherry picked from commit 11e92f0c9f)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-11-20 17:54:27 +00:00
55d5339daa --vote-account doesn't support ASK but --authorized-voter does (#13731)
(cherry picked from commit 8808a74593)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-11-20 15:24:36 +00:00
594b69395a Cleanup (#13728) (#13729)
Co-authored-by: Carl Lin <carl@solana.com>
(cherry picked from commit 9bb11a2dcc)

Co-authored-by: carllin <wumu727@gmail.com>
2020-11-20 12:57:40 +00:00
6dc62bfb77 Fix fragile tests in prep of stake rewrite pr (#13654) (#13721)
* Fix fragile tests in prep of stake rewrite pr

* Restore BOOTSTRAP_VALIDATOR_LAMPORTS where appropriate

* Further clean up

* Further clean up

* Aligh with other call site change

* Remove false warn!

* fix ci!

(cherry picked from commit b74d7b5758)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-11-20 09:34:46 +00:00
08b53c0963 Use info for failed to match slot vote error (#13715) (#13720)
(cherry picked from commit 2cb006fa44)

Co-authored-by: sakridge <sakridge@gmail.com>
2020-11-20 01:34:42 +00:00
b5baa966ac Fix avx check with newest nightly compiler (#13465) (#13719)
(cherry picked from commit c644b05c54)

Co-authored-by: sakridge <sakridge@gmail.com>
2020-11-20 01:23:16 +00:00
ff38a46af6 sanitizes bloom filters to avoid division by zero (#13714) (#13718)
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 01:07:30 +00:00
841f596b26 Document get_account() gotcha (#13713)
(cherry picked from commit f9acbd6e3f)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-11-19 23:21:43 +00:00
5e1497856b Add SPL Feature Proposal program (#13683)
(cherry picked from commit 9d75b82840)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-11-19 23:04:38 +00:00
e085b580b5 makes crds fields private (#13703) (#13708)
Crds fields should maintain several invariants between themselves, so
exposing them as public fields can be bug prone. In addition these
invariants are asserted on every write:
https://github.com/solana-labs/solana/blob/9668dd85d/core/src/crds.rs#L138-L154
https://github.com/solana-labs/solana/blob/9668dd85d/core/src/crds.rs#L239-L262
which adds extra instructions and is not optimal. Should these fields be
private the asserts will be redundant.

(cherry picked from commit b58f69297f)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2020-11-19 22:26:28 +00:00
d967ff0138 Allow GNUSparse for genesis.bin (#13704) (#13707)
(cherry picked from commit 397cf726fc)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-11-19 21:57:12 +00:00
71e3a99742 fix doc redirects (#13709) (#13710)
(cherry picked from commit af08ba93e6)

Co-authored-by: Jack May <jack@solana.com>
2020-11-19 21:41:23 +00:00
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
8d904877ef fix rust example section link (#13701) (#13702)
(cherry picked from commit 9668dd85d4)

Co-authored-by: Jack May <jack@solana.com>
2020-11-19 18:14:42 +00:00
fbe4e95e6a breaks prunes data into chunks to fit into packets (#13613) (#13698)
Validator logs show that prune messages are dropped because they exceed
packet data size:
https://github.com/solana-labs/solana/blob/f25c969ad/perf/src/packet.rs#L90-L92
This can exacerbate gossip traffic by redundantly increasing push
messages across network. The workaround is to break prunes into smaller
chunks and send over in multiple messages.

(cherry picked from commit 1ffab5de77)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2020-11-19 17:53:03 +00:00
e7e7cbe632 v1.4: Distribute spl tokens (#13688)
* Add helpers to covert between sdk types

* Add distribute-spl-tokens to args and arg-parsing

* Build spl-token transfer-checked instructions

* Check spl-token balances properly

* Add display handling to support spl-token

* Small refactor to allow failures in allocation iter

* Use Associated Token Account for spl-token distributions

* Add spl token support to balances command

* Update readme

* Add spl-token tests

* Rename spl-tokens file

* Move a couple more things out of commands

* Stop requiring lockup_date heading for non-stake distributions

* Adjust solana_rbpf log level up in coverage

* Use epsilon for allocation retention
2020-11-19 10:32:27 -07:00
7e5b75fa7e Check for overflow in rent partition calculation (#13569) (#13696)
Co-authored-by: Carl Lin <carl@solana.com>
(cherry picked from commit 110acd20dc)

Co-authored-by: carllin <wumu727@gmail.com>
2020-11-19 13:41:48 +00:00
60beb509f7 Prevent scans from seeing root updates/clean (#13464) (#13686)
Co-authored-by: Carl Lin <carl@solana.com>
(cherry picked from commit 6276360468)

Co-authored-by: carllin <wumu727@gmail.com>
2020-11-19 07:11:59 +00:00
15f6b6ccd6 RPC: Demote missing block error to warning (#13685)
It frightens the tourists

(cherry picked from commit f2a1a0ac5c)

Co-authored-by: Trent Nelson <trent@solana.com>
2020-11-19 07:05:32 +00:00
f56f3d81b5 audit: Ignore RUSTSEC-2020-0071, potential SEGV in time 2020-11-18 22:28:41 -07:00
098c94352d Fix doc proposal sidebar layout (#13675) (#13677)
(cherry picked from commit 13a08c7f08)

Co-authored-by: Jack May <jack@solana.com>
2020-11-18 22:29:04 +00:00
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
80f2c485ba Recommend --no-port-check to improve validator restart time (#13667)
(cherry picked from commit 31d2f445a2)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-11-18 17:32:47 +00:00
f855f4d1c0 Update development docs (#13661) 2020-11-18 09:27:11 +00:00
81a26aa4fc solana-tokens: Add real --version (bp #13659) (#13660)
* Add real --version

(cherry picked from commit 78dc334afe)

# Conflicts:
#	Cargo.lock
#	tokens/Cargo.toml

* Update Cargo.toml

* Update Cargo.lock

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-11-18 03:25:05 +00:00
855cf9a362 Bump version to 1.4.10 (#13657) 2020-11-18 01:29:58 +00:00
96ba314281 Bump rbpf to v0.1.33 (#13643) 2020-11-17 16:00:20 -08:00
e52e6dfbaa v1.4: Improve monitoring of timestamp correction and bounding (#13655)
* Include rejuvenated field in Clock parsing

* Expand timestamp-correction logging info
v1.4.9
2020-11-17 14:46:30 -07:00
181ff3d13e Update Initialized split rent-exempt value (#13646) (#13653)
(cherry picked from commit 39932d7664)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-11-17 20:43:30 +00:00
195ce0ed79 Remove overflow opportunities (#13649) (#13651)
(cherry picked from commit a7bed62af0)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-11-17 20:26:06 +00:00
b24e301201 helloworld no longer supports program feature (#13645) (#13648)
(cherry picked from commit df1f53950e)

Co-authored-by: Jack May <jack@solana.com>
2020-11-17 18:08:48 +00:00
fb492efda8 Add RpcClient::new_with_commitment()
(cherry picked from commit c5299b60ed)
2020-11-17 09:14:25 -08:00
c40216350c Add back BPF error logging (#13633) (#13639)
* Add back BPF error logging

* Update programs/bpf_loader/src/lib.rs

Co-authored-by: Michael Vines <mvines@gmail.com>
(cherry picked from commit 3a9dca0c67)

Co-authored-by: Jack May <jack@solana.com>
2020-11-17 09:33:58 +00:00
d031bbcf2e Quiet notification logs when no subscriptions (#13629) (#13637)
(cherry picked from commit 3e4acba72f)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-11-17 08:26:15 +00:00
c183c3a5ec Improve TestValidator instantiation (bp #13627) (#13635)
* 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

* Fix conflict

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2020-11-17 01:08:58 -07:00
f04d4af4f2 Default preflight_commitment to confirmation commitment (#13632)
(cherry picked from commit c2f77a3473)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-11-17 07:31:35 +00:00
ea0a3521ed Fix assertion failure (#13626) (#13631)
Co-authored-by: Carl Lin <carl@solana.com>
(cherry picked from commit afc1b59475)

Co-authored-by: carllin <wumu727@gmail.com>
2020-11-17 07:01:10 +00:00
a75898a415 Remove program cap from CLI checks (bp #13617) (#13622)
* Remove program cap from CLI checks (#13617)

(cherry picked from commit 64a3cf03e2)

# Conflicts:
#	cli/src/cli.rs

* Fix conflict

Co-authored-by: Jack May <jack@solana.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2020-11-17 05:23:32 +00:00
a77fce465a run.sh: Use default client keypair for the faucet (bp #13614) (#13618)
* Use default client keypair if --keypair argument is not provided

(cherry picked from commit e9e5ee4362)

# Conflicts:
#	faucet/Cargo.toml

* Use default client keypair if --faucet-keypair is not provided

(cherry picked from commit 4069e7b663)

# Conflicts:
#	genesis/Cargo.toml

* Cargo.lock

(cherry picked from commit ab5814cd90)

# Conflicts:
#	Cargo.lock

* Use default client keypair for faucet to avoid the need for airdrops

(cherry picked from commit b5820f9325)

* Fix conflicts

Co-authored-by: Michael Vines <mvines@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2020-11-17 02:23:01 +00:00
719f162229 Reject faked stake/vote accounts in stake mgmt. (#13615) (#13621)
* Reject faked stake/vote accounts in stake mgmt.

* Use clearer name

(cherry picked from commit 2b3faa1947)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-11-16 23:19:54 +00:00
a39cc8d21f Build more of the SPL repo in CI (#13619)
(cherry picked from commit e5f4442325)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-11-16 20:56:23 +00:00
87767b181d Document feature-set field in getVersion 2020-11-15 18:03:06 -08:00
88b19e10cb ledger-tool cap: delegation owner and stake v2 flag (#13602) (#13607)
* Output delegation owner as well

* Add --enable-stake-program-v2

* Small cleanup and add sanity assertion

* Fix typo...

(cherry picked from commit bcd303a447)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-11-15 20:55:14 +00:00
b42cda32ff packs more crds-values in a single gossip packet (#13500) (#13604)
split_gossip_messages:
https://github.com/solana-labs/solana/blob/a97c04b40/core/src/cluster_info.rs#L1536-L1574
splits crds-values into chunks to fit into a gossip packet. However it is
using a global upper-bound for the header-size across all protocols:
https://github.com/solana-labs/solana/blob/a97c04b40/core/src/cluster_info.rs#L90-L93
This can be wasteful as the specific gossip protocol can have smaller
header than this upper-bound (e.g. Protocol::PushMessage is 170 bytes
smaller). Adding more crds-values in one gossip packet can avoid the
overheads of separate packets and reduce total number of bytes sent over
the wire.

This commit updates the splitting function to take a max-chunk-size
argument. At call-site, this value is set to the size of the protocol
which the values are sent over.

(cherry picked from commit 5e8490ab9d)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2020-11-15 19:49:18 +00:00
2344391c48 indexes nodes' contact infos in crds table (#13553) (#13601)
In several places in gossip code, the entire crds table is scanned only
to filter out nodes' contact infos. Currently on mainnet, crds table is
of size ~70k, while there are only ~470 nodes. So the full table scan is
inefficient. Instead we may maintain an index of only nodes' contact
infos.

(cherry picked from commit cbea9ebc34)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2020-11-15 17:58:39 +00:00
207d13e429 Disable the PubSub vote subscription by default (#13600)
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 22:06:38 +00:00
360f166f5a Add counter metrics to rpc-subscriptions (#13596) (#13598)
(cherry picked from commit 88ae321d3f)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-11-14 21:09:43 +00:00