Commit Graph

17046 Commits

Author SHA1 Message Date
781609b27a uses sendmmsg in streamer (backport #23062) (#23080)
* uses sendmmsg in streamer (#23062)

packet::send_to sends packets one by one:
https://github.com/solana-labs/solana/blob/9213fcb11/streamer/src/packet.rs#L63-L75

sendmmsg uses a single system call for multiple messages:
https://github.com/solana-labs/solana/blob/9213fcb11/streamer/src/sendmmsg.rs#L94

(cherry picked from commit c078ca3fb3)

# Conflicts:
#	streamer/src/streamer.rs

* removes mergify merge conflicts

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
v1.9.6
2022-02-11 15:47:45 +00:00
5a5244ecf8 Add --full-rpc-api to run.sh (#23072) (#23079)
(cherry picked from commit 34443a238e)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2022-02-11 13:11:30 +00:00
2e60f95ab9 mention staking reward in getInflationReward doc (#23073) (#23074)
(cherry picked from commit 4bd6a231d2)

Co-authored-by: Anton <62949848+icepaq@users.noreply.github.com>
2022-02-11 04:21:29 +00:00
55179524bd Add deactivate-feature feature to test validator cli (#23041) (#23065)
Co-authored-by: Charlie You <charlie.you@hey.com>
2022-02-10 19:18:20 -08:00
4a0785ddcd Disable features programmatically in TestValidatorGenesis (#22860) (#23064)
* Supported starting test-validator and disabling features

* Enable starting test validator and removing feature accounts

* Enable deactivating feature accounts

* Enable deactivating feature accounts - updates per PR comments

* Enable deactivating feature accounts - updates per PR comments

* Added more verbosity when key for deactition is either not a Feature or not in genesis_config accounts

(cherry picked from commit 3c65fd7ba3)

Co-authored-by: Frank V. Castellucci <5435165+FrankC01@users.noreply.github.com>
2022-02-10 14:58:51 -08:00
4698fbc036 Move cap_accounts_data_len feature gate only around new error (#23048) (#23057)
(cherry picked from commit 0a1ab945bc)

Co-authored-by: Brooks Prumo <brooks@solana.com>
2022-02-10 20:41:15 +00:00
70f76b450e Add sbf-tools version to cargo target cache name on CI agents (#23027)
(cherry picked from commit c7aa7fb66b)

Co-authored-by: Dmitri Makarov <dmakarov@alumni.stanford.edu>
2022-02-09 22:24:04 +00:00
d64eebb799 estimate a program cost as 2 standard deviation above mean (backport #22286) (#23019)
* - estimate a program cost as 2 standard deviation above mean
- replaced get_average / get_mode with get_default to assign max units to unknown program

(cherry picked from commit a25ac1c988)

# Conflicts:
#	runtime/src/cost_model.rs

* use EMA in place of Welford

(cherry picked from commit 6587dbfa47)

* 1. Persist to blockstore less frequently;
2. reduce alpha for EMA to 1 percent to have roughly 200 data points for estimatio

(cherry picked from commit 7aa1fb4e24)

# Conflicts:
#	core/src/cost_update_service.rs
#	core/src/tvu.rs
#	runtime/src/cost_model.rs

* fix tests after merge

(cherry picked from commit ba2d83f580)

* fix merge

Co-authored-by: Tao Zhu <tao@solana.com>
2022-02-09 22:16:55 +00:00
71211e0d90 rebase 2022-02-09 10:44:09 -08:00
320fbd63c5 Prepare RPC subsystem for multiple SPL Token program ids
(cherry picked from commit 86d465c531)

# Conflicts:
#	rpc/src/rpc.rs
#	transaction-status/src/parse_instruction.rs
#	transaction-status/src/token_balances.rs
2022-02-09 10:44:09 -08:00
0fe00bab7d Return the accounts data len delta after processing messages (#22986) (#23023)
(cherry picked from commit 869cfc9a1c)

Co-authored-by: Brooks Prumo <brooks@solana.com>
2022-02-09 03:06:57 +00:00
00630d9c1b monitor: Remove getMaxRetransmitSlot RPC method usage
(cherry picked from commit dcd4ea9111)
2022-02-08 11:06:12 -08:00
d05b5b0902 Add get_processed_sibling_instruction syscall (#22859) (#22956) 2022-02-08 09:21:11 -08:00
5c69af607d Put accounts data len updates behind feature gate (#22918) (#23007)
(cherry picked from commit f0f4042680)

Co-authored-by: Brooks Prumo <brooks@solana.com>
2022-02-08 16:45:22 +00:00
df16a37ab5 bench should update leader schedule cache (#22991) (#22998)
(cherry picked from commit e52e48076e)

Co-authored-by: Tao Zhu <82401714+taozhu-chicago@users.noreply.github.com>
2022-02-08 15:05:57 +00:00
432eafd730 Search for consecutive ports (#22979) (#22984)
(cherry picked from commit 514aab46d9)

Co-authored-by: sakridge <sakridge@gmail.com>
2022-02-07 18:45:02 +00:00
41142a7d76 Optimize batching of transactions during replay for parallel processing (backport #22917) (#22982)
* Optimize batching of transactions during replay for parallel processing

(cherry picked from commit 4de14e530b)

* fix build

(cherry picked from commit dfef68f985)

* updates to address review feedback

(cherry picked from commit c5d8560cdb)

* suppress clippy

(cherry picked from commit a146f2d853)

Co-authored-by: Pankaj Garg <pankaj@solana.com>
2022-02-07 18:25:33 +00:00
8047601a7b Fix typo (#22973)
Fix typo

(cherry picked from commit eaf2df99c6)

Co-authored-by: wil-se <sebastiani.1753672@studenti.uniroma1.it>
2022-02-06 16:46:15 +00:00
85856a73aa Implement json output for solana ping (backport #22959) (#22968)
* Implement json output for solana ping (#22959)

(cherry picked from commit d2c89213ff)

# Conflicts:
#	cli/src/cluster_query.rs

* Fix conflicts

Co-authored-by: Tyera Eulberg <tyera@solana.com>
2022-02-05 23:42:33 +00:00
c3890ada8e Bumps solana_rbpf to version v0.2.23 (#22954) (#22961)
(cherry picked from commit e05cf4bf97)

Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net>
2022-02-05 13:08:29 +00:00
ceb253ce90 Bumps solana_rbpf to version v0.2.22 (#22923) (#22955)
* Bumps solana_rbpf to v0.2.22

* Adjusts vm::Config and feature gates.

(cherry picked from commit 96c88d1a5e)

Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net>
2022-02-05 11:16:22 +00:00
dd6c365bd9 Resolve conflicts (#22905)
Co-authored-by: carllin <carl@solana.com>
2022-02-05 06:47:18 +00:00
9ea025315e removes VoteTracker::new in favor of VoteTracker::default (#22941) (#22946)
VoteTracker::new does not need a bank and is so redundant:
https://github.com/solana-labs/solana/blob/5a230f418/core/src/cluster_info_vote_listener.rs#L103-L107
(cherry picked from commit 27aaf9df85)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2022-02-04 20:59:01 +00:00
c43cef79b5 Add quic port for accepting transactions (#22753) (#22937)
using quinn library

streamer: Sign TLS cert with validator identity key

Handle multiple incoming chunks

(cherry picked from commit 5a230f418d)

Co-authored-by: sakridge <sakridge@gmail.com>
2022-02-04 20:53:27 +00:00
2605724aa3 Bump bpf-tools to v1.23 (#22929)
(cherry picked from commit a9d9a5095b)

Co-authored-by: Dmitri Makarov <dmakarov@alumni.stanford.edu>
2022-02-04 04:14:25 +00:00
539f303eb7 Handle accounts data size changes due to rent-collected accounts (#22412) (#22919)
Co-authored-by: Brooks Prumo <brooks@solana.com>
2022-02-04 01:13:12 +00:00
f7091811d4 Allow buffered packets be consumed if bank is active, regardless leader schedule 2022-02-03 16:56:27 -06:00
15ef1827bf push live packets straight to buffer, leader only process packets from buffer 2022-02-03 16:56:27 -06:00
85fef67213 Refactor Rent::due() with RentDue enum (#22346) (#22921)
(cherry picked from commit d90d5ee9b6)

Co-authored-by: Brooks Prumo <brooks@solana.com>
2022-02-03 22:15:54 +00:00
90a70d9b5b Use lazy_rent_collection directly (#22410) (#22920)
(cherry picked from commit 9bc2592da1)

Co-authored-by: Brooks Prumo <brooks@solana.com>
2022-02-03 22:07:28 +00:00
643442e830 Reject close of active vote accounts (backport #22651) (#22896)
* Reject close of active vote accounts (#22651)

* 10461 Reject close of vote accounts unless it earned no credits in the previous epoch. This is checked by comparing current epoch (from clock sysvar) with the most recent epoch with credits in vote state.

(cherry picked from commit 75563f6c7b)

# Conflicts:
#	programs/vote/src/vote_processor.rs
#	sdk/src/feature_set.rs

* Resolve merge conflicts

Co-authored-by: Will Hickey <csu_hickey@yahoo.com>
Co-authored-by: Will Hickey <will.hickey@solana.com>
2022-02-03 19:59:07 +00:00
69e207ca58 rpc: use minimal mode by default (backport #22734) (#22879)
* rpc: use minimal mode by default

(cherry picked from commit eac4a6df68)

# Conflicts:
#	local-cluster/tests/local_cluster.rs

* test-validator-bin: reinstate full rpc method set

Co-authored-by: Trent Nelson <trent@solana.com>
2022-02-03 08:25:49 +00:00
fb8db79e63 adds reverse lookup index to cluster-nodes (#22892) (#22894)
retransmit has to exclude slot leader from set of nodes for each shred;
which currently requires a linear scan:
https://github.com/solana-labs/solana/blob/e3b137066/core/src/cluster_nodes.rs#L238-L242

This commit adds a reverse lookup index to avoid linear scan.

(cherry picked from commit dccbddad80)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2022-02-02 21:15:51 +00:00
237347847b caches WeightedShuffle struct in ClusterNodes (#22877) (#22889)
Instead of reconstructing WeightedShuffle struct for each shred
broadcast or retransmit, we can use the same struct with minimal
mutations.

(cherry picked from commit e3b137066d)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2022-02-02 16:54:57 +00:00
4706790c20 docs-ci: prebuild cli bin with output to appease TravisCI hang check (#22884)
(cherry picked from commit 2fda90e414)

Co-authored-by: Trent Nelson <trent@solana.com>
2022-02-02 09:00:48 +00:00
04281734e5 Cleanup serde snapshot common.rs (#22854) (#22863)
Co-authored-by: Brooks Prumo <brooks@solana.com>
2022-02-02 00:35:50 +00:00
a98ca9037d More serde snapshot cleanup (backport #22449) (#22872)
* More serde snapshot cleanup (#22449)

(cherry picked from commit 2756abce39)

# Conflicts:
#	runtime/src/serde_snapshot.rs
#	runtime/src/serde_snapshot/newer.rs

* fixup

Co-authored-by: Brooks Prumo <brooks@solana.com>
2022-02-01 22:25:04 +00:00
12e40a40f5 Cleanup serde snapshot's "future" to "newer" (backport #22431) (#22870)
* Refactor serde snapshot's "future" to "newer" (#22431)

(cherry picked from commit 9c3144e286)

# Conflicts:
#	runtime/src/serde_snapshot.rs

* fixup conflicts

* fixup remove unused use

Co-authored-by: Brooks Prumo <brooks@solana.com>
2022-02-01 19:03:02 +00:00
c715bc93cf removes Rng field from WeightedShuffle struct (#22850) (#22868)
(cherry picked from commit 45e09664b8)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2022-02-01 17:33:52 +00:00
3aa3cd8852 Clean up before credits_auto_rewind (#22839) (#22866)
* Clean up before credits_auto_rewind

* Use `=` intead of `|=` for mutable bool

(cherry picked from commit 545c97f903)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2022-02-01 15:22:33 +00:00
f83cb74509 rpc-sts: dedupe before initial send (#22856)
(cherry picked from commit 9f1f7aff2b)

Co-authored-by: Trent Nelson <trent@solana.com>
2022-02-01 01:54:54 +00:00
6c47a98945 Small punctuation fix (#22838) (#22849)
(cherry picked from commit 29bf1e2529)

Co-authored-by: Justin Kat <601027+Jkat@users.noreply.github.com>
2022-01-31 18:48:16 +00:00
4dfbb4347c includes zero weighted entries in WeightedShuffle (#22829) (#22847)
Current WeightedShuffle implementation excludes zero weighted entries
from the shuffle:
https://github.com/solana-labs/solana/blob/13e631dcf/gossip/src/weighted_shuffle.rs#L29-L30

Though mathematically this might make more sense, for our use-cases
(turbine specifically), this results in less efficient code:
https://github.com/solana-labs/solana/blob/13e631dcf/core/src/cluster_nodes.rs#L409-L430

This commit changes the implementation so that zero weighted indices are
also included in the shuffle but appear only at the end after non-zero
weighted indices.

(cherry picked from commit 604ca9316c)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2022-01-31 18:16:40 +00:00
28fc733894 add 'ticks-per-slot' to 'solana-test-validator' (#22701)
* add 'ticks-per-slot' to 'solana-test-validator'

* add input parser validator for "ticks-per-slot" argument

* fix fmt

(cherry picked from commit 0562426661)
2022-01-28 20:36:35 -08:00
93b44d8a4c Add new_from_parent() timings (#22744) (#22806)
(cherry picked from commit 94a5aee484)

Co-authored-by: carllin <carl@solana.com>
2022-01-28 03:10:53 +00:00
2804204f80 Adds TEST_DUPLICATE_PRIVILEGE_ESCALATION_SIGNER and TEST_DUPLICATE_PRIVILEGE_ESCALATION_WRITABLE. (#22790) 2022-01-28 00:52:09 +01:00
4d891043d1 Update syscall base costs 2022-01-27 13:36:16 -08:00
74498650bc Always contact release.solana.com over https (#22795)
(cherry picked from commit bd86459a94)

Co-authored-by: Michael Vines <mvines@gmail.com>
2022-01-27 21:30:37 +00:00
af3b307734 solana-test-validator now supports the --rpc-pubsub-enable-vote-subscription flag
(cherry picked from commit 75658e2a96)
2022-01-27 11:19:26 -08:00
2368e09d89 Add vote account address to vote subscription
(cherry picked from commit 331b953551)

# Conflicts:
#	core/src/cluster_info_vote_listener.rs
#	rpc/src/rpc_pubsub.rs
#	rpc/src/rpc_subscriptions.rs
2022-01-27 11:19:26 -08:00