7de8a55b54
Use f64 for stake math in get_stake_percent_in_gossip ( #19892 )
v1.6.25
2021-09-14 19:17:59 -06:00
7232b01a02
Bump version to v1.6.25 ( #19880 )
2021-09-14 20:33:13 +00:00
a4ebbc9f55
Remove demote_program_write_locks feature ( #19877 )
...
* Remove demote_program_write_locks feature
* Update test
v1.6.24
2021-09-14 12:25:42 -06:00
bf7c2f79c1
filters for recent contact-infos when checking for live stake (backport #19204 ) ( #19873 )
...
* filters for recent contact-infos when checking for live stake (#19204 )
Contact-infos are saved to disk:
https://github.com/solana-labs/solana/blob/9dfeee299/gossip/src/cluster_info.rs#L1678-L1683
and restored on validator start-up:
https://github.com/solana-labs/solana/blob/9dfeee299/core/src/validator.rs#L450
Staked nodes entries will not expire until an epoch after. So when the
validator checks for online stake it is erroneously picking up
contact-infos restored from disk, which breaks the entire
wait-for-supermajority logic:
https://github.com/solana-labs/solana/blob/9dfeee299/core/src/validator.rs#L1515-L1561
This commit adds an extra check for the age of contact-info entries and
filters out old ones.
(cherry picked from commit 7a789e0763
)
# Conflicts:
# core/src/validator.rs
* removes backport merge conflicts
Co-authored-by: behzad nouri <behzadnouri@gmail.com >
2021-09-14 18:21:56 +00:00
d401c3f5ab
Bump version
2021-09-14 08:12:02 -07:00
83d08223fd
More transaction forwarding ( #19834 )
v1.6.23
2021-09-14 16:08:53 +02:00
6bb63f9abf
Silence vercel github comments ( #19827 ) ( #19832 )
...
(cherry picked from commit 8ac12c29ed
)
Co-authored-by: Justin Starry <justin@solana.com >
2021-09-13 17:51:39 -05:00
d8293abc64
debug logs when crds table trim failed ( #18307 )
...
reports of this error being possibly spammy:
https://discord.com/channels/428295358100013066/689412830075551748/859441080054710293
The commit changes the log level to debug.
Additionally adding a new metric to understand the frequency of this error.
(cherry picked from commit 9d983a34a0
)
2021-09-10 20:02:13 -07:00
4d074a6716
Reduce wait for supermajority threshold back to 80%
...
(cherry picked from commit 4386e09710
)
2021-09-09 21:44:42 -07:00
3eee222667
Return error if Transaction contains writable executable or ProgramData accounts (backport #19629 ) ( #19729 )
...
* Return error if Transaction contains writable executable or ProgramData accounts (#19629 )
* Return error if Transaction locks an executable as writable
* Return error if a ProgramData account is writable but the upgradable loader isn't present
* Remove unreachable clause
* Fixup bpf tests
* Review comments
* Add new TransactionError
* Disallow writes to any upgradeable-loader account when loader not present; remove is_upgradeable_loader_present exception for all other executables
(cherry picked from commit 38bbb77989
)
# Conflicts:
# programs/bpf/tests/programs.rs
# runtime/src/accounts.rs
# runtime/src/bank.rs
# sdk/src/transaction.rs
# storage-proto/proto/transaction_by_addr.proto
# storage-proto/src/convert.rs
* Fix conflicts
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
Co-authored-by: Tyera Eulberg <tyera@solana.com >
2021-09-09 03:06:02 +00:00
a78c3c07f2
filters crds values in parallel when responding to gossip pull-requests (backport #18877 ) ( #19450 )
...
* filters crds values in parallel when responding to gossip pull-requests (#18877 )
When responding to gossip pull-requests, filter_crds_values takes a lot of time
while holding onto read-lock:
https://github.com/solana-labs/solana/blob/f51d64868/gossip/src/crds_gossip_pull.rs#L509-L566
This commit will filter-crds-values in parallel using rayon thread-pools.
(cherry picked from commit f1198fc6d5
)
* removes backport merge conflicts
Co-authored-by: behzad nouri <behzadnouri@gmail.com >
2021-09-08 17:09:35 +00:00
53f8e58300
Demote write locks on transaction program ids (backport #19593 ) (backport #19633 ) ( #19637 )
...
* Demote write locks on transaction program ids (backport #19593 ) (#19633 )
* Demote write locks on transaction program ids (#19593 )
* Add feature
* Demote write lock on program ids
* Fixup bpf tests
* Update MappedMessage::is_writable
* Comma nit
* Review comments
(cherry picked from commit decec3cd8b
)
# Conflicts:
# core/src/banking_stage.rs
# core/src/cost_model.rs
# core/src/cost_tracker.rs
# ledger-tool/src/main.rs
# program-runtime/src/instruction_processor.rs
# programs/bpf/tests/programs.rs
# programs/bpf_loader/src/syscalls.rs
# rpc/src/transaction_status_service.rs
# runtime/src/accounts.rs
# runtime/src/bank.rs
# runtime/src/message_processor.rs
# sdk/benches/serialize_instructions.rs
# sdk/program/src/message/mapped.rs
# sdk/program/src/message/sanitized.rs
# sdk/src/transaction/sanitized.rs
* Fix conflicts
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
Co-authored-by: Tyera Eulberg <tyera@solana.com >
(cherry picked from commit fcda5d4a7d
)
# Conflicts:
# cli-output/src/display.rs
# core/src/transaction_status_service.rs
# program-test/src/lib.rs
# programs/bpf_loader/src/syscalls.rs
# runtime/src/accounts.rs
# runtime/src/bank.rs
# runtime/src/message_processor.rs
# sdk/benches/serialize_instructions.rs
# sdk/program/src/message.rs
# sdk/src/feature_set.rs
# transaction-status/src/parse_accounts.rs
* Replace feature and fix conflicts
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com >
2021-09-04 09:10:57 +00:00
b4fdce9443
Populate memo in blockstore signatures-for-address ( #19515 ) ( #19604 )
...
* Add TransactionMemos column family
* Traitify extract_memos
* Write TransactionMemos in TransactionStatusService
* Populate memos from column
* Dedupe and add unit test
(cherry picked from commit 5fa3e5744c
)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
2021-09-03 18:38:57 +00:00
39fe52fc06
Fix clippy ( #17214 ) ( #19609 )
...
Newer clippy from +nightly have new errors about where annotations can and
cannot go. This commit fixes two of them.
(cherry picked from commit b074e86ad2
)
Co-authored-by: Brooks Prumo <brooks@solana.com >
2021-09-03 17:00:25 +00:00
db65b4e641
Populate memo in bigtable transaction structs (backport #19512 ) ( #19606 )
...
* Populate memo in bigtable transaction structs (#19512 )
* Populate memo in bigtable transaction structs
* Preface memos with len
(cherry picked from commit f4ae450f34
)
# Conflicts:
# transaction-status/src/parse_instruction.rs
* Fix conflicts
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
Co-authored-by: Tyera Eulberg <tyera@solana.com >
2021-09-03 09:26:08 +00:00
fe1c20c689
excludes epoch-slots from nodes with unknown or different shred version (backport #17899 ) ( #19551 )
...
* excludes epoch-slots from nodes with unknown or different shred version (#17899 )
Inspecting TDS gossip table shows that crds values of nodes with
different shred-versions are creeping in. Their epoch-slots are
accumulated in ClusterSlots causing bogus slots very far from current
root which are not purged and so cause ClusterSlots keep consuming more
memory:
https://github.com/solana-labs/solana/issues/17789
https://github.com/solana-labs/solana/issues/14366#issuecomment-769896036
https://github.com/solana-labs/solana/issues/14366#issuecomment-832754654
This commit updates ClusterInfo::get_epoch_slots, and discards entries
from nodes with unknown or different shred-version.
Follow up commits will patch gossip not to waste bandwidth and memory
over crds values of nodes with different shred-version.
(cherry picked from commit 985280ec0b
)
# Conflicts:
# core/src/cluster_info.rs
* removes backport merge conflicts
Co-authored-by: behzad nouri <behzadnouri@gmail.com >
2021-09-01 18:50:56 +00:00
6566a0f6c8
short cuts expiration check if origin's contact-info is still valid ( #17918 ) ( #19552 )
...
Crds::find_old_labels can skip checking values timestamps if the
origin's contact info hasn't expired yet:
https://github.com/solana-labs/solana/blob/985280ec0/gossip/src/crds.rs#L394-L408
(cherry picked from commit cca46308bc
)
Co-authored-by: behzad nouri <behzadnouri@gmail.com >
2021-09-01 18:47:40 +00:00
3606de56f7
Fix tests that make assumptions about tx fee rate ( #19538 ) ( #19543 )
...
(cherry picked from commit 4fb43bbd90
)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
2021-09-01 05:57:30 +00:00
9a005855dc
persists repair-peers cache across repair service loops (backport #18400 ) ( #19526 )
...
* persists repair-peers cache across repair service loops (#18400 )
The repair-peers cache is reset each time repair service loop runs,
and so computed repeatedly for the same slots:
https://github.com/solana-labs/solana/blob/d2b07dca9/core/src/repair_service.rs#L275
This commit uses an LRU cache to persists repair-peers for each slot.
In addition to LRU eviction rules, in order to avoid re-using outdated
data, each entry also has 10 seconds TTL.
(cherry picked from commit a0551b4054
)
# Conflicts:
# core/src/repair_service.rs
# core/src/serve_repair.rs
* removes backport merge conflicts
Co-authored-by: behzad nouri <behzadnouri@gmail.com >
2021-08-31 21:17:22 +00:00
70bdcf06b4
locks gossip only once in push_epoch_slots (backport #17355 ) ( #19484 )
...
* locks gossip only once in push_epoch_slots
push_epoch_slots is unlocking and locking again gossip when iterating
over epoch slot indices which is wasteful:
https://github.com/solana-labs/solana/blob/0486df02b/core/src/cluster_info.rs#L915-L929
(cherry picked from commit 9339a6f8f3
)
# Conflicts:
# core/src/cluster_info.rs
* removes redundant slots sort in push_epoch_slots
(cherry picked from commit 9471ba61c5
)
Co-authored-by: behzad nouri <behzadnouri@gmail.com >
2021-08-29 17:09:59 +00:00
f53f273585
parallelizes gossip packets receiver with processing of requests (backport #17647 ) ( #19474 )
...
* 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.
(cherry picked from commit cab30e2356
)
# Conflicts:
# core/src/cluster_info.rs
* removes backport merge conflicts
Co-authored-by: behzad nouri <behzadnouri@gmail.com >
2021-08-27 22:13:14 +00:00
e0584b77c5
Fixing missing pubsub notification for programSubscribe and logsSubscribe (backport #19092 ) ( #19455 )
...
* Fixing missing pubsub notification for programSubscribe and logsSubscribe (#19092 )
#18587 : programSubscribe is missing notifications randomly. The issue is because of two reasons
Not all rooted slots get OptimisticallyConfirmed notifications
The OptimisticallyConfirmed notifications can be out of order for slots: slot A and B with A < B can see notification for B first before A.
Summary of Changes
Changed OptimisticallyConfirmedBankTracker to send notifications for parent banks if they have not been notified yet. We use a new variable last_notified_slot to track that.
Tests:
With my validator running against testnet, before the fix, it was failing 75% of time, with the fix, it is passing consistently. Using the program mentioned in #18587 .
(cherry picked from commit 1a372a792e
)
# Conflicts:
# core/src/optimistically_confirmed_bank_tracker.rs
# core/src/rpc_subscriptions.rs
* Fix conflicts
Co-authored-by: Lijun Wang <83639177+lijunwangs@users.noreply.github.com >
Co-authored-by: Tyera Eulberg <tyera@solana.com >
2021-08-27 01:31:51 +00:00
39a5431790
Bump jsonrpc crates and remove old tokio ( #19454 )
2021-08-26 23:53:44 +00:00
715c5e64c4
Bump version to 1.6.23 ( #19447 )
2021-08-26 18:09:15 +00:00
7956f04fa5
Backport Accounts Fixes #16838 and the test #17038 ( #19412 )
...
* reclaims unref accounts from index (#16838 )
* Test account index and store alignment (#17038 )
* Use ReclaimResult::Default() instead of building subtypes
* Add test to ensure account_db store and index are aligned
Co-authored-by: Jeff Washington (jwash) <75863576+jeffwashington@users.noreply.github.com >
Co-authored-by: steviez <steven@solana.com >
v1.6.22
2021-08-25 14:40:53 -07:00
2825f82bee
Add parameter to allow setting max-retries for SendTransaction rpc (backport #19387 ) ( #19415 )
...
* Add parameter to allow setting max-retries for SendTransaction rpc (#19387 )
* Add parameter to cap rpc send retries for a tx
* Add parameter to docs
(cherry picked from commit 7482861f4b
)
# Conflicts:
# banks-server/src/banks_server.rs
# core/src/rpc.rs
# core/src/send_transaction_service.rs
* Fix conflicts
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
Co-authored-by: Tyera Eulberg <tyera@solana.com >
2021-08-25 16:47:47 +00:00
45e3cd373b
Bump crossbeam-epoch (backport #19378 ) ( #19388 )
...
* Bump to get off yanked crate (#19378 )
(cherry picked from commit 82ea4891fd
)
# Conflicts:
# Cargo.lock
# programs/bpf/Cargo.lock
* Fix conflicts
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
Co-authored-by: Tyera Eulberg <tyera@solana.com >
2021-08-24 08:16:08 +00:00
2b4b260c71
Update crossbeam-deque to 0.8.1 ( #19361 ) ( #19381 )
...
(cherry picked from commit 2ccbe471ae
)
2021-08-23 23:10:35 +00:00
866fd22fde
ci: pin patched solana crates version for downstream project builds
2021-08-18 22:08:12 -06:00
d23df85410
Remove pin-project-lite warning
2021-08-18 22:08:12 -06:00
839cdecfd2
Bump assert_cmd and remove audit ignore
2021-08-18 22:08:12 -06:00
cc6296b1fa
Add audit ignores
2021-08-18 22:08:12 -06:00
0c2a85a903
Update hyper 0.14
2021-08-18 22:08:12 -06:00
011fe72aa2
Bump version to v1.6.22
2021-08-18 22:08:12 -06:00
40fc14471d
Really start caching by fixing swapped CAS... ( #18842 ) ( #18969 )
...
(cherry picked from commit 611af87fdb
)
Co-authored-by: Ryo Onodera <ryoqun@gmail.com >
v1.6.21
2021-07-29 16:52:46 +00:00
7fc85b8c9b
Fix erroneous default start_slot ( #18948 ) ( #18951 )
...
(cherry picked from commit 578f2aa22b
)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
2021-07-29 03:56:54 +00:00
4d77ac1688
Bump version to v1.6.21 ( #18953 )
2021-07-28 23:47:03 +00:00
77bdb45d4a
Sigverify refactor ( #18873 )
v1.6.20
2021-07-23 22:32:09 +02:00
3539849a7f
Add voting service ( #18552 ) ( #18781 )
2021-07-22 22:26:04 +02:00
8c28f9b63e
Exclude stubbed ProgramCosts column from compaction ( #18840 )
2021-07-22 17:56:23 +00:00
3346843a87
token: Swap new token program id for consistency on all networks ( #18823 ) ( #18836 )
...
(cherry picked from commit d6f5945653
)
Co-authored-by: Jon Cinque <jon.cinque@gmail.com >
2021-07-22 09:55:39 +00:00
007c49ff2b
feature: add new token program feature (v1.6 backport of #18780 ) ( #18804 )
...
* feature: add new token program feature
* Fixup test
* Cargo fmt
* Add back whitespace for cargo fmt
* Revert file totally
2021-07-21 21:58:28 +02:00
bbd386884d
Disambiguate archive_snapshot_package
IO error sources ( #18797 )
...
(cherry picked from commit a4c3db51fc
)
Co-authored-by: Trent Nelson <trent@solana.com >
2021-07-21 19:32:19 +00:00
ba8426e0fd
1.6: Bump crates to 1.6.20 ( #18805 )
2021-07-21 17:44:41 +02:00
1017c4851a
backport new column families from master to 1.6 ( #18743 )
...
* backporting bank_hash and program_costs column families from master to 1.6 for rocksdb backward compatibility
* missed a line to allow dead code
* include code for purge
v1.6.19
2021-07-17 10:59:42 -06:00
d7b381c90c
Bump version to v1.6.19
2021-07-17 08:57:44 +00:00
870a7e8458
CI Tweaks (backport #18738 ) ( #18741 )
...
* ci: fix typo
(cherry picked from commit 96a7cedaca
)
* ci: suppress cargo tree output
(cherry picked from commit 59cd0556ef
)
Co-authored-by: Trent Nelson <trent@solana.com >
v1.6.18
2021-07-17 07:08:28 +00:00
6f661dd8a9
excludes private ip addresses ( #18739 )
...
(cherry picked from commit e316586516
)
# Conflicts:
# core/src/broadcast_stage.rs
# core/src/cluster_info.rs
Co-authored-by: behzad nouri <behzadnouri@gmail.com >
2021-07-17 03:48:07 +00:00
2e6d03c41f
Use rustup default profile ( #18727 ) ( #18730 )
...
(cherry picked from commit 2ec81f627d
)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
2021-07-16 21:13:39 +00:00
3dbdaa5341
Bump version to v1.6.18
2021-07-16 09:57:58 +00:00