@aztec/stdlib 1.0.0-nightly.20250606 → 1.0.0-nightly.20250607
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.d.ts +304 -304
- package/dest/avm/avm_circuit_public_inputs.d.ts +60 -60
- package/dest/avm/avm_proving_request.d.ts +184 -184
- package/dest/avm/message_pack.d.ts.map +1 -1
- package/dest/avm/message_pack.js +2 -1
- package/dest/block/l2_block.js +1 -1
- package/dest/block/l2_block_code_to_purge.js +1 -1
- package/dest/block/l2_block_source.d.ts +2 -0
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/fees/transaction_fee.js +3 -3
- package/dest/gas/gas.js +1 -1
- package/dest/gas/gas_fees.d.ts +15 -14
- package/dest/gas/gas_fees.d.ts.map +1 -1
- package/dest/gas/gas_fees.js +17 -18
- package/dest/gas/gas_settings.d.ts +24 -24
- package/dest/gas/gas_settings.d.ts.map +1 -1
- package/dest/gas/gas_settings.js +1 -1
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +1 -0
- package/dest/interfaces/proving-job.d.ts +185 -185
- package/dest/interfaces/proving-job.d.ts.map +1 -1
- package/dest/interfaces/service.d.ts +1 -2
- package/dest/interfaces/service.d.ts.map +1 -1
- package/dest/interfaces/service.js +0 -7
- package/dest/kernel/combined_constant_data.d.ts +71 -0
- package/dest/kernel/combined_constant_data.d.ts.map +1 -0
- package/dest/kernel/combined_constant_data.js +73 -0
- package/dest/kernel/index.d.ts +1 -0
- package/dest/kernel/index.d.ts.map +1 -1
- package/dest/kernel/index.js +1 -0
- package/dest/rollup/base_or_merge_rollup_public_inputs.d.ts +3 -3
- package/dest/rollup/base_or_merge_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/base_or_merge_rollup_public_inputs.js +3 -3
- package/dest/rollup/base_rollup_hints.d.ts +14 -15
- package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
- package/dest/rollup/base_rollup_hints.js +12 -13
- package/dest/rollup/block_root_or_block_merge_public_inputs.d.ts +24 -9
- package/dest/rollup/block_root_or_block_merge_public_inputs.d.ts.map +1 -1
- package/dest/rollup/block_root_or_block_merge_public_inputs.js +14 -7
- package/dest/rollup/block_root_rollup.d.ts +2 -2
- package/dest/rollup/block_root_rollup.js +1 -1
- package/dest/rollup/constant_rollup_data.d.ts +45 -0
- package/dest/rollup/constant_rollup_data.d.ts.map +1 -0
- package/dest/rollup/{block_constant_data.js → constant_rollup_data.js} +13 -10
- package/dest/rollup/empty_block_root_rollup_inputs.d.ts +4 -4
- package/dest/rollup/empty_block_root_rollup_inputs.d.ts.map +1 -1
- package/dest/rollup/empty_block_root_rollup_inputs.js +2 -2
- package/dest/rollup/index.d.ts +1 -2
- package/dest/rollup/index.d.ts.map +1 -1
- package/dest/rollup/index.js +1 -2
- package/dest/rollup/root_rollup.d.ts +6 -2
- package/dest/rollup/root_rollup.d.ts.map +1 -1
- package/dest/rollup/root_rollup.js +6 -3
- package/dest/tests/factories.d.ts +10 -1
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +33 -20
- package/dest/tests/mocks.js +2 -2
- package/dest/trees/append_only_tree_snapshot.d.ts +2 -2
- package/dest/trees/append_only_tree_snapshot.d.ts.map +1 -1
- package/dest/trees/append_only_tree_snapshot.js +2 -2
- package/dest/tx/block_header.js +2 -2
- package/dest/tx/global_variables.d.ts +12 -12
- package/dest/tx/global_variables.js +2 -2
- package/dest/tx/partial_state_reference.js +2 -2
- package/dest/tx/processed_tx.d.ts +3 -2
- package/dest/tx/processed_tx.d.ts.map +1 -1
- package/dest/tx/processed_tx.js +7 -5
- package/dest/tx/proposed_block_header.d.ts +2 -2
- package/dest/tx/proposed_block_header.js +1 -1
- package/dest/tx/public_simulation_output.d.ts +3 -3
- package/dest/tx/public_simulation_output.d.ts.map +1 -1
- package/dest/tx/public_simulation_output.js +7 -7
- package/dest/tx/state_reference.js +2 -2
- package/dest/tx/tree_snapshots.js +2 -2
- package/dest/tx/tx_context.d.ts +32 -32
- package/dest/types/shared.d.ts +4 -0
- package/dest/types/shared.d.ts.map +1 -1
- package/dest/zkpassport/index.d.ts +31 -0
- package/dest/zkpassport/index.d.ts.map +1 -0
- package/dest/zkpassport/index.js +81 -0
- package/package.json +9 -8
- package/src/avm/message_pack.ts +1 -0
- package/src/block/l2_block.ts +1 -1
- package/src/block/l2_block_code_to_purge.ts +1 -1
- package/src/block/l2_block_source.ts +3 -0
- package/src/fees/transaction_fee.ts +5 -5
- package/src/gas/gas.ts +1 -1
- package/src/gas/gas_fees.ts +27 -23
- package/src/gas/gas_settings.ts +1 -5
- package/src/interfaces/archiver.ts +1 -0
- package/src/interfaces/service.ts +1 -11
- package/src/kernel/combined_constant_data.ts +128 -0
- package/src/kernel/index.ts +1 -0
- package/src/rollup/base_or_merge_rollup_public_inputs.ts +4 -4
- package/src/rollup/base_rollup_hints.ts +11 -12
- package/src/rollup/block_root_or_block_merge_public_inputs.ts +18 -7
- package/src/rollup/block_root_rollup.ts +1 -1
- package/src/rollup/constant_rollup_data.ts +54 -0
- package/src/rollup/empty_block_root_rollup_inputs.ts +3 -3
- package/src/rollup/index.ts +1 -2
- package/src/rollup/root_rollup.ts +7 -5
- package/src/tests/factories.ts +54 -30
- package/src/tests/mocks.ts +2 -2
- package/src/trees/append_only_tree_snapshot.ts +2 -2
- package/src/tx/block_header.ts +2 -2
- package/src/tx/global_variables.ts +2 -2
- package/src/tx/partial_state_reference.ts +4 -4
- package/src/tx/processed_tx.ts +10 -7
- package/src/tx/proposed_block_header.ts +1 -1
- package/src/tx/public_simulation_output.ts +5 -5
- package/src/tx/state_reference.ts +2 -2
- package/src/tx/tree_snapshots.ts +8 -8
- package/src/types/shared.ts +5 -0
- package/src/zkpassport/index.ts +115 -0
- package/dest/rollup/block_constant_data.d.ts +0 -37
- package/dest/rollup/block_constant_data.d.ts.map +0 -1
- package/dest/rollup/epoch_constant_data.d.ts +0 -39
- package/dest/rollup/epoch_constant_data.d.ts.map +0 -1
- package/dest/rollup/epoch_constant_data.js +0 -40
- package/src/rollup/block_constant_data.ts +0 -63
- package/src/rollup/epoch_constant_data.ts +0 -44
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
2
|
-
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
3
|
-
/**
|
|
4
|
-
* Constants that are the same for the entire epoch.
|
|
5
|
-
*/ export class EpochConstantData {
|
|
6
|
-
vkTreeRoot;
|
|
7
|
-
protocolContractTreeRoot;
|
|
8
|
-
proverId;
|
|
9
|
-
constructor(/**
|
|
10
|
-
* Root of the verification key tree.
|
|
11
|
-
*/ vkTreeRoot, /**
|
|
12
|
-
* Root of the protocol contract tree.
|
|
13
|
-
*/ protocolContractTreeRoot, /**
|
|
14
|
-
* Identifier of the prover of the epoch.
|
|
15
|
-
*/ proverId){
|
|
16
|
-
this.vkTreeRoot = vkTreeRoot;
|
|
17
|
-
this.protocolContractTreeRoot = protocolContractTreeRoot;
|
|
18
|
-
this.proverId = proverId;
|
|
19
|
-
}
|
|
20
|
-
static from(fields) {
|
|
21
|
-
return new EpochConstantData(...EpochConstantData.getFields(fields));
|
|
22
|
-
}
|
|
23
|
-
static fromBuffer(buffer) {
|
|
24
|
-
const reader = BufferReader.asReader(buffer);
|
|
25
|
-
return new EpochConstantData(Fr.fromBuffer(reader), Fr.fromBuffer(reader), Fr.fromBuffer(reader));
|
|
26
|
-
}
|
|
27
|
-
static getFields(fields) {
|
|
28
|
-
return [
|
|
29
|
-
fields.vkTreeRoot,
|
|
30
|
-
fields.protocolContractTreeRoot,
|
|
31
|
-
fields.proverId
|
|
32
|
-
];
|
|
33
|
-
}
|
|
34
|
-
static empty() {
|
|
35
|
-
return new EpochConstantData(Fr.ZERO, Fr.ZERO, Fr.ZERO);
|
|
36
|
-
}
|
|
37
|
-
toBuffer() {
|
|
38
|
-
return serializeToBuffer(...EpochConstantData.getFields(this));
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
2
|
-
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
3
|
-
import type { FieldsOf } from '@aztec/foundation/types';
|
|
4
|
-
|
|
5
|
-
import { AppendOnlyTreeSnapshot } from '../trees/append_only_tree_snapshot.js';
|
|
6
|
-
import { GlobalVariables } from '../tx/global_variables.js';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Constants that are the same for the entire block.
|
|
10
|
-
*/
|
|
11
|
-
export class BlockConstantData {
|
|
12
|
-
constructor(
|
|
13
|
-
/** Archive tree snapshot at the very beginning of the entire rollup. */
|
|
14
|
-
public lastArchive: AppendOnlyTreeSnapshot,
|
|
15
|
-
/** L1 to L2 message tree snapshot at the very beginning of the entire rollup. */
|
|
16
|
-
public lastL1ToL2: AppendOnlyTreeSnapshot,
|
|
17
|
-
/** Root of the verification key tree. */
|
|
18
|
-
public vkTreeRoot: Fr,
|
|
19
|
-
/** Root of the protocol contract tree. */
|
|
20
|
-
public protocolContractTreeRoot: Fr,
|
|
21
|
-
/** Global variables for the block. */
|
|
22
|
-
public globalVariables: GlobalVariables,
|
|
23
|
-
) {}
|
|
24
|
-
|
|
25
|
-
static from(fields: FieldsOf<BlockConstantData>): BlockConstantData {
|
|
26
|
-
return new BlockConstantData(...BlockConstantData.getFields(fields));
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
static fromBuffer(buffer: Buffer | BufferReader): BlockConstantData {
|
|
30
|
-
const reader = BufferReader.asReader(buffer);
|
|
31
|
-
return new BlockConstantData(
|
|
32
|
-
reader.readObject(AppendOnlyTreeSnapshot),
|
|
33
|
-
reader.readObject(AppendOnlyTreeSnapshot),
|
|
34
|
-
Fr.fromBuffer(reader),
|
|
35
|
-
Fr.fromBuffer(reader),
|
|
36
|
-
reader.readObject(GlobalVariables),
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
static getFields(fields: FieldsOf<BlockConstantData>) {
|
|
41
|
-
return [
|
|
42
|
-
fields.lastArchive,
|
|
43
|
-
fields.lastL1ToL2,
|
|
44
|
-
fields.vkTreeRoot,
|
|
45
|
-
fields.protocolContractTreeRoot,
|
|
46
|
-
fields.globalVariables,
|
|
47
|
-
] as const;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
static empty() {
|
|
51
|
-
return new BlockConstantData(
|
|
52
|
-
AppendOnlyTreeSnapshot.empty(),
|
|
53
|
-
AppendOnlyTreeSnapshot.empty(),
|
|
54
|
-
Fr.ZERO,
|
|
55
|
-
Fr.ZERO,
|
|
56
|
-
GlobalVariables.empty(),
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
toBuffer() {
|
|
61
|
-
return serializeToBuffer(...BlockConstantData.getFields(this));
|
|
62
|
-
}
|
|
63
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
2
|
-
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
3
|
-
import type { FieldsOf } from '@aztec/foundation/types';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Constants that are the same for the entire epoch.
|
|
7
|
-
*/
|
|
8
|
-
export class EpochConstantData {
|
|
9
|
-
constructor(
|
|
10
|
-
/**
|
|
11
|
-
* Root of the verification key tree.
|
|
12
|
-
*/
|
|
13
|
-
public vkTreeRoot: Fr,
|
|
14
|
-
/**
|
|
15
|
-
* Root of the protocol contract tree.
|
|
16
|
-
*/
|
|
17
|
-
public protocolContractTreeRoot: Fr,
|
|
18
|
-
/**
|
|
19
|
-
* Identifier of the prover of the epoch.
|
|
20
|
-
*/
|
|
21
|
-
public proverId: Fr,
|
|
22
|
-
) {}
|
|
23
|
-
|
|
24
|
-
static from(fields: FieldsOf<EpochConstantData>): EpochConstantData {
|
|
25
|
-
return new EpochConstantData(...EpochConstantData.getFields(fields));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
static fromBuffer(buffer: Buffer | BufferReader): EpochConstantData {
|
|
29
|
-
const reader = BufferReader.asReader(buffer);
|
|
30
|
-
return new EpochConstantData(Fr.fromBuffer(reader), Fr.fromBuffer(reader), Fr.fromBuffer(reader));
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
static getFields(fields: FieldsOf<EpochConstantData>) {
|
|
34
|
-
return [fields.vkTreeRoot, fields.protocolContractTreeRoot, fields.proverId] as const;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
static empty() {
|
|
38
|
-
return new EpochConstantData(Fr.ZERO, Fr.ZERO, Fr.ZERO);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
toBuffer() {
|
|
42
|
-
return serializeToBuffer(...EpochConstantData.getFields(this));
|
|
43
|
-
}
|
|
44
|
-
}
|