Skip to content

Commit 2b1bd51

Browse files
authored
feat: aztec-packages 0.66.0 (#234)
And improvements to event-cannon
1 parent d38a74e commit 2b1bd51

File tree

70 files changed

+1717
-1416
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

+1717
-1416
lines changed

k8s/local/aztec-sandbox-node/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
app: aztec-sandbox-node
1818
spec:
1919
containers:
20-
- image: aztecprotocol/aztec:0.65.2
20+
- image: aztecprotocol/aztec:0.66.0
2121
name: aztec-sandbox-node
2222
resources:
2323
limits:

packages/backend-utils/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"lint-base": "yarn run g:lint"
1515
},
1616
"dependencies": {
17-
"@aztec/aztec.js": "0.65.2",
17+
"@aztec/aztec.js": "0.66.0",
1818
"@chicmoz-pkg/types": "workspace:^"
1919
},
2020
"devDependencies": {

packages/backend-utils/src/parse-block.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ const getTxEffectWithHashes = (txEffects: L2Block["body"]["txEffects"]) => {
55
return txEffects.map((txEffect) => {
66
return {
77
...txEffect,
8+
unencryptedLogslength: txEffect.unencryptedLogsLength.toNumber(),
9+
privateLogs: txEffect.privateLogs.map((log) => log.toFields()),
810
hash: "0x" + txEffect.hash().toString("hex"),
911
txHash: txEffect.txHash.toString(),
1012
};

packages/message-registry/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"lint-base": "yarn run g:lint"
1515
},
1616
"dependencies": {
17-
"@aztec/aztec.js": "0.65.2",
17+
"@aztec/aztec.js": "0.66.0",
1818
"@chicmoz-pkg/types": "workspace:^"
1919
},
2020
"devDependencies": {

packages/types/src/aztec/l2Contract.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,15 @@ export const chicmozL2ContractClassRegisteredEventSchema = z.object({
3333
version: z.number(),
3434
artifactHash: frSchema,
3535
privateFunctionsRoot: frSchema,
36-
packedPublicBytecode: bufferSchema,
36+
packedBytecode: bufferSchema,
3737
});
3838

3939
export type ChicmozL2ContractClassRegisteredEvent = z.infer<
4040
typeof chicmozL2ContractClassRegisteredEventSchema
4141
>;
4242

4343
const functionSelectorSchema = z.object({
44-
type: z.enum(["FunctionSelector"]),
45-
value: z.string(),
44+
value: z.number(),
4645
});
4746

4847
export const chicmozL2PrivateFunctionBroadcastedEventSchema = z.object({

packages/types/src/aztec/l2TxEffect.ts

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,12 @@ import { z } from "zod";
22
import { hexStringSchema } from "../general.js";
33
import { aztecAddressSchema, bufferSchema, frNumberSchema, frSchema } from "./utils.js";
44

5-
export const noteEncryptedLogEntrySchema = z.object({
6-
data: bufferSchema,
7-
});
8-
9-
export const encryptedLogEntrySchema = z.object({
10-
data: bufferSchema,
11-
maskedContractAddress: frSchema,
12-
});
13-
145
export const unencryptedLogEntrySchema = z.object({
156
data: bufferSchema,
167
contractAddress: aztecAddressSchema,
178
});
189

19-
const logsSchema = (logEntrySchema: typeof noteEncryptedLogEntrySchema | typeof encryptedLogEntrySchema | typeof unencryptedLogEntrySchema) =>
10+
const logsSchema = (logEntrySchema: typeof unencryptedLogEntrySchema) =>
2011
z.object({
2112
functionLogs: z.array(
2213
z.object({
@@ -72,16 +63,11 @@ export const chicmozL2TxEffectSchema = z.object({
7263
publicDataWrites: z.array(
7364
z.object({ leafSlot: frSchema, value: frSchema }),
7465
),
75-
noteEncryptedLogsLength: frNumberSchema,
76-
encryptedLogsLength: frNumberSchema,
7766
unencryptedLogsLength: frNumberSchema,
78-
noteEncryptedLogs: logsSchema(noteEncryptedLogEntrySchema),
79-
encryptedLogs: logsSchema(encryptedLogEntrySchema),
67+
privateLogs: z.array(z.array(frSchema)),
8068
unencryptedLogs: logsSchema(unencryptedLogEntrySchema),
8169
});
8270

83-
export type NoteEncryptedLogEntry = z.infer<typeof noteEncryptedLogEntrySchema>;
84-
export type EncryptedLogEntry = z.infer<typeof encryptedLogEntrySchema>;
8571
export type UnencryptedLogEntry = z.infer<typeof unencryptedLogEntrySchema>;
8672

8773
export type ChicmozL2PendingTx = z.infer<typeof chicmozL2PendingTxSchema>;

packages/types/src/aztec/special.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,24 @@ import {
66
} from "./l2Contract.js";
77
import { chicmozL2TxEffectSchema } from "./l2TxEffect.js";
88

9+
export const chicmozL2VerifiedContractAddressDataSchema = z.object({
10+
contractInstanceAddress: z.string(),
11+
name: z.string(),
12+
details: z.string(),
13+
contact: z.string(),
14+
uiUrl: z.string(),
15+
repoUrl: z.string(),
16+
});
17+
18+
export type ChicmozL2VerifiedContractAddressData = z.infer<
19+
typeof chicmozL2VerifiedContractAddressDataSchema
20+
>;
21+
922
export const chicmozL2ContractInstanceDeluxeSchema = z.object({
1023
...chicmozL2ContractInstanceDeployedEventSchema.shape,
1124
...chicmozL2ContractClassRegisteredEventSchema.shape,
1225
blockHeight: chicmozL2BlockSchema.shape.height.optional(),
13-
aztecScoutVerified: z.boolean().optional(),
26+
verifiedInfo: chicmozL2VerifiedContractAddressDataSchema.optional(),
1427
});
1528

1629
export type ChicmozL2ContractInstanceDeluxe = z.infer<

services/aztec-listener/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"main": "index.js",
55
"license": "Apache-2.0",
66
"dependencies": {
7-
"@aztec/aztec.js": "0.65.2",
8-
"@aztec/circuits.js": "0.65.2",
7+
"@aztec/aztec.js": "0.66.0",
8+
"@aztec/circuits.js": "0.66.0",
99
"@chicmoz-pkg/logger-server": "workspace:^",
1010
"@chicmoz-pkg/message-bus": "workspace:^",
1111
"@chicmoz-pkg/message-registry": "workspace:^",

services/aztec-listener/src/aztec/txs_poller.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Tx } from "@aztec/aztec.js";
22
import { TX_POLL_INTERVAL_MS } from "../constants.js";
33
import { getPendingTxs } from "./network-client.js";
44
import { onPendingTxs } from "../event-handler/index.js";
5+
import { logger } from "../logger.js";
56

67
let pollInterval: NodeJS.Timeout;
78

@@ -18,13 +19,19 @@ export const stopPolling = () => {
1819
};
1920

2021
const internalOnPendingTxs = async (pendingTxs: Tx[]) => {
21-
const newPendingTxs = pendingTxs.filter((tx) => !handledTxs.includes(tx.getTxHash().toString()));
22+
const newPendingTxs = pendingTxs.filter(
23+
(tx) => !handledTxs.includes(tx.getTxHash().toString())
24+
);
2225
if (newPendingTxs.length === 0) return;
2326
await onPendingTxs(pendingTxs);
2427
handledTxs = pendingTxs.map((tx) => tx.getTxHash().toString());
2528
};
2629

2730
const fetchAndPublishPendingTxs = async () => {
28-
const txs = await getPendingTxs();
29-
await internalOnPendingTxs(txs);
31+
try {
32+
const txs = await getPendingTxs();
33+
await internalOnPendingTxs(txs);
34+
} catch (error) {
35+
logger.warn("Error fetching pending txs", error);
36+
}
3037
};

services/ethereum-listener/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
],
1010
"license": "Apache-2.0",
1111
"dependencies": {
12-
"@aztec/aztec.js": "0.65.2",
13-
"@aztec/l1-artifacts": "0.65.2",
12+
"@aztec/aztec.js": "0.66.0",
13+
"@aztec/l1-artifacts": "0.66.0",
1414
"@chicmoz-pkg/logger-server": "workspace:^",
1515
"@chicmoz-pkg/message-bus": "workspace:^",
1616
"@chicmoz-pkg/message-registry": "workspace:^",

0 commit comments

Comments
 (0)