Commit Graph

22390 Commits

Author SHA1 Message Date
Yihau Chen 8a849718d2
ci: cleanup (#31196)
* extract threads limit script

* extract common functions

* mv need_to_generate_test_result need_to_upload_test_result
2023-04-14 20:37:07 +00:00
Andrew Fitzgerald b657004141
store slot on BlockBatchUpdate (#31190) 2023-04-14 13:15:31 -07:00
Brennan 93d0d25d77
Move rent debit out of bank (#31204)
* Move rent debit out of bank

* Clean up imports and visibility

* Fix imports

* rename public mod rent_debits
2023-04-14 19:41:10 +00:00
dependabot[bot] 0332f5f38d
Bump quinn-proto from 0.9.2 to 0.9.3 (#31139)
Bumps [quinn-proto](https://github.com/quinn-rs/quinn) from 0.9.2 to 0.9.3.
- [Release notes](https://github.com/quinn-rs/quinn/releases)
- [Commits](quinn-rs/quinn@0.9.2...0.9.3)

---
updated-dependencies:
- dependency-name: quinn-proto
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-14 12:00:58 -07:00
dependabot[bot] 68315d7563
Bump chrono from 0.4.23 to 0.4.24 (#31120)
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.23 to 0.4.24.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](chronotope/chrono@v0.4.23...v0.4.24)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-14 11:57:42 -07:00
Andrew Fitzgerald 8fe28c3798
RootBankCache: only cache weak reference to avoid keeping a bank alive (#31189) 2023-04-14 11:33:18 -07:00
Dmitri Makarov d12501056d
Eliminate dependency on Open SSL in cargo-build-sbf (#31205) 2023-04-14 13:42:35 -04:00
Alexander Meißner 8eb31f6cfd
Refactor - Syscalls in RBPF CLI (#31109)
* Makes members of SyscallContext public.
Removes check_aligned and check_size from SyscallContext.

* Replaces InvokeContext::set_syscall_context() in tests with mock_create_vm!().

* Passes SyscallContext directly to InvokeContext::set_syscall_context().

* Merges TraceLogStackFrame into SyscallContext.

* Removes the create_vm!() macro.

* Moves BpfAllocator from bpf_loader into program_runtime.

* Frees BpfAllocator from Rc<RefCell<>>.

* Removes unused code from BpfAllocator.

* Consume CUs for heap before doing the allocation.

* Exposes syscalls in rbpf-cli.

* Adds debugging_features parameter to load_program_from_bytes() and load_program_from_account().

* Removes test_bpf_loader_non_terminating_program() as that is already tested in RBPF.

* Moves stack and heap allocation back onto the program runtime stack.
2023-04-14 15:20:08 +02:00
kirill lykov 592b3ce17e
fix docs blockstore formatting (#31105)
* fix docs blockstore formatting

* Update docs/src/validator/blockstore.md

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

* fix function signature in replay docs

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

* update `get_slot_entries` function description in the docs

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

* fix formatting

* remove new line in a doc

---------

Co-authored-by: steviez <steven@solana.com>
2023-04-14 12:13:28 +00:00
axleiro 577cc185fd
increase docker mem allocation (#31197) 2023-04-14 03:06:23 -05:00
Yihau Chen 1bf69b448b
ci: move coverage to the last block (#31163) 2023-04-14 12:19:20 +08:00
Tyera 2147f0d056
Fix keygen usb panic (debug only) (#31194)
* Bump clap v3

* Use fallible method to check for confirm_key
2023-04-14 02:21:00 +00:00
Brooks d43e19bb03
Refactors the Full/Incremental SnapshotHash types (#31186) 2023-04-13 18:01:27 -04:00
Tyera 875df9600d
Bump h2 to v0.3.17 (#31187)
h2 below v0.3.17 has a denial of service alert: https://github.com/solana-labs/solana/security/dependabot/349
2023-04-13 14:56:59 -07:00
Xiang Zhu 9f53c42339
bank_from_latest_snapshot_dir (#31115)
* bank_from_latest_snapshot_dir

* Clear the account paths before constructing a bank from a snapshot dir

* Clear the account paths before constructing a bank from a snapshot dir (#31170)

* use the highest POST snapshot dir to construct a bank

* Use POST to fix test_bank_from_latest_snapshot_dir

* Revert "Clear the account paths before constructing a bank from a snapshot dir"

This reverts commit 272bb9fee14a09d7fde3cddb3d439f2cdadb5493.

* Remove the set_accounts_hash_for_tests call

* Revert "Revert "Clear the account paths before constructing a bank from a snapshot dir""

This reverts commit 2e345d8b98b8fb3b07f00ce050132c678acf88d4.
2023-04-13 12:44:56 -07:00
Nick Frostbutter 768405c410
[docs][ci] skip usage doc build for non-deploys (#31063)
* build: skip cli usage doc build for non-deploys

* fix: checking for CI

* chore: removed trailing whitespace

* fix: apease buildkite
2023-04-13 13:26:26 -05:00
Brooks 1f67591e21
Removes `base` from `IncrementalSnapshotHash` (#31185) 2023-04-13 17:35:35 +00:00
Brooks e05957d8fa
Push starting snapshot hashes in SnapshotGossipManager::new() (#31173) 2023-04-13 11:49:17 -04:00
Yihau Chen fdecd0dcaa
ci: use preinstalled openssl (#31107)
ci: use built-in openssl
2023-04-13 06:24:53 +00:00
Andrew Fitzgerald c847236147
decision maker perf (#30618) 2023-04-12 21:40:59 -07:00
steviez c834d2fc95
Prevent process_blockstore_from_root() from holding Bank for too long (#31179)
blockstore_processor::process_blockstore_from_root() starts with a
BankForks that contains exactly one Bank. The function grabs an Arc of
this initial Bank, and does some logging and initial setup before
processing more slots in load_frozen_forks().

process_blockstore_from_root() holds that Arc until it returns. This
increases the ref count and prevents the initial Bank from getting
cleaned up in a timely manner if load_frozen_forks() prunes that initial
Bank from BankForks.

This change extracts the needed information from the Arc<Bank>, and
drops the Arc so that the Bank can be dropped in a timely manner.
2023-04-13 04:10:26 +00:00
Yihau Chen a5bd85cf75
ci: export channel info in buildkite pre-command (#31162) 2023-04-13 11:32:57 +08:00
Xiang Zhu 78d061a3d3
Clear the account paths before constructing a bank from a snapshot dir (#31170) 2023-04-12 16:03:19 -07:00
Brooks 6835ceeef5
Inlines variables into logging format strings (#31177)
Inlines variables into loging format strings
2023-04-12 22:16:38 +00:00
Andrew Fitzgerald 01659edd16
Forwarder: forward_packets w/o metrics (#30925) 2023-04-12 14:09:24 -07:00
behzad nouri 8556a40ee0
removes duplicate connection-table arguments (#31172)
prune_unstaked_connections_and_add_new_connection unnecessarily receives both
MutexGuard<ConnectionTable> and Arc<Mutex<ConnectionTable>>.
2023-04-12 20:39:29 +00:00
Brooks e39f7a318d
Cleans up imports in bootstrap.rs (#31176) 2023-04-12 20:12:16 +00:00
behzad nouri 34da001cda
passes through concrete QUIC connection errors up the call stack (#31168) 2023-04-12 19:53:25 +00:00
Brooks 602297e29f
Add comment in SolanaGossipMananger::update_latest_full_snapshot_hash() (#31171) 2023-04-12 16:52:23 +00:00
Brooks 1761c0947b
Removes unused arg from SnapshotGossipManager::new() (#31169) 2023-04-12 16:45:31 +00:00
HaoranYi 1db0683a50
Refactor reward payout code - part 4 (#31159)
extract redeem_reward fn
2023-04-12 10:20:21 -05:00
Brooks 944b9d574a
Only push latest snapshot hashes in SnapshotGossipManager (#31154) 2023-04-12 11:00:26 -04:00
HaoranYi f2e3a0d821
Refactor reward payout code - part 3 (#31157)
extract calculate points fn
2023-04-12 09:36:23 -05:00
Jeff Washington (jwash) 3d6248d76a
ledger-tool verify cli for final hash calc (#31153) 2023-04-12 07:30:45 -07:00
HaoranYi 9e14cdc19f
Refactor reward payout code - part 2 (#31156)
* extract load_vote_stake_accounts fn

* rename
2023-04-12 08:40:08 -05:00
DimAn b81b7ebf03
validator: `--tpu-host-addr` -> `--public-tpu-address` (#31137) 2023-04-12 13:33:09 +00:00
DimAn 9136f80d36
validator: add `set-public-tpu-address` command (#30452) 2023-04-12 13:32:22 +00:00
Trent Nelson 7f7351d763
SECURITY.md: Require exploit PoC for submission consideration (#31113) 2023-04-11 19:32:48 -06:00
Xiang Zhu 31784b2ecc
Add remove_incomplete_bank_snapshot_dir (#31131)
* Add remove_incomplete_bank_snapshot_dir

* Remove incomplete snapshot dir if incomplete

* Revert "Add remove_incomplete_bank_snapshot_dir"

This reverts commit aaafef74803ca4e2050b8cd83ef352c5a59509b4.

* Replace metadata's is_file with simple PathBuf's is_file

* In test verify the deletion of the incomplete snapshot dir

* Add comments to explain the snapshot dir cleanup
2023-04-11 17:56:26 -07:00
HaoranYi 20d1615ccd
Refactor reward payout code - part 1 (#31155)
type alias
2023-04-11 16:23:52 -05:00
Tao Zhu 5816d33b57
Add test for transaction has too high prioritization fee (#31097)
* Add test for transaction has too high prioritization fee than payer account balance
2023-04-11 16:22:19 -05:00
behzad nouri 557e4c47e1
uses OnceCell for lazy endpoint initialization in quic-client (#31149)
RwLock<Option<...>> lacks the api and adds unnecessary overhead for lazy
initialization. OnceCell instead provides the intended api for this purpose.
2023-04-11 19:53:25 +00:00
Brooks 965dd37924
Moves SnapshotGossipManager to its own file (#31147) 2023-04-11 15:51:52 -04:00
Nick Frostbutter ac761dd9c0
[docs] added google analytics to docs (#31141)
* feat: added google analytics to docs

* docs: added comments
2023-04-11 14:35:40 -05:00
Brooks e1cb8a672b
Renames SnapshotHashes in cluster info metrics (#31145) 2023-04-11 17:35:00 +00:00
Pankaj Garg fb6e02c46c
Retain usage counter on program upgrade (#31142)
* Retain usage counter on program upgrade

* cleanup as per feedback

* fix clippy
2023-04-11 09:43:42 -07:00
Brooks 453f272698
Rename IncrementalSnapshotHashes to SnapshotHashes (#31136) 2023-04-11 10:30:29 -04:00
Jeff Washington (jwash) 0121be5a9f
disk index: add more tests (#31135) 2023-04-11 07:30:11 -07:00
steviez 0eec1ad57f
chore: Update Blockstore::get_slots_since() doc comments (#31134)
Additionally, change the function definition to use Slot instead of u64.
Slot is defined as an alias of u64 so these are functionally equivalent,
but using Slot over u64 is more expressive of the intent.
2023-04-11 02:39:31 -05:00
steviez 814de50f2a
chore: Variable rename `height` ==> `slot` in blockstore function (#31132)
Slots refer to time windows where a block could be produced whereas
height refers to how many blocks are actually in a fork. This function
is operating on a list of slots, so the use of "height" is incorrect and
misleading.
2023-04-11 02:38:20 -05:00