@aztec-labs/protocol-contracts 6.0.0-nightly.20260921 → 6.0.0-nightly.20260923
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.
- package/artifacts/ContractClassRegistry.json +2 -2
- package/artifacts/ContractInstanceRegistry.json +2 -2
- package/artifacts/FeeJuice.json +2 -2
- package/dest/class-registry/contract_class_published_event.d.ts +1 -1
- package/dest/class-registry/contract_class_published_event.d.ts.map +1 -1
- package/dest/class-registry/contract_class_published_event.js +8 -5
- package/package.json +5 -5
- package/src/class-registry/contract_class_published_event.ts +9 -5
|
@@ -4182,7 +4182,7 @@
|
|
|
4182
4182
|
}
|
|
4183
4183
|
],
|
|
4184
4184
|
"name": "ContractClassRegistry",
|
|
4185
|
-
"noir_version": "1.0.0-rc.
|
|
4185
|
+
"noir_version": "1.0.0-rc.3+5a7ee9bf5ed8973076df7bb0d2b723024db09ae7",
|
|
4186
4186
|
"outputs": {
|
|
4187
4187
|
"globals": {},
|
|
4188
4188
|
"structs": {
|
|
@@ -4224,5 +4224,5 @@
|
|
|
4224
4224
|
}
|
|
4225
4225
|
},
|
|
4226
4226
|
"transpiled": true,
|
|
4227
|
-
"aztec_version": "6.0.0-nightly.
|
|
4227
|
+
"aztec_version": "6.0.0-nightly.20260923"
|
|
4228
4228
|
}
|
|
@@ -5139,7 +5139,7 @@
|
|
|
5139
5139
|
}
|
|
5140
5140
|
],
|
|
5141
5141
|
"name": "ContractInstanceRegistry",
|
|
5142
|
-
"noir_version": "1.0.0-rc.
|
|
5142
|
+
"noir_version": "1.0.0-rc.3+5a7ee9bf5ed8973076df7bb0d2b723024db09ae7",
|
|
5143
5143
|
"outputs": {
|
|
5144
5144
|
"globals": {},
|
|
5145
5145
|
"structs": {
|
|
@@ -5565,5 +5565,5 @@
|
|
|
5565
5565
|
}
|
|
5566
5566
|
},
|
|
5567
5567
|
"transpiled": true,
|
|
5568
|
-
"aztec_version": "6.0.0-nightly.
|
|
5568
|
+
"aztec_version": "6.0.0-nightly.20260923"
|
|
5569
5569
|
}
|
package/artifacts/FeeJuice.json
CHANGED
|
@@ -7140,7 +7140,7 @@
|
|
|
7140
7140
|
}
|
|
7141
7141
|
],
|
|
7142
7142
|
"name": "FeeJuice",
|
|
7143
|
-
"noir_version": "1.0.0-rc.
|
|
7143
|
+
"noir_version": "1.0.0-rc.3+5a7ee9bf5ed8973076df7bb0d2b723024db09ae7",
|
|
7144
7144
|
"outputs": {
|
|
7145
7145
|
"globals": {
|
|
7146
7146
|
"storage": [
|
|
@@ -7390,5 +7390,5 @@
|
|
|
7390
7390
|
}
|
|
7391
7391
|
},
|
|
7392
7392
|
"transpiled": true,
|
|
7393
|
-
"aztec_version": "6.0.0-nightly.
|
|
7393
|
+
"aztec_version": "6.0.0-nightly.20260923"
|
|
7394
7394
|
}
|
|
@@ -17,4 +17,4 @@ export declare class ContractClassPublishedEvent {
|
|
|
17
17
|
toContractClassPublicWithBytecodeCommitment(): Promise<ContractClassPublicWithCommitment>;
|
|
18
18
|
static extractContractClassEvents(logs: ContractClassLog[]): ContractClassPublishedEvent[];
|
|
19
19
|
}
|
|
20
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJhY3RfY2xhc3NfcHVibGlzaGVkX2V2ZW50LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY2xhc3MtcmVnaXN0cnkvY29udHJhY3RfY2xhc3NfcHVibGlzaGVkX2V2ZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxFQUFFLEVBQUUsTUFBTSxxQ0FBcUMsQ0FBQztBQUd6RCxPQUFPLEVBQ0wsS0FBSyxtQkFBbUIsRUFDeEIsS0FBSyxpQ0FBaUMsRUFFdkMsTUFBTSw2QkFBNkIsQ0FBQztBQUNyQyxPQUFPLEtBQUssRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBSWhFLG9EQUFvRDtBQUNwRCxxQkFBYSwyQkFBMkI7YUFFcEIsZUFBZSxFQUFFLEVBQUU7YUFDbkIsT0FBTyxFQUFFLE1BQU07YUFDZixZQUFZLEVBQUUsRUFBRTthQUNoQixvQkFBb0IsRUFBRSxFQUFFO2FBQ3hCLG9CQUFvQixFQUFFLE1BQU07SUFMOUMsWUFDa0IsZUFBZSxFQUFFLEVBQUUsRUFDbkIsT0FBTyxFQUFFLE1BQU0sRUFDZixZQUFZLEVBQUUsRUFBRSxFQUNoQixvQkFBb0IsRUFBRSxFQUFFLEVBQ3hCLG9CQUFvQixFQUFFLE1BQU0sRUFDMUM7SUFFSixNQUFNLENBQUMsNkJBQTZCLENBQUMsR0FBRyxFQUFFLGdCQUFnQixXQUt6RDtJQUVELE1BQU0sQ0FBQyxPQUFPLENBQUMsR0FBRyxFQUFFLGdCQUFnQiwrQkEwQm5DO0lBRUQsdUdBQXVHO0lBQ3ZHLHFCQUFxQixJQUFJLG1CQUFtQixDQVEzQztJQUVELHVGQUF1RjtJQUNqRiwyQ0FBMkMsSUFBSSxPQUFPLENBQUMsaUNBQWlDLENBQUMsQ0FHOUY7SUFFRCxPQUFjLDBCQUEwQixDQUFDLElBQUksRUFBRSxnQkFBZ0IsRUFBRSxHQUFHLDJCQUEyQixFQUFFLENBSWhHO0NBQ0YifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract_class_published_event.d.ts","sourceRoot":"","sources":["../../src/class-registry/contract_class_published_event.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,qCAAqC,CAAC;AAGzD,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,iCAAiC,EAEvC,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAIhE,oDAAoD;AACpD,qBAAa,2BAA2B;aAEpB,eAAe,EAAE,EAAE;aACnB,OAAO,EAAE,MAAM;aACf,YAAY,EAAE,EAAE;aAChB,oBAAoB,EAAE,EAAE;aACxB,oBAAoB,EAAE,MAAM;IAL9C,YACkB,eAAe,EAAE,EAAE,EACnB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,EAAE,EAChB,oBAAoB,EAAE,EAAE,EACxB,oBAAoB,EAAE,MAAM,EAC1C;IAEJ,MAAM,CAAC,6BAA6B,CAAC,GAAG,EAAE,gBAAgB,WAKzD;IAED,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,gBAAgB,+
|
|
1
|
+
{"version":3,"file":"contract_class_published_event.d.ts","sourceRoot":"","sources":["../../src/class-registry/contract_class_published_event.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,qCAAqC,CAAC;AAGzD,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,iCAAiC,EAEvC,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAIhE,oDAAoD;AACpD,qBAAa,2BAA2B;aAEpB,eAAe,EAAE,EAAE;aACnB,OAAO,EAAE,MAAM;aACf,YAAY,EAAE,EAAE;aAChB,oBAAoB,EAAE,EAAE;aACxB,oBAAoB,EAAE,MAAM;IAL9C,YACkB,eAAe,EAAE,EAAE,EACnB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,EAAE,EAChB,oBAAoB,EAAE,EAAE,EACxB,oBAAoB,EAAE,MAAM,EAC1C;IAEJ,MAAM,CAAC,6BAA6B,CAAC,GAAG,EAAE,gBAAgB,WAKzD;IAED,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,gBAAgB,+BA0BnC;IAED,uGAAuG;IACvG,qBAAqB,IAAI,mBAAmB,CAQ3C;IAED,uFAAuF;IACjF,2CAA2C,IAAI,OAAO,CAAC,iCAAiC,CAAC,CAG9F;IAED,OAAc,0BAA0B,CAAC,IAAI,EAAE,gBAAgB,EAAE,GAAG,2BAA2B,EAAE,CAIhG;CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CONTRACT_CLASS_PUBLISHED_MAGIC_VALUE } from '@aztec-labs/constants';
|
|
1
|
+
import { CONTRACT_CLASS_PUBLISHED_MAGIC_VALUE, MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS } from '@aztec-labs/constants';
|
|
2
2
|
import { Fr } from '@aztec-labs/foundation/curves/bn254';
|
|
3
3
|
import { FieldReader } from '@aztec-labs/foundation/serialize';
|
|
4
4
|
import { bufferFromFields } from '@aztec-labs/stdlib/abi';
|
|
@@ -29,10 +29,13 @@ import { ProtocolContractAddress } from '../protocol_contract_data.js';
|
|
|
29
29
|
const artifactHash = reader.readField();
|
|
30
30
|
const privateFunctionsRoot = reader.readField();
|
|
31
31
|
const bytecodeFields = reader.readFieldArray(fieldsWithoutTag.length - reader.cursor);
|
|
32
|
-
//
|
|
33
|
-
//
|
|
34
|
-
//
|
|
35
|
-
|
|
32
|
+
// Bound the declared length by both the physical capacity of this log's bytecode encoding and the
|
|
33
|
+
// protocol's maximum packed public bytecode. Both limits count one length-prefix field, with each
|
|
34
|
+
// remaining field carrying 31 bytes. The physical bound stops a malformed log declaring a multi-MiB
|
|
35
|
+
// length backed by a tiny payload and forcing a large allocation during early (pre-proof) validation;
|
|
36
|
+
// the semantic bound stops a length that decodes here only to fail later when the bytecode commitment
|
|
37
|
+
// repacks it into fields.
|
|
38
|
+
const maxByteLength = (Math.min(bytecodeFields.length, MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS) - 1) * (Fr.SIZE_IN_BYTES - 1);
|
|
36
39
|
const packedPublicBytecode = bufferFromFields(bytecodeFields, maxByteLength);
|
|
37
40
|
return new ContractClassPublishedEvent(contractClassId, version, artifactHash, privateFunctionsRoot, packedPublicBytecode);
|
|
38
41
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@aztec-labs/protocol-contracts",
|
|
3
3
|
"homepage": "https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/protocol-contracts",
|
|
4
4
|
"description": "Canonical Noir contracts for the Aztec Network",
|
|
5
|
-
"version": "6.0.0-nightly.
|
|
5
|
+
"version": "6.0.0-nightly.20260923",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./dest/index.js",
|
|
@@ -73,15 +73,15 @@
|
|
|
73
73
|
]
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@aztec-labs/constants": "6.0.0-nightly.
|
|
77
|
-
"@aztec-labs/foundation": "6.0.0-nightly.
|
|
78
|
-
"@aztec-labs/stdlib": "6.0.0-nightly.
|
|
76
|
+
"@aztec-labs/constants": "6.0.0-nightly.20260923",
|
|
77
|
+
"@aztec-labs/foundation": "6.0.0-nightly.20260923",
|
|
78
|
+
"@aztec-labs/stdlib": "6.0.0-nightly.20260923",
|
|
79
79
|
"lodash.chunk": "^4.2.0",
|
|
80
80
|
"lodash.omit": "^4.5.0",
|
|
81
81
|
"tslib": "^2.4.0"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
|
-
"@aztec-foundation/protocol-contracts-artifacts": "6.0.0-nightly.
|
|
84
|
+
"@aztec-foundation/protocol-contracts-artifacts": "6.0.0-nightly.20260921",
|
|
85
85
|
"@jest/globals": "^30.0.0",
|
|
86
86
|
"@types/jest": "^30.0.0",
|
|
87
87
|
"@types/lodash.chunk": "^4.2.9",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CONTRACT_CLASS_PUBLISHED_MAGIC_VALUE } from '@aztec-labs/constants';
|
|
1
|
+
import { CONTRACT_CLASS_PUBLISHED_MAGIC_VALUE, MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS } from '@aztec-labs/constants';
|
|
2
2
|
import { Fr } from '@aztec-labs/foundation/curves/bn254';
|
|
3
3
|
import { FieldReader } from '@aztec-labs/foundation/serialize';
|
|
4
4
|
import { bufferFromFields } from '@aztec-labs/stdlib/abi';
|
|
@@ -37,10 +37,14 @@ export class ContractClassPublishedEvent {
|
|
|
37
37
|
const artifactHash = reader.readField();
|
|
38
38
|
const privateFunctionsRoot = reader.readField();
|
|
39
39
|
const bytecodeFields = reader.readFieldArray(fieldsWithoutTag.length - reader.cursor);
|
|
40
|
-
//
|
|
41
|
-
//
|
|
42
|
-
//
|
|
43
|
-
|
|
40
|
+
// Bound the declared length by both the physical capacity of this log's bytecode encoding and the
|
|
41
|
+
// protocol's maximum packed public bytecode. Both limits count one length-prefix field, with each
|
|
42
|
+
// remaining field carrying 31 bytes. The physical bound stops a malformed log declaring a multi-MiB
|
|
43
|
+
// length backed by a tiny payload and forcing a large allocation during early (pre-proof) validation;
|
|
44
|
+
// the semantic bound stops a length that decodes here only to fail later when the bytecode commitment
|
|
45
|
+
// repacks it into fields.
|
|
46
|
+
const maxByteLength =
|
|
47
|
+
(Math.min(bytecodeFields.length, MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS) - 1) * (Fr.SIZE_IN_BYTES - 1);
|
|
44
48
|
const packedPublicBytecode = bufferFromFields(bytecodeFields, maxByteLength);
|
|
45
49
|
|
|
46
50
|
return new ContractClassPublishedEvent(
|