Commit Graph

21132 Commits

Author SHA1 Message Date
Eric Su 710ac01ef7
docs: make the comments on using the new confirmTransaction clearer (#29251)
* docs: make the comments on using the new connection.confirmTransaction clearer

* docs: add TransactionConfirmataionStrategy type

* refactor: change param type in sendAndConfirmRawTransaction

* docs: fix typo
2022-12-19 12:23:38 -08:00
Steven Luscher 456a81982e
fix: reduce Connection keep-alive timeout to 1 second fewer than the Solana RPC's keep-alive timeout (#29130)
* Delete `AgentManager`

* Replace custom `http.Agent` implementation with `agentkeepalive` package

* Set the default free socket timeout to 1s less than the Solana RPC's default timeout

* Add link to particular issue comment

* Create the correct flavor of default agent for http/https
2022-12-19 10:22:25 -08:00
Jeff Washington (jwash) 3eca364190
remove metrics from prior to rent_epoch feature activation (#29322) 2022-12-19 08:18:02 -08:00
Tao Zhu c657f42d77
remove a wrapper function (#29305) 2022-12-19 16:10:16 +00:00
kirill lykov cdb204114e
take rust version from toolchain file (#29320)
* take rust version from toolchain file

* add quotes to pacify shellcheck
2022-12-19 17:00:14 +01:00
gr8den a0b655b72b
fix typo in runtime docs (#29314) 2022-12-17 11:01:46 -07:00
Steven Luscher 8380bf027d
chore: correct the name of the STALEBOT_START_DATE_RFC_2822 variable (#29191)
Oops. Changed this in the repository, but failed to update it in code.

Note to self: land this _after_ 8:00UTC Dec 10
2022-12-17 09:38:42 -08:00
Brooks Prumo d1722b7a7a
Fixes non-binding `let` on a future (quic-client) (#29300) 2022-12-17 03:01:22 -05:00
Brooks Prumo 0281973671
Fixes non-binding `let` on a future (ip-echo-server) (#29301)
* Fixes non-binding let on a future (ip-echo-server)

```
warning: non-binding `let` on a future
   --> net-utils/src/ip_echo_server.rs:133:13
    |
133 |             let _ = tcp_stream.shutdown();
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: consider awaiting the future or dropping explicitly with `std::mem::drop`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_future
    = note: `-D clippy::let-underscore-future` implied by `-D warnings`
```

* pr: remove let

* pr: ?
2022-12-17 00:17:59 +00:00
Lijun Wang d1cf4ced3d
quic test timeout fix (#29260)
Allow longer chunk receive timeout without impacting testing the stream exit condition for unit tests. The exit is periodically checked, we will break only when the total allowed chunk receive timed out. The start time is reset when a new chunk is received.
2022-12-16 14:26:04 -08:00
Noah Gundotra 8ef900be59
Explorer: account does not exist (#29308)
explorer: account does not exist
2022-12-16 15:13:19 -05:00
Brooks Prumo 19692263fb
Fixes format string (#29298) 2022-12-16 19:53:04 +00:00
behzad nouri 92ca725c6b
patches shred::merkle::make_shreds_from_data when data is empty (#29295)
If data is empty, make_shreds_from_data will now return one data shred
with empty data. This preserves invariants verified in tests regardless
of data size.
2022-12-16 18:56:21 +00:00
Brooks Prumo 426be3d82d
docs: Accounts must be rent exempt (#29256) 2022-12-16 13:14:01 -05:00
Mohd. Yahya b01ebfc39b
Explorer: removed lamports balance and added message for reaped accounts (#29283)
removed lamports balance and added message
2022-12-16 12:29:43 -05:00
Brennan Watt 86b2e545e1
Prune redundant const SLOT_MS (#29278)
* Alias redundant const SLOT_MS to DEFAULT_MS_PER_SLOT

* Slate SLOT_MS for deprecation

* Add doc comments

Co-authored-by: Brooks Prumo <brooks@prumo.org>
2022-12-16 08:05:09 -08:00
0xripleys ec06cf7311
"solana program set-upgrade-authority" uses SetAuthorityChecked instruction by default (#29190)
* set-upgrade-authority uses checked instruction by default

* remove print statements

* PR fixes
2022-12-16 06:59:54 +00:00
Jeff Washington (jwash) 19f13a0bea
refactor get_store_for_shrink (#29284) 2022-12-15 22:10:39 -08:00
steviez 0609dce36c
Make ledger-tool list-roots subcommand inclusive of start-root arg (#29265) 2022-12-15 22:33:57 -06:00
Jeff Biseda a44ea779bd
add support for a repair protocol whitelist (#29161) 2022-12-15 19:24:23 -08:00
Dmitri Makarov acb7eb226b
Add an rbpf-cli option to dump the program execution trace (#29289) 2022-12-15 20:08:00 -05:00
steviez ff8bb5362c
Remove repetitive logic in SlotMeta first insert detection logic (#29153) 2022-12-15 17:38:27 -06:00
behzad nouri 109dbf76df
removes Box<dyn Iterator<...>> from rpc/src/rpc_subscriptions.rs (#29203)
Box<dyn ...> requires dynamic dispatch, is heap allocated, slow and
verbose.
2022-12-15 22:33:52 +00:00
Brennan Watt 83b4c347b8
Remove unused ticks_per_slot variable (#29279) 2022-12-15 13:24:10 -08:00
behzad nouri 73c42dde6e
sanitizes shreds recovered from erasure shards (#29286)
Instead of sanitizing shreds late in recover code:
https://github.com/solana-labs/solana/blob/50ad0390f/ledger/src/shred/merkle.rs#L786

Shred{Code,Data}::from_recovered_shard should sanitize shreds before
returning:
https://github.com/solana-labs/solana/blob/50ad0390f/ledger/src/shred/merkle.rs#L192-L216
https://github.com/solana-labs/solana/blob/50ad0390f/ledger/src/shred/merkle.rs#L324-L350
2022-12-15 20:09:15 +00:00
Kirill Fomichev ccd96e246b
rpc: fix possible panics in optimize_filters (#29146) 2022-12-15 20:04:41 +00:00
Brooks Prumo 1e0a0e0ced
Cleans up CacheHashData (#29267) 2022-12-15 14:16:27 -05:00
behzad nouri 78a04ed432
ignores pubkey in Protocol::PruneMessage (#29280)
Protocol::PruneMessage(Pubkey, _) is the same as PruneData.pubkey and so
is redundant and can be ignored:
https://github.com/solana-labs/solana/blob/95d339300/gossip/src/cluster_info.rs#LL277-L279
https://github.com/solana-labs/solana/blob/95d339300/gossip/src/cluster_info.rs#L361-L367
2022-12-15 17:51:12 +00:00
Noah Gundotra 50ad0390f9
explorer: add enum parsing for anchor arguments (#29275)
add enum parsing for anchor arguments
2022-12-15 11:11:25 -05:00
behzad nouri a5c8c7c536
locks crds table only once to process push messages (#29218)
Processing push messages is locking and unlocking crds table for each
push message:
https://github.com/solana-labs/solana/blob/536b879aa/gossip/src/cluster_info.rs#L2266-L2276
https://github.com/solana-labs/solana/blob/536b879aa/gossip/src/crds_gossip_push.rs#L215C9-L260

This commit instead locks the crds table once for all the received push
messages.
2022-12-15 16:02:46 +00:00
behzad nouri 95d3393008 prunes gossip nodes based on timeliness of delivered messages
As described here:
https://github.com/solana-labs/solana/issues/28642#issuecomment-1337449607
current gossip pruning code fails to maintain spanning trees across
cluster.

This commit instead implements a pruning code based on timeliness of
delivered messages. If a messages is delivered timely enough (in terms
of number of duplicates already observed for that value), it counts
towards the respective node's score. Once there are enough many CRDS
upserts from a specific origin, redundant nodes are pruned based on the
tracked score.

Since the pruning leaves some configurable redundancy and the scores are
reset frequently, it should better tolerate active-set rotations.
2022-12-15 13:28:27 +00:00
behzad nouri b06656cbba tracks number of gossip push duplicates
The commit tracks number of times duplicates of a CRDS value is received
from gossip push. Following commits will utilize this metric to score
gossip nodes in terms of timeliness of their push messages, in order to
better pick which nodes to prune.
2022-12-15 13:28:27 +00:00
Yihau Chen 90f74302cf
chore: improve solana-client-test (#29255)
* separate test port

* make server check more deterministic

* remove serial_test

* use atomic auto incremental port

* make NEXT_RPC_PUBSUB_PORT as an global static variable

* make check_server_is_ready become check_server_is_ready_or_panic

* use processed commitment in test_rpc_client

* lint
2022-12-15 16:27:31 +08:00
Ikko Ashimine 50c1de5597
fix typo in shred.rs (#29149)
calcuation -> calculation
2022-12-15 01:14:39 -06:00
Jeff Washington (jwash) 5a687fa818
make AccountStorage::map private (#29268) 2022-12-14 20:03:25 -08:00
Noah Gundotra 119b7332f0
explorer: Only show supply page for custom urls (#29273)
only show supply page for custom urls
2022-12-14 23:01:28 -05:00
Jeff Washington (jwash) 3a7b67ea55
refactor unwrap_or_default for type that will soon not have a default (#29257) 2022-12-14 15:11:36 -08:00
Jeff Washington (jwash) 49a136a374
move AccountStorage out of accounts_db.rs (#29261) 2022-12-14 15:08:39 -08:00
Jeff Washington (jwash) f9db75768c
Vec<Arc<AccountStorageEntry>> becomes SnapshotStorage (#29253) 2022-12-14 12:18:43 -08:00
Brooks Prumo 94b04935c8
docs: Wraps to 80 characters (#29259) 2022-12-14 15:14:59 -05:00
Brennan Watt 830ccb9bff
Fix compile warning for some targets (#29258)
* Fix compile warning for some targets

* Reduce redundant code
2022-12-14 20:40:13 +01:00
Nicholas d8f8dea9e4
Explorer: Token Decimal Fix (#28831)
Added maximumFractionDigits

Co-authored-by: TheClub4 <bryantan-888@hotmail.com>
2022-12-14 14:20:32 -05:00
Noah Gundotra 5d6f94ef42
Explorer: add alert notice to Project Serum deployments (#28913)
* explorer: add scam notice to serum deployments

* explorer: prettier fix

* explorer: generalize account-incident alerting

* explorer: format:fix

* explorer: remove github registry link

* explorer: remove unused fetch

* Change flagged accounts from context to flat record
2022-12-14 13:27:47 -05:00
Jeff Washington (jwash) fab0ce21a2
remove shrink_candidate_slots_v1 (#29252) 2022-12-14 08:57:16 -08:00
Jeff Washington (jwash) b77bef4ee3
write_version -> write_version_obsolete (#29176) 2022-12-14 07:43:40 -08:00
HaoranYi 7a97121747
add retry for flakey local cluster test (#29228) 2022-12-14 08:55:51 -06:00
Jeff Washington (jwash) b8e25282c2
remove rebuild_bank_from_snapshots(caching_enabled) (#29247)
* fix tests broken by add_root change

* remove rebuild_bank_from_snapshots(caching_enabled)
2022-12-13 16:33:06 -08:00
Jeff Washington (jwash) f355066456
remove caching_enabled from serde_snapshot (#29246)
* fix tests broken by add_root change

* remove caching_enabled from serde_snapshot
2022-12-13 16:32:43 -08:00
Jeff Washington (jwash) 62be54a75e
remove process_stale_slot_v1 and other fns (#29244) 2022-12-13 16:32:24 -08:00
Jeff Washington (jwash) 4ae12bf5fa
fix tests broken by add_root change (#29248) 2022-12-13 14:43:52 -08:00