@aztec/stdlib 5.0.0-rc.2 → 5.0.1
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/block/attestation_info.d.ts +1 -1
- package/dest/block/attestation_info.d.ts.map +1 -1
- package/dest/block/attestation_info.js +7 -4
- package/dest/block/l2_block_source.d.ts +34 -3
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/block/l2_block_source.js +15 -0
- package/dest/block/l2_block_stream/event_driven_l2_block_stream.d.ts +39 -0
- package/dest/block/l2_block_stream/event_driven_l2_block_stream.d.ts.map +1 -0
- package/dest/block/l2_block_stream/event_driven_l2_block_stream.js +165 -0
- package/dest/block/l2_block_stream/index.d.ts +2 -1
- package/dest/block/l2_block_stream/index.d.ts.map +1 -1
- package/dest/block/l2_block_stream/index.js +1 -0
- package/dest/block/l2_block_stream/interfaces.d.ts +16 -2
- package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
- package/dest/block/l2_block_stream/interfaces.js +25 -1
- package/dest/block/l2_block_stream/l2_block_stream.d.ts +21 -35
- package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_block_stream.js +5 -30
- package/dest/block/proposal/attestations_and_signers.d.ts +19 -1
- package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -1
- package/dest/block/proposal/attestations_and_signers.js +47 -7
- package/dest/block/validate_block_result.d.ts +16 -1
- package/dest/block/validate_block_result.d.ts.map +1 -1
- package/dest/block/validate_block_result.js +18 -3
- package/dest/config/network-consensus-config.d.ts +1 -1
- package/dest/config/network-consensus-config.d.ts.map +1 -1
- package/dest/config/network-consensus-config.js +2 -10
- package/dest/contract/contract_address.d.ts +5 -4
- package/dest/contract/contract_address.d.ts.map +1 -1
- package/dest/contract/contract_instance.d.ts +16 -2
- package/dest/contract/contract_instance.d.ts.map +1 -1
- package/dest/contract/contract_instance.js +45 -0
- package/dest/contract/interfaces/contract_instance.d.ts +71 -10
- package/dest/contract/interfaces/contract_instance.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_instance.js +7 -2
- package/dest/contract/partial_address.d.ts +9 -3
- package/dest/contract/partial_address.d.ts.map +1 -1
- package/dest/contract/partial_address.js +8 -2
- package/dest/database-version/version_manager.d.ts +18 -4
- package/dest/database-version/version_manager.d.ts.map +1 -1
- package/dest/database-version/version_manager.js +76 -6
- package/dest/ha-signing/config.d.ts +19 -5
- package/dest/ha-signing/config.d.ts.map +1 -1
- package/dest/ha-signing/config.js +9 -3
- package/dest/ha-signing/local_config.d.ts +10 -2
- package/dest/ha-signing/local_config.d.ts.map +1 -1
- package/dest/ha-signing/local_config.js +8 -2
- package/dest/hash/hash.d.ts +1 -2
- package/dest/hash/hash.d.ts.map +1 -1
- package/dest/hash/hash.js +0 -7
- package/dest/interfaces/archiver.d.ts +8 -1
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +2 -1
- package/dest/interfaces/aztec-node-admin.d.ts +5 -2
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/configs.d.ts +4 -1
- package/dest/interfaces/configs.d.ts.map +1 -1
- package/dest/interfaces/configs.js +1 -0
- package/dest/interfaces/private_kernel_prover.d.ts +9 -11
- package/dest/interfaces/private_kernel_prover.d.ts.map +1 -1
- package/dest/interfaces/proving-job.d.ts +87 -74
- package/dest/interfaces/proving-job.d.ts.map +1 -1
- package/dest/interfaces/proving-job.js +13 -4
- package/dest/interfaces/server_circuit_prover.d.ts +3 -3
- package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
- package/dest/interfaces/validator.d.ts +7 -3
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/interfaces/world_state.d.ts +14 -1
- package/dest/interfaces/world_state.d.ts.map +1 -1
- package/dest/kernel/hints/find_private_kernel_reset_dimensions.d.ts +8 -2
- package/dest/kernel/hints/find_private_kernel_reset_dimensions.d.ts.map +1 -1
- package/dest/kernel/hints/find_private_kernel_reset_dimensions.js +12 -74
- package/dest/kernel/index.d.ts +2 -2
- package/dest/kernel/index.d.ts.map +1 -1
- package/dest/kernel/index.js +1 -1
- package/dest/kernel/private_circuit_public_inputs.d.ts +13 -3
- package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_circuit_public_inputs.js +14 -7
- package/dest/kernel/private_context_inputs.d.ts +4 -3
- package/dest/kernel/private_context_inputs.d.ts.map +1 -1
- package/dest/kernel/private_context_inputs.js +7 -3
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +7 -1
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_circuit_public_inputs.js +7 -0
- package/dest/kernel/private_kernel_init_2_circuit_private_inputs.d.ts +2 -3
- package/dest/kernel/private_kernel_init_2_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_init_2_circuit_private_inputs.js +3 -5
- package/dest/kernel/private_kernel_init_3_circuit_private_inputs.d.ts +2 -3
- package/dest/kernel/private_kernel_init_3_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_init_3_circuit_private_inputs.js +3 -5
- package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts +1 -9
- package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_init_circuit_private_inputs.js +2 -6
- package/dest/kernel/private_kernel_reset_dimensions.d.ts +7 -8
- package/dest/kernel/private_kernel_reset_dimensions.d.ts.map +1 -1
- package/dest/kernel/private_kernel_reset_tail_circuit_private_inputs.d.ts +29 -0
- package/dest/kernel/private_kernel_reset_tail_circuit_private_inputs.d.ts.map +1 -0
- package/dest/kernel/private_kernel_reset_tail_circuit_private_inputs.js +36 -0
- package/dest/keys/derivation.d.ts +41 -6
- package/dest/keys/derivation.d.ts.map +1 -1
- package/dest/keys/derivation.js +49 -26
- package/dest/logs/app_tagging_secret.d.ts +16 -8
- package/dest/logs/app_tagging_secret.d.ts.map +1 -1
- package/dest/logs/app_tagging_secret.js +24 -27
- package/dest/logs/index.d.ts +1 -3
- package/dest/logs/index.d.ts.map +1 -1
- package/dest/logs/index.js +0 -2
- package/dest/logs/shared_secret_derivation.d.ts +29 -6
- package/dest/logs/shared_secret_derivation.d.ts.map +1 -1
- package/dest/logs/shared_secret_derivation.js +44 -11
- package/dest/messaging/l1_to_l2_message.d.ts +23 -2
- package/dest/messaging/l1_to_l2_message.d.ts.map +1 -1
- package/dest/messaging/l1_to_l2_message.js +36 -11
- package/dest/p2p/attestation_utils.d.ts +1 -1
- package/dest/p2p/attestation_utils.d.ts.map +1 -1
- package/dest/p2p/attestation_utils.js +8 -1
- package/dest/p2p/checkpoint_attestation.d.ts +9 -1
- package/dest/p2p/checkpoint_attestation.d.ts.map +1 -1
- package/dest/p2p/checkpoint_attestation.js +10 -0
- package/dest/p2p/signature_utils.d.ts +10 -1
- package/dest/p2p/signature_utils.d.ts.map +1 -1
- package/dest/p2p/signature_utils.js +9 -1
- package/dest/rollup/avm_proof_data.d.ts +3 -3
- package/dest/rollup/avm_proof_data.d.ts.map +1 -1
- package/dest/stats/stats.d.ts +2 -2
- package/dest/stats/stats.d.ts.map +1 -1
- package/dest/tests/factories.d.ts +1 -1
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +4 -3
- package/dest/tx/private_tx_constant_data.d.ts +18 -2
- package/dest/tx/private_tx_constant_data.d.ts.map +1 -1
- package/dest/tx/private_tx_constant_data.js +13 -4
- package/dest/tx/simulated_tx.d.ts +10 -6
- package/dest/tx/simulated_tx.d.ts.map +1 -1
- package/dest/world-state/genesis_data.d.ts +9 -1
- package/dest/world-state/genesis_data.d.ts.map +1 -1
- package/dest/world-state/genesis_data.js +1 -0
- package/package.json +8 -8
- package/src/block/attestation_info.ts +7 -2
- package/src/block/l2_block_source.ts +54 -2
- package/src/block/l2_block_stream/event_driven_l2_block_stream.ts +207 -0
- package/src/block/l2_block_stream/index.ts +1 -0
- package/src/block/l2_block_stream/interfaces.ts +35 -1
- package/src/block/l2_block_stream/l2_block_stream.ts +35 -62
- package/src/block/proposal/attestations_and_signers.ts +53 -7
- package/src/block/validate_block_result.ts +48 -2
- package/src/config/network-consensus-config.ts +2 -13
- package/src/contract/contract_address.ts +4 -3
- package/src/contract/contract_instance.ts +62 -1
- package/src/contract/interfaces/contract_instance.ts +26 -8
- package/src/contract/partial_address.ts +8 -2
- package/src/database-version/version_manager.ts +96 -6
- package/src/gas/README.md +108 -36
- package/src/ha-signing/config.ts +23 -5
- package/src/ha-signing/local_config.ts +20 -1
- package/src/hash/hash.ts +0 -8
- package/src/interfaces/archiver.ts +8 -0
- package/src/interfaces/configs.ts +3 -0
- package/src/interfaces/private_kernel_prover.ts +10 -12
- package/src/interfaces/proving-job.ts +15 -3
- package/src/interfaces/server_circuit_prover.ts +2 -2
- package/src/interfaces/world_state.ts +14 -0
- package/src/kernel/hints/find_private_kernel_reset_dimensions.ts +22 -112
- package/src/kernel/index.ts +1 -1
- package/src/kernel/private_circuit_public_inputs.ts +12 -1
- package/src/kernel/private_context_inputs.ts +10 -3
- package/src/kernel/private_kernel_circuit_public_inputs.ts +9 -0
- package/src/kernel/private_kernel_init_2_circuit_private_inputs.ts +0 -3
- package/src/kernel/private_kernel_init_3_circuit_private_inputs.ts +0 -3
- package/src/kernel/private_kernel_init_circuit_private_inputs.ts +0 -6
- package/src/kernel/private_kernel_reset_dimensions.ts +15 -5
- package/src/kernel/private_kernel_reset_tail_circuit_private_inputs.ts +69 -0
- package/src/keys/derivation.ts +69 -24
- package/src/logs/app_tagging_secret.ts +34 -27
- package/src/logs/index.ts +0 -2
- package/src/logs/shared_secret_derivation.ts +47 -14
- package/src/messaging/l1_to_l2_message.ts +51 -13
- package/src/p2p/attestation_utils.ts +8 -1
- package/src/p2p/checkpoint_attestation.ts +12 -0
- package/src/p2p/signature_utils.ts +9 -0
- package/src/rollup/avm_proof_data.ts +2 -2
- package/src/stats/stats.ts +2 -2
- package/src/tests/factories.ts +3 -6
- package/src/tx/private_tx_constant_data.ts +25 -2
- package/src/world-state/genesis_data.ts +10 -0
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +0 -47
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +0 -1
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.js +0 -38
- package/dest/logs/message_context.d.ts +0 -17
- package/dest/logs/message_context.d.ts.map +0 -1
- package/dest/logs/message_context.js +0 -9
- package/dest/logs/pending_tagged_log.d.ts +0 -11
- package/dest/logs/pending_tagged_log.d.ts.map +0 -1
- package/dest/logs/pending_tagged_log.js +0 -4
- package/src/kernel/private_kernel_tail_circuit_private_inputs.ts +0 -58
- package/src/logs/message_context.ts +0 -18
- package/src/logs/pending_tagged_log.ts +0 -12
|
@@ -23,6 +23,14 @@ export class PrivateTxConstantData {
|
|
|
23
23
|
* protocol to execute and prove the transaction.
|
|
24
24
|
*/
|
|
25
25
|
public txContext: TxContext,
|
|
26
|
+
/**
|
|
27
|
+
* Salt of the transaction request (`TxRequest.salt`).
|
|
28
|
+
*
|
|
29
|
+
* Bound to the user's `tx_request` by the Init circuit and kept constant by every subsequent kernel so that each
|
|
30
|
+
* app circuit's `txRequestSalt` public input can be checked against it. It is intentionally not carried into
|
|
31
|
+
* `TxConstantData`: it is dropped by the Tail circuits rather than being exposed by the final (hiding) kernel.
|
|
32
|
+
*/
|
|
33
|
+
public txRequestSalt: Fr,
|
|
26
34
|
/**
|
|
27
35
|
* Root of the vk tree for the protocol circuits.
|
|
28
36
|
*/
|
|
@@ -38,7 +46,13 @@ export class PrivateTxConstantData {
|
|
|
38
46
|
}
|
|
39
47
|
|
|
40
48
|
static getFields(fields: FieldsOf<PrivateTxConstantData>) {
|
|
41
|
-
return [
|
|
49
|
+
return [
|
|
50
|
+
fields.anchorBlockHeader,
|
|
51
|
+
fields.txContext,
|
|
52
|
+
fields.txRequestSalt,
|
|
53
|
+
fields.vkTreeRoot,
|
|
54
|
+
fields.protocolContracts,
|
|
55
|
+
] as const;
|
|
42
56
|
}
|
|
43
57
|
|
|
44
58
|
static fromFields(fields: Fr[] | FieldReader): PrivateTxConstantData {
|
|
@@ -47,6 +61,7 @@ export class PrivateTxConstantData {
|
|
|
47
61
|
reader.readObject(BlockHeader),
|
|
48
62
|
reader.readObject(TxContext),
|
|
49
63
|
reader.readField(),
|
|
64
|
+
reader.readField(),
|
|
50
65
|
reader.readObject(ProtocolContracts),
|
|
51
66
|
);
|
|
52
67
|
}
|
|
@@ -67,6 +82,7 @@ export class PrivateTxConstantData {
|
|
|
67
82
|
reader.readObject(BlockHeader),
|
|
68
83
|
reader.readObject(TxContext),
|
|
69
84
|
Fr.fromBuffer(reader),
|
|
85
|
+
Fr.fromBuffer(reader),
|
|
70
86
|
reader.readObject(ProtocolContracts),
|
|
71
87
|
);
|
|
72
88
|
}
|
|
@@ -76,13 +92,20 @@ export class PrivateTxConstantData {
|
|
|
76
92
|
}
|
|
77
93
|
|
|
78
94
|
static empty() {
|
|
79
|
-
return new PrivateTxConstantData(
|
|
95
|
+
return new PrivateTxConstantData(
|
|
96
|
+
BlockHeader.empty(),
|
|
97
|
+
TxContext.empty(),
|
|
98
|
+
Fr.ZERO,
|
|
99
|
+
Fr.ZERO,
|
|
100
|
+
ProtocolContracts.empty(),
|
|
101
|
+
);
|
|
80
102
|
}
|
|
81
103
|
|
|
82
104
|
getSize() {
|
|
83
105
|
return (
|
|
84
106
|
this.anchorBlockHeader.getSize() +
|
|
85
107
|
this.txContext.getSize() +
|
|
108
|
+
this.txRequestSalt.size +
|
|
86
109
|
this.vkTreeRoot.size +
|
|
87
110
|
this.protocolContracts.getSize()
|
|
88
111
|
);
|
|
@@ -1,9 +1,18 @@
|
|
|
1
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
+
|
|
1
3
|
import type { PublicDataTreeLeaf } from '../trees/index.js';
|
|
2
4
|
|
|
3
5
|
/** Data used to initialize the genesis block, including prefilled public state and an optional timestamp. */
|
|
4
6
|
export type GenesisData = {
|
|
5
7
|
/** Public data tree leaves to pre-populate in the genesis state (e.g. fee juice balances). */
|
|
6
8
|
prefilledPublicData: PublicDataTreeLeaf[];
|
|
9
|
+
/**
|
|
10
|
+
* Nullifiers to pre-insert into the genesis nullifier tree. Optional; defaults to an empty list, which leaves the
|
|
11
|
+
* nullifier tree at its canonical empty-genesis state so that production genesis roots are unchanged. When non-empty,
|
|
12
|
+
* the leaves must be unique and strictly increasing in field value (the native world state enforces this before
|
|
13
|
+
* construction). Test networks pass a non-empty list to seed e.g. standard-contract registration nullifiers.
|
|
14
|
+
*/
|
|
15
|
+
prefilledNullifiers?: Fr[];
|
|
7
16
|
/** Timestamp for the genesis block header. Defaults to 0 (canonical empty genesis) in production. */
|
|
8
17
|
genesisTimestamp: bigint;
|
|
9
18
|
};
|
|
@@ -11,6 +20,7 @@ export type GenesisData = {
|
|
|
11
20
|
/** An empty genesis data with no prefilled state and a zero timestamp. */
|
|
12
21
|
export const EMPTY_GENESIS_DATA: GenesisData = {
|
|
13
22
|
prefilledPublicData: [],
|
|
23
|
+
prefilledNullifiers: [],
|
|
14
24
|
genesisTimestamp: 0n,
|
|
15
25
|
};
|
|
16
26
|
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { BufferReader } from '@aztec/foundation/serialize';
|
|
2
|
-
import type { UInt64 } from '../types/shared.js';
|
|
3
|
-
import { PaddedSideEffectAmounts } from './padded_side_effects.js';
|
|
4
|
-
import { PrivateKernelData } from './private_kernel_data.js';
|
|
5
|
-
/**
|
|
6
|
-
* Input to the private kernel circuit - tail call.
|
|
7
|
-
*/
|
|
8
|
-
export declare class PrivateKernelTailCircuitPrivateInputs {
|
|
9
|
-
/**
|
|
10
|
-
* The previous kernel data
|
|
11
|
-
*/
|
|
12
|
-
previousKernel: PrivateKernelData;
|
|
13
|
-
/**
|
|
14
|
-
* The number of the padded side effects.
|
|
15
|
-
*/
|
|
16
|
-
paddedSideEffectAmounts: PaddedSideEffectAmounts;
|
|
17
|
-
/**
|
|
18
|
-
* The timestamp by which the transaction must be included in a block.
|
|
19
|
-
*/
|
|
20
|
-
expirationTimestampUpperBound: UInt64;
|
|
21
|
-
constructor(
|
|
22
|
-
/**
|
|
23
|
-
* The previous kernel data
|
|
24
|
-
*/
|
|
25
|
-
previousKernel: PrivateKernelData,
|
|
26
|
-
/**
|
|
27
|
-
* The number of the padded side effects.
|
|
28
|
-
*/
|
|
29
|
-
paddedSideEffectAmounts: PaddedSideEffectAmounts,
|
|
30
|
-
/**
|
|
31
|
-
* The timestamp by which the transaction must be included in a block.
|
|
32
|
-
*/
|
|
33
|
-
expirationTimestampUpperBound: UInt64);
|
|
34
|
-
isForPublic(): boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Serialize this as a buffer.
|
|
37
|
-
* @returns The buffer.
|
|
38
|
-
*/
|
|
39
|
-
toBuffer(): Buffer<ArrayBufferLike>;
|
|
40
|
-
/**
|
|
41
|
-
* Deserializes from a buffer or reader.
|
|
42
|
-
* @param buffer - Buffer or reader to read from.
|
|
43
|
-
* @returns The deserialized instance.
|
|
44
|
-
*/
|
|
45
|
-
static fromBuffer(buffer: Buffer | BufferReader): PrivateKernelTailCircuitPrivateInputs;
|
|
46
|
-
}
|
|
47
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpdmF0ZV9rZXJuZWxfdGFpbF9jaXJjdWl0X3ByaXZhdGVfaW5wdXRzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMva2VybmVsL3ByaXZhdGVfa2VybmVsX3RhaWxfY2lyY3VpdF9wcml2YXRlX2lucHV0cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsWUFBWSxFQUF1QyxNQUFNLDZCQUE2QixDQUFDO0FBRWhHLE9BQU8sS0FBSyxFQUFFLE1BQU0sRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBQ2pELE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQ25FLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBRTdEOztHQUVHO0FBQ0gscUJBQWEscUNBQXFDO0lBRTlDOztPQUVHO0lBQ0ksY0FBYyxFQUFFLGlCQUFpQjtJQUN4Qzs7T0FFRztJQUNJLHVCQUF1QixFQUFFLHVCQUF1QjtJQUN2RDs7T0FFRztJQUNJLDZCQUE2QixFQUFFLE1BQU07SUFaOUM7SUFDRTs7T0FFRztJQUNJLGNBQWMsRUFBRSxpQkFBaUI7SUFDeEM7O09BRUc7SUFDSSx1QkFBdUIsRUFBRSx1QkFBdUI7SUFDdkQ7O09BRUc7SUFDSSw2QkFBNkIsRUFBRSxNQUFNLEVBQzFDO0lBRUosV0FBVyxZQUtWO0lBRUQ7OztPQUdHO0lBQ0gsUUFBUSw0QkFNUDtJQUVEOzs7O09BSUc7SUFDSCxNQUFNLENBQUMsVUFBVSxDQUFDLE1BQU0sRUFBRSxNQUFNLEdBQUcsWUFBWSxHQUFHLHFDQUFxQyxDQU90RjtDQUNGIn0=
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"private_kernel_tail_circuit_private_inputs.d.ts","sourceRoot":"","sources":["../../src/kernel/private_kernel_tail_circuit_private_inputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuC,MAAM,6BAA6B,CAAC;AAEhG,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D;;GAEG;AACH,qBAAa,qCAAqC;IAE9C;;OAEG;IACI,cAAc,EAAE,iBAAiB;IACxC;;OAEG;IACI,uBAAuB,EAAE,uBAAuB;IACvD;;OAEG;IACI,6BAA6B,EAAE,MAAM;IAZ9C;IACE;;OAEG;IACI,cAAc,EAAE,iBAAiB;IACxC;;OAEG;IACI,uBAAuB,EAAE,uBAAuB;IACvD;;OAEG;IACI,6BAA6B,EAAE,MAAM,EAC1C;IAEJ,WAAW,YAKV;IAED;;;OAGG;IACH,QAAQ,4BAMP;IAED;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,qCAAqC,CAOtF;CACF"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { BufferReader, bigintToUInt64BE, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
2
|
-
import { PaddedSideEffectAmounts } from './padded_side_effects.js';
|
|
3
|
-
import { PrivateKernelData } from './private_kernel_data.js';
|
|
4
|
-
/**
|
|
5
|
-
* Input to the private kernel circuit - tail call.
|
|
6
|
-
*/ export class PrivateKernelTailCircuitPrivateInputs {
|
|
7
|
-
previousKernel;
|
|
8
|
-
paddedSideEffectAmounts;
|
|
9
|
-
expirationTimestampUpperBound;
|
|
10
|
-
constructor(/**
|
|
11
|
-
* The previous kernel data
|
|
12
|
-
*/ previousKernel, /**
|
|
13
|
-
* The number of the padded side effects.
|
|
14
|
-
*/ paddedSideEffectAmounts, /**
|
|
15
|
-
* The timestamp by which the transaction must be included in a block.
|
|
16
|
-
*/ expirationTimestampUpperBound){
|
|
17
|
-
this.previousKernel = previousKernel;
|
|
18
|
-
this.paddedSideEffectAmounts = paddedSideEffectAmounts;
|
|
19
|
-
this.expirationTimestampUpperBound = expirationTimestampUpperBound;
|
|
20
|
-
}
|
|
21
|
-
isForPublic() {
|
|
22
|
-
return this.previousKernel.publicInputs.end.publicCallRequests.claimedLength > 0 || !this.previousKernel.publicInputs.publicTeardownCallRequest.isEmpty();
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Serialize this as a buffer.
|
|
26
|
-
* @returns The buffer.
|
|
27
|
-
*/ toBuffer() {
|
|
28
|
-
return serializeToBuffer(this.previousKernel, this.paddedSideEffectAmounts, bigintToUInt64BE(this.expirationTimestampUpperBound));
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Deserializes from a buffer or reader.
|
|
32
|
-
* @param buffer - Buffer or reader to read from.
|
|
33
|
-
* @returns The deserialized instance.
|
|
34
|
-
*/ static fromBuffer(buffer) {
|
|
35
|
-
const reader = BufferReader.asReader(buffer);
|
|
36
|
-
return new PrivateKernelTailCircuitPrivateInputs(reader.readObject(PrivateKernelData), reader.readObject(PaddedSideEffectAmounts), reader.readUInt64());
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
-
import type { TxHash } from '../tx/tx_hash.js';
|
|
3
|
-
/**
|
|
4
|
-
* Additional information needed to process a message.
|
|
5
|
-
*
|
|
6
|
-
* All messages exist in the context of a transaction, and information about that transaction is typically required
|
|
7
|
-
* in order to perform validation, store results, etc. For example, messages containing notes require knowledge of note
|
|
8
|
-
* hashes and the first nullifier in order to find the note's nonce.
|
|
9
|
-
*
|
|
10
|
-
* A TS version of `message_context.nr`.
|
|
11
|
-
*/
|
|
12
|
-
export type MessageContext = {
|
|
13
|
-
txHash: TxHash;
|
|
14
|
-
uniqueNoteHashesInTx: Fr[];
|
|
15
|
-
firstNullifierInTx: Fr;
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVzc2FnZV9jb250ZXh0LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbG9ncy9tZXNzYWdlX2NvbnRleHQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsRUFBRSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFFekQsT0FBTyxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFFL0M7Ozs7Ozs7O0dBUUc7QUFDSCxNQUFNLE1BQU0sY0FBYyxHQUFHO0lBQzNCLE1BQU0sRUFBRSxNQUFNLENBQUM7SUFDZixvQkFBb0IsRUFBRSxFQUFFLEVBQUUsQ0FBQztJQUMzQixrQkFBa0IsRUFBRSxFQUFFLENBQUM7Q0FDeEIsQ0FBQyJ9
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message_context.d.ts","sourceRoot":"","sources":["../../src/logs/message_context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAEzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE/C;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB,EAAE,EAAE,EAAE,CAAC;IAC3B,kBAAkB,EAAE,EAAE,CAAC;CACxB,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Additional information needed to process a message.
|
|
3
|
-
*
|
|
4
|
-
* All messages exist in the context of a transaction, and information about that transaction is typically required
|
|
5
|
-
* in order to perform validation, store results, etc. For example, messages containing notes require knowledge of note
|
|
6
|
-
* hashes and the first nullifier in order to find the note's nonce.
|
|
7
|
-
*
|
|
8
|
-
* A TS version of `message_context.nr`.
|
|
9
|
-
*/ export { };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
-
import type { MessageContext } from './message_context.js';
|
|
3
|
-
/**
|
|
4
|
-
* Represents a pending tagged log as it is stored in the pending tagged log array to which the fetchTaggedLogs oracle
|
|
5
|
-
* inserts found private logs. A TS version of `pending_tagged_log.nr`.
|
|
6
|
-
*/
|
|
7
|
-
export type PendingTaggedLog = {
|
|
8
|
-
log: Fr[];
|
|
9
|
-
context: MessageContext;
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGVuZGluZ190YWdnZWRfbG9nLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbG9ncy9wZW5kaW5nX3RhZ2dlZF9sb2cudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsRUFBRSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFFekQsT0FBTyxLQUFLLEVBQUUsY0FBYyxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFFM0Q7OztHQUdHO0FBQ0gsTUFBTSxNQUFNLGdCQUFnQixHQUFHO0lBQzdCLEdBQUcsRUFBRSxFQUFFLEVBQUUsQ0FBQztJQUNWLE9BQU8sRUFBRSxjQUFjLENBQUM7Q0FDekIsQ0FBQyJ9
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pending_tagged_log.d.ts","sourceRoot":"","sources":["../../src/logs/pending_tagged_log.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,EAAE,EAAE,CAAC;IACV,OAAO,EAAE,cAAc,CAAC;CACzB,CAAC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { BufferReader, bigintToUInt64BE, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
2
|
-
|
|
3
|
-
import type { UInt64 } from '../types/shared.js';
|
|
4
|
-
import { PaddedSideEffectAmounts } from './padded_side_effects.js';
|
|
5
|
-
import { PrivateKernelData } from './private_kernel_data.js';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Input to the private kernel circuit - tail call.
|
|
9
|
-
*/
|
|
10
|
-
export class PrivateKernelTailCircuitPrivateInputs {
|
|
11
|
-
constructor(
|
|
12
|
-
/**
|
|
13
|
-
* The previous kernel data
|
|
14
|
-
*/
|
|
15
|
-
public previousKernel: PrivateKernelData,
|
|
16
|
-
/**
|
|
17
|
-
* The number of the padded side effects.
|
|
18
|
-
*/
|
|
19
|
-
public paddedSideEffectAmounts: PaddedSideEffectAmounts,
|
|
20
|
-
/**
|
|
21
|
-
* The timestamp by which the transaction must be included in a block.
|
|
22
|
-
*/
|
|
23
|
-
public expirationTimestampUpperBound: UInt64,
|
|
24
|
-
) {}
|
|
25
|
-
|
|
26
|
-
isForPublic() {
|
|
27
|
-
return (
|
|
28
|
-
this.previousKernel.publicInputs.end.publicCallRequests.claimedLength > 0 ||
|
|
29
|
-
!this.previousKernel.publicInputs.publicTeardownCallRequest.isEmpty()
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Serialize this as a buffer.
|
|
35
|
-
* @returns The buffer.
|
|
36
|
-
*/
|
|
37
|
-
toBuffer() {
|
|
38
|
-
return serializeToBuffer(
|
|
39
|
-
this.previousKernel,
|
|
40
|
-
this.paddedSideEffectAmounts,
|
|
41
|
-
bigintToUInt64BE(this.expirationTimestampUpperBound),
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Deserializes from a buffer or reader.
|
|
47
|
-
* @param buffer - Buffer or reader to read from.
|
|
48
|
-
* @returns The deserialized instance.
|
|
49
|
-
*/
|
|
50
|
-
static fromBuffer(buffer: Buffer | BufferReader): PrivateKernelTailCircuitPrivateInputs {
|
|
51
|
-
const reader = BufferReader.asReader(buffer);
|
|
52
|
-
return new PrivateKernelTailCircuitPrivateInputs(
|
|
53
|
-
reader.readObject(PrivateKernelData),
|
|
54
|
-
reader.readObject(PaddedSideEffectAmounts),
|
|
55
|
-
reader.readUInt64(),
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
-
|
|
3
|
-
import type { TxHash } from '../tx/tx_hash.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Additional information needed to process a message.
|
|
7
|
-
*
|
|
8
|
-
* All messages exist in the context of a transaction, and information about that transaction is typically required
|
|
9
|
-
* in order to perform validation, store results, etc. For example, messages containing notes require knowledge of note
|
|
10
|
-
* hashes and the first nullifier in order to find the note's nonce.
|
|
11
|
-
*
|
|
12
|
-
* A TS version of `message_context.nr`.
|
|
13
|
-
*/
|
|
14
|
-
export type MessageContext = {
|
|
15
|
-
txHash: TxHash;
|
|
16
|
-
uniqueNoteHashesInTx: Fr[];
|
|
17
|
-
firstNullifierInTx: Fr;
|
|
18
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
-
|
|
3
|
-
import type { MessageContext } from './message_context.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Represents a pending tagged log as it is stored in the pending tagged log array to which the fetchTaggedLogs oracle
|
|
7
|
-
* inserts found private logs. A TS version of `pending_tagged_log.nr`.
|
|
8
|
-
*/
|
|
9
|
-
export type PendingTaggedLog = {
|
|
10
|
-
log: Fr[];
|
|
11
|
-
context: MessageContext;
|
|
12
|
-
};
|