Commit Graph

21493 Commits

Author SHA1 Message Date
Brooks daea6722f6
Improves RPC path sanitation (#29931) 2023-01-26 23:49:02 -05:00
Illia Bobyr 3bd389149c
doc: ledger: SlotMeta: Clarify `consumed` and `completed_data_indexes` (#29886) 2023-01-26 16:30:09 -08:00
behzad nouri efb8a53b28
removes staked-nodes updater service excessive locks on gossip (#29936) 2023-01-26 23:31:35 +00:00
Illia Bobyr 652955d053
doc: ledger::blockstore_db::columns: Add links (#29925) 2023-01-26 15:28:19 -08:00
Nick Frostbutter 9b270020f6
[docs] new JSON RPC API docs format (#29772)
* feat: added api page

* fix: api redirects

* feat: websocket page and partials

* feat: deprectated partials

* feat: http method partials

* fix: more deprecated partials

* feat: codeblock component and styles

* feat: api http methods page

* feat: sidebar

* refactor: proposal api links

* refactor: internal linking

* refactor: more internal links

* refactor: internal link and note cards

* refactor: local links

* refactor: local links and auto save prettier

* feat: added numNonVoteTransaction data details

* fix: updated getRecentPrioritizationFees

* fix: corrected wording

* fix: version typo

* fix: commitment links

* fix: parsed response links

* fix: dangling links

* refactor: filter criteria

* docs: removed jsonrpc-api.md file

* fix: dangling links

* style: removed whitespaces for CI

* style: removed whitespace

* style: fixed whitespaces
2023-01-26 17:14:47 -06:00
Illia Bobyr 23531fc659
ledger: Remove `clippy::wrong_self_convention` (#29916)
Clippy does not seem to be complaining anymore.

It looks like this rule is now only applied to `as_` methods that take `&self`
or `&mut self` as the first argument:

  a9c251f11d/clippy_lints/src/methods/wrong_self_convention.rs (L14)

For `Copy` types, `to_` rule is applied only when the method takes `self` as the
first argument:

  a9c251f11d/clippy_lints/src/methods/wrong_self_convention.rs (L25)

Enforcement is here:

  a9c251f11d/clippy_lints/src/methods/wrong_self_convention.rs (L106)
2023-01-26 15:12:35 -08:00
Tyera e39153df51
Add Memcmp filter constructor and deprecate fields (#29923)
* Deprecate Memcmp inner fields

* Add Memcmp::new

* Replace some literal construction

* Add convert_to_raw_bytes method and use

* Make convert_to_raw_bytes fallible

* Allow literal matches for complex cases
2023-01-26 14:50:15 -07:00
behzad nouri d6fbf3fb17
adds new contact-info with forward compatible sockets (#29596)
The commit implement new ContactInfo where
* Ports and IP addresses are specified separately so that unique IP
  addresses can only be specified once.
* Different sockets (tvu, tpu, etc) are specified by opaque u8 tags so
  that adding and removing sockets is backward and forward compatible.
* solana_version::Version is also embedded in so that it won't need to
  be gossiped separately.
* NodeInstance is also rolled in by adding a field identifying when the
  instance was first created so that it won't need to be gossiped
  separately.

Update plan:
* Once the cluster is able to ingest the new type (i.e. this patch), a
  2nd patch will start gossiping the new ContactInfo along with the
  LegacyContactInfo.
* Once all nodes in the cluster gossip the new ContactInfo, a 3rd patch
  will start solely using the new ContactInfo while still gossiping the
  old LegacyContactInfo.
* Once all nodes in the cluster solely use the new ContactInfo, a 4th
  patch will stop gossiping the old LegacyContactInfo.
2023-01-26 17:02:18 +00:00
dependabot[bot] 180ea1e0a5
chore:(deps): bump react-countup from 6.3.2 to 6.4.0 in /explorer (#29926)
Bumps [react-countup](https://github.com/glennreyes/react-countup) from 6.3.2 to 6.4.0.
- [Release notes](https://github.com/glennreyes/react-countup/releases)
- [Commits](https://github.com/glennreyes/react-countup/compare/v6.3.2...v6.4.0)

---
updated-dependencies:
- dependency-name: react-countup
  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>
2023-01-26 09:05:42 +00:00
Illia Bobyr 8fafbb0a06
doc: Fix documentation warnings and add some links (#29887) 2023-01-25 23:15:58 -08:00
Yueh-Hsuan Chiang c96b52eda4
Update CONTRIBUTING.md for crate creation. (#29637)
Create a section under CONTRIBUTING.md for crate creation.
2023-01-25 22:23:37 -08:00
Ashwin Sekar a5213d41f3
Eliminate unchecked arithmetic in vote program (#29885) 2023-01-25 21:55:52 -08:00
Trent Nelson ac5b2ffb39
make `scripts/cargo-fmt.sh` $PWD agnostic (#29919) 2023-01-26 04:03:39 +00:00
dependabot[bot] 174acef539
chore:(deps): bump ua-parser-js from 0.7.31 to 0.7.33 in /explorer (#29889)
Bumps [ua-parser-js](https://github.com/faisalman/ua-parser-js) from 0.7.31 to 0.7.33.
- [Release notes](https://github.com/faisalman/ua-parser-js/releases)
- [Changelog](https://github.com/faisalman/ua-parser-js/blob/master/changelog.md)
- [Commits](https://github.com/faisalman/ua-parser-js/compare/0.7.31...0.7.33)

---
updated-dependencies:
- dependency-name: ua-parser-js
  dependency-type: indirect
...

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>
2023-01-26 04:03:19 +00:00
Tyera 03ad13bb76
Fix mergify, vis-a-vis missing dont-squash-my-commits team (#29909)
Fix mergify.yml vis-a-vis missing dont-squash-my-commits team
2023-01-25 20:59:18 -07:00
Brooks 867d2581a6
Moves impl of bank_hash_info_at() into hash_internal_state() (#29913) 2023-01-25 22:24:51 -05:00
Andrew Fitzgerald fbb90603a9
BankingStage Refactor: Separate transaction commiting module (#29808)
Separate transaction commiting module
2023-01-25 19:02:21 -08:00
Jon Cinque e326f4f60b
program-test: Add token-2022 to default programs (#29878)
* program-test: Add token-2022 to default programs

* Use the upgradeable loader
2023-01-26 01:52:55 +01:00
Pankaj Garg 3f9c974587
Remove the specific QUIC connection entry that disconnected (#29883) 2023-01-25 16:14:25 -08:00
Kirill Fomichev b4d1769688
geyser: add parent slot/blockhash to block (#29855) 2023-01-25 14:20:24 -08:00
Brooks dde4b5d1ef
Adds AccountsDb::get_bank_hash_info() (#29908) 2023-01-25 17:01:01 -05:00
steviez fa39bfef6b
Move Deduper into a separate file (#29891) 2023-01-25 15:34:53 -06:00
Brooks d76c598691
Snapshot serde test uses calculate_accounts_delta_hash() (#29905) 2023-01-25 16:26:15 -05:00
Andrew Fitzgerald 704472ae13
BankingStage Refactor: Separate Forwarder Module (#29402)
Separate Forwarder module
2023-01-25 12:31:59 -08:00
Tyera bec97d3c6b
solana-genesis: fix bpf-program value_name (#29903)
Fix clap arg value
2023-01-25 13:05:35 -07:00
Jon Cinque 77c45f0478
sdk: Expose `CompileError` to the outside (#29900)
sdk: Expose `CompileError` to users
2023-01-25 19:22:45 +01:00
Xiang Zhu 4ebcacb4a3
Revert "Add run parent directory for accounts files (#29794)" (#29899)
This PR is causing OOM on master.  Reverting it for now.

This reverts commit 74f89d1494.
2023-01-25 10:03:01 -08:00
HaoranYi 2194551f87
Special case slot 0 for block connectness check in ledger tool (#29860)
* special case is_connected check for slot 0 so that we can load snapshot 0 for gce cluster boostrapting

* remove obsolete comments

* refactor with match expr

* update comments

* Update ledger-tool/src/main.rs

Co-authored-by: steviez <steven@solana.com>

* Update ledger-tool/src/main.rs

Co-authored-by: steviez <steven@solana.com>

Co-authored-by: steviez <steven@solana.com>
2023-01-25 09:06:22 -06:00
Ryo Onodera 40bbf99c74
Add fully-reproducible online tracer for banking (#29196)
* Add fully-reproducible online tracer for banking

* Don't use eprintln!()...

* Update programs/sbf/Cargo.lock...

* Remove meaningless assert_eq

* Group test-only code under aptly named mod

* Remove needless overflow handling in receive_until

* Delay stat aggregation as it's possible now

* Use Cow to avoid needless heap allocs

* Properly consume metrics action as soon as hold

* Trace UnprocessedTransactionStorage::len() instead

* Loosen joining api over type safety for replaystage

* Introce hash event to override these when simulating

* Use serde_with/serde_as instead of hacky workaround

* Update another Cargo.lock...

* Add detailed comment for Packet::buffer serialize

* Rename sender_overhead_minimized_receiver_loop()

* Use type interference for TraceError

* Another minor rename

* Retire now useless ForEach to simplify code

* Use type alias as much as possible

* Properly translate and propagate tracing errors

* Clarify --enable-banking-trace with better naming

* Consider unclean (signal-based) node restarts..

* Tweak logging and cli

* Remove Bank events as it's not needed anymore

* Make tpu own banking tracer thread

* Reduce diff a bit..

* Use latest serde_with

* Finally use the published rolling-file crate

* Make test code change more consistent

* Revive dead and non-terminating test code path...

* Dispose batches early now that possible

* Split off thread handle very early at ::new()

* Tweak message for TooSmallDirByteLimitl

* Remove too much of indirection

* Remove needless pub from ::channel()

* Clarify test comments

* Avoid needless event creation if tracer is disabled

* Write tests around file rotation and spill-over

* Remove unneeded PathBuf::clone()s...

* Introduce inner struct instead of tuple...

* Remove unused enum BankStatus...

* Avoid .unwrap() for the case of disabled tracer...
2023-01-25 21:54:38 +09:00
Han Yang 7d286961ba
Add `MSG_WAITFORONE.try_into().unwrap()` to deal with different type signature on musl libc (#29369)
* add try_into().unwrap() to deal with different type signature on musl libc

* add allow useless_conversion

* trailing whitespace

* cargo fmt
2023-01-25 13:40:14 +01:00
Jon Cinque 8f4bcf7fee
program-test: Use "max" for program account lamports (#29880) 2023-01-25 11:51:16 +01:00
Yihau Chen 9193b4221d
Revert "chore: workspace inheritance (#29509)" (#29892)
This reverts commit a67d239dde.
2023-01-25 15:50:41 +08:00
Yihau Chen a67d239dde
chore: workspace inheritance (#29509)
* introduce workspace.package

* introduce workspace.dependencies

* read version from root cargo.toml

* pass check when version = { workspace = true }

* don't bump version when version = { workspace = true }

* including workspace Cargo.toml when bump version

* programs/sbf use workspace inheritance

* fix increasing cargo version ignore program/sbf/Cargo.toml
2023-01-25 13:59:59 +08:00
steviez a165e7021b
Use halt-at-slot to specify getting bank-hash for slot 0 (#29873)
The bootstrap node creates the bootstrap snapshot at slot 0 so we do
indeed want the bank hash at slot 0. However, stricter error checking in
solana-ledger-tool made it such that the bank-hash command would error.
2023-01-24 22:05:59 -06:00
steviez ac65343f01
Remove duplicate bank frozen log from ReplayStage (#29821)
We emit a similar log with more information shortly after from Bank, so
this logline is extra that occurs for every slot.
2023-01-24 20:29:14 -06:00
Xiang Zhu 74f89d1494
Add run parent directory for accounts files (#29794)
* Add run parent directory for accounts files

* fix test test_concurrent_snapshot_packaging

* review comments.  renamed the path setup function

* Addressed most of the review comments

* remove explict type def for map result

* handle create_accounts_run_and_snapshot_dirs error with expect

* update with more review comments

* minor fixes from review comments

* simplify account_filename option assignment

* handle error from create_accounts_run_and_snapshot_dirs

* use then instead of then_some for lazy evaluation
2023-01-24 16:44:35 -08:00
Brooks bda0c606a1
Renames fn to calculate_accounts_delta_hash() (#29876) 2023-01-24 18:55:56 -05:00
apfitzge 834b98aac0
Check that halt_slot >= starting_slot (#29868)
* Check that halt_slot >= starting_slot

* Improve message by saying where starting slot comes from
2023-01-24 14:38:52 -08:00
apfitzge 624f3d2d8c
Bugfix: bank-hash optionally takes halt_at_slot (#29865)
bank-hash optionally takes halt_at_slot
2023-01-24 14:15:07 -08:00
Brooks 655345728b
Use saturating_add_signed() (#29867) 2023-01-24 17:07:50 -05:00
Brooks d67baefd70
Use Option::unzip() (#29866) 2023-01-24 17:07:29 -05:00
samkim-crypto a3c763c2a0
Add a feature ID for enable_big_mod_exp_syscall (#29851) 2023-01-25 04:57:38 +09:00
behzad nouri 8a146361d1
includes rent_epoch in vote-accounts sanity checks (#29861)
https://github.com/solana-labs/solana/pull/26479
preserves rent epoch for rent-exempt accounts. Since the feature got
activated, vote accounts in stakes-cache have identical rent_epoch field
as the accounts in accounts-db. The commit verifies this in stakes-cache
sanity checks.
2023-01-24 19:47:38 +00:00
Brooks a06f8e68a5
Tests wait for initial accounts hash verification to complete (#29840) 2023-01-24 14:44:39 -05:00
Jeff Washington (jwash) 07afa22671
test fn append_single_account_with_default_hash uses AccountStorageEntry (#29839) 2023-01-24 11:43:03 -08:00
Brennan Watt 0be194145b
Include own node in stake table (#29838) 2023-01-24 09:34:44 -08:00
behzad nouri 1c7662a37f
asserts that cluster-info keypair is consistent with contact-info id (#29818) 2023-01-24 16:57:55 +00:00
Jeff Washington (jwash) cac52b0819
trait ShrinkCollectRefs (#29830) 2023-01-24 08:43:50 -08:00
Jeff Washington (jwash) 8d4603edfb
update tests storages -> storage (#29837) 2023-01-24 07:54:28 -08:00
Jeff Washington (jwash) 79843fcbe7
update tests for 1 append vec per slot (#29836) 2023-01-24 07:53:54 -08:00