@aztec/aztec-node 3.0.0-canary.a9708bd → 3.0.0-manual.20251030

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,7 +19,7 @@ export class SentinelStore {
19
19
 
20
20
  constructor(
21
21
  private store: AztecAsyncKVStore,
22
- private config: { historyLength: number },
22
+ private config: { historyLength: number; historicProvenPerformanceLength: number },
23
23
  ) {
24
24
  this.historyMap = store.openMap('sentinel-validator-status');
25
25
  this.provenMap = store.openMap('sentinel-validator-proven');
@@ -29,6 +29,10 @@ export class SentinelStore {
29
29
  return this.config.historyLength;
30
30
  }
31
31
 
32
+ public getHistoricProvenPerformanceLength() {
33
+ return this.config.historicProvenPerformanceLength;
34
+ }
35
+
32
36
  public async updateProvenPerformance(epoch: bigint, performance: ValidatorsEpochPerformance) {
33
37
  await this.store.transactionAsync(async () => {
34
38
  for (const [who, { missed, total }] of Object.entries(performance)) {
@@ -65,8 +69,8 @@ export class SentinelStore {
65
69
  // Since we keep the size small, this is not a big deal.
66
70
  currentPerformance.sort((a, b) => Number(a.epoch - b.epoch));
67
71
 
68
- // keep the most recent `historyLength` entries.
69
- const performanceToKeep = currentPerformance.slice(-this.config.historyLength);
72
+ // keep the most recent `historicProvenPerformanceLength` entries.
73
+ const performanceToKeep = currentPerformance.slice(-this.config.historicProvenPerformanceLength);
70
74
 
71
75
  await this.provenMap.set(who.toString(), this.serializePerformance(performanceToKeep));
72
76
  }