Commit Graph

21917 Commits

Author SHA1 Message Date
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
Yihau Chen 221fe61089
chore: remove redundant packages (#30511) 2023-02-28 18:27:29 +08:00
Yihau Chen 676e3e1926
fix: remove unnecessary --allow-private-addr setup (#30552) 2023-02-28 13:14:44 +08:00
Jeff Biseda 781a7cbd28
cleanup get_closeset_completion (#30516) 2023-02-27 16:56:40 -08:00
Trent Nelson 50f069af43
install: support config upgrade from serde_yaml v0.8 (#30535) 2023-02-27 14:25:29 -07:00
Ikko Eltociear Ashimine 7ac3505b30
Fix typo in ledger.md (#30537)
explictly -> explicitly
2023-02-27 12:37:51 -08:00
Yueh-Hsuan Chiang 33e179905f
getter functions for StoredAccountMeta (#30447)
This PR makes all the StoredAccountMeta fields pub(crate)
and provides getter functions to access its member fields.

This PR is a preparation step for abstracting out StoredAccountMeta.
2023-02-27 10:03:22 -08:00
Jordan Sexton 18c22c7cef
Add link to new web3.js repo (#30096) 2023-02-27 10:23:54 -06:00
Jeff Washington (jwash) 85eaf1e7ab
improve BankCreationFreezingProgress and add tests (#30513) 2023-02-27 07:54:08 -08:00
Yihau Chen 2500fd3f01
ci: set -e for .buildkite/scripts/build-downstream-projects.sh (#30508) 2023-02-27 03:19:53 +08:00
Yihau Chen d16a03cd44
chore: bump js-sys to 0.3.59 (#30495) 2023-02-27 03:19:44 +08:00
Yihau Chen ccef90c48d
chore: bump sha3 to 0.10.4 (#30491) 2023-02-27 03:19:35 +08:00
Yihau Chen d19758139d
chore: bump bytemuck to 1.11.0 (#30490) 2023-02-27 03:19:11 +08:00
hana bd49b984e2
remove VoteState::deserialize() from sbf builds (#30515)
the existing deserialize implementation overruns the sbf stack and is unusable in a program context
this silences a warning to that effect which all solana_program importers receive

closes #30188
2023-02-25 16:10:08 -08:00
Tao Zhu cbcd3ef27e
Not allow transactions request zero CU to update prioritization fee cache (#30507)
* filter out transaction requests zero cu from updating prioritization fee cache

* updated comment
2023-02-24 23:50:02 -06:00