Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,664 changes: 1,664 additions & 0 deletions yarn-project/.yarn/patches/viem-npm-2.23.7-0552761b08.patch

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion yarn-project/archiver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"lodash.omit": "^4.5.0",
"tsc-watch": "^6.0.0",
"tslib": "^2.5.0",
"viem": "2.23.7"
"viem": "patch:viem@npm%3A2.23.7#~/.yarn/patches/viem-npm-2.23.7-0552761b08.patch"
},
"devDependencies": {
"@jest/globals": "^30.0.0",
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/aztec-faucet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"koa": "^2.16.1",
"koa-bodyparser": "^4.4.1",
"koa-router": "^13.1.1",
"viem": "2.23.7",
"viem": "patch:viem@npm%3A2.23.7#~/.yarn/patches/viem-npm-2.23.7-0552761b08.patch",
"zod": "^3.23.8"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/aztec-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"koa": "^2.16.1",
"koa-router": "^13.1.1",
"tslib": "^2.4.0",
"viem": "2.23.7"
"viem": "patch:viem@npm%3A2.23.7#~/.yarn/patches/viem-npm-2.23.7-0552761b08.patch"
},
"devDependencies": {
"@jest/globals": "^30.0.0",
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/aztec.js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"@aztec/stdlib": "workspace:^",
"axios": "^1.12.0",
"tslib": "^2.4.0",
"viem": "2.23.7"
"viem": "patch:viem@npm%3A2.23.7#~/.yarn/patches/viem-npm-2.23.7-0552761b08.patch"
},
"devDependencies": {
"@jest/globals": "^30.0.0",
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/aztec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"commander": "^12.1.0",
"koa": "^2.16.1",
"koa-router": "^13.1.1",
"viem": "2.23.7"
"viem": "patch:viem@npm%3A2.23.7#~/.yarn/patches/viem-npm-2.23.7-0552761b08.patch"
},
"files": [
"dest",
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/bb-prover/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"jest-mock-extended": "^4.0.0",
"ts-node": "^10.9.1",
"typescript": "^5.3.3",
"viem": "2.23.7"
"viem": "patch:viem@npm%3A2.23.7#~/.yarn/patches/viem-npm-2.23.7-0552761b08.patch"
},
"files": [
"dest",
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/blob-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"dependencies": {
"@aztec/constants": "workspace:^",
"@aztec/foundation": "workspace:^",
"c-kzg": "4.0.0-alpha.1",
"c-kzg": "4.1.0",
"tslib": "^2.4.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/blob-lib/src/blob.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const {
} = cKzg;

try {
loadTrustedSetup();
loadTrustedSetup(8);
} catch (error: any) {
if (error.message.includes('trusted setup is already loaded')) {
// NB: The c-kzg lib has no way of checking whether the setup is loaded or not,
Expand Down
1 change: 1 addition & 0 deletions yarn-project/blob-lib/src/blob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ export class Blob {
return {
blobToKzgCommitment: cKzg.blobToKzgCommitment,
computeBlobKzgProof: cKzg.computeBlobKzgProof,
computeCellsAndKzgProofs: cKzg.computeCellsAndKzgProofs,
};
}

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/blob-lib/src/blob_batching.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const trustedSetup = JSON.parse(
const { FIELD_ELEMENTS_PER_BLOB, computeKzgProof, loadTrustedSetup, verifyKzgProof } = cKzg;

try {
loadTrustedSetup();
loadTrustedSetup(8);
} catch (error: any) {
if (error.message.includes('trusted setup is already loaded')) {
// NB: The c-kzg lib has no way of checking whether the setup is loaded or not,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
import { makeBatchedBlobAccumulator, makeBlockBlobPublicInputs } from './testing.js';

try {
cKzg.loadTrustedSetup();
cKzg.loadTrustedSetup(8);
} catch (error: any) {
if (error.message.includes('trusted setup is already loaded')) {
// NB: The c-kzg lib has no way of checking whether the setup is loaded or not,
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/blob-lib/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export * from './blob_batching_public_inputs.js';
export * from './sponge_blob.js';

try {
loadTrustedSetup();
loadTrustedSetup(8);
} catch (error: any) {
if (error.message.includes('trusted setup is already loaded')) {
// NB: The c-kzg lib has no way of checking whether the setup is loaded or not,
Expand Down
1 change: 1 addition & 0 deletions yarn-project/blob-lib/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ export interface BlobKzgInstance {
blobToKzgCommitment(blob: Uint8Array): Uint8Array;
/** Function to compute KZG proof for blob data */
computeBlobKzgProof(blob: Uint8Array, commitment: Uint8Array): Uint8Array;
computeCellsAndKzgProofs(blob: Uint8Array): [Uint8Array[], Uint8Array[]];
}
2 changes: 1 addition & 1 deletion yarn-project/blob-sink/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"snappy": "^7.2.2",
"source-map-support": "^0.5.21",
"tslib": "^2.4.0",
"viem": "2.23.7",
"viem": "patch:viem@npm%3A2.23.7#~/.yarn/patches/viem-npm-2.23.7-0552761b08.patch",
"zod": "^3.23.8"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"semver": "^7.5.4",
"source-map-support": "^0.5.21",
"tslib": "^2.4.0",
"viem": "2.23.7"
"viem": "patch:viem@npm%3A2.23.7#~/.yarn/patches/viem-npm-2.23.7-0552761b08.patch"
},
"devDependencies": {
"@aztec/accounts": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"tslib": "^2.4.0",
"typescript": "^5.3.3",
"util": "^0.12.5",
"viem": "2.23.7",
"viem": "patch:viem@npm%3A2.23.7#~/.yarn/patches/viem-npm-2.23.7-0552761b08.patch",
"zod": "^3.23.8"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/epoch-cache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"get-port": "^7.1.0",
"jest-mock-extended": "^4.0.0",
"tslib": "^2.4.0",
"viem": "2.23.7",
"viem": "patch:viem@npm%3A2.23.7#~/.yarn/patches/viem-npm-2.23.7-0552761b08.patch",
"zod": "^3.23.8"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/ethereum/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"lodash.chunk": "^4.2.0",
"lodash.pickby": "^4.5.0",
"tslib": "^2.4.0",
"viem": "2.23.7",
"viem": "patch:viem@npm%3A2.23.7#~/.yarn/patches/viem-npm-2.23.7-0552761b08.patch",
"zod": "^3.23.8"
},
"devDependencies": {
Expand Down
28 changes: 22 additions & 6 deletions yarn-project/ethereum/src/l1_tx_utils/l1_tx_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { EthAddress } from '@aztec/foundation/eth-address';
import { type Logger, createLogger } from '@aztec/foundation/log';
import { retryUntil } from '@aztec/foundation/retry';
import { sleep } from '@aztec/foundation/sleep';
import { bufferToHex } from '@aztec/foundation/string';
import { DateProvider } from '@aztec/foundation/timer';
import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi';

Expand All @@ -22,6 +23,7 @@ import {
formatGwei,
serializeTransaction,
} from 'viem';
import { defaultPrepareTransactionRequestParameters } from 'viem/actions';
import { jsonRpc } from 'viem/nonce';

import type { ViemClient } from '../types.js';
Expand Down Expand Up @@ -157,11 +159,25 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {

private async signTransaction(txRequest: TransactionSerializable): Promise<`0x${string}`> {
const signature = await this.signer(txRequest, this.getSenderAddress());
return serializeTransaction(txRequest, signature);
const res = serializeTransaction(txRequest, signature);
return res;
}

protected async prepareSignedTransaction(txData: PrepareTransactionRequestRequest) {
const txRequest = await this.client.prepareTransactionRequest(txData);
protected async prepareSignedTransaction(txData: PrepareTransactionRequestRequest, isBlobTx: boolean) {
const txRequest = await this.client.prepareTransactionRequest({
...txData,
...(isBlobTx ? { parameters: [...defaultPrepareTransactionRequestParameters, 'sidecars'] } : {}),
});
const kzg = txData.kzg! as any;

if (txData.blobs?.length && this.client.chain.id === 11155111) {
for (let i = 0; i < txData.blobs.length; i++) {
const blob = txData.blobs![i];
const [_, cellProofs] = kzg.computeCellsAndKzgProofs(blob) as [Uint8Array[], Uint8Array[]];
txRequest.sidecars![i]!.proof = cellProofs.map(el => bufferToHex(Buffer.from(el))) as any;
i++;
}
}
return await this.signTransaction(txRequest as TransactionSerializable);
}

Expand Down Expand Up @@ -218,7 +234,7 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
}

// Send the new tx
const signedRequest = await this.prepareSignedTransaction(txData);
const signedRequest = await this.prepareSignedTransaction(txData, !!blobInputs);
const txHash = await this.client.sendRawTransaction({ serializedTransaction: signedRequest });

// Create the new state for monitoring
Expand Down Expand Up @@ -433,7 +449,7 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {

const txData = this.makeTxData(state, { isCancelTx });

const signedRequest = await this.prepareSignedTransaction(txData);
const signedRequest = await this.prepareSignedTransaction(txData, isBlobTx);
const newHash = await this.client.sendRawTransaction({ serializedTransaction: signedRequest });

this.logger.verbose(
Expand Down Expand Up @@ -682,7 +698,7 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
state.lastSentAtL1Ts = new Date(await this.getL1Timestamp());

const txData = this.makeTxData(state, { isCancelTx: true });
const signedRequest = await this.prepareSignedTransaction(txData);
const signedRequest = await this.prepareSignedTransaction(txData, isBlobTx);
const cancelTxHash = await this.client.sendRawTransaction({ serializedTransaction: signedRequest });

state.cancelTxHashes.push(cancelTxHash);
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/ethereum/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export function formatViemError(error: any, abi: Abi = ErrorsAbi): FormattedViem

// If it's a regular Error instance, return it with its message
if (error instanceof Error) {
return new FormattedViemError(error.message, (error as any)?.metaMessages);
return error;
}

const body = String(error);
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/foundation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
"ts-node": "^10.9.1",
"typescript": "^5.3.3",
"typescript-eslint": "^8.32.1",
"viem": "2.23.7"
"viem": "patch:viem@npm%3A2.23.7#~/.yarn/patches/viem-npm-2.23.7-0552761b08.patch"
},
"files": [
"dest",
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/node-keystore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"@aztec/stdlib": "workspace:^",
"@ethersproject/wallet": "^5.7.0",
"tslib": "^2.4.0",
"viem": "2.23.7",
"viem": "patch:viem@npm%3A2.23.7#~/.yarn/patches/viem-npm-2.23.7-0552761b08.patch",
"zod": "^3.23.8"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/p2p/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
"ts-node": "^10.9.1",
"typescript": "^5.3.3",
"uint8arrays": "^5.0.3",
"viem": "2.23.7"
"viem": "patch:viem@npm%3A2.23.7#~/.yarn/patches/viem-npm-2.23.7-0552761b08.patch"
},
"files": [
"dest",
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/prover-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"@aztec/world-state": "workspace:^",
"source-map-support": "^0.5.21",
"tslib": "^2.4.0",
"viem": "2.23.7"
"viem": "patch:viem@npm%3A2.23.7#~/.yarn/patches/viem-npm-2.23.7-0552761b08.patch"
},
"devDependencies": {
"@jest/globals": "^30.0.0",
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/pxe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"lodash.omit": "^4.5.0",
"sha3": "^2.1.4",
"tslib": "^2.4.0",
"viem": "2.23.7"
"viem": "patch:viem@npm%3A2.23.7#~/.yarn/patches/viem-npm-2.23.7-0552761b08.patch"
},
"devDependencies": {
"@aztec/merkle-tree": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/sequencer-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@aztec/world-state": "workspace:^",
"lodash.chunk": "^4.2.0",
"tslib": "^2.4.0",
"viem": "2.23.7"
"viem": "patch:viem@npm%3A2.23.7#~/.yarn/patches/viem-npm-2.23.7-0552761b08.patch"
},
"devDependencies": {
"@aztec/archiver": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/simulator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"jest-mock-extended": "^4.0.0",
"ts-node": "^10.9.1",
"typescript": "^5.3.3",
"viem": "2.23.7"
"viem": "patch:viem@npm%3A2.23.7#~/.yarn/patches/viem-npm-2.23.7-0552761b08.patch"
},
"files": [
"dest",
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/slasher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"@aztec/telemetry-client": "workspace:^",
"source-map-support": "^0.5.21",
"tslib": "^2.4.0",
"viem": "2.23.7",
"viem": "patch:viem@npm%3A2.23.7#~/.yarn/patches/viem-npm-2.23.7-0552761b08.patch",
"zod": "^3.23.8"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/stdlib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"msgpackr": "^1.11.2",
"pako": "^2.1.0",
"tslib": "^2.4.0",
"viem": "2.23.7",
"viem": "patch:viem@npm%3A2.23.7#~/.yarn/patches/viem-npm-2.23.7-0552761b08.patch",
"zod": "^3.23.8"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/telemetry-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@opentelemetry/sdk-trace-node": "^1.28.0",
"@opentelemetry/semantic-conventions": "^1.28.0",
"prom-client": "^15.1.3",
"viem": "2.23.7"
"viem": "patch:viem@npm%3A2.23.7#~/.yarn/patches/viem-npm-2.23.7-0552761b08.patch"
},
"devDependencies": {
"@jest/globals": "^30.0.0",
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/validator-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"koa": "^2.16.1",
"koa-router": "^13.1.1",
"tslib": "^2.4.0",
"viem": "2.23.7"
"viem": "patch:viem@npm%3A2.23.7#~/.yarn/patches/viem-npm-2.23.7-0552761b08.patch"
},
"devDependencies": {
"@jest/globals": "^30.0.0",
Expand Down
Loading
Loading