Commit Graph

21931 Commits

Author SHA1 Message Date
Yihau Chen 04e52f5475
ci: remove ejson (#30653) 2023-03-10 14:52:47 +08:00
samkim-crypto 4a94eeee5e
Upgrade to token-2022 0.6.0 (#30353)
* upgrade spl-token-2022 to 0.6.0

* Add spl_token_2022-0.6.0.so to program-test

* cargo lock

* update account decoder tests to use Pubkey::new_from_array instead of Pubkey::new

* update rpc tests to use Pubkey::new_from_array instead of Pubkey::new

* update token-2022 .so file

* cargo lock

* increase the threshold for allowable rebuilds in ci

* update spl ATA to v1.1.3

* decrement back the threshold for allowable rebuilds

* cargo lock

* increment ci rebuild threshold
2023-03-10 10:32:19 +09:00
Yueh-Hsuan Chiang 71b6370426
Abstract out StoredAccountMeta as an Enum (#30478)
#### Problem
The existing StoredAccountMeta requires the file and in-memory layout of
account metadata to match StoredMeta and AccountMeta.  This limits the
flexibility to implement different accounts storage file formats.

#### Summary of Changes
This PR abstracts out StoredAccountMeta as an Enum.
2023-03-09 15:52:51 -08:00
Andrew Fitzgerald b0112a5f43
BankingStage Consumer: test_buffered_packets* reworking (#30615)
* refactor test_consume_buffered_packets_interrupted without test_fn

* Fix comment

* Also check retries

* Add retryable test case
2023-03-09 09:13:04 -08:00
Brennan 76eef7ed0d
Require minimum of 2 ticks per slot for test val (#30646) 2023-03-09 08:18:00 -08:00
Yihau Chen 755a9a6600
ci: add SCCACHE_S3_KEY_PREFIX (#30652) 2023-03-09 19:29:27 +08:00
Ashwin Sekar 11e554b922
Fix repair_weight test bad merge failure (#30649) 2023-03-08 21:23:37 -07:00
Steven Luscher 569c5fd9d6
[docs] Fix `dataSlice` definition (#30648)
* Repair incorrect definition for `dataSlice` in `getAccountInfo`

* Update all other occurrences of `dataSlice` in the docs
2023-03-08 19:54:33 -06:00
Tao Zhu 3b9438fd49
Replace hardcoded loaded accounts size limit with compute budget instruction (#30506)
1. replace hardcoded loaded accounts data size limit with compute budget instruction;
2. new transaction error for invalid account data size limit
3. test requested limit with combination of features and transactions
2023-03-08 19:41:45 -06:00
Ashwin Sekar 31712d38de
Track pruned subtrees in repair weight (#29922) 2023-03-08 18:38:32 -07:00
Steven Luscher 0c41c8ee1b
docs: fix order of positional `start_slot` and `end_slot` in `getBlocks` API docs (#30351) 2023-03-08 15:53:38 -08:00
Alexander Meißner d2fc2e5f62
Refactor - Remove `first_instruction_account` in `bpf_loader` (#30614)
* Removes first_instruction_account from process_loader_upgradeable_instruction(), process_loader_instruction() and write_program_data().

* Removes first_instruction_account from process_instruction_common().

* Removes get_index_in_transaction() and try_borrow_account().
2023-03-08 16:54:19 +01:00
Ryo Onodera d8a6953eb2
Disable cache if retried 3 times (#30638)
* Disable cache if retired 3 times

* Add more comments

* Reduce if nesting to avoid maintenance pitfall by DISABLE_CACHE

* Well /home was required...

* Adjust to align with third time's the charm

* Adjust if arrangement a bit with tweaks
2023-03-08 22:54:19 +09:00
Julien Catalano 4f3b71e173
[docs] Fix typos (#30640) 2023-03-08 13:25:23 +01:00
Jon Cinque b0a1398e66
program-test: Add test for moving lamports (#30637) 2023-03-08 12:43:26 +01:00
Dmitri Makarov 807f90ee8e
Document debugging on-chain programs (#30632) 2023-03-07 20:56:01 -05:00
Jeff Biseda 4c0ce84488
increase retransmit shreds received cache size (#30556) 2023-03-07 13:03:52 -08:00
Will Hickey 63052ed463
CI: Remove mergify backport config for v1.13 (#30520)
* CI: Remove mergify backport config for v1.13

* Restore BackportAssignee definition (removed by previous commit by mistake)
2023-03-07 11:10:23 -06:00
HaoranYi 8a1c7614f1
typos (#30604) 2023-03-07 11:08:46 -06:00
mvines 2d88c2a646
mergify: Remove v1.15 backport rules (#30621)
Remove v1.15 backport rules
2023-03-07 08:35:00 -08:00
Dmitri Makarov b915b47315
Bump sbf-tools version to v1.35 (#30628)
- this release includes fixes in relocation handling necessary for
  source-level debugging of on-chain programs
2023-03-07 07:23:59 -08:00
kirill lykov 5631685d30
replaced chunks with tuples in validator (#30499)
* replaced chunks with tuples in test validator

* update Cargo.lock

* replaced chunks with tuples in genesis

* Update Cargo.lock
2023-03-07 14:32:42 +01:00
Dmitri Makarov 7361fe27f9
Disable cwd remapping if debug build is requested in build-sbf (#30601)
CWD remapping removes absolute path prefixes from the path strings in
generated binary files. The paths are needed for source level
debugging.
2023-03-06 21:36:44 -05:00
K-anon 36d773810a
Add Executor Cache Eviction Strategy (#30526)
Co-authored-by: K-anon <IntokuSatori@users.noreply.github.com>
2023-03-06 15:07:01 -07:00
Brooks 70c6c7e1f7
Uses strong types for snapshot hashes in SnapshotPackagerService (#30603) 2023-03-06 16:50:45 -05:00
Illia Bobyr 82288d4457
accounts_db::get_all_accounts: Select slots with an iterator (#30581)
As `Range` is a special case of an `Iterator`, this is a generalization
that makes `get_all_accounts()` accept other kinds of ranges.  Such as
`RangeInclusive`.
2023-03-06 12:30:50 -08:00
Yueh-Hsuan Chiang a78ef393bf
Generalize the return value of append_accounts() (#30571)
#### Problem
The existing append_accounts returns a vector of offsets, which accounts-db
later uses it to infer the storage size of each account.  However, such inference
does not apply to the new hot/cold storage format.

#### Summary of Changes
This PR changes the return value of append_accounts() to `Vec<StoredAccountInfo>`,
which includes both offset and storage size information of an account.
2023-03-06 09:52:05 -08:00
Andrew Fitzgerald bba0ed702f
BankingStage Refactor: Consumer State (#30288)
* BankingStage Refactor: Consumer add state

* remove trailing comma
2023-03-06 09:13:28 -08:00
Brooks 120b0c92d1
AccountsHashVerifier remembers last full snapshot info (#30582)
AHV remembers last full snapshot info
2023-03-06 16:40:46 +00:00
Alexander Meißner 38e74325e3
Refactor - Remove `process_instruction` parameter `first_instruction_account` (#30579)
* Stops using first_instruction_account parameter in bpf_loader.

* Removes first_instruction_account parameter from process_instruction().
2023-03-06 17:37:37 +01:00
Jeff Washington (jwash) b26d470b02
support loading snapshots with > 1 append vec per slot (#30570)
* support loading snapshots with > 1 append vec per slot

* pr feedback

* drain to into_values

* unwrap() -> expect()

* loop to find non-conflicting file and add test
2023-03-06 06:08:57 -08:00
Oliver Tušla ec7b1c8bda
Fix typo: where -> were (#30599) 2023-03-05 16:46:00 -05:00
steviez a8bff33387
Make backup_and_clear_blockstore() honor ValidatorConfig options (#30538)
* Add helper function to create BlockstoreOptions from ValidatorConfig

* Make backup_and_clear_blockstore() honor ValidatorConfig options

backup_and_clear_blockstore() opens a Blockstore session; however, it
is currently using Blockstore::open(). This Blockstore method uses
BlockstoreOption::default() under the hood. As a result, any validator
args that adjust Blockstore settings are not considered in
backup_and_clear_blockstore().

This is especially problematic if the non-default value of
--rocksdb-shred-compaction is being used. In this case,
backup_and_clear_blockstore() was opening the wrong directory and
incorrectly finding an empty ledger.

This change plumbs any blockstore configuration to
backup_and_clear_blockstore().
2023-03-04 21:09:41 -08:00
behzad nouri 06a8419423
reduces MAX_CODE_SHREDS_PER_SLOT (#30543)
https://github.com/solana-labs/solana/pull/26070
introduced MAX_CODE_SHREDS_PER_SLOT which because of how coding shreds
are generated was later set larger than MAX_DATA_SHREDS_PER_SLOT.

The old code was discarding: index >= MAX_DATA_SHREDS_PER_SLOT
regardless of if the shred is code or data:
https://github.com/solana-labs/solana/blob/v1.13.6/core/src/window_service.rs#L193-L195

Since that many code (or data) shreds will probably never result in a
rooted slot anyways, the commit reduces MAX_CODE_SHREDS_PER_SLOT to what
previously was the effective limit.
2023-03-04 20:56:26 +00:00
Brooks 6972f92c29
AHV loop uses let-else (#30583) 2023-03-04 01:59:29 +00:00
sakridge 7a8563f2c8
Panic when shred index exceeds the max per slot (#30555)
Assert when shred index exceeds the max per slot
2023-03-04 02:49:23 +01:00
Brooks 1cf0ce1215
AHV logs when stopped (#30585) 2023-03-03 23:44:30 +00:00
Brooks cd652a7e20
AHV uses metrics names like SPS's (#30584) 2023-03-03 23:38:35 +00:00
sakridge eb4e7584b9
Tweak net.sh docs for primordial stakes (#30586)
Update net.sh docs
2023-03-04 00:28:10 +01:00
Illia Bobyr 14c600aa70
StoredAccountMeta: Relax returned refs lifetimes. (#30576)
All the references returned from a `StoredAccountMeta` instance
actually come from the underlying account.  As written, the lifetimes of
the returned references are constrained by the lifetime of the
`StoredAccountMeta` instance.

While technically correct, it is overly strict.  It is totally fine to
use the returned reference as long as the underlying account is alive.
Which could be longer than the lifetime of the `StoredAccountMeta`
wrapper.
2023-03-03 14:51:37 -08:00
steviez db94e4564f
ledger-tool: Avoid creating SanitizedTransaction in print command (#30575)
The print command looks up program_ids from transactions by creating
SanitizedTransactions. But, print doesn't have access to a Bank so
transactions that include an address table lookup can't be sanitized.

Sanitizing the transaction isn't necessary, so this change just looks up
the program id from unsanitized transactions.
2023-03-03 14:18:57 -06:00
Jeff Washington (jwash) b7d05dd755
consolidate held in mem stats (#30574) 2023-03-03 10:05:05 -08:00
Yihau Chen 35427ee5a9
test: add test_load_serde_yaml_v_0_8_config (#30558) 2023-03-03 12:44:02 +08:00
Tyera 7b1d446001
Admin RPC Service: move post-init activation to before wait-for-supermajority (#30544)
* Move AdminRpcRequestMetadataPostInit to solana-core

* Move AdminRpcRequestMetadataPostInit write to just before wait_for_supermajority

* Pass AdminRpcRequestMetadataPostInit in TestValidatorGenesis

* Fixup local-cluster
2023-03-01 19:38:11 -07:00
Jeff Washington (jwash) fbcb82dcf8
add index_entries_being_shrunk to ShrinkCollect (#30518) 2023-03-01 17:09:42 -08:00
Jeff Washington (jwash) 590ee58667
wip: throttle correctly (#30547)
throttle correctly
2023-03-01 17:08:46 -08:00
Trent Nelson a3e4c96bc0
security.txt - pinging admins is a good way to get banned (#30567) 2023-03-01 14:01:15 -07:00
HaoranYi 16db984cb5
improve supermajority waiting logging (#30479)
make logging for supermajority waiting and stake percent from gossip in sync
2023-03-01 08:57:42 -06:00
Alexander Meißner 31bd695b83
Feature - `switch_to_new_elf_parser` (#30498)
Adds feature gate "switch_to_new_elf_parser".
2023-03-01 09:13:00 +01:00
Yihau Chen bd98f3a533
chore: make anyhow inherit root's declaration (#30509) 2023-02-28 18:27:41 +08:00