@aztec/pxe 3.0.0-canary.a9708bd → 3.0.0-devnet.20251212
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/README.md +5 -5
- package/dest/bin/check_oracle_version.d.ts +1 -1
- package/dest/bin/check_oracle_version.js +110 -10
- package/dest/config/index.d.ts +9 -17
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +10 -16
- package/dest/config/package_info.d.ts +1 -1
- package/dest/config/package_info.js +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.d.ts +6 -6
- package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.js +97 -42
- package/dest/contract_function_simulator/execution_data_provider.d.ts +40 -57
- package/dest/contract_function_simulator/execution_data_provider.d.ts.map +1 -1
- package/dest/contract_function_simulator/execution_note_cache.d.ts +11 -9
- package/dest/contract_function_simulator/execution_note_cache.d.ts.map +1 -1
- package/dest/contract_function_simulator/execution_note_cache.js +28 -17
- package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts +16 -0
- package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts.map +1 -0
- package/dest/contract_function_simulator/execution_tagging_index_cache.js +26 -0
- package/dest/contract_function_simulator/hashed_values_cache.d.ts +2 -2
- package/dest/contract_function_simulator/hashed_values_cache.d.ts.map +1 -1
- package/dest/contract_function_simulator/index.d.ts +4 -2
- package/dest/contract_function_simulator/index.d.ts.map +1 -1
- package/dest/contract_function_simulator/index.js +2 -1
- package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts +2 -2
- package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts +2 -2
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts +3 -3
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.js +8 -4
- package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +6 -3
- package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/note_validation_request.js +12 -3
- package/dest/contract_function_simulator/noir-structs/utility_context.d.ts +22 -0
- package/dest/contract_function_simulator/noir-structs/utility_context.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/utility_context.js +33 -0
- package/dest/contract_function_simulator/oracle/index.d.ts +2 -2
- package/dest/contract_function_simulator/oracle/index.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/index.js +1 -1
- package/dest/contract_function_simulator/oracle/interfaces.d.ts +104 -0
- package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/interfaces.js +4 -0
- package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts +2 -4
- package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.js +1 -1
- package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts +10 -4
- package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/note_packing_utils.js +10 -5
- package/dest/contract_function_simulator/oracle/oracle.d.ts +17 -15
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.js +101 -81
- package/dest/contract_function_simulator/oracle/private_execution.d.ts +6 -5
- package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution.js +7 -16
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +34 -22
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +89 -25
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +23 -33
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +38 -42
- package/dest/contract_function_simulator/pick_notes.d.ts +2 -2
- package/dest/contract_function_simulator/pick_notes.d.ts.map +1 -1
- package/dest/contract_function_simulator/pick_notes.js +1 -1
- package/dest/contract_function_simulator/proxied_contract_data_source.d.ts +1 -1
- package/dest/contract_function_simulator/proxied_contract_data_source.d.ts.map +1 -1
- package/dest/contract_function_simulator/proxied_node.d.ts +1 -1
- package/dest/contract_function_simulator/proxied_node.d.ts.map +1 -1
- package/dest/contract_function_simulator/pxe_oracle_interface.d.ts +34 -68
- package/dest/contract_function_simulator/pxe_oracle_interface.d.ts.map +1 -1
- package/dest/contract_function_simulator/pxe_oracle_interface.js +220 -208
- package/dest/entrypoints/client/bundle/index.d.ts +4 -2
- package/dest/entrypoints/client/bundle/index.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/index.js +2 -1
- package/dest/entrypoints/client/bundle/utils.d.ts +9 -9
- package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/utils.js +12 -12
- package/dest/entrypoints/client/lazy/index.d.ts +4 -2
- package/dest/entrypoints/client/lazy/index.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/index.js +2 -1
- package/dest/entrypoints/client/lazy/utils.d.ts +8 -8
- package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/utils.js +11 -11
- package/dest/entrypoints/pxe_creation_options.d.ts +3 -1
- package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -1
- package/dest/entrypoints/server/index.d.ts +4 -2
- package/dest/entrypoints/server/index.d.ts.map +1 -1
- package/dest/entrypoints/server/index.js +2 -1
- package/dest/entrypoints/server/utils.d.ts +5 -24
- package/dest/entrypoints/server/utils.d.ts.map +1 -1
- package/dest/entrypoints/server/utils.js +9 -41
- package/dest/error_enriching.d.ts +11 -0
- package/dest/error_enriching.d.ts.map +1 -0
- package/dest/{pxe_service/error_enriching.js → error_enriching.js} +3 -0
- package/dest/events/index.d.ts +2 -0
- package/dest/events/index.d.ts.map +1 -0
- package/dest/events/index.js +1 -0
- package/dest/events/private_event_filter_validator.d.ts +8 -0
- package/dest/events/private_event_filter_validator.d.ts.map +1 -0
- package/dest/events/private_event_filter_validator.js +39 -0
- package/dest/oracle_version.d.ts +3 -3
- package/dest/oracle_version.js +2 -2
- package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts +3 -3
- package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts.map +1 -1
- package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.js +7 -7
- package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts +1 -1
- package/dest/private_kernel/hints/compute_tx_include_by_timestamp.js +6 -6
- package/dest/private_kernel/hints/index.d.ts +1 -1
- package/dest/private_kernel/index.d.ts +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.d.ts +9 -2
- package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.js +38 -32
- package/dest/private_kernel/private_kernel_oracle.d.ts +3 -2
- package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_oracle_impl.d.ts +8 -7
- package/dest/private_kernel/private_kernel_oracle_impl.d.ts.map +1 -1
- package/dest/pxe.d.ts +240 -0
- package/dest/pxe.d.ts.map +1 -0
- package/dest/{pxe_service/pxe_service.js → pxe.js} +227 -241
- package/dest/storage/address_data_provider/address_data_provider.d.ts +2 -4
- package/dest/storage/address_data_provider/address_data_provider.d.ts.map +1 -1
- package/dest/storage/address_data_provider/address_data_provider.js +0 -3
- package/dest/storage/address_data_provider/index.d.ts +1 -1
- package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts +3 -5
- package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts.map +1 -1
- package/dest/storage/capsule_data_provider/capsule_data_provider.js +1 -5
- package/dest/storage/capsule_data_provider/index.d.ts +1 -1
- package/dest/storage/contract_data_provider/contract_data_provider.d.ts +6 -17
- package/dest/storage/contract_data_provider/contract_data_provider.d.ts.map +1 -1
- package/dest/storage/contract_data_provider/contract_data_provider.js +0 -15
- package/dest/storage/contract_data_provider/index.d.ts +1 -1
- package/dest/storage/contract_data_provider/private_functions_tree.d.ts +1 -1
- package/dest/storage/contract_data_provider/private_functions_tree.d.ts.map +1 -1
- package/dest/storage/contract_data_provider/private_functions_tree.js +1 -1
- package/dest/storage/index.d.ts +1 -2
- package/dest/storage/index.d.ts.map +1 -1
- package/dest/storage/index.js +0 -1
- package/dest/storage/metadata.d.ts +1 -1
- package/dest/storage/note_data_provider/index.d.ts +2 -2
- package/dest/storage/note_data_provider/index.d.ts.map +1 -1
- package/dest/storage/note_data_provider/index.js +1 -1
- package/dest/storage/note_data_provider/note_data_provider.d.ts +75 -11
- package/dest/storage/note_data_provider/note_data_provider.d.ts.map +1 -1
- package/dest/storage/note_data_provider/note_data_provider.js +143 -81
- package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts +31 -17
- package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts.map +1 -1
- package/dest/storage/private_event_data_provider/private_event_data_provider.js +47 -28
- package/dest/storage/sync_data_provider/index.d.ts +1 -1
- package/dest/storage/sync_data_provider/sync_data_provider.d.ts +4 -5
- package/dest/storage/sync_data_provider/sync_data_provider.d.ts.map +1 -1
- package/dest/storage/sync_data_provider/sync_data_provider.js +0 -3
- package/dest/storage/tagging_data_provider/index.d.ts +1 -1
- package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts +29 -7
- package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts.map +1 -1
- package/dest/storage/tagging_data_provider/tagging_data_provider.js +46 -39
- package/dest/synchronizer/index.d.ts +1 -1
- package/dest/synchronizer/synchronizer.d.ts +3 -2
- package/dest/synchronizer/synchronizer.d.ts.map +1 -1
- package/dest/synchronizer/synchronizer.js +4 -4
- package/dest/tagging/constants.d.ts +2 -0
- package/dest/tagging/constants.d.ts.map +1 -0
- package/dest/tagging/constants.js +2 -0
- package/dest/tagging/index.d.ts +7 -0
- package/dest/tagging/index.d.ts.map +1 -0
- package/dest/tagging/index.js +5 -0
- package/dest/tagging/siloed_tag.d.ts +14 -0
- package/dest/tagging/siloed_tag.d.ts.map +1 -0
- package/dest/tagging/siloed_tag.js +20 -0
- package/dest/tagging/tag.d.ts +12 -0
- package/dest/tagging/tag.d.ts.map +1 -0
- package/dest/tagging/tag.js +17 -0
- package/dest/tagging/utils.d.ts +18 -0
- package/dest/tagging/utils.d.ts.map +1 -0
- package/dest/tagging/utils.js +24 -0
- package/package.json +22 -24
- package/src/bin/check_oracle_version.ts +134 -10
- package/src/config/index.ts +18 -32
- package/src/config/package_info.ts +1 -1
- package/src/contract_function_simulator/contract_function_simulator.ts +151 -62
- package/src/contract_function_simulator/execution_data_provider.ts +47 -65
- package/src/contract_function_simulator/execution_note_cache.ts +33 -17
- package/src/contract_function_simulator/execution_tagging_index_cache.ts +32 -0
- package/src/contract_function_simulator/hashed_values_cache.ts +1 -1
- package/src/contract_function_simulator/index.ts +3 -1
- package/src/contract_function_simulator/noir-structs/event_validation_request.ts +1 -1
- package/src/contract_function_simulator/noir-structs/log_retrieval_request.ts +1 -1
- package/src/contract_function_simulator/noir-structs/log_retrieval_response.ts +10 -5
- package/src/contract_function_simulator/noir-structs/note_validation_request.ts +14 -2
- package/src/contract_function_simulator/noir-structs/utility_context.ts +42 -0
- package/src/contract_function_simulator/oracle/index.ts +1 -1
- package/src/contract_function_simulator/oracle/interfaces.ts +176 -0
- package/src/contract_function_simulator/oracle/message_load_oracle_inputs.ts +1 -1
- package/src/contract_function_simulator/oracle/note_packing_utils.ts +21 -5
- package/src/contract_function_simulator/oracle/oracle.ts +135 -80
- package/src/contract_function_simulator/oracle/private_execution.ts +10 -17
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +123 -49
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +68 -80
- package/src/contract_function_simulator/pick_notes.ts +1 -1
- package/src/contract_function_simulator/pxe_oracle_interface.ts +291 -271
- package/src/entrypoints/client/bundle/index.ts +3 -1
- package/src/entrypoints/client/bundle/utils.ts +15 -23
- package/src/entrypoints/client/lazy/index.ts +3 -1
- package/src/entrypoints/client/lazy/utils.ts +14 -22
- package/src/entrypoints/pxe_creation_options.ts +2 -0
- package/src/entrypoints/server/index.ts +3 -1
- package/src/entrypoints/server/utils.ts +12 -56
- package/src/{pxe_service/error_enriching.ts → error_enriching.ts} +5 -1
- package/src/events/index.ts +1 -0
- package/src/events/private_event_filter_validator.ts +47 -0
- package/src/oracle_version.ts +2 -2
- package/src/private_kernel/hints/build_private_kernel_reset_private_inputs.ts +5 -9
- package/src/private_kernel/hints/compute_tx_include_by_timestamp.ts +6 -6
- package/src/private_kernel/private_kernel_execution_prover.ts +51 -43
- package/src/private_kernel/private_kernel_oracle.ts +2 -1
- package/src/private_kernel/private_kernel_oracle_impl.ts +4 -3
- package/src/{pxe_service/pxe_service.ts → pxe.ts} +256 -308
- package/src/storage/address_data_provider/address_data_provider.ts +1 -7
- package/src/storage/capsule_data_provider/capsule_data_provider.ts +2 -12
- package/src/storage/contract_data_provider/contract_data_provider.ts +4 -27
- package/src/storage/contract_data_provider/private_functions_tree.ts +1 -1
- package/src/storage/index.ts +0 -1
- package/src/storage/note_data_provider/index.ts +1 -1
- package/src/storage/note_data_provider/note_data_provider.ts +171 -109
- package/src/storage/private_event_data_provider/private_event_data_provider.ts +69 -41
- package/src/storage/sync_data_provider/sync_data_provider.ts +3 -8
- package/src/storage/tagging_data_provider/tagging_data_provider.ts +52 -55
- package/src/synchronizer/synchronizer.ts +4 -4
- package/src/tagging/constants.ts +2 -0
- package/src/tagging/index.ts +6 -0
- package/src/tagging/siloed_tag.ts +22 -0
- package/src/tagging/tag.ts +16 -0
- package/src/tagging/utils.ts +31 -0
- package/dest/bin/index.d.ts +0 -3
- package/dest/bin/index.d.ts.map +0 -1
- package/dest/bin/index.js +0 -48
- package/dest/contract_function_simulator/oracle/typed_oracle.d.ts +0 -87
- package/dest/contract_function_simulator/oracle/typed_oracle.d.ts.map +0 -1
- package/dest/contract_function_simulator/oracle/typed_oracle.js +0 -146
- package/dest/contract_function_simulator/tagging_utils.d.ts +0 -17
- package/dest/contract_function_simulator/tagging_utils.d.ts.map +0 -1
- package/dest/contract_function_simulator/tagging_utils.js +0 -23
- package/dest/pxe_service/error_enriching.d.ts +0 -11
- package/dest/pxe_service/error_enriching.d.ts.map +0 -1
- package/dest/pxe_service/index.d.ts +0 -3
- package/dest/pxe_service/index.d.ts.map +0 -1
- package/dest/pxe_service/index.js +0 -2
- package/dest/pxe_service/pxe_service.d.ts +0 -100
- package/dest/pxe_service/pxe_service.d.ts.map +0 -1
- package/dest/storage/data_provider.d.ts +0 -4
- package/dest/storage/data_provider.d.ts.map +0 -1
- package/dest/storage/data_provider.js +0 -1
- package/dest/storage/note_data_provider/note_dao.d.ts +0 -100
- package/dest/storage/note_data_provider/note_dao.d.ts.map +0 -1
- package/dest/storage/note_data_provider/note_dao.js +0 -102
- package/dest/test/pxe_test_suite.d.ts +0 -3
- package/dest/test/pxe_test_suite.d.ts.map +0 -1
- package/dest/test/pxe_test_suite.js +0 -97
- package/src/bin/index.ts +0 -62
- package/src/contract_function_simulator/oracle/typed_oracle.ts +0 -289
- package/src/contract_function_simulator/tagging_utils.ts +0 -32
- package/src/pxe_service/index.ts +0 -2
- package/src/storage/data_provider.ts +0 -3
- package/src/storage/note_data_provider/note_dao.ts +0 -154
- package/src/test/pxe_test_suite.ts +0 -113
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
export * from '../../../
|
|
1
|
+
export * from '../../../pxe.js';
|
|
2
2
|
export * from '../../../config/index.js';
|
|
3
|
+
export * from '../../../error_enriching.js';
|
|
3
4
|
export * from '../../../storage/index.js';
|
|
4
5
|
export * from './utils.js';
|
|
5
6
|
export { PXEOracleInterface } from '../../../contract_function_simulator/pxe_oracle_interface.js';
|
|
6
|
-
|
|
7
|
+
export type { PXECreationOptions } from '../../pxe_creation_options.js';
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9lbnRyeXBvaW50cy9jbGllbnQvYnVuZGxlL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsaUJBQWlCLENBQUM7QUFDaEMsY0FBYywwQkFBMEIsQ0FBQztBQUN6QyxjQUFjLDZCQUE2QixDQUFDO0FBQzVDLGNBQWMsMkJBQTJCLENBQUM7QUFDMUMsY0FBYyxZQUFZLENBQUM7QUFDM0IsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sOERBQThELENBQUM7QUFDbEcsWUFBWSxFQUFFLGtCQUFrQixFQUFFLE1BQU0sK0JBQStCLENBQUMifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/entrypoints/client/bundle/index.ts"],"names":[],"mappings":"AAAA,cAAc
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/entrypoints/client/bundle/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,kBAAkB,EAAE,MAAM,8DAA8D,CAAC;AAClG,YAAY,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export * from '../../../
|
|
1
|
+
export * from '../../../pxe.js';
|
|
2
2
|
export * from '../../../config/index.js';
|
|
3
|
+
export * from '../../../error_enriching.js';
|
|
3
4
|
export * from '../../../storage/index.js';
|
|
4
5
|
export * from './utils.js';
|
|
5
6
|
export { PXEOracleInterface } from '../../../contract_function_simulator/pxe_oracle_interface.js';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
2
|
-
import type {
|
|
3
|
-
import {
|
|
2
|
+
import type { PXEConfig } from '../../../config/index.js';
|
|
3
|
+
import { PXE } from '../../../pxe.js';
|
|
4
4
|
import type { PXECreationOptions } from '../../pxe_creation_options.js';
|
|
5
5
|
/**
|
|
6
|
-
* Create and start an
|
|
6
|
+
* Create and start an PXE instance with the given AztecNode.
|
|
7
7
|
* If no keyStore or database is provided, it will use KeyStore and MemoryDB as default values.
|
|
8
|
-
* Returns a Promise that resolves to the started
|
|
8
|
+
* Returns a Promise that resolves to the started PXE instance.
|
|
9
9
|
*
|
|
10
10
|
* @param aztecNode - The AztecNode instance to be used by the server.
|
|
11
|
-
* @param config - The PXE
|
|
12
|
-
* @param options - (Optional) Optional information for creating an
|
|
13
|
-
* @returns A Promise that resolves to the started
|
|
11
|
+
* @param config - The PXE Config to use
|
|
12
|
+
* @param options - (Optional) Optional information for creating an PXE.
|
|
13
|
+
* @returns A Promise that resolves to the started PXE instance.
|
|
14
14
|
*/
|
|
15
|
-
export declare function
|
|
16
|
-
//# sourceMappingURL=
|
|
15
|
+
export declare function createPXE(aztecNode: AztecNode, config: PXEConfig, options?: PXECreationOptions): Promise<PXE>;
|
|
16
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9lbnRyeXBvaW50cy9jbGllbnQvYnVuZGxlL3V0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQU1BLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBRWpFLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQzFELE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUN0QyxPQUFPLEtBQUssRUFBRSxrQkFBa0IsRUFBRSxNQUFNLCtCQUErQixDQUFDO0FBRXhFOzs7Ozs7Ozs7R0FTRztBQUNILHdCQUFzQixTQUFTLENBQzdCLFNBQVMsRUFBRSxTQUFTLEVBQ3BCLE1BQU0sRUFBRSxTQUFTLEVBQ2pCLE9BQU8sR0FBRSxrQkFBb0MsZ0JBZ0M5QyJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/entrypoints/client/bundle/utils.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/entrypoints/client/bundle/utils.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAExE;;;;;;;;;GASG;AACH,wBAAsB,SAAS,CAC7B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,SAAS,EACjB,OAAO,GAAE,kBAAoC,gBAgC9C"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { randomBytes } from '@aztec/foundation/crypto';
|
|
1
|
+
import { BBBundlePrivateKernelProver } from '@aztec/bb-prover/client/bundle';
|
|
2
|
+
import { randomBytes } from '@aztec/foundation/crypto/random';
|
|
3
3
|
import { createLogger } from '@aztec/foundation/log';
|
|
4
4
|
import { createStore } from '@aztec/kv-store/indexeddb';
|
|
5
5
|
import { BundledProtocolContractsProvider } from '@aztec/protocol-contracts/providers/bundle';
|
|
6
6
|
import { WASMSimulator } from '@aztec/simulator/client';
|
|
7
|
-
import {
|
|
7
|
+
import { PXE } from '../../../pxe.js';
|
|
8
8
|
/**
|
|
9
|
-
* Create and start an
|
|
9
|
+
* Create and start an PXE instance with the given AztecNode.
|
|
10
10
|
* If no keyStore or database is provided, it will use KeyStore and MemoryDB as default values.
|
|
11
|
-
* Returns a Promise that resolves to the started
|
|
11
|
+
* Returns a Promise that resolves to the started PXE instance.
|
|
12
12
|
*
|
|
13
13
|
* @param aztecNode - The AztecNode instance to be used by the server.
|
|
14
|
-
* @param config - The PXE
|
|
15
|
-
* @param options - (Optional) Optional information for creating an
|
|
16
|
-
* @returns A Promise that resolves to the started
|
|
17
|
-
*/ export async function
|
|
14
|
+
* @param config - The PXE Config to use
|
|
15
|
+
* @param options - (Optional) Optional information for creating an PXE.
|
|
16
|
+
* @returns A Promise that resolves to the started PXE instance.
|
|
17
|
+
*/ export async function createPXE(aztecNode, config, options = {
|
|
18
18
|
loggers: {}
|
|
19
19
|
}) {
|
|
20
20
|
const logSuffix = typeof options.useLogSuffix === 'boolean' ? options.useLogSuffix ? randomBytes(3).toString('hex') : undefined : options.useLogSuffix;
|
|
@@ -26,11 +26,11 @@ import { PXEService } from '../../../pxe_service/pxe_service.js';
|
|
|
26
26
|
};
|
|
27
27
|
const storeLogger = loggers.store ? loggers.store : createLogger('pxe:data:idb' + (logSuffix ? `:${logSuffix}` : ''));
|
|
28
28
|
const store = options.store ?? await createStore('pxe_data', configWithContracts, storeLogger);
|
|
29
|
-
const simulator = new WASMSimulator();
|
|
29
|
+
const simulator = options.simulator ?? new WASMSimulator();
|
|
30
30
|
const proverLogger = loggers.prover ? loggers.prover : createLogger('pxe:bb:wasm:bundle' + (logSuffix ? `:${logSuffix}` : ''));
|
|
31
|
-
const prover = options.prover ?? new
|
|
31
|
+
const prover = options.prover ?? new BBBundlePrivateKernelProver(simulator, proverLogger);
|
|
32
32
|
const protocolContractsProvider = new BundledProtocolContractsProvider();
|
|
33
33
|
const pxeLogger = loggers.pxe ? loggers.pxe : createLogger('pxe:service' + (logSuffix ? `:${logSuffix}` : ''));
|
|
34
|
-
const pxe = await
|
|
34
|
+
const pxe = await PXE.create(aztecNode, store, prover, simulator, protocolContractsProvider, config, pxeLogger);
|
|
35
35
|
return pxe;
|
|
36
36
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
export * from '../../../
|
|
1
|
+
export * from '../../../pxe.js';
|
|
2
2
|
export * from '../../../config/index.js';
|
|
3
3
|
export * from '../../../storage/index.js';
|
|
4
|
+
export * from '../../../error_enriching.js';
|
|
4
5
|
export * from './utils.js';
|
|
5
6
|
export { PXEOracleInterface } from '../../../contract_function_simulator/pxe_oracle_interface.js';
|
|
6
|
-
|
|
7
|
+
export { type PXECreationOptions } from '../../pxe_creation_options.js';
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9lbnRyeXBvaW50cy9jbGllbnQvbGF6eS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGlCQUFpQixDQUFDO0FBQ2hDLGNBQWMsMEJBQTBCLENBQUM7QUFDekMsY0FBYywyQkFBMkIsQ0FBQztBQUMxQyxjQUFjLDZCQUE2QixDQUFDO0FBQzVDLGNBQWMsWUFBWSxDQUFDO0FBQzNCLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLDhEQUE4RCxDQUFDO0FBQ2xHLE9BQU8sRUFBRSxLQUFLLGtCQUFrQixFQUFFLE1BQU0sK0JBQStCLENBQUMifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/entrypoints/client/lazy/index.ts"],"names":[],"mappings":"AAAA,cAAc
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/entrypoints/client/lazy/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,kBAAkB,EAAE,MAAM,8DAA8D,CAAC;AAClG,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export * from '../../../
|
|
1
|
+
export * from '../../../pxe.js';
|
|
2
2
|
export * from '../../../config/index.js';
|
|
3
3
|
export * from '../../../storage/index.js';
|
|
4
|
+
export * from '../../../error_enriching.js';
|
|
4
5
|
export * from './utils.js';
|
|
5
6
|
export { PXEOracleInterface } from '../../../contract_function_simulator/pxe_oracle_interface.js';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
2
|
-
import type {
|
|
3
|
-
import {
|
|
2
|
+
import type { PXEConfig } from '../../../config/index.js';
|
|
3
|
+
import { PXE } from '../../../pxe.js';
|
|
4
4
|
import type { PXECreationOptions } from '../../pxe_creation_options.js';
|
|
5
5
|
/**
|
|
6
|
-
* Create and start an
|
|
7
|
-
* Returns a Promise that resolves to the started
|
|
6
|
+
* Create and start an PXE instance with the given AztecNode.
|
|
7
|
+
* Returns a Promise that resolves to the started PXE instance.
|
|
8
8
|
*
|
|
9
9
|
* @param aztecNode - The AztecNode instance to be used by the server.
|
|
10
|
-
* @param config - The PXE
|
|
10
|
+
* @param config - The PXE Config to use
|
|
11
11
|
* @param
|
|
12
|
-
* @returns A Promise that resolves to the started
|
|
12
|
+
* @returns A Promise that resolves to the started PXE instance.
|
|
13
13
|
*/
|
|
14
|
-
export declare function
|
|
15
|
-
//# sourceMappingURL=
|
|
14
|
+
export declare function createPXE(aztecNode: AztecNode, config: PXEConfig, options?: PXECreationOptions): Promise<PXE>;
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9lbnRyeXBvaW50cy9jbGllbnQvbGF6eS91dGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNQSxPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUVqRSxPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUMxRCxPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDdEMsT0FBTyxLQUFLLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQUV4RTs7Ozs7Ozs7R0FRRztBQUNILHdCQUFzQixTQUFTLENBQzdCLFNBQVMsRUFBRSxTQUFTLEVBQ3BCLE1BQU0sRUFBRSxTQUFTLEVBQ2pCLE9BQU8sR0FBRSxrQkFBb0MsZ0JBaUM5QyJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/entrypoints/client/lazy/utils.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/entrypoints/client/lazy/utils.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAExE;;;;;;;;GAQG;AACH,wBAAsB,SAAS,CAC7B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,SAAS,EACjB,OAAO,GAAE,kBAAoC,gBAiC9C"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { randomBytes } from '@aztec/foundation/crypto';
|
|
1
|
+
import { BBLazyPrivateKernelProver } from '@aztec/bb-prover/client/lazy';
|
|
2
|
+
import { randomBytes } from '@aztec/foundation/crypto/random';
|
|
3
3
|
import { createLogger } from '@aztec/foundation/log';
|
|
4
4
|
import { createStore } from '@aztec/kv-store/indexeddb';
|
|
5
5
|
import { LazyProtocolContractsProvider } from '@aztec/protocol-contracts/providers/lazy';
|
|
6
6
|
import { WASMSimulator } from '@aztec/simulator/client';
|
|
7
|
-
import {
|
|
7
|
+
import { PXE } from '../../../pxe.js';
|
|
8
8
|
/**
|
|
9
|
-
* Create and start an
|
|
10
|
-
* Returns a Promise that resolves to the started
|
|
9
|
+
* Create and start an PXE instance with the given AztecNode.
|
|
10
|
+
* Returns a Promise that resolves to the started PXE instance.
|
|
11
11
|
*
|
|
12
12
|
* @param aztecNode - The AztecNode instance to be used by the server.
|
|
13
|
-
* @param config - The PXE
|
|
13
|
+
* @param config - The PXE Config to use
|
|
14
14
|
* @param
|
|
15
|
-
* @returns A Promise that resolves to the started
|
|
16
|
-
*/ export async function
|
|
15
|
+
* @returns A Promise that resolves to the started PXE instance.
|
|
16
|
+
*/ export async function createPXE(aztecNode, config, options = {
|
|
17
17
|
loggers: {}
|
|
18
18
|
}) {
|
|
19
19
|
const logSuffix = typeof options.useLogSuffix === 'boolean' ? options.useLogSuffix ? randomBytes(3).toString('hex') : undefined : options.useLogSuffix;
|
|
@@ -25,11 +25,11 @@ import { PXEService } from '../../../pxe_service/pxe_service.js';
|
|
|
25
25
|
const loggers = options.loggers ?? {};
|
|
26
26
|
const storeLogger = loggers.store ? loggers.store : createLogger('pxe:data:idb' + (logSuffix ? `:${logSuffix}` : ''));
|
|
27
27
|
const store = options.store ?? await createStore('pxe_data', configWithContracts, storeLogger);
|
|
28
|
-
const simulator = new WASMSimulator();
|
|
28
|
+
const simulator = options.simulator ?? new WASMSimulator();
|
|
29
29
|
const proverLogger = loggers.prover ? loggers.prover : createLogger('pxe:bb:wasm:bundle' + (logSuffix ? `:${logSuffix}` : ''));
|
|
30
|
-
const prover = options.prover ?? new
|
|
30
|
+
const prover = options.prover ?? new BBLazyPrivateKernelProver(simulator, proverLogger);
|
|
31
31
|
const protocolContractsProvider = new LazyProtocolContractsProvider();
|
|
32
32
|
const pxeLogger = loggers.pxe ? loggers.pxe : createLogger('pxe:service' + (logSuffix ? `:${logSuffix}` : ''));
|
|
33
|
-
const pxe = await
|
|
33
|
+
const pxe = await PXE.create(aztecNode, store, prover, simulator, protocolContractsProvider, config, pxeLogger);
|
|
34
34
|
return pxe;
|
|
35
35
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Logger } from '@aztec/foundation/log';
|
|
2
2
|
import type { AztecAsyncKVStore } from '@aztec/kv-store';
|
|
3
|
+
import type { CircuitSimulator } from '@aztec/simulator/client';
|
|
3
4
|
import type { PrivateKernelProver } from '@aztec/stdlib/interfaces/client';
|
|
4
5
|
export type PXECreationOptions = {
|
|
5
6
|
loggers?: {
|
|
@@ -10,5 +11,6 @@ export type PXECreationOptions = {
|
|
|
10
11
|
useLogSuffix?: boolean | string;
|
|
11
12
|
prover?: PrivateKernelProver;
|
|
12
13
|
store?: AztecAsyncKVStore;
|
|
14
|
+
simulator?: CircuitSimulator;
|
|
13
15
|
};
|
|
14
|
-
//# sourceMappingURL=
|
|
16
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHhlX2NyZWF0aW9uX29wdGlvbnMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9lbnRyeXBvaW50cy9weGVfY3JlYXRpb25fb3B0aW9ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQztBQUNwRCxPQUFPLEtBQUssRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQ3pELE9BQU8sS0FBSyxFQUFFLGdCQUFnQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFDaEUsT0FBTyxLQUFLLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUUzRSxNQUFNLE1BQU0sa0JBQWtCLEdBQUc7SUFDL0IsT0FBTyxDQUFDLEVBQUU7UUFBRSxLQUFLLENBQUMsRUFBRSxNQUFNLENBQUM7UUFBQyxHQUFHLENBQUMsRUFBRSxNQUFNLENBQUM7UUFBQyxNQUFNLENBQUMsRUFBRSxNQUFNLENBQUE7S0FBRSxDQUFDO0lBQzVELFlBQVksQ0FBQyxFQUFFLE9BQU8sR0FBRyxNQUFNLENBQUM7SUFDaEMsTUFBTSxDQUFDLEVBQUUsbUJBQW1CLENBQUM7SUFDN0IsS0FBSyxDQUFDLEVBQUUsaUJBQWlCLENBQUM7SUFDMUIsU0FBUyxDQUFDLEVBQUUsZ0JBQWdCLENBQUM7Q0FDOUIsQ0FBQyJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pxe_creation_options.d.ts","sourceRoot":"","sources":["../../src/entrypoints/pxe_creation_options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5D,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAChC,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,KAAK,CAAC,EAAE,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"pxe_creation_options.d.ts","sourceRoot":"","sources":["../../src/entrypoints/pxe_creation_options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5D,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAChC,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
export * from '../../
|
|
1
|
+
export * from '../../pxe.js';
|
|
2
2
|
export * from '../../config/index.js';
|
|
3
|
+
export * from '../../error_enriching.js';
|
|
3
4
|
export * from '../../storage/index.js';
|
|
4
5
|
export * from './utils.js';
|
|
5
6
|
export { PXEOracleInterface } from '../../contract_function_simulator/pxe_oracle_interface.js';
|
|
6
7
|
export { ORACLE_VERSION } from '../../oracle_version.js';
|
|
7
|
-
|
|
8
|
+
export { type PXECreationOptions } from '../pxe_creation_options.js';
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9lbnRyeXBvaW50cy9zZXJ2ZXIvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyx1QkFBdUIsQ0FBQztBQUN0QyxjQUFjLDBCQUEwQixDQUFDO0FBQ3pDLGNBQWMsd0JBQXdCLENBQUM7QUFDdkMsY0FBYyxZQUFZLENBQUM7QUFDM0IsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sMkRBQTJELENBQUM7QUFDL0YsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQ3pELE9BQU8sRUFBRSxLQUFLLGtCQUFrQixFQUFFLE1BQU0sNEJBQTRCLENBQUMifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/server/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/server/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,kBAAkB,EAAE,MAAM,2DAA2D,CAAC;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export * from '../../
|
|
1
|
+
export * from '../../pxe.js';
|
|
2
2
|
export * from '../../config/index.js';
|
|
3
|
+
export * from '../../error_enriching.js';
|
|
3
4
|
export * from '../../storage/index.js';
|
|
4
5
|
export * from './utils.js';
|
|
5
6
|
export { PXEOracleInterface } from '../../contract_function_simulator/pxe_oracle_interface.js';
|
|
@@ -1,27 +1,8 @@
|
|
|
1
|
-
import { type CircuitSimulator } from '@aztec/simulator/client';
|
|
2
1
|
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
3
|
-
import type {
|
|
4
|
-
import {
|
|
2
|
+
import type { PXEConfig } from '../../config/index.js';
|
|
3
|
+
import { PXE } from '../../pxe.js';
|
|
5
4
|
import type { PXECreationOptions } from '../pxe_creation_options.js';
|
|
6
|
-
type PXEConfigWithoutDefaults = Omit<
|
|
7
|
-
|
|
8
|
-
* Create and start an PXEService instance with the given AztecNode and config.
|
|
9
|
-
*
|
|
10
|
-
* @param aztecNode - The AztecNode instance to be used by the server.
|
|
11
|
-
* @param config - The PXE Service Config to use
|
|
12
|
-
* @param useLogSuffix - Whether to add a randomly generated suffix to the PXE debug logs.
|
|
13
|
-
* @returns A Promise that resolves to the started PXEService instance.
|
|
14
|
-
*/
|
|
15
|
-
export declare function createPXEService(aztecNode: AztecNode, config: PXEConfigWithoutDefaults, options?: PXECreationOptions): Promise<PXEService>;
|
|
16
|
-
/**
|
|
17
|
-
* Create and start an PXEService instance with the given AztecNode, Simulator and config.
|
|
18
|
-
*
|
|
19
|
-
* @param aztecNode - The AztecNode instance to be used by the server.
|
|
20
|
-
* @param simulator - The Simulator to use
|
|
21
|
-
* @param config - The PXE Service Config to use
|
|
22
|
-
* @param useLogSuffix - Whether to add a randomly generated suffix to the PXE debug logs.
|
|
23
|
-
* @returns A Promise that resolves to the started PXEService instance.
|
|
24
|
-
*/
|
|
25
|
-
export declare function createPXEServiceWithSimulator(aztecNode: AztecNode, simulator: CircuitSimulator, config: PXEConfigWithoutDefaults, options?: PXECreationOptions): Promise<PXEService>;
|
|
5
|
+
type PXEConfigWithoutDefaults = Omit<PXEConfig, 'l1Contracts' | 'l1ChainId' | 'l2BlockBatchSize' | 'rollupVersion'>;
|
|
6
|
+
export declare function createPXE(aztecNode: AztecNode, config: PXEConfigWithoutDefaults, options?: PXECreationOptions): Promise<PXE>;
|
|
26
7
|
export {};
|
|
27
|
-
//# sourceMappingURL=
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9lbnRyeXBvaW50cy9zZXJ2ZXIvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBV0EsT0FBTyxLQUFLLEVBQUUsU0FBUyxFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFFakUsT0FBTyxLQUFLLEVBQUUsU0FBUyxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFDdkQsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGNBQWMsQ0FBQztBQUVuQyxPQUFPLEtBQUssRUFBRSxrQkFBa0IsRUFBRSxNQUFNLDRCQUE0QixDQUFDO0FBRXJFLEtBQUssd0JBQXdCLEdBQUcsSUFBSSxDQUFDLFNBQVMsRUFBRSxhQUFhLEdBQUcsV0FBVyxHQUFHLGtCQUFrQixHQUFHLGVBQWUsQ0FBQyxDQUFDO0FBRXBILHdCQUFzQixTQUFTLENBQzdCLFNBQVMsRUFBRSxTQUFTLEVBQ3BCLE1BQU0sRUFBRSx3QkFBd0IsRUFDaEMsT0FBTyxHQUFFLGtCQUFvQyxnQkFtRDlDIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/server/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/server/utils.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE,KAAK,wBAAwB,GAAG,IAAI,CAAC,SAAS,EAAE,aAAa,GAAG,WAAW,GAAG,kBAAkB,GAAG,eAAe,CAAC,CAAC;AAEpH,wBAAsB,SAAS,CAC7B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,wBAAwB,EAChC,OAAO,GAAE,kBAAoC,gBAmD9C"}
|
|
@@ -1,38 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { randomBytes } from '@aztec/foundation/crypto';
|
|
1
|
+
import { BBBundlePrivateKernelProver } from '@aztec/bb-prover/client/bundle';
|
|
2
|
+
import { randomBytes } from '@aztec/foundation/crypto/random';
|
|
4
3
|
import { createLogger } from '@aztec/foundation/log';
|
|
5
4
|
import { BundledProtocolContractsProvider } from '@aztec/protocol-contracts/providers/bundle';
|
|
6
5
|
import { MemoryCircuitRecorder, SimulatorRecorderWrapper, WASMSimulator } from '@aztec/simulator/client';
|
|
7
6
|
import { FileCircuitRecorder } from '@aztec/simulator/testing';
|
|
8
|
-
import {
|
|
7
|
+
import { PXE } from '../../pxe.js';
|
|
9
8
|
import { PXE_DATA_SCHEMA_VERSION } from '../../storage/index.js';
|
|
10
|
-
|
|
11
|
-
* Create and start an PXEService instance with the given AztecNode and config.
|
|
12
|
-
*
|
|
13
|
-
* @param aztecNode - The AztecNode instance to be used by the server.
|
|
14
|
-
* @param config - The PXE Service Config to use
|
|
15
|
-
* @param useLogSuffix - Whether to add a randomly generated suffix to the PXE debug logs.
|
|
16
|
-
* @returns A Promise that resolves to the started PXEService instance.
|
|
17
|
-
*/ export function createPXEService(aztecNode, config, options = {
|
|
9
|
+
export async function createPXE(aztecNode, config, options = {
|
|
18
10
|
loggers: {}
|
|
19
11
|
}) {
|
|
20
|
-
const simulator = new WASMSimulator();
|
|
21
12
|
const recorder = process.env.CIRCUIT_RECORD_DIR ? new FileCircuitRecorder(process.env.CIRCUIT_RECORD_DIR) : new MemoryCircuitRecorder();
|
|
22
|
-
const
|
|
23
|
-
return createPXEServiceWithSimulator(aztecNode, simulatorWithRecorder, config, options);
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Create and start an PXEService instance with the given AztecNode, Simulator and config.
|
|
27
|
-
*
|
|
28
|
-
* @param aztecNode - The AztecNode instance to be used by the server.
|
|
29
|
-
* @param simulator - The Simulator to use
|
|
30
|
-
* @param config - The PXE Service Config to use
|
|
31
|
-
* @param useLogSuffix - Whether to add a randomly generated suffix to the PXE debug logs.
|
|
32
|
-
* @returns A Promise that resolves to the started PXEService instance.
|
|
33
|
-
*/ export async function createPXEServiceWithSimulator(aztecNode, simulator, config, options = {
|
|
34
|
-
loggers: {}
|
|
35
|
-
}) {
|
|
13
|
+
const simulator = new SimulatorRecorderWrapper(new WASMSimulator(), recorder);
|
|
36
14
|
const logSuffix = typeof options.useLogSuffix === 'boolean' ? options.useLogSuffix ? randomBytes(3).toString('hex') : undefined : options.useLogSuffix;
|
|
37
15
|
const loggers = options.loggers ?? {};
|
|
38
16
|
const { l1ChainId, l1ContractAddresses: l1Contracts, rollupVersion } = await aztecNode.getNodeInfo();
|
|
@@ -51,22 +29,12 @@ import { PXE_DATA_SCHEMA_VERSION } from '../../storage/index.js';
|
|
|
51
29
|
options.store = await createStore('pxe_data', PXE_DATA_SCHEMA_VERSION, configWithContracts, storeLogger);
|
|
52
30
|
}
|
|
53
31
|
const proverLogger = loggers.prover ? loggers.prover : createLogger('pxe:bb:native' + (logSuffix ? `:${logSuffix}` : ''));
|
|
54
|
-
const prover = options.prover ??
|
|
32
|
+
const prover = options.prover ?? createProver(simulator, proverLogger);
|
|
55
33
|
const protocolContractsProvider = new BundledProtocolContractsProvider();
|
|
56
34
|
const pxeLogger = loggers.pxe ? loggers.pxe : createLogger('pxe:service' + (logSuffix ? `:${logSuffix}` : ''));
|
|
57
|
-
const pxe = await
|
|
35
|
+
const pxe = await PXE.create(aztecNode, options.store, prover, simulator, protocolContractsProvider, configWithContracts, pxeLogger);
|
|
58
36
|
return pxe;
|
|
59
37
|
}
|
|
60
|
-
function createProver(
|
|
61
|
-
|
|
62
|
-
return new BBWASMBundlePrivateKernelProver(simulator, 16, logger);
|
|
63
|
-
} else {
|
|
64
|
-
const bbConfig = config;
|
|
65
|
-
return BBNativePrivateKernelProver.new({
|
|
66
|
-
bbSkipCleanup: false,
|
|
67
|
-
numConcurrentIVCVerifiers: 1,
|
|
68
|
-
bbIVCConcurrency: 1,
|
|
69
|
-
...bbConfig
|
|
70
|
-
}, simulator, logger);
|
|
71
|
-
}
|
|
38
|
+
function createProver(simulator, logger) {
|
|
39
|
+
return new BBBundlePrivateKernelProver(simulator, logger);
|
|
72
40
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Logger } from '@aztec/foundation/log';
|
|
2
|
+
import { type SimulationError } from '@aztec/stdlib/errors';
|
|
3
|
+
import type { ContractDataProvider } from './storage/contract_data_provider/contract_data_provider.js';
|
|
4
|
+
/**
|
|
5
|
+
* Adds contract and function names to a simulation error, if they
|
|
6
|
+
* can be found in the PXE database
|
|
7
|
+
* @param err - The error to enrich.
|
|
8
|
+
*/
|
|
9
|
+
export declare function enrichSimulationError(err: SimulationError, contractDataProvider: ContractDataProvider, logger: Logger): Promise<void>;
|
|
10
|
+
export declare function enrichPublicSimulationError(err: SimulationError, contractDataProvider: ContractDataProvider, logger: Logger): Promise<void>;
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3JfZW5yaWNoaW5nLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvZXJyb3JfZW5yaWNoaW5nLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLE1BQU0sRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBSXBELE9BQU8sRUFBRSxLQUFLLGVBQWUsRUFBNkIsTUFBTSxzQkFBc0IsQ0FBQztBQUV2RixPQUFPLEtBQUssRUFBRSxvQkFBb0IsRUFBRSxNQUFNLDREQUE0RCxDQUFDO0FBRXZHOzs7O0dBSUc7QUFDSCx3QkFBc0IscUJBQXFCLENBQ3pDLEdBQUcsRUFBRSxlQUFlLEVBQ3BCLG9CQUFvQixFQUFFLG9CQUFvQixFQUMxQyxNQUFNLEVBQUUsTUFBTSxpQkFvRGY7QUFFRCx3QkFBc0IsMkJBQTJCLENBQy9DLEdBQUcsRUFBRSxlQUFlLEVBQ3BCLG9CQUFvQixFQUFFLG9CQUFvQixFQUMxQyxNQUFNLEVBQUUsTUFBTSxpQkF5Q2YifQ==
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error_enriching.d.ts","sourceRoot":"","sources":["../src/error_enriching.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAIpD,OAAO,EAAE,KAAK,eAAe,EAA6B,MAAM,sBAAsB,CAAC;AAEvF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4DAA4D,CAAC;AAEvG;;;;GAIG;AACH,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,eAAe,EACpB,oBAAoB,EAAE,oBAAoB,EAC1C,MAAM,EAAE,MAAM,iBAoDf;AAED,wBAAsB,2BAA2B,CAC/C,GAAG,EAAE,eAAe,EACpB,oBAAoB,EAAE,oBAAoB,EAC1C,MAAM,EAAE,MAAM,iBAyCf"}
|
|
@@ -48,6 +48,9 @@ import { isNoirCallStackUnresolved } from '@aztec/stdlib/errors';
|
|
|
48
48
|
export async function enrichPublicSimulationError(err, contractDataProvider, logger) {
|
|
49
49
|
const callStack = err.getCallStack();
|
|
50
50
|
const originalFailingFunction = callStack[callStack.length - 1];
|
|
51
|
+
if (!originalFailingFunction) {
|
|
52
|
+
throw new Error(`Original failing function not found when enriching public simulation, missing callstack`);
|
|
53
|
+
}
|
|
51
54
|
const artifact = await contractDataProvider.getPublicFunctionArtifact(originalFailingFunction.contractAddress);
|
|
52
55
|
if (!artifact) {
|
|
53
56
|
throw new Error(`Artifact not found when enriching public simulation error. Contract address: ${originalFailingFunction.contractAddress}.`);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export * from './private_event_filter_validator.js';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ldmVudHMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxxQ0FBcUMsQ0FBQyJ9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './private_event_filter_validator.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PrivateEventFilter } from '@aztec/aztec.js/wallet';
|
|
2
|
+
import type { PrivateEventDataProviderFilter, SyncDataProvider } from '../storage/index.js';
|
|
3
|
+
export declare class PrivateEventFilterValidator {
|
|
4
|
+
private syncDataProvider;
|
|
5
|
+
constructor(syncDataProvider: SyncDataProvider);
|
|
6
|
+
validate(filter: PrivateEventFilter): Promise<PrivateEventDataProviderFilter>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpdmF0ZV9ldmVudF9maWx0ZXJfdmFsaWRhdG9yLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZXZlbnRzL3ByaXZhdGVfZXZlbnRfZmlsdGVyX3ZhbGlkYXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxrQkFBa0IsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBSWpFLE9BQU8sS0FBSyxFQUFFLDhCQUE4QixFQUFFLGdCQUFnQixFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFFNUYscUJBQWEsMkJBQTJCO0lBQzFCLE9BQU8sQ0FBQyxnQkFBZ0I7SUFBcEMsWUFBb0IsZ0JBQWdCLEVBQUUsZ0JBQWdCLEVBQUk7SUFFcEQsUUFBUSxDQUFDLE1BQU0sRUFBRSxrQkFBa0IsR0FBRyxPQUFPLENBQUMsOEJBQThCLENBQUMsQ0FvQ2xGO0NBQ0YifQ==
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private_event_filter_validator.d.ts","sourceRoot":"","sources":["../../src/events/private_event_filter_validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAIjE,OAAO,KAAK,EAAE,8BAA8B,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5F,qBAAa,2BAA2B;IAC1B,OAAO,CAAC,gBAAgB;IAApC,YAAoB,gBAAgB,EAAE,gBAAgB,EAAI;IAEpD,QAAQ,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAoClF;CACF"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { INITIAL_L2_BLOCK_NUM } from '@aztec/constants';
|
|
2
|
+
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
3
|
+
export class PrivateEventFilterValidator {
|
|
4
|
+
syncDataProvider;
|
|
5
|
+
constructor(syncDataProvider){
|
|
6
|
+
this.syncDataProvider = syncDataProvider;
|
|
7
|
+
}
|
|
8
|
+
async validate(filter) {
|
|
9
|
+
let { fromBlock, toBlock } = filter;
|
|
10
|
+
// Block range filters in Aztec Node are defined as closed-open intervals [fromBlock, toBlock), so
|
|
11
|
+
// we respect that convention here for consistency.
|
|
12
|
+
// We then default to [INITIAL_L2_BLOCK_NUM, latestKnownBlock + 1), ie: by default return events from
|
|
13
|
+
// the first block to the latest known block.
|
|
14
|
+
if (!fromBlock || !toBlock) {
|
|
15
|
+
const lastKnownBlock = await this.syncDataProvider.getBlockNumber();
|
|
16
|
+
fromBlock = fromBlock ?? BlockNumber(INITIAL_L2_BLOCK_NUM);
|
|
17
|
+
toBlock = toBlock ?? BlockNumber(lastKnownBlock + 1);
|
|
18
|
+
}
|
|
19
|
+
if (filter.scopes.length === 0) {
|
|
20
|
+
throw new Error('At least one scope is required to get private events');
|
|
21
|
+
}
|
|
22
|
+
if (fromBlock < 1) {
|
|
23
|
+
throw new Error('fromBlock must be greater than or equal to 1');
|
|
24
|
+
}
|
|
25
|
+
if (toBlock < 1) {
|
|
26
|
+
throw new Error('toBlock must be greater than or equal to 1');
|
|
27
|
+
}
|
|
28
|
+
if (fromBlock >= toBlock) {
|
|
29
|
+
throw new Error('toBlock must be strictly greater than fromBlock');
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
contractAddress: filter.contractAddress,
|
|
33
|
+
scopes: filter.scopes,
|
|
34
|
+
txHash: filter.txHash,
|
|
35
|
+
toBlock,
|
|
36
|
+
fromBlock
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}
|
package/dest/oracle_version.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const ORACLE_VERSION =
|
|
2
|
-
export declare const ORACLE_INTERFACE_HASH = "
|
|
3
|
-
//# sourceMappingURL=
|
|
1
|
+
export declare const ORACLE_VERSION = 5;
|
|
2
|
+
export declare const ORACLE_INTERFACE_HASH = "d603c17a97034d978ca453d2bce3aacae139539dee28bbc46e8f8c7177a348ec";
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3JhY2xlX3ZlcnNpb24uZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9vcmFjbGVfdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNQSxlQUFPLE1BQU0sY0FBYyxJQUFJLENBQUM7QUFJaEMsZUFBTyxNQUFNLHFCQUFxQixxRUFBcUUsQ0FBQyJ9
|
package/dest/oracle_version.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
///
|
|
5
5
|
/// @dev Whenever a contract function or Noir test is run, the `utilityAssertCompatibleOracleVersion` oracle is called
|
|
6
6
|
/// and if the oracle version is incompatible an error is thrown.
|
|
7
|
-
export const ORACLE_VERSION =
|
|
7
|
+
export const ORACLE_VERSION = 5;
|
|
8
8
|
/// This hash is computed as by hashing the Oracle interface and it is used to detect when the Oracle interface changes,
|
|
9
9
|
/// which in turn implies that you need to update the ORACLE_VERSION constant.
|
|
10
|
-
export const ORACLE_INTERFACE_HASH = '
|
|
10
|
+
export const ORACLE_INTERFACE_HASH = 'd603c17a97034d978ca453d2bce3aacae139539dee28bbc46e8f8c7177a348ec';
|
|
@@ -5,7 +5,7 @@ export declare class PrivateKernelResetPrivateInputsBuilder {
|
|
|
5
5
|
private previousKernelOutput;
|
|
6
6
|
private executionStack;
|
|
7
7
|
private noteHashNullifierCounterMap;
|
|
8
|
-
private
|
|
8
|
+
private splitCounter;
|
|
9
9
|
private previousKernel;
|
|
10
10
|
private nextIteration?;
|
|
11
11
|
private noteHashResetActions;
|
|
@@ -13,7 +13,7 @@ export declare class PrivateKernelResetPrivateInputsBuilder {
|
|
|
13
13
|
private numTransientData?;
|
|
14
14
|
private transientDataSquashingHints;
|
|
15
15
|
private requestedDimensions;
|
|
16
|
-
constructor(previousKernelOutput: PrivateKernelSimulateOutput<PrivateKernelCircuitPublicInputs>, executionStack: PrivateCallExecutionResult[], noteHashNullifierCounterMap: Map<number, number>,
|
|
16
|
+
constructor(previousKernelOutput: PrivateKernelSimulateOutput<PrivateKernelCircuitPublicInputs>, executionStack: PrivateCallExecutionResult[], noteHashNullifierCounterMap: Map<number, number>, splitCounter: number);
|
|
17
17
|
needsReset(): boolean;
|
|
18
18
|
build(oracle: PrivateKernelOracle, noteHashLeafIndexMap: Map<bigint, bigint>): Promise<PrivateKernelResetCircuitPrivateInputs>;
|
|
19
19
|
private reduceReadRequestActions;
|
|
@@ -25,4 +25,4 @@ export declare class PrivateKernelResetPrivateInputsBuilder {
|
|
|
25
25
|
private needsSiloNullifiers;
|
|
26
26
|
private needsSiloPrivateLogs;
|
|
27
27
|
}
|
|
28
|
-
//# sourceMappingURL=
|
|
28
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGRfcHJpdmF0ZV9rZXJuZWxfcmVzZXRfcHJpdmF0ZV9pbnB1dHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wcml2YXRlX2tlcm5lbC9oaW50cy9idWlsZF9wcml2YXRlX2tlcm5lbF9yZXNldF9wcml2YXRlX2lucHV0cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFlQSxPQUFPLEVBS0wsS0FBSyxnQ0FBZ0MsRUFFckMsc0NBQXNDLEVBR3RDLEtBQUssMkJBQTJCLEVBZWpDLE1BQU0sc0JBQXNCLENBQUM7QUFDOUIsT0FBTyxFQUFFLEtBQUssMEJBQTBCLEVBQWlCLE1BQU0sa0JBQWtCLENBQUM7QUFHbEYsT0FBTyxLQUFLLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQTRDdkUscUJBQWEsc0NBQXNDO0lBWS9DLE9BQU8sQ0FBQyxvQkFBb0I7SUFDNUIsT0FBTyxDQUFDLGNBQWM7SUFDdEIsT0FBTyxDQUFDLDJCQUEyQjtJQUNuQyxPQUFPLENBQUMsWUFBWTtJQWR0QixPQUFPLENBQUMsY0FBYyxDQUFtQztJQUV6RCxPQUFPLENBQUMsYUFBYSxDQUFDLENBQTZCO0lBRW5ELE9BQU8sQ0FBQyxvQkFBb0IsQ0FBcUU7SUFDakcsT0FBTyxDQUFDLHFCQUFxQixDQUFxRTtJQUNsRyxPQUFPLENBQUMsZ0JBQWdCLENBQUMsQ0FBUztJQUNsQyxPQUFPLENBQUMsMkJBQTJCLENBQWtFO0lBQ3JHLE9BQU8sQ0FBQyxtQkFBbUIsQ0FBK0I7SUFFMUQsWUFDVSxvQkFBb0IsRUFBRSwyQkFBMkIsQ0FBQyxnQ0FBZ0MsQ0FBQyxFQUNuRixjQUFjLEVBQUUsMEJBQTBCLEVBQUUsRUFDNUMsMkJBQTJCLEVBQUUsR0FBRyxDQUFDLE1BQU0sRUFBRSxNQUFNLENBQUMsRUFDaEQsWUFBWSxFQUFFLE1BQU0sRUFXN0I7SUFFRCxVQUFVLElBQUksT0FBTyxDQXNCcEI7SUFFSyxLQUFLLENBQUMsTUFBTSxFQUFFLG1CQUFtQixFQUFFLG9CQUFvQixFQUFFLEdBQUcsQ0FBQyxNQUFNLEVBQUUsTUFBTSxDQUFDLG1EQW9FakY7SUFFRCxPQUFPLENBQUMsd0JBQXdCO0lBMkJoQyxPQUFPLENBQUMsOEJBQThCO0lBdUR0QyxPQUFPLENBQUMsK0JBQStCO0lBdUR2QyxPQUFPLENBQUMsdUJBQXVCO0lBYS9CLE9BQU8sQ0FBQyx1QkFBdUI7SUFzRS9CLE9BQU8sQ0FBQyxtQkFBbUI7SUFjM0IsT0FBTyxDQUFDLG1CQUFtQjtJQWtCM0IsT0FBTyxDQUFDLG9CQUFvQjtDQXFCN0IifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build_private_kernel_reset_private_inputs.d.ts","sourceRoot":"","sources":["../../../src/private_kernel/hints/build_private_kernel_reset_private_inputs.ts"],"names":[],"mappings":"AAeA,OAAO,EAKL,KAAK,gCAAgC,EAErC,sCAAsC,EAGtC,KAAK,2BAA2B,
|
|
1
|
+
{"version":3,"file":"build_private_kernel_reset_private_inputs.d.ts","sourceRoot":"","sources":["../../../src/private_kernel/hints/build_private_kernel_reset_private_inputs.ts"],"names":[],"mappings":"AAeA,OAAO,EAKL,KAAK,gCAAgC,EAErC,sCAAsC,EAGtC,KAAK,2BAA2B,EAejC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,0BAA0B,EAAiB,MAAM,kBAAkB,CAAC;AAGlF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AA4CvE,qBAAa,sCAAsC;IAY/C,OAAO,CAAC,oBAAoB;IAC5B,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,2BAA2B;IACnC,OAAO,CAAC,YAAY;IAdtB,OAAO,CAAC,cAAc,CAAmC;IAEzD,OAAO,CAAC,aAAa,CAAC,CAA6B;IAEnD,OAAO,CAAC,oBAAoB,CAAqE;IACjG,OAAO,CAAC,qBAAqB,CAAqE;IAClG,OAAO,CAAC,gBAAgB,CAAC,CAAS;IAClC,OAAO,CAAC,2BAA2B,CAAkE;IACrG,OAAO,CAAC,mBAAmB,CAA+B;IAE1D,YACU,oBAAoB,EAAE,2BAA2B,CAAC,gCAAgC,CAAC,EACnF,cAAc,EAAE,0BAA0B,EAAE,EAC5C,2BAA2B,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAChD,YAAY,EAAE,MAAM,EAW7B;IAED,UAAU,IAAI,OAAO,CAsBpB;IAEK,KAAK,CAAC,MAAM,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,mDAoEjF;IAED,OAAO,CAAC,wBAAwB;IA2BhC,OAAO,CAAC,8BAA8B;IAuDtC,OAAO,CAAC,+BAA+B;IAuDvC,OAAO,CAAC,uBAAuB;IAa/B,OAAO,CAAC,uBAAuB;IAsE/B,OAAO,CAAC,mBAAmB;IAc3B,OAAO,CAAC,mBAAmB;IAkB3B,OAAO,CAAC,oBAAoB;CAqB7B"}
|
|
@@ -4,12 +4,12 @@ import { padArrayEnd } from '@aztec/foundation/collection';
|
|
|
4
4
|
import { assertLength } from '@aztec/foundation/serialize';
|
|
5
5
|
import { MembershipWitness } from '@aztec/foundation/trees';
|
|
6
6
|
import { privateKernelResetDimensionsConfig } from '@aztec/noir-protocol-circuits-types/client';
|
|
7
|
-
import { KeyValidationHint, PaddedSideEffects, PrivateKernelData, PrivateKernelResetCircuitPrivateInputs, PrivateKernelResetDimensions, PrivateKernelResetHints, ReadRequestActionEnum, ReadRequestResetActions, ScopedNoteHash, ScopedNullifier,
|
|
7
|
+
import { KeyValidationHint, PaddedSideEffects, PrivateKernelData, PrivateKernelResetCircuitPrivateInputs, PrivateKernelResetDimensions, PrivateKernelResetHints, ReadRequestActionEnum, ReadRequestResetActions, ScopedNoteHash, ScopedNullifier, TransientDataSquashingHint, buildNoteHashReadRequestHintsFromResetActions, buildNullifierReadRequestHintsFromResetActions, buildTransientDataHints, findPrivateKernelResetDimensions, getNoteHashReadRequestResetActions, getNullifierReadRequestResetActions, privateKernelResetDimensionNames } from '@aztec/stdlib/kernel';
|
|
8
8
|
import { collectNested } from '@aztec/stdlib/tx';
|
|
9
9
|
import { VkData } from '@aztec/stdlib/vks';
|
|
10
10
|
function collectNestedReadRequests(executionStack, extractReadRequests) {
|
|
11
11
|
return collectNested(executionStack, (executionResult)=>{
|
|
12
|
-
return extractReadRequests(executionResult).getActiveItems()
|
|
12
|
+
return extractReadRequests(executionResult).getActiveItems();
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
function getNullifierMembershipWitnessResolver(oracle) {
|
|
@@ -37,7 +37,7 @@ export class PrivateKernelResetPrivateInputsBuilder {
|
|
|
37
37
|
previousKernelOutput;
|
|
38
38
|
executionStack;
|
|
39
39
|
noteHashNullifierCounterMap;
|
|
40
|
-
|
|
40
|
+
splitCounter;
|
|
41
41
|
previousKernel;
|
|
42
42
|
// If there's no next iteration, it's the final reset.
|
|
43
43
|
nextIteration;
|
|
@@ -46,11 +46,11 @@ export class PrivateKernelResetPrivateInputsBuilder {
|
|
|
46
46
|
numTransientData;
|
|
47
47
|
transientDataSquashingHints;
|
|
48
48
|
requestedDimensions;
|
|
49
|
-
constructor(previousKernelOutput, executionStack, noteHashNullifierCounterMap,
|
|
49
|
+
constructor(previousKernelOutput, executionStack, noteHashNullifierCounterMap, splitCounter){
|
|
50
50
|
this.previousKernelOutput = previousKernelOutput;
|
|
51
51
|
this.executionStack = executionStack;
|
|
52
52
|
this.noteHashNullifierCounterMap = noteHashNullifierCounterMap;
|
|
53
|
-
this.
|
|
53
|
+
this.splitCounter = splitCounter;
|
|
54
54
|
this.previousKernel = previousKernelOutput.publicInputs;
|
|
55
55
|
this.requestedDimensions = PrivateKernelResetDimensions.empty();
|
|
56
56
|
this.noteHashResetActions = ReadRequestResetActions.empty(MAX_NOTE_HASH_READ_REQUESTS_PER_TX);
|
|
@@ -101,7 +101,7 @@ export class PrivateKernelResetPrivateInputsBuilder {
|
|
|
101
101
|
const paddedSideEffects = PaddedSideEffects.empty();
|
|
102
102
|
return new PrivateKernelResetCircuitPrivateInputs(previousKernelData, paddedSideEffects, new PrivateKernelResetHints(await buildNoteHashReadRequestHintsFromResetActions(oracle, this.previousKernel.validationRequests.noteHashReadRequests, this.previousKernel.end.noteHashes, this.noteHashResetActions, noteHashLeafIndexMap), await buildNullifierReadRequestHintsFromResetActions({
|
|
103
103
|
getNullifierMembershipWitness: getNullifierMembershipWitnessResolver(oracle)
|
|
104
|
-
}, this.previousKernel.validationRequests.nullifierReadRequests, this.nullifierResetActions), await getMasterSecretKeysAndAppKeyGenerators(this.previousKernel.validationRequests.scopedKeyValidationRequestsAndGenerators, dimensions.KEY_VALIDATION, oracle), this.transientDataSquashingHints
|
|
104
|
+
}, this.previousKernel.validationRequests.nullifierReadRequests, this.nullifierResetActions), await getMasterSecretKeysAndAppKeyGenerators(this.previousKernel.validationRequests.scopedKeyValidationRequestsAndGenerators, dimensions.KEY_VALIDATION, oracle), this.transientDataSquashingHints), dimensions);
|
|
105
105
|
}
|
|
106
106
|
reduceReadRequestActions(resetActions, maxPending, maxSettled) {
|
|
107
107
|
let numPending = 0;
|
|
@@ -216,7 +216,7 @@ export class PrivateKernelResetPrivateInputsBuilder {
|
|
|
216
216
|
futureNoteHashReads.push(...this.previousKernel.validationRequests.noteHashReadRequests.getActiveItems());
|
|
217
217
|
futureNullifierReads.push(...this.previousKernel.validationRequests.nullifierReadRequests.getActiveItems());
|
|
218
218
|
}
|
|
219
|
-
const { numTransientData, hints: transientDataSquashingHints } = buildTransientDataHints(this.previousKernel.end.noteHashes, this.previousKernel.end.nullifiers, futureNoteHashReads, futureNullifierReads, this.noteHashNullifierCounterMap, this.
|
|
219
|
+
const { numTransientData, hints: transientDataSquashingHints } = buildTransientDataHints(this.previousKernel.end.noteHashes, this.previousKernel.end.nullifiers, futureNoteHashReads, futureNullifierReads, this.noteHashNullifierCounterMap, this.splitCounter);
|
|
220
220
|
if (this.nextIteration && !numTransientData) {
|
|
221
221
|
const forceResetAll = true;
|
|
222
222
|
const canClearReadRequests = noteHashWillOverflow && this.needsResetNoteHashReadRequests(forceResetAll) || nullifierWillOverflow && this.needsResetNullifierReadRequests(forceResetAll) || logsWillOverflow && this.needsResetNoteHashReadRequests(forceResetAll);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { PrivateKernelCircuitPublicInputs } from '@aztec/stdlib/kernel';
|
|
2
2
|
import type { UInt64 } from '@aztec/stdlib/types';
|
|
3
3
|
export declare function computeTxIncludeByTimestamp(previousKernel: PrivateKernelCircuitPublicInputs, maxDuration?: number): UInt64;
|
|
4
|
-
//# sourceMappingURL=
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcHV0ZV90eF9pbmNsdWRlX2J5X3RpbWVzdGFtcC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3ByaXZhdGVfa2VybmVsL2hpbnRzL2NvbXB1dGVfdHhfaW5jbHVkZV9ieV90aW1lc3RhbXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxLQUFLLEVBQUUsZ0NBQWdDLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUM3RSxPQUFPLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQXFCbEQsd0JBQWdCLDJCQUEyQixDQUN6QyxjQUFjLEVBQUUsZ0NBQWdDLEVBQ2hELFdBQVcsU0FBb0MsR0FDOUMsTUFBTSxDQStCUiJ9
|