Commit Graph

21112 Commits

Author SHA1 Message Date
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
Jeff Washington (jwash) 250ec3f2a4
improve write_version usage in geyser scan from snapshot (#29223) 2022-12-13 14:40:12 -08:00
Alexander Meißner 721496b900
Feature - Program redeployment cooldown (#29136)
* Registers the feature enable_program_redeployment_cooldown.

* Adds redeployment slot constraint.

* Adds test to assert that closed programs can not be reopened.

* Ensure that program close truncates the account data.

* Adds set_sysvar_for_tests() to SBF program tests.
2022-12-13 22:54:24 +01:00
Jeff Washington (jwash) 3e649d2aa0
remove add_root(caching_enabled) (#29245) 2022-12-13 11:26:28 -08:00
Jeff Washington (jwash) 8da82e68fc
remove handle_snapshot_request(caching_enabled) (#29241) 2022-12-13 09:31:47 -08:00
dependabot[bot] dca5d7f9b4
chore: bump test-case from 2.1.0 to 2.2.2 (#28184)
Bumps [test-case](https://github.com/frondeus/test-case) from 2.1.0 to 2.2.2.
- [Release notes](https://github.com/frondeus/test-case/releases)
- [Changelog](https://github.com/frondeus/test-case/blob/master/CHANGELOG.md)
- [Commits](https://github.com/frondeus/test-case/compare/v2.1.0...v2.2.2)

---
updated-dependencies:
- dependency-name: test-case
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-13 16:07:50 +00:00
Jeff Washington (jwash) 1a0a465416
handle unclean roots explicitly during index generation (#29230) 2022-12-13 07:51:33 -08:00
Jeff Washington (jwash) b779134020
remove process_stale_slot_with_budget (#29236) 2022-12-13 07:50:14 -08:00
Jeff Washington (jwash) c8e7c706df
remove bank_from_streams(caching_enabled) (#29235) 2022-12-13 07:49:33 -08:00
Jeff Washington (jwash) 356372b175
remove TestValidatorGenesis::caching_enabled (#29229) 2022-12-13 07:20:44 -08:00
Brooks Prumo bcbf3374fd
Avoids copying hashes when computing merkle root (#29225) 2022-12-13 10:20:14 -05:00
Jeff Washington (jwash) e1c6de9ef4
remove handle_snapshot_requests(caching_enabled) (#29232) 2022-12-13 07:19:45 -08:00
Jeff Washington (jwash) 7034f4cbbe
remove new_with_config_for_benches(caching_enabled) (#29231) 2022-12-13 07:19:24 -08:00
Jeff Washington (jwash) 5983363b03
remove test_store_scan_consistency(caching_enabled) (#29233) 2022-12-13 07:18:55 -08:00
Jeff Washington (jwash) b95835143e
remove AccountsBackgroundService::new(caching_enabled) (#29234) 2022-12-13 07:18:02 -08:00
Jeff Washington (jwash) 3b4c27b727
remove some if accounts_db_caching_enabled { (#29237) 2022-12-13 07:17:14 -08:00
Jeff Washington (jwash) bb0bfc4214
remove bank_from_latest_snapshot_archives(caching_enabled) (#29238) 2022-12-13 07:16:24 -08:00
Jeff Washington (jwash) a57247a78e
handle write_version correctly in geyser api (#29224) 2022-12-13 06:42:28 -08:00
Yihau Chen 637d0358ed
ci: add openbook_dex back to downstream project test (#29207)
Revert "ci: don't run openbook_dex downstream-project test temporarily (#29201)"

This reverts commit bcf449158e.
2022-12-13 04:42:07 +00:00
Jeff Washington (jwash) fec8f61566
remove ProcessOptions::accounts_db_caching_enabled (#29217) 2022-12-12 20:25:00 -08:00
Alexander Meißner fe3bbede71
Cfg disable JIT code on systems where it is not supported (2) (#29226)
Cfg disable JIT code on systems where it is not supported.
2022-12-13 03:46:45 +00:00