Merge remote-tracking branch 'origin/stable' into release-v7.1.0

This commit is contained in:
Michael Sproul
2025-07-09 11:19:16 +10:00
5 changed files with 66 additions and 4 deletions

60
.github/mergify.yml vendored
View File

@@ -1,8 +1,10 @@
pull_request_rules: pull_request_rules:
- name: Ask to resolve conflict - name: Ask to resolve conflict
conditions: conditions:
- -closed
- conflict - conflict
- -author=dependabot[bot] - -author=dependabot[bot]
- label=ready-for-review
- or: - or:
- -draft # Don't report conflicts on regular draft. - -draft # Don't report conflicts on regular draft.
- and: # Do report conflicts on draft that are scheduled for the next major release. - and: # Do report conflicts on draft that are scheduled for the next major release.
@@ -12,6 +14,64 @@ pull_request_rules:
comment: comment:
message: This pull request has merge conflicts. Could you please resolve them message: This pull request has merge conflicts. Could you please resolve them
@{{author}}? 🙏 @{{author}}? 🙏
label:
add:
- waiting-on-author
remove:
- ready-for-review
- name: Ask to resolve CI failures
conditions:
- -closed
- label=ready-for-review
- or:
- check-skipped=test-suite-success
- check-skipped=local-testnet-success
- check-failure=test-suite-success
- check-failure=local-testnet-success
actions:
comment:
message: Some required checks have failed. Could you please take a look @{{author}}? 🙏
label:
add:
- waiting-on-author
remove:
- ready-for-review
- name: Update labels when PR is unblocked
conditions:
- -closed
- -draft
- label=waiting-on-author
- -conflict
# Unfortunately, it doesn't look like there's an easy way to check for PRs pending
# CI workflows approvals.
- check-success=test-suite-success
- check-success=local-testnet-success
# Update the label only if there are no more change requests from any reviewers and no unresolved threads.
# This rule ensures that a PR with passing CI can be marked as `waiting-on-author`.
- "#changes-requested-reviews-by = 0"
- "#review-threads-unresolved = 0"
actions:
label:
remove:
- waiting-on-author
add:
- ready-for-review
- name: Close stale pull request after 30 days of inactivity
conditions:
- -closed
- label=waiting-on-author
- updated-at<=30 days ago
actions:
close:
message: >
Hi @{{author}}, this pull request has been closed automatically due to 30 days of inactivity.
If youd like to continue working on it, feel free to reopen at any time.
label:
add:
- stale
- name: Approve trivial maintainer PRs - name: Approve trivial maintainer PRs
conditions: conditions:

View File

@@ -822,7 +822,7 @@ pub fn cli_app() -> Command {
.long("state-cache-size") .long("state-cache-size")
.value_name("STATE_CACHE_SIZE") .value_name("STATE_CACHE_SIZE")
.help("Specifies the size of the state cache") .help("Specifies the size of the state cache")
.default_value("32") .default_value("128")
.action(ArgAction::Set) .action(ArgAction::Set)
.display_order(0) .display_order(0)
) )

View File

@@ -345,7 +345,9 @@ impl<E: EthSpec> StateCache<E> {
let mut old_boundary_state_roots = vec![]; let mut old_boundary_state_roots = vec![];
let mut good_boundary_state_roots = vec![]; let mut good_boundary_state_roots = vec![];
for (&state_root, (_, state)) in self.states.iter().skip(cull_exempt) { // Skip the `cull_exempt` most-recently used, then reverse the iterator to start at
// least-recently used states.
for (&state_root, (_, state)) in self.states.iter().skip(cull_exempt).rev() {
let is_advanced = state.slot() > state.latest_block_header().slot; let is_advanced = state.slot() > state.latest_block_header().slot;
let is_boundary = state.slot() % E::slots_per_epoch() == 0; let is_boundary = state.slot() % E::slots_per_epoch() == 0;
let could_finalize = let could_finalize =

View File

@@ -381,7 +381,7 @@ Options:
Minimum number of states to cull from the state cache when it gets Minimum number of states to cull from the state cache when it gets
full [default: 1] full [default: 1]
--state-cache-size <STATE_CACHE_SIZE> --state-cache-size <STATE_CACHE_SIZE>
Specifies the size of the state cache [default: 32] Specifies the size of the state cache [default: 128]
--suggested-fee-recipient <SUGGESTED-FEE-RECIPIENT> --suggested-fee-recipient <SUGGESTED-FEE-RECIPIENT>
Emergency fallback fee recipient for use in case the validator client Emergency fallback fee recipient for use in case the validator client
does not have one configured. You should set this flag on the does not have one configured. You should set this flag on the

View File

@@ -1829,7 +1829,7 @@ fn block_cache_size_flag() {
fn state_cache_size_default() { fn state_cache_size_default() {
CommandLineTest::new() CommandLineTest::new()
.run_with_zero_port() .run_with_zero_port()
.with_config(|config| assert_eq!(config.store.state_cache_size, new_non_zero_usize(32))); .with_config(|config| assert_eq!(config.store.state_cache_size, new_non_zero_usize(128)));
} }
#[test] #[test]
fn state_cache_size_flag() { fn state_cache_size_flag() {