Skip to content

Commit 5fbcb67

Browse files
committed
prover node has no claims or bonds
1 parent ebf51a8 commit 5fbcb67

File tree

70 files changed

+122
-2915
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+122
-2915
lines changed

yarn-project/archiver/src/archiver/data_retrieval.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,8 @@ export async function getProofFromSubmitProofTx(
417417
if (functionName === 'submitEpochRootProof') {
418418
const [decodedArgs] = args as readonly [
419419
{
420-
epochSize: bigint;
420+
start: bigint;
421+
end: bigint;
421422
args: readonly [Hex, Hex, Hex, Hex, Hex, Hex, Hex];
422423
fees: readonly Hex[];
423424
aggregationObject: Hex;

yarn-project/aztec-node/src/aztec-node/server.ts

-9
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { type BlobSinkClientInterface, createBlobSinkClient } from '@aztec/blob-
44
import {
55
type AztecNode,
66
type ClientProtocolCircuitVerifier,
7-
type EpochProofQuote,
87
type GetContractClassLogsResponse,
98
type GetPublicLogsResponse,
109
type InBlock,
@@ -123,14 +122,6 @@ export class AztecNodeService implements AztecNode, Traceable {
123122
this.log.info(`Aztec Node started on chain 0x${l1ChainId.toString(16)}`, config.l1Contracts);
124123
}
125124

126-
public addEpochProofQuote(quote: EpochProofQuote): Promise<void> {
127-
return Promise.resolve(this.p2pClient.addEpochProofQuote(quote));
128-
}
129-
130-
public getEpochProofQuotes(epoch: bigint): Promise<EpochProofQuote[]> {
131-
return this.p2pClient.getEpochProofQuotes(epoch);
132-
}
133-
134125
public getL2Tips() {
135126
return this.blockSource.getL2Tips();
136127
}

yarn-project/aztec.js/src/api/cheat_codes.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { type PXE } from '@aztec/circuit-types';
22
import { EthCheatCodes } from '@aztec/ethereum/eth-cheatcodes';
33
import { type L1ContractAddresses } from '@aztec/ethereum/l1-contract-addresses';
44

5-
import { RollupCheatCodes } from '../index.js';
65
import { AztecCheatCodes } from '../utils/aztec_cheatcodes.js';
6+
import { RollupCheatCodes } from './ethereum/cheat_codes.js';
77

88
/**
99
* A class that provides utility functions for interacting with the chain.

yarn-project/aztec.js/src/api/ethereum/cheat_codes.ts

-29
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { type EpochProofClaim } from '@aztec/circuit-types';
2-
import { EthAddress } from '@aztec/circuits.js';
31
import { EthCheatCodes } from '@aztec/ethereum/eth-cheatcodes';
42
import { type L1ContractAddresses } from '@aztec/ethereum/l1-contract-addresses';
53
import { createLogger } from '@aztec/foundation/log';
@@ -107,33 +105,6 @@ export class RollupCheatCodes {
107105
this.logger.warn(`Advanced ${howMany} slots up to slot ${slot} in epoch ${epoch}`);
108106
}
109107

110-
/** Returns the current proof claim (if any) */
111-
public async getProofClaim(): Promise<EpochProofClaim | undefined> {
112-
// REFACTOR: This code is duplicated from l1-publisher
113-
const {
114-
epochToProve,
115-
basisPointFee,
116-
bondAmount,
117-
bondProvider: bondProviderHex,
118-
proposerClaimant: proposerClaimantHex,
119-
} = await this.rollup.read.getProofClaim();
120-
121-
const bondProvider = EthAddress.fromString(bondProviderHex);
122-
const proposerClaimant = EthAddress.fromString(proposerClaimantHex);
123-
124-
if (bondProvider.isZero() && proposerClaimant.isZero() && epochToProve === 0n) {
125-
return undefined;
126-
}
127-
128-
return {
129-
epochToProve,
130-
basisPointFee,
131-
bondAmount,
132-
bondProvider,
133-
proposerClaimant,
134-
};
135-
}
136-
137108
/**
138109
* Marks the specified block (or latest if none) as proven
139110
* @param maybeBlockNumber - The block number to mark as proven (defaults to latest pending)

yarn-project/aztec.js/src/index.ts

+9-12
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ export {
4141
EthAddress,
4242
Fq,
4343
Fr,
44+
getContractClassFromArtifact,
45+
getContractInstanceFromDeployParams,
4446
GlobalVariables,
4547
GrumpkinScalar,
4648
INITIAL_L2_BLOCK_NUM,
4749
NodeInfo,
4850
Point,
4951
PublicKeys,
50-
getContractClassFromArtifact,
51-
getContractInstanceFromDeployParams,
5252
} from '@aztec/circuits.js';
5353

5454
export { computeSecretHash } from '@aztec/circuits.js/hash';
@@ -68,12 +68,12 @@ export {
6868
Comparator,
6969
ContractClass2BlockL2Logs,
7070
EncryptedLogPayload,
71-
EpochProofQuote,
72-
EpochProofQuotePayload,
7371
EventMetadata,
7472
EventType,
7573
ExtendedNote,
7674
FunctionCall,
75+
getTimestampRangeForEpoch,
76+
HashedValues,
7777
L1Actor,
7878
L1EventPayload,
7979
L1NotePayload,
@@ -82,8 +82,9 @@ export {
8282
L2Block,
8383
LogId,
8484
MerkleTreeId,
85+
merkleTreeIds,
86+
mockTx,
8587
Note,
86-
HashedValues,
8788
SiblingPath,
8889
Tx,
8990
TxExecutionRequest,
@@ -92,14 +93,10 @@ export {
9293
TxStatus,
9394
UnencryptedL2Log,
9495
UniqueNote,
95-
getTimestampRangeForEpoch,
96-
merkleTreeIds,
97-
mockEpochProofQuote,
98-
mockTx,
9996
type LogFilter,
100-
type PXE,
10197
type PartialAddress,
10298
type PublicKey,
99+
type PXE,
103100
} from '@aztec/circuit-types';
104101

105102
// TODO: These kinds of things have no place on our public api.
@@ -120,10 +117,10 @@ export { fileURLToPath } from '@aztec/foundation/url';
120117
// Here you *can* do `export *` as the granular api defacto exports things explicitly.
121118
// This entire index file will be deprecated at some point after we're satisfied.
122119
export * from './api/abi.js';
123-
export * from './api/cheat_codes.js';
124-
export * from './api/fee.js';
125120
export * from './api/addresses.js';
121+
export * from './api/cheat_codes.js';
126122
export * from './api/ethereum/index.js';
123+
export * from './api/fee.js';
127124
export * from './api/log.js';
128125
// Granular export, even if not in the api folder
129126
export * from './contract/index.js';
+5-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
export { CompleteAddress, GrumpkinScalar, type PartialAddress, type PublicKey } from '@aztec/circuits.js';
22
export * from './auth_witness.js';
33
export * from './body.js';
4+
export * from './epoch-helpers/index.js';
45
export * from './function_call.js';
56
export * from './global_variable_builder.js';
7+
export * from './hashed_values.js';
8+
export * from './in_block.js';
69
export * from './interfaces/index.js';
710
export * from './l2_block.js';
811
export * from './l2_block_downloader/index.js';
@@ -12,18 +15,14 @@ export * from './merkle_tree_id.js';
1215
export * from './messaging/index.js';
1316
export * from './mocks.js';
1417
export * from './notes/index.js';
18+
export * from './nullifier_with_block_source.js';
1519
export * from './p2p/index.js';
16-
export * from './hashed_values.js';
17-
export * from './prover_coordination/index.js';
20+
export * from './proving_error.js';
1821
export * from './public_data_witness.js';
1922
export * from './public_execution_request.js';
2023
export * from './sibling_path/index.js';
2124
export * from './simulation_error.js';
2225
export * from './tx/index.js';
2326
export * from './tx_effect.js';
2427
export * from './tx_execution_request.js';
25-
export * from './in_block.js';
26-
export * from './nullifier_with_block_source.js';
27-
export * from './proving_error.js';
28-
export * from './epoch-helpers/index.js';
2928
export * from './versioning.js';

yarn-project/circuit-types/src/interfaces/aztec-node.test.ts

-18
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ import {
4141
} from '../logs/get_logs_response.js';
4242
import { type LogFilter } from '../logs/log_filter.js';
4343
import { MerkleTreeId } from '../merkle_tree_id.js';
44-
import { EpochProofQuote } from '../prover_coordination/epoch_proof_quote.js';
4544
import { PublicDataWitness } from '../public_data_witness.js';
4645
import { SiblingPath } from '../sibling_path/sibling_path.js';
4746
import { type TxValidationResult } from '../tx/index.js';
@@ -347,15 +346,6 @@ describe('AztecNodeApiSchema', () => {
347346
expect(response).toBe('enr:-');
348347
});
349348

350-
it('addEpochProofQuote', async () => {
351-
await context.client.addEpochProofQuote(EpochProofQuote.random());
352-
});
353-
354-
it('getEpochProofQuotes', async () => {
355-
const response = await context.client.getEpochProofQuotes(1n);
356-
expect(response).toEqual([expect.any(EpochProofQuote)]);
357-
});
358-
359349
it('addContractClass', async () => {
360350
const contractClass = await getContractClassFromArtifact(artifact);
361351
await context.client.addContractClass({ ...contractClass, unconstrainedFunctions: [], privateFunctions: [] });
@@ -612,14 +602,6 @@ class MockAztecNode implements AztecNode {
612602
getEncodedEnr(): Promise<string | undefined> {
613603
return Promise.resolve('enr:-');
614604
}
615-
addEpochProofQuote(quote: EpochProofQuote): Promise<void> {
616-
expect(quote).toBeInstanceOf(EpochProofQuote);
617-
return Promise.resolve();
618-
}
619-
getEpochProofQuotes(epoch: bigint): Promise<EpochProofQuote[]> {
620-
expect(epoch).toEqual(1n);
621-
return Promise.resolve([EpochProofQuote.random()]);
622-
}
623605
addContractClass(_contractClass: ContractClassPublic): Promise<void> {
624606
return Promise.resolve();
625607
}

yarn-project/circuit-types/src/interfaces/aztec-node.ts

-17
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ import {
3737
TxScopedL2Log,
3838
} from '../logs/index.js';
3939
import { MerkleTreeId } from '../merkle_tree_id.js';
40-
import { EpochProofQuote } from '../prover_coordination/epoch_proof_quote.js';
4140
import { PublicDataWitness } from '../public_data_witness.js';
4241
import { SiblingPath } from '../sibling_path/index.js';
4342
import {
@@ -440,18 +439,6 @@ export interface AztecNode
440439
*/
441440
getEncodedEnr(): Promise<string | undefined>;
442441

443-
/**
444-
* Receives a quote for an epoch proof and stores it in its EpochProofQuotePool
445-
* @param quote - The quote to store
446-
*/
447-
addEpochProofQuote(quote: EpochProofQuote): Promise<void>;
448-
449-
/**
450-
* Returns the received quotes for a given epoch
451-
* @param epoch - The epoch for which to get the quotes
452-
*/
453-
getEpochProofQuotes(epoch: bigint): Promise<EpochProofQuote[]>;
454-
455442
/**
456443
* Adds a contract class bypassing the registerer.
457444
* TODO(#10007): Remove this method.
@@ -594,10 +581,6 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
594581

595582
getEncodedEnr: z.function().returns(z.string().optional()),
596583

597-
addEpochProofQuote: z.function().args(EpochProofQuote.schema).returns(z.void()),
598-
599-
getEpochProofQuotes: z.function().args(schemas.BigInt).returns(z.array(EpochProofQuote.schema)),
600-
601584
// TODO(#10007): Remove this method
602585
addContractClass: z.function().args(ContractClassPublicSchema).returns(z.void()),
603586
};

yarn-project/circuit-types/src/interfaces/p2p.test.ts

+3-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { type JsonRpcTestContext, createJsonRpcTestSetup } from '@aztec/foundation/json-rpc/test';
22

33
import { BlockAttestation } from '../p2p/block_attestation.js';
4-
import { EpochProofQuote } from '../prover_coordination/epoch_proof_quote.js';
54
import { Tx } from '../tx/tx.js';
65
import { type P2PApi, P2PApiSchema, type PeerInfo } from './p2p.js';
76

@@ -32,12 +31,6 @@ describe('P2PApiSchema', () => {
3231
expect(attestations[0]).toBeInstanceOf(BlockAttestation);
3332
});
3433

35-
it('getEpochProofQuotes', async () => {
36-
const quotes = await context.client.getEpochProofQuotes(BigInt(1));
37-
expect(quotes).toEqual([EpochProofQuote.empty()]);
38-
expect(quotes[0]).toBeInstanceOf(EpochProofQuote);
39-
});
40-
4134
it('getPendingTxs', async () => {
4235
const txs = await context.client.getPendingTxs();
4336
expect(txs[0]).toBeInstanceOf(Tx);
@@ -71,16 +64,15 @@ class MockP2P implements P2PApi {
7164
expect(proposalId).toEqual('proposalId');
7265
return Promise.resolve([BlockAttestation.empty()]);
7366
}
74-
getEpochProofQuotes(epoch: bigint): Promise<EpochProofQuote[]> {
75-
expect(epoch).toEqual(1n);
76-
return Promise.resolve([EpochProofQuote.empty()]);
77-
}
67+
7868
async getPendingTxs(): Promise<Tx[]> {
7969
return [await Tx.random()];
8070
}
71+
8172
getEncodedEnr(): Promise<string | undefined> {
8273
return Promise.resolve('enr');
8374
}
75+
8476
getPeers(includePending?: boolean): Promise<PeerInfo[]> {
8577
expect(includePending === undefined || includePending === true).toBeTruthy();
8678
return Promise.resolve(peers);

yarn-project/circuit-types/src/interfaces/p2p.ts

-10
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { z } from 'zod';
44

55
import { BlockAttestation } from '../p2p/block_attestation.js';
66
import { type P2PClientType } from '../p2p/client_type.js';
7-
import { EpochProofQuote } from '../prover_coordination/epoch_proof_quote.js';
87
import { Tx } from '../tx/tx.js';
98

109
export type PeerInfo =
@@ -26,14 +25,6 @@ const PeerInfoSchema = z.discriminatedUnion('status', [
2625

2726
/** Exposed API to the P2P module. */
2827
export interface P2PApiWithoutAttestations {
29-
/**
30-
* Queries the EpochProofQuote pool for quotes for the given epoch
31-
*
32-
* @param epoch - the epoch to query
33-
* @returns EpochProofQuotes
34-
*/
35-
getEpochProofQuotes(epoch: bigint): Promise<EpochProofQuote[]>;
36-
3728
/**
3829
* Returns all pending transactions in the transaction pool.
3930
* @returns An array of Txs.
@@ -71,7 +62,6 @@ export const P2PApiSchema: ApiSchemaFor<P2PApi> = {
7162
.function()
7263
.args(schemas.BigInt, optional(z.string()))
7364
.returns(z.array(BlockAttestation.schema)),
74-
getEpochProofQuotes: z.function().args(schemas.BigInt).returns(z.array(EpochProofQuote.schema)),
7565
getPendingTxs: z.function().returns(z.array(Tx.schema)),
7666
getEncodedEnr: z.function().returns(z.string().optional()),
7767
getPeers: z.function().args(optional(z.boolean())).returns(z.array(PeerInfoSchema)),

yarn-project/circuit-types/src/interfaces/prover-coordination.ts

-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { type ApiSchemaFor } from '@aztec/foundation/schemas';
22

33
import { z } from 'zod';
44

5-
import { EpochProofQuote } from '../prover_coordination/index.js';
65
import { Tx } from '../tx/tx.js';
76
import { TxHash } from '../tx/tx_hash.js';
87

@@ -21,16 +20,9 @@ export interface ProverCoordination {
2120
* @returns The transactions, if found, 'undefined' otherwise.
2221
*/
2322
getTxsByHash(txHashes: TxHash[]): Promise<Tx[]>;
24-
25-
/**
26-
* Receives a quote for an epoch proof and stores it in its EpochProofQuotePool
27-
* @param quote - The quote to store
28-
*/
29-
addEpochProofQuote(quote: EpochProofQuote): Promise<void>;
3023
}
3124

3225
export const ProverCoordinationApiSchema: ApiSchemaFor<ProverCoordination> = {
3326
getTxByHash: z.function().args(TxHash.schema).returns(Tx.schema.optional()),
3427
getTxsByHash: z.function().args(z.array(TxHash.schema)).returns(z.array(Tx.schema)),
35-
addEpochProofQuote: z.function().args(EpochProofQuote.schema).returns(z.void()),
3628
};

0 commit comments

Comments
 (0)