Commit Graph

19773 Commits

Author SHA1 Message Date
Justin Starry 07d7c938b9
Refactor: split up syscalls module (#26637)
* Refactor: split up syscalls module

* fix ci script

* fix visibility
2022-07-16 19:33:57 +02:00
sakridge 9714cb3764
Remove some unchecked math from the quic chunk handling (#26408) 2022-07-16 17:03:31 +02:00
Tao Zhu 22d465cd57
Share function to get priority details from various transaction types (#26643) 2022-07-15 18:17:22 -05:00
Jeff Washington (jwash) be8813e588
shrink stops using HandleReclaims (#26594) 2022-07-15 17:54:48 -05:00
Jeff Washington (jwash) 83c614da3c
change type to be more clear (#26646) 2022-07-15 17:17:17 -05:00
Jeff Washington (jwash) 47716a5e01
async hash verify on load (#26208)
* verify accounts hash in bg on startup

* fix some tests and loading from genesis

* add extra state for when background thread has completed
2022-07-15 14:29:56 -05:00
Justin Starry 15d18a03e5
Clean up activated `reduce_required_deploy_balance` feature (#26557)
Clean up activated reduce_required_deploy_balance feature
2022-07-15 16:08:14 +01:00
behzad nouri bf225bae73
restricts rent-paying accounts lifetime extension (#26606)
https://github.com/solana-labs/solana/pull/22292
prevents rent paying accounts creation going forward. However a rent
paying account can linger on for ever if it is continually topped up but
stays below the rent-exempt minimum.
This can prevent eliminating accounts-rewrites and the problematic
rent_epoch field in accounts.

Link to discord discussion:
https://discord.com/channels/428295358100013066/943609352068145162/995202300001927219

This commit restricts rent-paying accounts lifetime extension by
preventing increasing lamports on the account if the account stays below
the rent-exempt minimum.
2022-07-15 13:23:37 +00:00
dependabot[bot] 6887e1268e
chore:(deps): bump @testing-library/user-event from 13.5.0 to 14.2.3 in /explorer (#26633)
chore:(deps): bump @testing-library/user-event in /explorer

Bumps [@testing-library/user-event](https://github.com/testing-library/user-event) from 13.5.0 to 14.2.3.
- [Release notes](https://github.com/testing-library/user-event/releases)
- [Changelog](https://github.com/testing-library/user-event/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/user-event/compare/v13.5.0...v14.2.3)

---
updated-dependencies:
- dependency-name: "@testing-library/user-event"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-15 08:17:26 +00:00
kirill lykov b1acd9954b
extract method to split keypairs into two set of chunks (#26623) 2022-07-15 09:47:30 +02:00
Alexander Meißner 038da82b6f
Feature: Early verification of account modifications in `BorrowedAccount` (#25899)
* Adjusts test cases for stricter requirements.

* Removes account reset in deserialization test.

* Removes verify related test cases.

* Replicates account modification verification logic of PreAccount in BorrowedAccount.

* Adds TransactionContext::account_touched_flags.

* Adds account modification verification to the BPF ABIv0 and ABIv1 deserialization, CPI syscall and program-test.

* Replicates the total sum of all lamports verification of PreAccounts in InstructionContext

* Check that the callers instruction balance is maintained during a call / push.

* Replicates PreAccount statistics in TransactionContext.

* Disable verify() and verify_and_update() if the feature enable_early_verification_of_account_modifications is enabled.

* Moves Option<Rent> of enable_early_verification_of_account_modifications into TransactionContext::new().

* Relaxes AccountDataMeter related test cases.

* Don't touch the account if nothing changes.

* Adds two tests to trigger InstructionError::UnbalancedInstruction.

Co-authored-by: Justin Starry <justin@solana.com>
2022-07-15 09:31:34 +02:00
Tao Zhu f13b5c832d
Remove obsoleted metrics reporting to reduce lock contention on cost_model (#26608)
remove obsoleted metrics reporting to reduce lock contention on cost_model
2022-07-14 23:02:49 -05:00
Dmitri Makarov 0b78a213c3 Add a comment explaining the check for crate recompilation redundancy 2022-07-14 17:59:37 -07:00
skrrb 4f71ae6102 test-validator: use ADDRESS from account flag 2022-07-14 11:23:07 -07:00
Dmitri Makarov 27cee7a7de Compile for bpf target for compatibility when cargo-build-bpf is used 2022-07-14 10:41:39 -07:00
Justin Starry 3fc161bea4
Fix flaky message kitchen sink test (#26624) 2022-07-14 18:39:57 +01:00
bji 61fd9288ba
Fix sol_memset to return the correct value. (#26598) 2022-07-14 17:27:02 +01:00
HaoranYi 819d6512ab
add PartialEq, Eq and spell correction (#26614) 2022-07-14 14:55:03 +00:00
Jeff Washington (jwash) 3e9bd6170c
use OnceCell instead of RwLock for rent_paying_accounts_by_partition (#26601) 2022-07-14 08:52:41 -05:00
behzad nouri 1bc2cc7f76
patches flaky test_rpc_slot_updates (#26593)
test_rpc_slot_updates fails if SlotUpdate::Completed is received after
SlotUpdate::Frozen:
https://github.com/solana-labs/solana/blob/dcfd823ca/rpc-test/tests/rpc.rs#L198-L228

However, SlotUpdate::Completed is sent asynchronous to banking-stage and
replay when shreds are inserted into blockstore. When the leader
generates blocks, replay may freeze the bank before shreds are all
inserted into blockstore; and so SlotUpdate::Completed may be received
_after_ SlotUpdate::Frozen.

The commit removes the ordering check for SlotUpdate::Completed.
2022-07-14 12:33:54 +00:00
Jeff Washington (jwash) 4dea32e8e5
fix active_scans metric to not swap (#26602) 2022-07-13 20:11:23 -05:00
Jeff Washington (jwash) 2b7cc107d8
typo (#26618) 2022-07-13 17:55:02 -05:00
Alessandro Decina ab6802bd2d cargo-build-sbf, cargo-test-sbf: add --arch option
--arch allows selecting the target SBF version. See
https://github.com/solana-labs/llvm-project/pull/26.
2022-07-13 14:49:38 -07:00
Dmitri Makarov 8797ad03c4 Bump sbf-tools version to v1.28 2022-07-13 21:47:48 +00:00
Dmitri Makarov 1db17a8874 Issue a warning about removing RUSTC from cargo env by build-sbf 2022-07-13 20:44:27 +00:00
Antematter e3c9c58032
feat: added web3 bindings for Address Lookup Table Program instructions (#26469)
* feat: added web3 bindings for Address Lookup Table Program

* fix: refactoring + addresses PR comments

* fix: typos fixed and minor refactoring

* add lookup table instruction decoding support + fixes recent slot serialization bug

* export lookup table program

* linting

* fix: type annotations

* add tests cases for address lookup table program

* fix: alloc encoding buffer properly for seq layouts

* fix: typedoc issue

Co-authored-by: Antematter <hello@antematter.io>
Co-authored-by: Muhammad Saad <msaadahmed039@gmail.com>
Co-authored-by: Justin Starry <justin@solana.com>
2022-07-13 20:19:51 +01:00
Richard Patel 048b9f670b
Set solana-tpu ALPN protocol ID (#26587) 2022-07-13 20:55:13 +02:00
Pankaj Garg 49a112ae74
Use pubkey of peer for active QUIC connection table (#26597)
* Use pubkey of peer for active QUIC connection table

* clippy

* update code
2022-07-13 09:59:01 -07:00
Dmitri Makarov b7e7e4159c Prevent cargo from running a non-BPF compiler for BPF target 2022-07-13 05:48:48 +00:00
Steven Luscher 817402123f
fix: fork `URL` and `fetch` for React Native in web3.js (#26604) 2022-07-12 21:41:33 -07:00
Michael Vines 06ae906e90 getStakeActivation now correctly returns the inactivate lamports for deactivat{ed,ing} stake account in all cases 2022-07-12 18:17:58 -07:00
HaoranYi 1aa9215411
Refactor: add account_iter api for appendvec (#26591)
* add account iterator for appendvec

* semicolon
2022-07-12 23:56:05 +00:00
Jeff Washington (jwash) 6b0eb5a42b
handle rent paying accounts differently (#26487)
* handle rent paying accounts differently

* restore collection

* downgrade assert to metric and warn until we get more runtime
2022-07-12 17:51:33 -05:00
Steven Luscher 8217848388
Direct issue filers to the Stack Exchange if their question is one of technical support 2022-07-12 15:29:29 -07:00
Dmitri Makarov b1718422ce Add a check for rebuild regression due to dep features in cargo tomls 2022-07-12 15:12:22 -07:00
Brooks Prumo 1dfbb225e3
Fix test_accounts_data_size_and_rent_collection (#26576) 2022-07-12 17:05:21 -05:00
Jeff Washington (jwash) c62c55a16b
shrink stores by id (#26490) 2022-07-12 15:43:41 -05:00
Pankaj Garg 14ee87d793
Move QUIC TLS certificate code in its own file (#26569) 2022-07-12 13:34:37 -07:00
Jeff Washington (jwash) 9d31216d23
add StoreReclaims::Ignore (#26489) 2022-07-12 15:05:47 -05:00
HaoranYi bf14440895
clean up and optimize account hash verify (#26560)
* remove unused code

* extract test related fault hash inject fn

* use rotate to optimize hashes removal

* use rotate to optimize snapshot hashes removal

* address code reveiw feedbacks

* revise comments

* inline
2022-07-12 19:27:28 +00:00
Justin Starry dcfd823ca8
Clean up activated `reject_non_rent_exempt_vote_withdraws` feature (#26558)
Clean up activated reject_non_rent_exempt_vote_withdraws feature
2022-07-12 18:17:42 +01:00
Yueh-Hsuan Chiang 493108f026
Move Blockstore::blockstore_directory() to ShredStorageType (#26179)
#### Summary of Changes
Blockstore::blockstore_directory() function takes a ShredStorageType and returns a path.
As it's a ShredStorageType related function, moving it under ShredStorageType as a
member function is a better fit.

In addition, as we start doing automatic shred compaction type selection under ledger-tool,
it becomes more convenient to reuse the function and const under blockstore_options
namespace instead of blockstore.
2022-07-13 00:05:54 +08:00
Yueh-Hsuan Chiang f284bba53b
Create const &strs for rocksdb perf write operation names (#26352)
#### Summary of Changes
Define PERF_METRIC_OP_NAME_PUT and PERF_METRIC_OP_NAME_WRITE_BATCH
to replace repetitive / hard-coded operation names for report_rocksdb_write_perf.
2022-07-13 00:05:26 +08:00
steviez 7a0ba899bb
Add some general guidance to GitHub issue template (#26570)
Add some general guidance to issue template
2022-07-12 09:53:15 -05:00
Jeff Washington (jwash) f54f528148
make bank test creation standard (#26519) 2022-07-12 09:07:55 -05:00
Athar Mohammad d0d3ad7166
Support for returnData in simulate transaction (#26499)
feat(web3.js): add Support for returnData in simulate transaction
2022-07-12 14:07:17 +02:00
Alexander Meißner 03738d6766
Cleanup: Removes `prev_account_sizes` from `InvokeContext::native_invoke()` (#26582)
Removes prev_account_sizes from InvokeContext::native_invoke().
2022-07-12 13:41:29 +02:00
github-actions[bot] fd5df1cf25
Bump Version to 1.11.4 (#26578)
Co-authored-by: willhickey <willhickey@users.noreply.github.com>
2022-07-11 23:30:38 -05:00
Jeff Washington (jwash) 1db136a8be
do not count 0 lamport accounts as rent-paying (#26514) 2022-07-11 22:16:46 -05:00
Jeff Washington (jwash) 36bd46bece
ancient append vec: reuse AccountsToStore (#26572) 2022-07-11 22:13:09 -05:00