Skip to content

Commit fca9b22

Browse files
authored
feat: merge-train/spartan (#18092)
BEGIN_COMMIT_OVERRIDE fix: pass along proof submission disabled flag (#18091) chore: track attestation failures for all validators (#18098) chore: fix flake (#18101) END_COMMIT_OVERRIDE
2 parents 6ce8775 + 7623919 commit fca9b22

File tree

5 files changed

+30
-24
lines changed

5 files changed

+30
-24
lines changed

yarn-project/end-to-end/src/e2e_l1_publisher/e2e_l1_publisher.test.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,8 @@ describe('L1Publisher integration', () => {
725725
let sendRequestsResult: Awaited<ReturnType<SequencerPublisher['sendRequests']>> | null;
726726

727727
beforeEach(async () => {
728+
sendRequestsResult = null;
729+
728730
await setup({ aztecSlotDuration: 48 });
729731

730732
await ethCheatCodes.setAutomine(false);
@@ -743,7 +745,10 @@ describe('L1Publisher integration', () => {
743745
void publisher
744746
.sendRequests()
745747
.then(r => (sendRequestsResult = r ?? null))
746-
.catch(err => err);
748+
.catch(err => {
749+
sendRequestsResult = null;
750+
return err;
751+
});
747752

748753
// Wait until the publish tx is sent
749754
await retryUntil(() => ethCheatCodes.getTxPoolStatus().then(s => s.pending > 0), 'tx sent', 20, 0.1);
@@ -775,8 +780,6 @@ describe('L1Publisher integration', () => {
775780
if (nextL2Slot > initialL2Slot) {
776781
expect(sendRequestsResult).toBeNull();
777782
break;
778-
} else {
779-
expect(sendRequestsResult).toBeUndefined();
780783
}
781784
}
782785

@@ -872,7 +875,7 @@ describe('L1Publisher integration', () => {
872875

873876
// Wait for completion
874877
await retryUntil(() => !!sendRequestsResult, 'request resolved', 5, 0.1);
875-
await retryUntil(() => publisher.l1TxUtils.state === TxUtilsState.MINED, 'mined', 5, 0.1);
878+
await retryUntil(() => publisher.l1TxUtils.state === TxUtilsState.MINED, 'mined', 10, 0.1);
876879

877880
// The second proposal should succeed
878881
expect(sendRequestsResult).not.toBeNull();

yarn-project/prover-node/src/factory.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ export async function createProverNode(
181181
'txGatheringIntervalMs',
182182
'txGatheringTimeoutMs',
183183
'proverNodeFailedEpochStore',
184+
'proverNodeDisableProofPublish',
184185
'dataDirectory',
185186
'l1ChainId',
186187
'rollupVersion',

yarn-project/telemetry-client/src/attributes.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,6 @@ export const TX_COLLECTION_METHOD = 'aztec.tx_collection.method';
126126

127127
/** Scope of L1 transaction (sequencer, prover, or other) */
128128
export const L1_TX_SCOPE = 'aztec.l1_tx.scope';
129+
130+
/** Generic error type attribute */
131+
export const IS_COMMITTEE_MEMBER = 'aztec.is_committee_member';

yarn-project/validator-client/src/metrics.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,17 @@ export class ValidatorMetrics {
8585
this.successfulAttestationsCount.add(num);
8686
}
8787

88-
public incFailedAttestationsBadProposal(num: number, reason: string) {
88+
public incFailedAttestationsBadProposal(num: number, reason: string, inCommittee: boolean) {
8989
this.failedAttestationsBadProposalCount.add(num, {
9090
[Attributes.ERROR_TYPE]: reason,
91+
[Attributes.IS_COMMITTEE_MEMBER]: inCommittee,
9192
});
9293
}
9394

94-
public incFailedAttestationsNodeIssue(num: number, reason: string) {
95+
public incFailedAttestationsNodeIssue(num: number, reason: string, inCommittee: boolean) {
9596
this.failedAttestationsNodeIssueCount.add(num, {
9697
[Attributes.ERROR_TYPE]: reason,
98+
[Attributes.IS_COMMITTEE_MEMBER]: inCommittee,
9799
});
98100
}
99101
}

yarn-project/validator-client/src/validator.ts

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -295,24 +295,21 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
295295
if (!validationResult.isValid) {
296296
this.log.warn(`Proposal validation failed: ${validationResult.reason}`, proposalInfo);
297297

298-
// Only track attestation failure metrics if we're actually in the committee
299-
if (partOfCommittee) {
300-
const reason = validationResult.reason || 'unknown';
301-
// Classify failure reason: bad proposal vs node issue
302-
const badProposalReasons: BlockProposalValidationFailureReason[] = [
303-
'invalid_proposal',
304-
'state_mismatch',
305-
'failed_txs',
306-
'in_hash_mismatch',
307-
'parent_block_wrong_slot',
308-
];
309-
310-
if (badProposalReasons.includes(reason as BlockProposalValidationFailureReason)) {
311-
this.metrics.incFailedAttestationsBadProposal(1, reason);
312-
} else {
313-
// Node issues: parent_block_not_found, block_number_already_exists, txs_not_available, timeout, unknown_error
314-
this.metrics.incFailedAttestationsNodeIssue(1, reason);
315-
}
298+
const reason = validationResult.reason || 'unknown';
299+
// Classify failure reason: bad proposal vs node issue
300+
const badProposalReasons: BlockProposalValidationFailureReason[] = [
301+
'invalid_proposal',
302+
'state_mismatch',
303+
'failed_txs',
304+
'in_hash_mismatch',
305+
'parent_block_wrong_slot',
306+
];
307+
308+
if (badProposalReasons.includes(reason as BlockProposalValidationFailureReason)) {
309+
this.metrics.incFailedAttestationsBadProposal(1, reason, partOfCommittee);
310+
} else {
311+
// Node issues so we can't attest
312+
this.metrics.incFailedAttestationsNodeIssue(1, reason, partOfCommittee);
316313
}
317314

318315
// Slash invalid block proposals (can happen even when not in committee)

0 commit comments

Comments
 (0)