@aztec/stdlib 3.0.0-nightly.20250924 → 3.0.0-nightly.20250926
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/dest/avm/avm_accumulated_data.d.ts +1 -0
- package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
- package/dest/avm/avm_accumulated_data.js +4 -0
- package/dest/avm/index.d.ts +0 -1
- package/dest/avm/index.d.ts.map +1 -1
- package/dest/avm/index.js +0 -1
- package/dest/file-store/factory.d.ts.map +1 -1
- package/dest/file-store/factory.js +18 -0
- package/dest/file-store/s3.d.ts +25 -0
- package/dest/file-store/s3.d.ts.map +1 -0
- package/dest/file-store/s3.js +187 -0
- package/dest/interfaces/aztec-node-admin.d.ts +6 -0
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/pxe.d.ts +5 -179
- package/dest/interfaces/pxe.d.ts.map +1 -1
- package/dest/interfaces/pxe.js +2 -59
- package/dest/interfaces/slasher.d.ts +4 -0
- package/dest/interfaces/slasher.d.ts.map +1 -1
- package/dest/interfaces/slasher.js +1 -0
- package/dest/interfaces/validator.d.ts +6 -1
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/interfaces/validator.js +2 -1
- package/dest/rollup/avm_proof_data.d.ts +2 -12
- package/dest/rollup/avm_proof_data.d.ts.map +1 -1
- package/dest/rollup/avm_proof_data.js +0 -24
- package/dest/rollup/base_rollup_hints.d.ts +15 -16
- package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
- package/dest/rollup/base_rollup_hints.js +24 -25
- package/dest/rollup/block_root_rollup_private_inputs.d.ts +13 -13
- package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/block_root_rollup_private_inputs.js +20 -20
- package/dest/rollup/index.d.ts +1 -1
- package/dest/rollup/index.d.ts.map +1 -1
- package/dest/rollup/index.js +1 -1
- package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts +1 -1
- package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/public_tx_base_rollup_private_inputs.js +2 -2
- package/dest/rollup/{state_diff_hints.d.ts → tree_snapshot_diff_hints.d.ts} +22 -38
- package/dest/rollup/tree_snapshot_diff_hints.d.ts.map +1 -0
- package/dest/rollup/tree_snapshot_diff_hints.js +75 -0
- package/dest/rollup/tx_rollup_public_inputs.d.ts +4 -4
- package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/tx_rollup_public_inputs.js +7 -7
- package/dest/tests/factories.d.ts +4 -4
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +20 -25
- package/package.json +9 -8
- package/src/avm/avm_accumulated_data.ts +10 -0
- package/src/avm/index.ts +0 -1
- package/src/file-store/factory.ts +15 -0
- package/src/file-store/s3.ts +186 -0
- package/src/interfaces/pxe.ts +8 -80
- package/src/interfaces/slasher.ts +2 -0
- package/src/interfaces/validator.ts +5 -1
- package/src/rollup/avm_proof_data.ts +2 -31
- package/src/rollup/base_rollup_hints.ts +20 -21
- package/src/rollup/block_root_rollup_private_inputs.ts +14 -14
- package/src/rollup/index.ts +1 -1
- package/src/rollup/public_tx_base_rollup_private_inputs.ts +3 -2
- package/src/rollup/{state_diff_hints.ts → tree_snapshot_diff_hints.ts} +26 -41
- package/src/rollup/tx_rollup_public_inputs.ts +4 -4
- package/src/tests/factories.ts +25 -37
- package/dest/avm/public_data_hint.d.ts +0 -16
- package/dest/avm/public_data_hint.d.ts.map +0 -1
- package/dest/avm/public_data_hint.js +0 -27
- package/dest/rollup/state_diff_hints.d.ts.map +0 -1
- package/dest/rollup/state_diff_hints.js +0 -85
- package/src/avm/public_data_hint.ts +0 -38
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { MAX_NULLIFIERS_PER_TX, NOTE_HASH_SUBTREE_SIBLING_PATH_LENGTH, NULLIFIER_SUBTREE_SIBLING_PATH_LENGTH, NULLIFIER_TREE_HEIGHT, PUBLIC_DATA_TREE_HEIGHT } from '@aztec/constants';
|
|
2
|
-
import { makeTuple } from '@aztec/foundation/array';
|
|
3
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
4
|
-
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
5
|
-
import { MembershipWitness } from '@aztec/foundation/trees';
|
|
6
|
-
import { NullifierLeafPreimage, PublicDataTreeLeafPreimage } from '../trees/index.js';
|
|
7
|
-
/**
|
|
8
|
-
* Hints used while proving state diff validity for the private base rollup.
|
|
9
|
-
*/ export class PrivateBaseStateDiffHints {
|
|
10
|
-
nullifierPredecessorPreimages;
|
|
11
|
-
nullifierPredecessorMembershipWitnesses;
|
|
12
|
-
sortedNullifiers;
|
|
13
|
-
sortedNullifierIndexes;
|
|
14
|
-
noteHashSubtreeSiblingPath;
|
|
15
|
-
nullifierSubtreeSiblingPath;
|
|
16
|
-
feeWriteLowLeafPreimage;
|
|
17
|
-
feeWriteLowLeafMembershipWitness;
|
|
18
|
-
feeWriteSiblingPath;
|
|
19
|
-
constructor(/**
|
|
20
|
-
* The nullifiers which need to be updated to perform the batch insertion of the new nullifiers.
|
|
21
|
-
* See `StandardIndexedTree.batchInsert` function for more details.
|
|
22
|
-
*/ nullifierPredecessorPreimages, /**
|
|
23
|
-
* Membership witnesses for the nullifiers which need to be updated to perform the batch insertion of the new
|
|
24
|
-
* nullifiers.
|
|
25
|
-
*/ nullifierPredecessorMembershipWitnesses, /**
|
|
26
|
-
* The nullifiers to be inserted in the tree, sorted high to low.
|
|
27
|
-
*/ sortedNullifiers, /**
|
|
28
|
-
* The indexes of the sorted nullifiers to the original ones.
|
|
29
|
-
*/ sortedNullifierIndexes, /**
|
|
30
|
-
* Sibling path "pointing to" where the new note hash subtree should be inserted into the note hash tree.
|
|
31
|
-
*/ noteHashSubtreeSiblingPath, /**
|
|
32
|
-
* Sibling path "pointing to" where the new nullifiers subtree should be inserted into the nullifier tree.
|
|
33
|
-
*/ nullifierSubtreeSiblingPath, /**
|
|
34
|
-
* Low leaf for the fee write in the public data tree.
|
|
35
|
-
*/ feeWriteLowLeafPreimage, /**
|
|
36
|
-
* Membership witness for the low leaf for the fee write in the public data tree.
|
|
37
|
-
*/ feeWriteLowLeafMembershipWitness, /**
|
|
38
|
-
* Sibling path "pointing to" where the fee write should be inserted into the public data tree.
|
|
39
|
-
*/ feeWriteSiblingPath){
|
|
40
|
-
this.nullifierPredecessorPreimages = nullifierPredecessorPreimages;
|
|
41
|
-
this.nullifierPredecessorMembershipWitnesses = nullifierPredecessorMembershipWitnesses;
|
|
42
|
-
this.sortedNullifiers = sortedNullifiers;
|
|
43
|
-
this.sortedNullifierIndexes = sortedNullifierIndexes;
|
|
44
|
-
this.noteHashSubtreeSiblingPath = noteHashSubtreeSiblingPath;
|
|
45
|
-
this.nullifierSubtreeSiblingPath = nullifierSubtreeSiblingPath;
|
|
46
|
-
this.feeWriteLowLeafPreimage = feeWriteLowLeafPreimage;
|
|
47
|
-
this.feeWriteLowLeafMembershipWitness = feeWriteLowLeafMembershipWitness;
|
|
48
|
-
this.feeWriteSiblingPath = feeWriteSiblingPath;
|
|
49
|
-
}
|
|
50
|
-
static from(fields) {
|
|
51
|
-
return new PrivateBaseStateDiffHints(...PrivateBaseStateDiffHints.getFields(fields));
|
|
52
|
-
}
|
|
53
|
-
static getFields(fields) {
|
|
54
|
-
return [
|
|
55
|
-
fields.nullifierPredecessorPreimages,
|
|
56
|
-
fields.nullifierPredecessorMembershipWitnesses,
|
|
57
|
-
fields.sortedNullifiers,
|
|
58
|
-
fields.sortedNullifierIndexes,
|
|
59
|
-
fields.noteHashSubtreeSiblingPath,
|
|
60
|
-
fields.nullifierSubtreeSiblingPath,
|
|
61
|
-
fields.feeWriteLowLeafPreimage,
|
|
62
|
-
fields.feeWriteLowLeafMembershipWitness,
|
|
63
|
-
fields.feeWriteSiblingPath
|
|
64
|
-
];
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Serializes the state diff hints to a buffer.
|
|
68
|
-
* @returns A buffer of the serialized state diff hints.
|
|
69
|
-
*/ toBuffer() {
|
|
70
|
-
return serializeToBuffer(...PrivateBaseStateDiffHints.getFields(this));
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Deserializes the state diff hints from a buffer.
|
|
74
|
-
* @param buffer - A buffer to deserialize from.
|
|
75
|
-
* @returns A new PrivateBaseStateDiffHints instance.
|
|
76
|
-
*/ static fromBuffer(buffer) {
|
|
77
|
-
const reader = BufferReader.asReader(buffer);
|
|
78
|
-
return new PrivateBaseStateDiffHints(reader.readArray(MAX_NULLIFIERS_PER_TX, NullifierLeafPreimage), reader.readArray(MAX_NULLIFIERS_PER_TX, {
|
|
79
|
-
fromBuffer: (buffer)=>MembershipWitness.fromBuffer(buffer, NULLIFIER_TREE_HEIGHT)
|
|
80
|
-
}), reader.readArray(MAX_NULLIFIERS_PER_TX, Fr), reader.readNumbers(MAX_NULLIFIERS_PER_TX), reader.readArray(NOTE_HASH_SUBTREE_SIBLING_PATH_LENGTH, Fr), reader.readArray(NULLIFIER_SUBTREE_SIBLING_PATH_LENGTH, Fr), reader.readObject(PublicDataTreeLeafPreimage), MembershipWitness.fromBuffer(reader, PUBLIC_DATA_TREE_HEIGHT), reader.readArray(PUBLIC_DATA_TREE_HEIGHT, Fr));
|
|
81
|
-
}
|
|
82
|
-
static empty() {
|
|
83
|
-
return new PrivateBaseStateDiffHints(makeTuple(MAX_NULLIFIERS_PER_TX, NullifierLeafPreimage.empty), makeTuple(MAX_NULLIFIERS_PER_TX, ()=>MembershipWitness.empty(NULLIFIER_TREE_HEIGHT)), makeTuple(MAX_NULLIFIERS_PER_TX, Fr.zero), makeTuple(MAX_NULLIFIERS_PER_TX, ()=>0), makeTuple(NOTE_HASH_SUBTREE_SIBLING_PATH_LENGTH, Fr.zero), makeTuple(NULLIFIER_SUBTREE_SIBLING_PATH_LENGTH, Fr.zero), PublicDataTreeLeafPreimage.empty(), MembershipWitness.empty(PUBLIC_DATA_TREE_HEIGHT), makeTuple(PUBLIC_DATA_TREE_HEIGHT, Fr.zero));
|
|
84
|
-
}
|
|
85
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { PUBLIC_DATA_TREE_HEIGHT } from '@aztec/constants';
|
|
2
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
3
|
-
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
4
|
-
import { MembershipWitness } from '@aztec/foundation/trees';
|
|
5
|
-
|
|
6
|
-
import { PublicDataTreeLeafPreimage } from '../trees/index.js';
|
|
7
|
-
|
|
8
|
-
export class PublicDataHint {
|
|
9
|
-
constructor(
|
|
10
|
-
public leafSlot: Fr,
|
|
11
|
-
public value: Fr,
|
|
12
|
-
public membershipWitness: MembershipWitness<typeof PUBLIC_DATA_TREE_HEIGHT>,
|
|
13
|
-
public leafPreimage: PublicDataTreeLeafPreimage,
|
|
14
|
-
) {}
|
|
15
|
-
|
|
16
|
-
static empty() {
|
|
17
|
-
return new PublicDataHint(
|
|
18
|
-
Fr.ZERO,
|
|
19
|
-
Fr.ZERO,
|
|
20
|
-
MembershipWitness.empty(PUBLIC_DATA_TREE_HEIGHT),
|
|
21
|
-
PublicDataTreeLeafPreimage.empty(),
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
static fromBuffer(buffer: Buffer | BufferReader) {
|
|
26
|
-
const reader = BufferReader.asReader(buffer);
|
|
27
|
-
return new PublicDataHint(
|
|
28
|
-
reader.readObject(Fr),
|
|
29
|
-
reader.readObject(Fr),
|
|
30
|
-
MembershipWitness.fromBuffer(reader, PUBLIC_DATA_TREE_HEIGHT),
|
|
31
|
-
reader.readObject(PublicDataTreeLeafPreimage),
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
toBuffer() {
|
|
36
|
-
return serializeToBuffer(this.leafSlot, this.value, this.membershipWitness, this.leafPreimage);
|
|
37
|
-
}
|
|
38
|
-
}
|