@aztec/archiver 3.0.0-nightly.20251105 → 3.0.0-nightly.20251107

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.
@@ -1 +1 @@
1
- {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/archiver/validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EACL,KAAK,gBAAgB,EAErB,KAAK,mBAAmB,EAEzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,iBAAiB,EAAkB,MAAM,6BAA6B,CAAC;AAErF,YAAY,EAAE,mBAAmB,EAAE,CAAC;AAEpC;;;GAGG;AACH,wBAAsB,yBAAyB,CAC7C,cAAc,EAAE,gBAAgB,EAChC,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,IAAI,CAAC,iBAAiB,EAAE,eAAe,CAAC,EACnD,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,mBAAmB,CAAC,CA4E9B"}
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/archiver/validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EACL,KAAK,gBAAgB,EAErB,KAAK,mBAAmB,EAEzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,iBAAiB,EAAkB,MAAM,6BAA6B,CAAC;AAErF,YAAY,EAAE,mBAAmB,EAAE,CAAC;AAEpC;;;GAGG;AACH,wBAAsB,yBAAyB,CAC7C,cAAc,EAAE,gBAAgB,EAChC,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,IAAI,CAAC,iBAAiB,EAAE,eAAe,CAAC,EACnD,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,mBAAmB,CAAC,CAgF9B"}
@@ -32,7 +32,6 @@ import { getEpochAtSlot } from '@aztec/stdlib/epoch-helpers';
32
32
  valid: true
33
33
  };
34
34
  }
35
- const committeeSet = new Set(committee.map((member)=>member.toString()));
36
35
  const requiredAttestationCount = Math.floor(committee.length * 2 / 3) + 1;
37
36
  const failedValidationResult = (reason)=>({
38
37
  valid: false,
@@ -58,11 +57,12 @@ import { getEpochAtSlot } from '@aztec/stdlib/epoch-helpers';
58
57
  invalidIndex: i
59
58
  };
60
59
  }
61
- // Check if the attestor is in the committee
60
+ // Check if the attestor at this index matches the committee member at the same index
62
61
  if (info.status === 'recovered-from-signature' || info.status === 'provided-as-address') {
63
62
  const signer = info.address.toString();
64
- if (!committeeSet.has(signer)) {
65
- logger?.warn(`Attestation from non-committee member ${signer} at slot ${slot}`, {
63
+ const expectedCommitteeMember = committee[i]?.toString();
64
+ if (!expectedCommitteeMember || signer !== expectedCommitteeMember) {
65
+ logger?.warn(`Attestation at index ${i} from ${signer} does not match expected committee member ${expectedCommitteeMember} at slot ${slot}`, {
66
66
  committee,
67
67
  invalidIndex: i,
68
68
  ...logData
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/archiver",
3
- "version": "3.0.0-nightly.20251105",
3
+ "version": "3.0.0-nightly.20251107",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./dest/index.js",
@@ -66,18 +66,18 @@
66
66
  ]
67
67
  },
68
68
  "dependencies": {
69
- "@aztec/blob-lib": "3.0.0-nightly.20251105",
70
- "@aztec/blob-sink": "3.0.0-nightly.20251105",
71
- "@aztec/constants": "3.0.0-nightly.20251105",
72
- "@aztec/epoch-cache": "3.0.0-nightly.20251105",
73
- "@aztec/ethereum": "3.0.0-nightly.20251105",
74
- "@aztec/foundation": "3.0.0-nightly.20251105",
75
- "@aztec/kv-store": "3.0.0-nightly.20251105",
76
- "@aztec/l1-artifacts": "3.0.0-nightly.20251105",
77
- "@aztec/noir-protocol-circuits-types": "3.0.0-nightly.20251105",
78
- "@aztec/protocol-contracts": "3.0.0-nightly.20251105",
79
- "@aztec/stdlib": "3.0.0-nightly.20251105",
80
- "@aztec/telemetry-client": "3.0.0-nightly.20251105",
69
+ "@aztec/blob-lib": "3.0.0-nightly.20251107",
70
+ "@aztec/blob-sink": "3.0.0-nightly.20251107",
71
+ "@aztec/constants": "3.0.0-nightly.20251107",
72
+ "@aztec/epoch-cache": "3.0.0-nightly.20251107",
73
+ "@aztec/ethereum": "3.0.0-nightly.20251107",
74
+ "@aztec/foundation": "3.0.0-nightly.20251107",
75
+ "@aztec/kv-store": "3.0.0-nightly.20251107",
76
+ "@aztec/l1-artifacts": "3.0.0-nightly.20251107",
77
+ "@aztec/noir-protocol-circuits-types": "3.0.0-nightly.20251107",
78
+ "@aztec/protocol-contracts": "3.0.0-nightly.20251107",
79
+ "@aztec/stdlib": "3.0.0-nightly.20251107",
80
+ "@aztec/telemetry-client": "3.0.0-nightly.20251107",
81
81
  "lodash.groupby": "^4.6.0",
82
82
  "lodash.omit": "^4.5.0",
83
83
  "tsc-watch": "^6.0.0",
@@ -43,7 +43,6 @@ export async function validateBlockAttestations(
43
43
  return { valid: true };
44
44
  }
45
45
 
46
- const committeeSet = new Set(committee.map(member => member.toString()));
47
46
  const requiredAttestationCount = Math.floor((committee.length * 2) / 3) + 1;
48
47
 
49
48
  const failedValidationResult = <TReason extends ValidateBlockNegativeResult['reason']>(reason: TReason) => ({
@@ -70,15 +69,20 @@ export async function validateBlockAttestations(
70
69
  return { ...failedValidationResult('invalid-attestation'), invalidIndex: i };
71
70
  }
72
71
 
73
- // Check if the attestor is in the committee
72
+ // Check if the attestor at this index matches the committee member at the same index
74
73
  if (info.status === 'recovered-from-signature' || info.status === 'provided-as-address') {
75
74
  const signer = info.address.toString();
76
- if (!committeeSet.has(signer)) {
77
- logger?.warn(`Attestation from non-committee member ${signer} at slot ${slot}`, {
78
- committee,
79
- invalidIndex: i,
80
- ...logData,
81
- });
75
+ const expectedCommitteeMember = committee[i]?.toString();
76
+
77
+ if (!expectedCommitteeMember || signer !== expectedCommitteeMember) {
78
+ logger?.warn(
79
+ `Attestation at index ${i} from ${signer} does not match expected committee member ${expectedCommitteeMember} at slot ${slot}`,
80
+ {
81
+ committee,
82
+ invalidIndex: i,
83
+ ...logData,
84
+ },
85
+ );
82
86
  return { ...failedValidationResult('invalid-attestation'), invalidIndex: i };
83
87
  }
84
88
  }