Commit Graph

22275 Commits

Author SHA1 Message Date
Ryo Onodera aaaee556d8
ci: silence ci test output while recording in full (#30654)
* ci: silence ci test output while recording in full

* shellcheck

* Adjust --color handling place

* Dump to stderr...

* Reduce too spammy solana_metrics logs

* Clean up

* Tweak

* Stash actual command's exit_code, not echo's
2023-03-16 22:17:29 +09:00
Brooks 423fd6010e
Removes extraneous accounts hash calculations in snapshot tests (#30737) 2023-03-16 09:17:03 -04:00
Tyera 0cdb315b5b
Make redelegate signer more optional (#30734) 2023-03-15 22:59:56 -06:00
Yihau Chen f8abc8df8d
ci: fix do-audit don't report error (#30728)
* ci: fix do-audit don't retport error

* Update ci/do-audit.sh

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>

* use the latest suggestion

* lint

* redirect stderr to stdout

* another solution

---------

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
2023-03-16 11:58:08 +08:00
Yueh-Hsuan Chiang fce949009d
Add new_from_file() API to AccountsFile (#30687)
#### Problem
Accounts db currently use AppendVec::new_from_file() directly
to create a new AcountsFile instance from an existing file.
However, this method should be abstracted out to AccountsFile
so that an existing file can be opened correctly using the right format.

#### Summary of Changes
Add new_from_file() API to AccountsFile which will open an existing
file based on its accounts file format.

Currently, it only supports AppendVec.
2023-03-15 20:38:20 -07:00
Andrew Fitzgerald b7e76c752f
Separate stats updates from decision_maker (#30481)
* Separate stats updates from decision_maker

* BufferedPacketsDecision::bank_start

* BufferedPacketsDecision: bank_start() doc-comment

* remove unnecessary clone
2023-03-15 19:39:48 -07:00
Ryo Onodera 74970a0b5d
Remove unused ProcessOptions::entry_callback (#30600)
* Confine entry_callback under cfg(test) for clarity

* Fix ci

* Actually remove entry_callback altogether

* fix clippy
2023-03-16 09:33:18 +09:00
behzad nouri 3cc74a6087
updates tempfile to 3.4.0 (#30727)
Patching below rustsec advisory:

    Crate:     remove_dir_all
    Version:   0.5.3
    Title:     Race Condition Enabling Link Following and Time-of-check Time-of-use (TOCTOU)
    Date:      2023-02-24
    ID:        RUSTSEC-2023-0018
    URL:       https://rustsec.org/advisories/RUSTSEC-2023-0018
    Solution:  Upgrade to >=0.8.0
2023-03-15 18:25:35 -06:00
Brooks cbc0d01d0d
Refactors verify_accounts_hash_and_lamports() (#30733) 2023-03-15 18:37:27 -04:00
samkim-crypto 2d58bb287d
[zk-token-sdk] Add option to create proof context state in the proof verification program (#29996)
* extend verifiable trait

* add PodBool

* implement ZkProofData trait

* add proof context program to zk-token-proof program

* update tests  for close account

* add close account instruction

* reorganize tests

* complete tests

* clean up and add docs

* clean up pod

* add proof program state

* update tests

* move proof program tests as separate module

* clippy

* cargo sort

* cargo fmt

* re-organize visibility

* add context state description

* update maintainer reference

* change `VerifyProofData` and `ProofContextState` to pod

* add tests for mixing proof types

* add tests for self owned context state accounts

* cargo fmt

* remove unnecessary scoping and add comments on scopes

* re-organize proof instructions

* clippy

* update zk-token-proof-test to 1.16.0

* upgrade spl-token-2022 to 0.6.1

* reoganize proof type

* cargo lock

* remove ZkProofContext trait
2023-03-16 07:35:20 +09:00
Tao Zhu a4ad0c75fc
fix heap cost calculation rounding error (#30673)
* add test for refaction heap size, fix size truncating by div op
* add feature gate
* checked result of consume_checked() if feature is activated
2023-03-15 12:03:04 -05:00
Brooks cefb00e3fb
Includes error in panic in initial accounts hash verification (#30725) 2023-03-15 12:24:55 -04:00
Brooks a5f86a8212
Verifies accounts hash in snapshot tests (#30724) 2023-03-15 12:23:44 -04:00
Brooks 65cd55261a
Makes Bank::get_snapshot_hash() aware of incremental accounts hashes (#30719) 2023-03-14 18:03:38 -04:00
Jeff Washington (jwash) 62fe6ea7a0
validators always skip clean/shrink on startup (#30710)
* validators always skip clean/shrink on startup

* move arg to get_deprecated_arguments
2023-03-14 11:41:15 -07:00
Nick Frostbutter f528335ac0
docs: prioritization fees (#30138)
* docs: updated prioritization fees docs

* fix: updated wording and removed outdated info

* docs: updated prioritization fees docs

* fix: merge fix

---------

Co-authored-by: nickfrosty <nick.frostbutter@solana.org>
2023-03-14 13:31:41 -05:00
Tyera b389d509a8
Track max_complete_rewards_slot for use in rpc, bigtable (#30698)
* Add RewardsMessage enum

* Cache and update max_complete_rewards_slot

* Plumb max_complete_rewards_slot into JsonRpcRequestProcesseor

* Use max_complete_rewards_slot to check get_block requests

* Use max_complete_rewards_slot to limit Bigtable uploads

* Plumb max_complete_rewards_slot into RpcSubscriptions

* Use max_complete_rewards_slot to limit block subscriptions

* Nit: fix test
2023-03-14 12:08:48 -06:00
Brooks 93c43610ac
AccountsHashVerifier stores IncrementalAccountsHash in AccountsDb (#30696) 2023-03-14 12:41:44 -04:00
Brennan 9b587bf073
Create gossip vote iterator sorted by stake weight (#30697) 2023-03-14 08:43:01 -07:00
Brennan 11c942ab40
`test_verified_vote_packets_validator_gossip_votes_iterator_correct_fork` dynamic num validators (#30695)
Gossip vote test dynamic number of validators cleanup
2023-03-14 08:35:26 -07:00
Jeff Washington (jwash) 89d5efa0d8
mem idx tracks duplicates better (#30701) 2023-03-14 07:26:39 -07:00
Brooks 560ec08d5e
AccountsHashVerifier writes BankIncrementalSnapshotPersistence (#30587) 2023-03-13 17:44:34 -04:00
Brooks 346021a48c
Refactors common accounts hash calculation config in AccountsHashVerifier (#30677)
* Refactors common accounts hash calculation config in AccountsHashVerifier

* pr: config var
2023-03-13 19:39:28 +00:00
mvines a791e1b541
rpc_service: Rename variable for consistency with the rest of the code base (#30694)
Rename variable for consistency with the rest of the code base
2023-03-13 19:37:06 +00:00
Brooks 6e5615e32d
Revert "AccountsHashVerifier remembers last full snapshot info (#30582)" (#30660) 2023-03-13 14:48:16 -04:00
Brooks 263342a686
Adds accounts hashes from full & incremental snapshots at startup (#30656) 2023-03-13 14:47:25 -04:00
Brooks 505e3ff5c7
AccountsHashVerifier updates AccountsDb after calculating accounts hash (#30658) 2023-03-13 16:41:24 +00:00
Madhav Goyal 9a8a0223ca
Link needs updating (#30688)
* Link needs updating

Link to monitor the solana cluster doesnt work

* Updated to solana grafna

users could fin the dashboard they are looking for
2023-03-13 17:33:22 +01:00
Trent Nelson a15139ef15
tests: share `GenesisConfig` in `validator_parallel_exit` (#30692) 2023-03-13 10:12:35 -06:00
Brooks a43f803604
AccountsHashVerifier purges old accounts hashes (#30644) 2023-03-13 11:12:11 -04:00
Brooks 5e5b7f00a2
Stores capitalization in account hashes map (#30635) 2023-03-13 10:50:45 -04:00
Ryo Onodera 7f58345dad
ci: test-checks.sh all sbf code & use nightly only (#30602) 2023-03-13 14:28:34 +09:00
behzad nouri c4b2639a86
patches flaky test_retransmit_latest_unpropagated_leader_slot (#30686) 2023-03-12 22:46:05 +00:00
Brooks 3a97986d7e
Cleans up tests for verify_accounts_hash (#30683) 2023-03-11 01:01:44 -05:00
behzad nouri f9805b6fbb
stops nodes from broadcasting slots twice (#30681)
https://github.com/solana-labs/solana/blob/94ef881de/core/src/progress_map.rs#L178
always returns true the first time around because retry_time is None.
So every slot is broadcasted twice.
2023-03-11 02:46:08 +00:00
Brooks 17b48edd7b
Renames types to be consistent with verify_accounts_hash (#30674) 2023-03-10 20:02:14 -05:00
Brooks 63623e4df2
Renames fns to verify_accounts_hash (#30672) 2023-03-10 18:11:47 -05:00
Brooks 64f583b37d
Improves logs in bank verification at startup (#30671)
* Improves logs in bank verification at startup

* pr: should_clean
2023-03-10 21:01:49 +00:00
mvines 94ef881de0
Update discord link in docs (#30670)
Update discord link
2023-03-10 12:09:28 -08:00
Tao Zhu 7b95c8e698
add default_cost as mandatory field for Builtin (#30639)
* add default_cost as mandatory field for Builtin

* updated tests

* set zkp program default to VerifyTransfer CUs

---------

Co-authored-by: Jon Cinque <joncinque@pm.me>
2023-03-10 14:02:24 -06:00
Alessandro Decina 0335ea7249
Bump solana_rbpf to v0.2.40 (#30668)
Update to solana_rbpf v0.2.40
2023-03-10 19:05:29 +01:00
Andrew Fitzgerald 5f6755f58b
remove test fn (#30616)
kill banking_stage::Consumer test_fn
2023-03-10 09:30:25 -08:00
Alessandro Decina 13107b4eb6
Enable JIT in Bank::new_with_config_for_tests() (#30661)
The most common validator configuration is JIT on, so test that. On
platforms that don't support JIT we'll still fallback on the
interpreter.
2023-03-10 22:52:33 +11:00
Ryo Onodera 0b9c040fcf
Add .codecov.yml with checks disabled (#30666)
* Add .codecov.yml with checks disabled

* Trigger test-coverage.sh...
2023-03-10 20:11:22 +09:00
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