Skip to content

Commit 7b2f138

Browse files
committed
Merge remote-tracking branch 'origin/stable' into release-v7.1.0
2 parents bd8a2a8 + 999b045 commit 7b2f138

File tree

5 files changed

+66
-4
lines changed

5 files changed

+66
-4
lines changed

.github/mergify.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
pull_request_rules:
22
- name: Ask to resolve conflict
33
conditions:
4+
- -closed
45
- conflict
56
- -author=dependabot[bot]
7+
- label=ready-for-review
68
- or:
79
- -draft # Don't report conflicts on regular draft.
810
- and: # Do report conflicts on draft that are scheduled for the next major release.
@@ -12,6 +14,64 @@ pull_request_rules:
1214
comment:
1315
message: This pull request has merge conflicts. Could you please resolve them
1416
@{{author}}? 🙏
17+
label:
18+
add:
19+
- waiting-on-author
20+
remove:
21+
- ready-for-review
22+
23+
- name: Ask to resolve CI failures
24+
conditions:
25+
- -closed
26+
- label=ready-for-review
27+
- or:
28+
- check-skipped=test-suite-success
29+
- check-skipped=local-testnet-success
30+
- check-failure=test-suite-success
31+
- check-failure=local-testnet-success
32+
actions:
33+
comment:
34+
message: Some required checks have failed. Could you please take a look @{{author}}? 🙏
35+
label:
36+
add:
37+
- waiting-on-author
38+
remove:
39+
- ready-for-review
40+
41+
- name: Update labels when PR is unblocked
42+
conditions:
43+
- -closed
44+
- -draft
45+
- label=waiting-on-author
46+
- -conflict
47+
# Unfortunately, it doesn't look like there's an easy way to check for PRs pending
48+
# CI workflows approvals.
49+
- check-success=test-suite-success
50+
- check-success=local-testnet-success
51+
# Update the label only if there are no more change requests from any reviewers and no unresolved threads.
52+
# This rule ensures that a PR with passing CI can be marked as `waiting-on-author`.
53+
- "#changes-requested-reviews-by = 0"
54+
- "#review-threads-unresolved = 0"
55+
actions:
56+
label:
57+
remove:
58+
- waiting-on-author
59+
add:
60+
- ready-for-review
61+
62+
- name: Close stale pull request after 30 days of inactivity
63+
conditions:
64+
- -closed
65+
- label=waiting-on-author
66+
- updated-at<=30 days ago
67+
actions:
68+
close:
69+
message: >
70+
Hi @{{author}}, this pull request has been closed automatically due to 30 days of inactivity.
71+
If you’d like to continue working on it, feel free to reopen at any time.
72+
label:
73+
add:
74+
- stale
1575

1676
- name: Approve trivial maintainer PRs
1777
conditions:

beacon_node/src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ pub fn cli_app() -> Command {
822822
.long("state-cache-size")
823823
.value_name("STATE_CACHE_SIZE")
824824
.help("Specifies the size of the state cache")
825-
.default_value("32")
825+
.default_value("128")
826826
.action(ArgAction::Set)
827827
.display_order(0)
828828
)

beacon_node/store/src/state_cache.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,9 @@ impl<E: EthSpec> StateCache<E> {
345345
let mut old_boundary_state_roots = vec![];
346346
let mut good_boundary_state_roots = vec![];
347347

348-
for (&state_root, (_, state)) in self.states.iter().skip(cull_exempt) {
348+
// Skip the `cull_exempt` most-recently used, then reverse the iterator to start at
349+
// least-recently used states.
350+
for (&state_root, (_, state)) in self.states.iter().skip(cull_exempt).rev() {
349351
let is_advanced = state.slot() > state.latest_block_header().slot;
350352
let is_boundary = state.slot() % E::slots_per_epoch() == 0;
351353
let could_finalize =

book/src/help_bn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ Options:
381381
Minimum number of states to cull from the state cache when it gets
382382
full [default: 1]
383383
--state-cache-size <STATE_CACHE_SIZE>
384-
Specifies the size of the state cache [default: 32]
384+
Specifies the size of the state cache [default: 128]
385385
--suggested-fee-recipient <SUGGESTED-FEE-RECIPIENT>
386386
Emergency fallback fee recipient for use in case the validator client
387387
does not have one configured. You should set this flag on the

lighthouse/tests/beacon_node.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1829,7 +1829,7 @@ fn block_cache_size_flag() {
18291829
fn state_cache_size_default() {
18301830
CommandLineTest::new()
18311831
.run_with_zero_port()
1832-
.with_config(|config| assert_eq!(config.store.state_cache_size, new_non_zero_usize(32)));
1832+
.with_config(|config| assert_eq!(config.store.state_cache_size, new_non_zero_usize(128)));
18331833
}
18341834
#[test]
18351835
fn state_cache_size_flag() {

0 commit comments

Comments
 (0)