@aztec/pxe 0.0.1-commit.e6bd8901 → 0.0.1-commit.ec7ac5448
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/bin/check_oracle_version.js +4 -4
- package/dest/block_synchronizer/block_synchronizer.d.ts +5 -3
- package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -1
- package/dest/block_synchronizer/block_synchronizer.js +17 -5
- package/dest/config/index.d.ts +2 -2
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +1 -1
- package/dest/config/package_info.js +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.d.ts +60 -31
- package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.js +201 -74
- package/dest/contract_function_simulator/ephemeral_array_service.d.ts +28 -0
- package/dest/contract_function_simulator/ephemeral_array_service.d.ts.map +1 -0
- package/dest/contract_function_simulator/ephemeral_array_service.js +78 -0
- package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts +7 -7
- package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts.map +1 -1
- package/dest/contract_function_simulator/execution_tagging_index_cache.js +19 -11
- package/dest/contract_function_simulator/index.d.ts +2 -1
- package/dest/contract_function_simulator/index.d.ts.map +1 -1
- package/dest/contract_function_simulator/index.js +1 -0
- package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts +4 -6
- package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/event_validation_request.js +8 -10
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts +1 -1
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.js +1 -1
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts +2 -2
- 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 +2 -4
- package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +4 -7
- 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 +6 -11
- package/dest/contract_function_simulator/oracle/interfaces.d.ts +62 -46
- package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/legacy_oracle_mappings.d.ts +9 -0
- package/dest/contract_function_simulator/oracle/legacy_oracle_mappings.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/legacy_oracle_mappings.js +47 -0
- package/dest/contract_function_simulator/oracle/oracle.d.ts +75 -44
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.js +310 -113
- package/dest/contract_function_simulator/oracle/private_execution.js +5 -3
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +53 -79
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +109 -89
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +124 -67
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +326 -140
- package/dest/contract_function_simulator/pick_notes.d.ts +1 -1
- package/dest/contract_function_simulator/pick_notes.d.ts.map +1 -1
- package/dest/contract_function_simulator/pick_notes.js +9 -2
- 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_contract_data_source.js +3 -0
- package/dest/contract_logging.d.ts +27 -0
- package/dest/contract_logging.d.ts.map +1 -0
- package/dest/contract_logging.js +38 -0
- package/dest/contract_sync/contract_sync_service.d.ts +44 -0
- package/dest/contract_sync/contract_sync_service.d.ts.map +1 -0
- package/dest/contract_sync/contract_sync_service.js +104 -0
- package/dest/contract_sync/helpers.d.ts +28 -0
- package/dest/contract_sync/helpers.d.ts.map +1 -0
- package/dest/contract_sync/{index.js → helpers.js} +20 -16
- package/dest/debug/pxe_debug_utils.d.ts +24 -10
- package/dest/debug/pxe_debug_utils.d.ts.map +1 -1
- package/dest/debug/pxe_debug_utils.js +28 -18
- package/dest/entrypoints/client/bundle/index.d.ts +3 -1
- package/dest/entrypoints/client/bundle/index.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/index.js +2 -0
- package/dest/entrypoints/client/bundle/utils.d.ts +2 -2
- package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/utils.js +23 -9
- package/dest/entrypoints/client/lazy/index.d.ts +3 -1
- package/dest/entrypoints/client/lazy/index.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/index.js +2 -0
- package/dest/entrypoints/client/lazy/utils.d.ts +3 -3
- package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/utils.js +24 -10
- package/dest/entrypoints/pxe_creation_options.d.ts +5 -2
- package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -1
- package/dest/entrypoints/pxe_creation_options.js +3 -1
- package/dest/entrypoints/server/index.d.ts +4 -3
- package/dest/entrypoints/server/index.d.ts.map +1 -1
- package/dest/entrypoints/server/index.js +3 -2
- package/dest/entrypoints/server/utils.d.ts +2 -2
- package/dest/entrypoints/server/utils.d.ts.map +1 -1
- package/dest/entrypoints/server/utils.js +30 -11
- package/dest/events/event_service.d.ts +5 -5
- package/dest/events/event_service.d.ts.map +1 -1
- package/dest/events/event_service.js +20 -9
- package/dest/job_coordinator/job_coordinator.d.ts +3 -2
- package/dest/job_coordinator/job_coordinator.d.ts.map +1 -1
- package/dest/job_coordinator/job_coordinator.js +3 -2
- package/dest/logs/log_service.d.ts +8 -9
- package/dest/logs/log_service.d.ts.map +1 -1
- package/dest/logs/log_service.js +38 -62
- package/dest/messages/message_context_service.d.ts +17 -0
- package/dest/messages/message_context_service.d.ts.map +1 -0
- package/dest/messages/message_context_service.js +36 -0
- package/dest/notes/note_service.d.ts +7 -8
- package/dest/notes/note_service.d.ts.map +1 -1
- package/dest/notes/note_service.js +23 -15
- package/dest/notes_filter.d.ts +24 -0
- package/dest/notes_filter.d.ts.map +1 -0
- package/dest/notes_filter.js +4 -0
- package/dest/oracle_version.d.ts +4 -3
- package/dest/oracle_version.d.ts.map +1 -1
- package/dest/oracle_version.js +20 -10
- package/dest/private_kernel/hints/compute_tx_expiration_timestamp.d.ts +4 -0
- package/dest/private_kernel/hints/compute_tx_expiration_timestamp.d.ts.map +1 -0
- package/dest/private_kernel/hints/{compute_tx_include_by_timestamp.js → compute_tx_expiration_timestamp.js} +12 -12
- package/dest/private_kernel/hints/index.d.ts +1 -1
- package/dest/private_kernel/hints/index.js +1 -1
- package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts +4 -3
- package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts.map +1 -1
- package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.js +129 -68
- package/dest/private_kernel/hints/test_utils.d.ts +122 -0
- package/dest/private_kernel/hints/test_utils.d.ts.map +1 -0
- package/dest/private_kernel/hints/test_utils.js +203 -0
- package/dest/private_kernel/private_kernel_execution_prover.d.ts +3 -2
- package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.js +21 -13
- package/dest/private_kernel/private_kernel_oracle.d.ts +8 -4
- package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_oracle.js +7 -3
- package/dest/pxe.d.ts +73 -24
- package/dest/pxe.d.ts.map +1 -1
- package/dest/pxe.js +131 -78
- package/dest/storage/address_store/address_store.d.ts +1 -1
- package/dest/storage/address_store/address_store.d.ts.map +1 -1
- package/dest/storage/address_store/address_store.js +12 -11
- package/dest/storage/anchor_block_store/anchor_block_store.d.ts +9 -1
- package/dest/storage/anchor_block_store/anchor_block_store.d.ts.map +1 -1
- package/dest/storage/anchor_block_store/anchor_block_store.js +8 -1
- package/dest/storage/capsule_store/capsule_service.d.ts +21 -0
- package/dest/storage/capsule_store/capsule_service.d.ts.map +1 -0
- package/dest/storage/capsule_store/capsule_service.js +50 -0
- package/dest/storage/capsule_store/capsule_store.d.ts +9 -9
- package/dest/storage/capsule_store/capsule_store.d.ts.map +1 -1
- package/dest/storage/capsule_store/capsule_store.js +39 -36
- package/dest/storage/capsule_store/index.d.ts +2 -1
- package/dest/storage/capsule_store/index.d.ts.map +1 -1
- package/dest/storage/capsule_store/index.js +1 -0
- package/dest/storage/contract_store/contract_store.d.ts +42 -15
- package/dest/storage/contract_store/contract_store.d.ts.map +1 -1
- package/dest/storage/contract_store/contract_store.js +157 -72
- package/dest/storage/metadata.d.ts +1 -1
- package/dest/storage/metadata.js +1 -1
- package/dest/storage/note_store/note_store.d.ts +13 -3
- package/dest/storage/note_store/note_store.d.ts.map +1 -1
- package/dest/storage/note_store/note_store.js +147 -107
- package/dest/storage/private_event_store/private_event_store.d.ts +1 -1
- package/dest/storage/private_event_store/private_event_store.d.ts.map +1 -1
- package/dest/storage/private_event_store/private_event_store.js +84 -61
- package/dest/storage/private_event_store/stored_private_event.d.ts +4 -4
- package/dest/storage/private_event_store/stored_private_event.d.ts.map +1 -1
- package/dest/storage/private_event_store/stored_private_event.js +2 -2
- package/dest/storage/tagging_store/recipient_tagging_store.d.ts +6 -6
- package/dest/storage/tagging_store/recipient_tagging_store.d.ts.map +1 -1
- package/dest/storage/tagging_store/recipient_tagging_store.js +31 -19
- package/dest/storage/tagging_store/sender_address_book_store.d.ts +1 -1
- package/dest/storage/tagging_store/sender_address_book_store.d.ts.map +1 -1
- package/dest/storage/tagging_store/sender_address_book_store.js +20 -14
- package/dest/storage/tagging_store/sender_tagging_store.d.ts +29 -28
- package/dest/storage/tagging_store/sender_tagging_store.d.ts.map +1 -1
- package/dest/storage/tagging_store/sender_tagging_store.js +233 -137
- package/dest/tagging/get_all_logs_by_tags.d.ts +4 -4
- package/dest/tagging/get_all_logs_by_tags.d.ts.map +1 -1
- package/dest/tagging/get_all_logs_by_tags.js +17 -3
- package/dest/tagging/index.d.ts +3 -3
- package/dest/tagging/index.d.ts.map +1 -1
- package/dest/tagging/index.js +1 -1
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts +5 -6
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts.map +1 -1
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.js +7 -7
- package/dest/tagging/recipient_sync/utils/find_highest_indexes.js +2 -2
- package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts +7 -8
- package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts.map +1 -1
- package/dest/tagging/recipient_sync/utils/load_logs_for_range.js +12 -11
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts +5 -9
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts.map +1 -1
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.js +13 -7
- package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts +4 -3
- package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts.map +1 -1
- package/dest/tagging/sender_sync/utils/get_status_change_of_pending.js +20 -10
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts +6 -8
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts.map +1 -1
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.js +36 -24
- package/package.json +25 -16
- package/src/bin/check_oracle_version.ts +4 -4
- package/src/block_synchronizer/block_synchronizer.ts +29 -19
- package/src/config/index.ts +1 -1
- package/src/config/package_info.ts +1 -1
- package/src/contract_function_simulator/contract_function_simulator.ts +360 -133
- package/src/contract_function_simulator/ephemeral_array_service.ts +110 -0
- package/src/contract_function_simulator/execution_tagging_index_cache.ts +19 -14
- package/src/contract_function_simulator/index.ts +1 -0
- package/src/contract_function_simulator/noir-structs/event_validation_request.ts +9 -9
- package/src/contract_function_simulator/noir-structs/log_retrieval_request.ts +1 -1
- package/src/contract_function_simulator/noir-structs/log_retrieval_response.ts +2 -5
- package/src/contract_function_simulator/noir-structs/note_validation_request.ts +4 -10
- package/src/contract_function_simulator/oracle/interfaces.ts +90 -62
- package/src/contract_function_simulator/oracle/legacy_oracle_mappings.ts +104 -0
- package/src/contract_function_simulator/oracle/oracle.ts +391 -150
- package/src/contract_function_simulator/oracle/private_execution.ts +4 -4
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +136 -187
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +544 -174
- package/src/contract_function_simulator/pick_notes.ts +9 -2
- package/src/contract_function_simulator/proxied_contract_data_source.ts +8 -1
- package/src/contract_logging.ts +52 -0
- package/src/contract_sync/contract_sync_service.ts +170 -0
- package/src/contract_sync/{index.ts → helpers.ts} +23 -25
- package/src/debug/pxe_debug_utils.ts +63 -19
- package/src/entrypoints/client/bundle/index.ts +2 -0
- package/src/entrypoints/client/bundle/utils.ts +18 -18
- package/src/entrypoints/client/lazy/index.ts +2 -0
- package/src/entrypoints/client/lazy/utils.ts +19 -18
- package/src/entrypoints/pxe_creation_options.ts +9 -1
- package/src/entrypoints/server/index.ts +3 -2
- package/src/entrypoints/server/utils.ts +24 -29
- package/src/events/event_service.ts +21 -10
- package/src/job_coordinator/job_coordinator.ts +4 -3
- package/src/logs/log_service.ts +72 -106
- package/src/messages/message_context_service.ts +44 -0
- package/src/notes/note_service.ts +24 -16
- package/src/notes_filter.ts +24 -0
- package/src/oracle_version.ts +20 -10
- package/src/private_kernel/hints/{compute_tx_include_by_timestamp.ts → compute_tx_expiration_timestamp.ts} +13 -13
- package/src/private_kernel/hints/index.ts +1 -1
- package/src/private_kernel/hints/private_kernel_reset_private_inputs_builder.ts +164 -117
- package/src/private_kernel/hints/test_utils.ts +325 -0
- package/src/private_kernel/private_kernel_execution_prover.ts +25 -15
- package/src/private_kernel/private_kernel_oracle.ts +9 -9
- package/src/pxe.ts +243 -131
- package/src/storage/address_store/address_store.ts +15 -15
- package/src/storage/anchor_block_store/anchor_block_store.ts +8 -0
- package/src/storage/capsule_store/capsule_service.ts +90 -0
- package/src/storage/capsule_store/capsule_store.ts +42 -34
- package/src/storage/capsule_store/index.ts +1 -0
- package/src/storage/contract_store/contract_store.ts +186 -76
- package/src/storage/metadata.ts +1 -1
- package/src/storage/note_store/note_store.ts +166 -132
- package/src/storage/private_event_store/private_event_store.ts +102 -81
- package/src/storage/private_event_store/stored_private_event.ts +3 -3
- package/src/storage/tagging_store/recipient_tagging_store.ts +38 -24
- package/src/storage/tagging_store/sender_address_book_store.ts +20 -14
- package/src/storage/tagging_store/sender_tagging_store.ts +287 -156
- package/src/tagging/get_all_logs_by_tags.ts +31 -7
- package/src/tagging/index.ts +2 -2
- package/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts +9 -12
- package/src/tagging/recipient_sync/utils/find_highest_indexes.ts +2 -2
- package/src/tagging/recipient_sync/utils/load_logs_for_range.ts +12 -17
- package/src/tagging/sender_sync/sync_sender_tagging_indexes.ts +25 -12
- package/src/tagging/sender_sync/utils/get_status_change_of_pending.ts +26 -11
- package/src/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.ts +30 -29
- package/dest/contract_sync/index.d.ts +0 -23
- package/dest/contract_sync/index.d.ts.map +0 -1
- package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts +0 -4
- package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts.map +0 -1
package/src/tagging/index.ts
CHANGED
|
@@ -15,5 +15,5 @@ export { UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN } from './constants.js';
|
|
|
15
15
|
export { getAllPrivateLogsByTags, getAllPublicLogsByTagsFromContract } from './get_all_logs_by_tags.js';
|
|
16
16
|
|
|
17
17
|
// Re-export tagging-related types from stdlib
|
|
18
|
-
export {
|
|
19
|
-
export { type PreTag } from '@aztec/stdlib/logs';
|
|
18
|
+
export { ExtendedDirectionalAppTaggingSecret, Tag, SiloedTag } from '@aztec/stdlib/logs';
|
|
19
|
+
export { type PreTag, type TaggingIndexRange } from '@aztec/stdlib/logs';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { BlockNumber } from '@aztec/foundation/branded-types';
|
|
2
|
-
import type {
|
|
3
|
-
import type { L2BlockHash } from '@aztec/stdlib/block';
|
|
2
|
+
import type { BlockHash } from '@aztec/stdlib/block';
|
|
4
3
|
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
5
|
-
import type {
|
|
4
|
+
import type { ExtendedDirectionalAppTaggingSecret, TxScopedL2Log } from '@aztec/stdlib/logs';
|
|
6
5
|
|
|
7
6
|
import type { RecipientTaggingStore } from '../../storage/tagging_store/recipient_tagging_store.js';
|
|
8
7
|
import { UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN } from '../constants.js';
|
|
@@ -10,19 +9,18 @@ import { findHighestIndexes } from './utils/find_highest_indexes.js';
|
|
|
10
9
|
import { loadLogsForRange } from './utils/load_logs_for_range.js';
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
|
-
* Loads private logs for
|
|
12
|
+
* Loads private logs for the app-sender-recipient triplet defined by `secret` and updates the highest aged and
|
|
14
13
|
* finalized indexes in the db. At most load logs from blocks up to and including `anchorBlockNumber`.
|
|
15
14
|
*
|
|
16
15
|
* @dev This function can be safely executed "in parallel" for other sender-recipient pairs because the data in
|
|
17
16
|
* in the tagging data provider is indexed by the secret and hence completely disjoint.
|
|
18
17
|
*/
|
|
19
18
|
export async function loadPrivateLogsForSenderRecipientPair(
|
|
20
|
-
secret:
|
|
21
|
-
app: AztecAddress,
|
|
19
|
+
secret: ExtendedDirectionalAppTaggingSecret,
|
|
22
20
|
aztecNode: AztecNode,
|
|
23
21
|
taggingStore: RecipientTaggingStore,
|
|
24
22
|
anchorBlockNumber: BlockNumber,
|
|
25
|
-
anchorBlockHash:
|
|
23
|
+
anchorBlockHash: BlockHash,
|
|
26
24
|
jobId: string,
|
|
27
25
|
): Promise<TxScopedL2Log[]> {
|
|
28
26
|
// # Explanation of how the algorithm works
|
|
@@ -30,7 +28,7 @@ export async function loadPrivateLogsForSenderRecipientPair(
|
|
|
30
28
|
// (highestAgedIndex, highestFinalizedIndex + WINDOW_LEN]
|
|
31
29
|
//
|
|
32
30
|
// highestAgedIndex is the highest index that was used in a tx that is included in a block at least
|
|
33
|
-
// `
|
|
31
|
+
// `MAX_TX_LIFETIME` seconds ago.
|
|
34
32
|
// highestFinalizedIndex is the highest index that was used in a tx that is included in a finalized block.
|
|
35
33
|
//
|
|
36
34
|
// "(" denotes an open end of the range - the index is not included in the range.
|
|
@@ -42,19 +40,19 @@ export async function loadPrivateLogsForSenderRecipientPair(
|
|
|
42
40
|
// ever appear.
|
|
43
41
|
//
|
|
44
42
|
// This relies on the "maximum inclusion timestamp" rule enforced by the kernel and rollup circuits:
|
|
45
|
-
// - a transaction's maximum inclusion timestamp is at most `
|
|
43
|
+
// - a transaction's maximum inclusion timestamp is at most `MAX_TX_LIFETIME` seconds after
|
|
46
44
|
// the timestamp of its anchor block; and
|
|
47
45
|
// - a rollup only includes transactions whose inclusion timestamp is >= the L2 block's timestamp.
|
|
48
46
|
//
|
|
49
47
|
// Suppose some device used index `I` in a transaction anchored to block `B_N` at time `N`, and that block is now at
|
|
50
|
-
// least `
|
|
48
|
+
// least `MAX_TX_LIFETIME` seconds in the past. Then there is no possibility of any *other* device
|
|
51
49
|
// trying to use an index <= `I` while anchoring to a *newer* block than `B_N` because if we were anchoring to
|
|
52
50
|
// a newer block than `B_N` then we would already have seen the log with index `I` and hence the device would have
|
|
53
51
|
// chosen a larger index.
|
|
54
52
|
// If that *other* device would anchor to a block older than `B_N` then that tx could never be included in a block
|
|
55
53
|
// because it would already have been expired.
|
|
56
54
|
//
|
|
57
|
-
// Therefore, once we see that index `I` has been used in a block that is at least `
|
|
55
|
+
// Therefore, once we see that index `I` has been used in a block that is at least `MAX_TX_LIFETIME`
|
|
58
56
|
// seconds old, we can safely stop syncing logs for all indexes <= `I` and set highestAgedIndex = `I`.
|
|
59
57
|
//
|
|
60
58
|
// ## Explanation of the upper bound `highestFinalizedIndex + WINDOW_LEN`
|
|
@@ -96,7 +94,6 @@ export async function loadPrivateLogsForSenderRecipientPair(
|
|
|
96
94
|
// Get private logs with their block timestamps and corresponding tagging indexes
|
|
97
95
|
const privateLogsWithIndexes = await loadLogsForRange(
|
|
98
96
|
secret,
|
|
99
|
-
app,
|
|
100
97
|
aztecNode,
|
|
101
98
|
start,
|
|
102
99
|
end,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MAX_TX_LIFETIME } from '@aztec/constants';
|
|
2
2
|
import type { TxScopedL2Log } from '@aztec/stdlib/logs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -16,7 +16,7 @@ export function findHighestIndexes(
|
|
|
16
16
|
const ageInSeconds = currentTimestamp - log.blockTimestamp;
|
|
17
17
|
|
|
18
18
|
if (
|
|
19
|
-
ageInSeconds >= BigInt(
|
|
19
|
+
ageInSeconds >= BigInt(MAX_TX_LIFETIME) &&
|
|
20
20
|
(highestAgedIndex === undefined || taggingIndex > highestAgedIndex)
|
|
21
21
|
) {
|
|
22
22
|
highestAgedIndex = taggingIndex;
|
|
@@ -1,32 +1,27 @@
|
|
|
1
1
|
import type { BlockNumber } from '@aztec/foundation/branded-types';
|
|
2
|
-
import type {
|
|
3
|
-
import type { L2BlockHash } from '@aztec/stdlib/block';
|
|
2
|
+
import type { BlockHash } from '@aztec/stdlib/block';
|
|
4
3
|
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
5
|
-
import type {
|
|
6
|
-
import { SiloedTag
|
|
4
|
+
import type { ExtendedDirectionalAppTaggingSecret, TxScopedL2Log } from '@aztec/stdlib/logs';
|
|
5
|
+
import { SiloedTag } from '@aztec/stdlib/logs';
|
|
7
6
|
|
|
8
7
|
import { getAllPrivateLogsByTags } from '../../get_all_logs_by_tags.js';
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
|
-
* Gets private logs with their corresponding block timestamps and tagging indexes for the given index range
|
|
12
|
-
* `
|
|
13
|
-
* exclusive.
|
|
10
|
+
* Gets private logs with their corresponding block timestamps and tagging indexes for the given index range and
|
|
11
|
+
* `extendedSecret`. At most load logs from blocks up to and including `anchorBlockNumber`. `start` is inclusive and
|
|
12
|
+
* `end` is exclusive.
|
|
14
13
|
*/
|
|
15
14
|
export async function loadLogsForRange(
|
|
16
|
-
|
|
17
|
-
app: AztecAddress,
|
|
15
|
+
extendedSecret: ExtendedDirectionalAppTaggingSecret,
|
|
18
16
|
aztecNode: AztecNode,
|
|
19
17
|
start: number,
|
|
20
18
|
end: number,
|
|
21
19
|
anchorBlockNumber: BlockNumber,
|
|
22
|
-
anchorBlockHash:
|
|
20
|
+
anchorBlockHash: BlockHash,
|
|
23
21
|
): Promise<Array<{ log: TxScopedL2Log; taggingIndex: number }>> {
|
|
24
|
-
// Derive tags for the window
|
|
25
|
-
const
|
|
26
|
-
.
|
|
27
|
-
.map((_, i) => ({ secret, index: start + i }));
|
|
28
|
-
const siloedTags = await Promise.all(preTags.map(preTag => Tag.compute(preTag))).then(tags =>
|
|
29
|
-
Promise.all(tags.map(tag => SiloedTag.compute(tag, app))),
|
|
22
|
+
// Derive siloed tags for the window
|
|
23
|
+
const siloedTags = await Promise.all(
|
|
24
|
+
Array.from({ length: end - start }, (_, i) => SiloedTag.compute({ extendedSecret, index: start + i })),
|
|
30
25
|
);
|
|
31
26
|
|
|
32
27
|
// We use the utility function below to retrieve all logs for the tags across all pages, so we don't need to handle
|
|
@@ -37,7 +32,7 @@ export async function loadLogsForRange(
|
|
|
37
32
|
const logsWithIndexes: Array<{ log: TxScopedL2Log; taggingIndex: number }> = [];
|
|
38
33
|
for (let i = 0; i < logs.length; i++) {
|
|
39
34
|
const logsForTag = logs[i];
|
|
40
|
-
const taggingIndex =
|
|
35
|
+
const taggingIndex = start + i;
|
|
41
36
|
for (const log of logsForTag) {
|
|
42
37
|
if (log.blockNumber <= anchorBlockNumber) {
|
|
43
38
|
logsWithIndexes.push({ log, taggingIndex });
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { L2BlockHash } from '@aztec/stdlib/block';
|
|
1
|
+
import type { BlockHash } from '@aztec/stdlib/block';
|
|
3
2
|
import type { AztecNode } from '@aztec/stdlib/interfaces/server';
|
|
4
|
-
import type {
|
|
3
|
+
import type { ExtendedDirectionalAppTaggingSecret } from '@aztec/stdlib/logs';
|
|
5
4
|
|
|
6
5
|
import type { SenderTaggingStore } from '../../storage/tagging_store/sender_tagging_store.js';
|
|
7
6
|
import { UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN } from '../constants.js';
|
|
@@ -11,11 +10,8 @@ import { loadAndStoreNewTaggingIndexes } from './utils/load_and_store_new_taggin
|
|
|
11
10
|
/**
|
|
12
11
|
* Syncs tagging indexes. This function needs to be called whenever a private log is being sent.
|
|
13
12
|
*
|
|
14
|
-
* @param secret - The secret that's unique for (sender, recipient,
|
|
13
|
+
* @param secret - The secret that's unique for (sender, recipient, app) tuple while the direction of
|
|
15
14
|
* sender -> recipient matters.
|
|
16
|
-
* @param app - The address of the contract that the logs are tagged for. Needs to be provided because we perform
|
|
17
|
-
* second round of siloing in this function which is necessary because kernels do it as well (they silo first field
|
|
18
|
-
* of the private log which corresponds to the tag).
|
|
19
15
|
* @remarks When syncing the indexes as sender we don't care about the log contents - we only care about the highest
|
|
20
16
|
* pending and highest finalized indexes as that guides the next index choice when sending a log. The next index choice
|
|
21
17
|
* is simply the highest pending index plus one (or finalized if pending is undefined).
|
|
@@ -23,11 +19,10 @@ import { loadAndStoreNewTaggingIndexes } from './utils/load_and_store_new_taggin
|
|
|
23
19
|
* updates its status accordingly.
|
|
24
20
|
*/
|
|
25
21
|
export async function syncSenderTaggingIndexes(
|
|
26
|
-
secret:
|
|
27
|
-
app: AztecAddress,
|
|
22
|
+
secret: ExtendedDirectionalAppTaggingSecret,
|
|
28
23
|
aztecNode: AztecNode,
|
|
29
24
|
taggingStore: SenderTaggingStore,
|
|
30
|
-
anchorBlockHash:
|
|
25
|
+
anchorBlockHash: BlockHash,
|
|
31
26
|
jobId: string,
|
|
32
27
|
): Promise<void> {
|
|
33
28
|
// # Explanation of how syncing works
|
|
@@ -59,7 +54,7 @@ export async function syncSenderTaggingIndexes(
|
|
|
59
54
|
while (true) {
|
|
60
55
|
// Load and store indexes for the current window. These indexes may already exist in the database if txs using
|
|
61
56
|
// them were previously sent from this PXE. Any duplicates are handled by the tagging data provider.
|
|
62
|
-
await loadAndStoreNewTaggingIndexes(secret,
|
|
57
|
+
await loadAndStoreNewTaggingIndexes(secret, start, end, aztecNode, taggingStore, anchorBlockHash, jobId);
|
|
63
58
|
|
|
64
59
|
// Retrieve all indexes within the current window from storage and update their status accordingly.
|
|
65
60
|
const pendingTxHashes = await taggingStore.getTxHashesOfPendingIndexes(secret, start, end, jobId);
|
|
@@ -67,11 +62,29 @@ export async function syncSenderTaggingIndexes(
|
|
|
67
62
|
break;
|
|
68
63
|
}
|
|
69
64
|
|
|
70
|
-
const { txHashesToFinalize, txHashesToDrop } = await getStatusChangeOfPending(
|
|
65
|
+
const { txHashesToFinalize, txHashesToDrop, txHashesWithExecutionReverted } = await getStatusChangeOfPending(
|
|
66
|
+
pendingTxHashes,
|
|
67
|
+
aztecNode,
|
|
68
|
+
);
|
|
71
69
|
|
|
72
70
|
await taggingStore.dropPendingIndexes(txHashesToDrop, jobId);
|
|
73
71
|
await taggingStore.finalizePendingIndexes(txHashesToFinalize, jobId);
|
|
74
72
|
|
|
73
|
+
if (txHashesWithExecutionReverted.length > 0) {
|
|
74
|
+
const indexedTxEffects = await Promise.all(
|
|
75
|
+
txHashesWithExecutionReverted.map(txHash => aztecNode.getTxEffect(txHash)),
|
|
76
|
+
);
|
|
77
|
+
for (const indexedTxEffect of indexedTxEffects) {
|
|
78
|
+
if (indexedTxEffect === undefined) {
|
|
79
|
+
throw new Error(
|
|
80
|
+
'TxEffect not found for execution-reverted tx. This is either a bug or a reorg has occurred.',
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
await taggingStore.finalizePendingIndexesOfAPartiallyRevertedTx(indexedTxEffect.data, jobId);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
75
88
|
// We check if the finalized index has been updated.
|
|
76
89
|
newFinalizedIndex = await taggingStore.getLastFinalizedIndex(secret, jobId);
|
|
77
90
|
if (previousFinalizedIndex !== newFinalizedIndex) {
|
|
@@ -2,35 +2,50 @@ import type { AztecNode } from '@aztec/stdlib/interfaces/server';
|
|
|
2
2
|
import { TxHash, TxStatus } from '@aztec/stdlib/tx';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Based on receipts obtained from `aztecNode` returns which pending transactions changed their status to finalized
|
|
6
|
-
* dropped.
|
|
5
|
+
* Based on receipts obtained from `aztecNode` returns which pending transactions changed their status to finalized,
|
|
6
|
+
* dropped, or execution-reverted (but mined).
|
|
7
7
|
*/
|
|
8
8
|
export async function getStatusChangeOfPending(
|
|
9
9
|
pending: TxHash[],
|
|
10
10
|
aztecNode: AztecNode,
|
|
11
|
-
): Promise<{
|
|
11
|
+
): Promise<{
|
|
12
|
+
txHashesToFinalize: TxHash[];
|
|
13
|
+
txHashesToDrop: TxHash[];
|
|
14
|
+
txHashesWithExecutionReverted: TxHash[];
|
|
15
|
+
}> {
|
|
12
16
|
// Get receipts for all pending tx hashes.
|
|
13
17
|
const receipts = await Promise.all(pending.map(pendingTxHash => aztecNode.getTxReceipt(pendingTxHash)));
|
|
14
18
|
|
|
15
19
|
const txHashesToFinalize: TxHash[] = [];
|
|
16
20
|
const txHashesToDrop: TxHash[] = [];
|
|
21
|
+
const txHashesWithExecutionReverted: TxHash[] = [];
|
|
17
22
|
|
|
18
23
|
for (let i = 0; i < receipts.length; i++) {
|
|
19
24
|
const receipt = receipts[i];
|
|
20
25
|
const txHash = pending[i];
|
|
21
26
|
|
|
22
|
-
if (receipt.status === TxStatus.FINALIZED
|
|
23
|
-
// Tx has been included in a block and the corresponding block is finalized
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
if (receipt.status === TxStatus.FINALIZED) {
|
|
28
|
+
// Tx has been included in a block and the corresponding block is finalized
|
|
29
|
+
if (receipt.hasExecutionSucceeded()) {
|
|
30
|
+
// No part of execution reverted - we just finalize all the indexes.
|
|
31
|
+
txHashesToFinalize.push(txHash);
|
|
32
|
+
} else if (receipt.hasExecutionReverted()) {
|
|
33
|
+
// Tx was mined but execution reverted (app logic, teardown, or both). Some logs from the non-revertible
|
|
34
|
+
// phase may still be onchain. We check which tags made it onchain and finalize those; drop the rest.
|
|
35
|
+
txHashesWithExecutionReverted.push(txHash);
|
|
36
|
+
} else {
|
|
37
|
+
// Defensive check - this branch should never be triggered
|
|
38
|
+
throw new Error(
|
|
39
|
+
'Both hasExecutionSucceeded and hasExecutionReverted on the receipt returned false. This should never happen and it implies a bug. Please open an issue.',
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
} else if (receipt.isDropped()) {
|
|
43
|
+
// Tx was dropped from the mempool --> we drop the corresponding pending indexes.
|
|
29
44
|
txHashesToDrop.push(txHash);
|
|
30
45
|
} else {
|
|
31
46
|
// Tx is still pending, not yet finalized, or was mined successfully but not yet finalized --> we don't do anything.
|
|
32
47
|
}
|
|
33
48
|
}
|
|
34
49
|
|
|
35
|
-
return { txHashesToFinalize, txHashesToDrop };
|
|
50
|
+
return { txHashesToFinalize, txHashesToDrop, txHashesWithExecutionReverted };
|
|
36
51
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { L2BlockHash } from '@aztec/stdlib/block';
|
|
1
|
+
import type { BlockHash } from '@aztec/stdlib/block';
|
|
3
2
|
import type { AztecNode } from '@aztec/stdlib/interfaces/server';
|
|
4
|
-
import type {
|
|
5
|
-
import { SiloedTag
|
|
3
|
+
import type { ExtendedDirectionalAppTaggingSecret } from '@aztec/stdlib/logs';
|
|
4
|
+
import { SiloedTag } from '@aztec/stdlib/logs';
|
|
6
5
|
import { TxHash } from '@aztec/stdlib/tx';
|
|
7
6
|
|
|
8
7
|
import type { SenderTaggingStore } from '../../../storage/tagging_store/sender_tagging_store.js';
|
|
@@ -12,41 +11,37 @@ import { getAllPrivateLogsByTags } from '../../get_all_logs_by_tags.js';
|
|
|
12
11
|
* Loads tagging indexes from the Aztec node and stores them in the tagging data provider.
|
|
13
12
|
* @remarks This function is one of two places by which a pending index can get to the tagging data provider. The other
|
|
14
13
|
* place is when a tx is being sent from this PXE.
|
|
15
|
-
* @param
|
|
16
|
-
* @param app - The address of the contract that the logs are tagged for. Used for siloing tags to match
|
|
17
|
-
* kernel circuit behavior.
|
|
14
|
+
* @param extendedSecret - The extended directional app tagging secret that's unique for (sender, recipient, app) tuple.
|
|
18
15
|
* @param start - The starting index (inclusive) of the window to process.
|
|
19
16
|
* @param end - The ending index (exclusive) of the window to process.
|
|
20
17
|
* @param aztecNode - The Aztec node instance to query for logs.
|
|
21
18
|
* @param taggingStore - The data provider to store pending indexes.
|
|
19
|
+
* @param anchorBlockHash - Hash of a block to use as reference block when querying node.
|
|
22
20
|
* @param jobId - Job identifier, used to keep writes in-memory until they can be persisted in a data integrity
|
|
23
21
|
* preserving way.
|
|
24
22
|
*/
|
|
25
23
|
export async function loadAndStoreNewTaggingIndexes(
|
|
26
|
-
|
|
27
|
-
app: AztecAddress,
|
|
24
|
+
extendedSecret: ExtendedDirectionalAppTaggingSecret,
|
|
28
25
|
start: number,
|
|
29
26
|
end: number,
|
|
30
27
|
aztecNode: AztecNode,
|
|
31
28
|
taggingStore: SenderTaggingStore,
|
|
32
|
-
anchorBlockHash:
|
|
29
|
+
anchorBlockHash: BlockHash,
|
|
33
30
|
jobId: string,
|
|
34
31
|
) {
|
|
35
32
|
// We compute the tags for the current window of indexes
|
|
36
|
-
const preTagsForWindow: PreTag[] = Array(end - start)
|
|
37
|
-
.fill(0)
|
|
38
|
-
.map((_, i) => ({ secret, index: start + i }));
|
|
39
33
|
const siloedTagsForWindow = await Promise.all(
|
|
40
|
-
|
|
34
|
+
Array.from({ length: end - start }, (_, i) => SiloedTag.compute({ extendedSecret, index: start + i })),
|
|
41
35
|
);
|
|
42
36
|
|
|
43
37
|
const txsForTags = await getTxsContainingTags(siloedTagsForWindow, aztecNode, anchorBlockHash);
|
|
44
|
-
const
|
|
38
|
+
const txIndexesMap = getTxIndexesMap(txsForTags, start, siloedTagsForWindow.length);
|
|
45
39
|
|
|
46
|
-
// Now we iterate over the map,
|
|
47
|
-
for (const [txHashStr,
|
|
40
|
+
// Now we iterate over the map, construct the tagging index ranges and store them in the db.
|
|
41
|
+
for (const [txHashStr, indexes] of txIndexesMap.entries()) {
|
|
48
42
|
const txHash = TxHash.fromString(txHashStr);
|
|
49
|
-
|
|
43
|
+
const ranges = [{ extendedSecret, lowestIndex: Math.min(...indexes), highestIndex: Math.max(...indexes) }];
|
|
44
|
+
await taggingStore.storePendingIndexes(ranges, txHash, jobId);
|
|
50
45
|
}
|
|
51
46
|
}
|
|
52
47
|
|
|
@@ -55,7 +50,7 @@ export async function loadAndStoreNewTaggingIndexes(
|
|
|
55
50
|
async function getTxsContainingTags(
|
|
56
51
|
tags: SiloedTag[],
|
|
57
52
|
aztecNode: AztecNode,
|
|
58
|
-
anchorBlockHash:
|
|
53
|
+
anchorBlockHash: BlockHash,
|
|
59
54
|
): Promise<TxHash[][]> {
|
|
60
55
|
// We use the utility function below to retrieve all logs for the tags across all pages, so we don't need to handle
|
|
61
56
|
// pagination here.
|
|
@@ -63,22 +58,28 @@ async function getTxsContainingTags(
|
|
|
63
58
|
return allLogs.map(logs => logs.map(log => log.txHash));
|
|
64
59
|
}
|
|
65
60
|
|
|
66
|
-
// Returns a map of txHash to
|
|
67
|
-
function
|
|
68
|
-
if (txHashesForTags.length !==
|
|
69
|
-
throw new Error(
|
|
70
|
-
`Number of tx hashes arrays does not match number of pre-tags. ${txHashesForTags.length} !== ${preTagsForWindow.length}`,
|
|
71
|
-
);
|
|
61
|
+
// Returns a map of txHash to all indexes for that txHash.
|
|
62
|
+
function getTxIndexesMap(txHashesForTags: TxHash[][], start: number, count: number): Map<string, number[]> {
|
|
63
|
+
if (txHashesForTags.length !== count) {
|
|
64
|
+
throw new Error(`Number of tx hashes arrays does not match number of tags. ${txHashesForTags.length} !== ${count}`);
|
|
72
65
|
}
|
|
73
66
|
|
|
74
|
-
const
|
|
67
|
+
const indexesMap = new Map<string, number[]>();
|
|
68
|
+
// Iterate over indexes
|
|
75
69
|
for (let i = 0; i < txHashesForTags.length; i++) {
|
|
76
|
-
const taggingIndex =
|
|
70
|
+
const taggingIndex = start + i;
|
|
77
71
|
const txHashesForTag = txHashesForTags[i];
|
|
72
|
+
// iterate over tx hashes that used that index (tag)
|
|
78
73
|
for (const txHash of txHashesForTag) {
|
|
79
74
|
const key = txHash.toString();
|
|
80
|
-
|
|
75
|
+
const existing = indexesMap.get(key);
|
|
76
|
+
// Add the index to the tx's indexes
|
|
77
|
+
if (existing) {
|
|
78
|
+
existing.push(taggingIndex);
|
|
79
|
+
} else {
|
|
80
|
+
indexesMap.set(key, [taggingIndex]);
|
|
81
|
+
}
|
|
81
82
|
}
|
|
82
83
|
}
|
|
83
|
-
return
|
|
84
|
+
return indexesMap;
|
|
84
85
|
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { FunctionCall, FunctionSelector } from '@aztec/stdlib/abi';
|
|
2
|
-
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
3
|
-
import type { ContractInstance } from '@aztec/stdlib/contract';
|
|
4
|
-
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
5
|
-
import type { BlockHeader } from '@aztec/stdlib/tx';
|
|
6
|
-
import type { ContractStore } from '../storage/contract_store/contract_store.js';
|
|
7
|
-
/**
|
|
8
|
-
* Read the current class id of a contract from the execution data provider or AztecNode. If not found, class id
|
|
9
|
-
* from the instance is used.
|
|
10
|
-
* @param contractAddress - The address of the contract to read the class id for.
|
|
11
|
-
* @param instance - The instance of the contract.
|
|
12
|
-
* @param aztecNode - The Aztec node to query for storage.
|
|
13
|
-
* @param header - The header of the block at which to load the DelayedPublicMutable storing the class id.
|
|
14
|
-
* @returns The current class id.
|
|
15
|
-
*/
|
|
16
|
-
export declare function readCurrentClassId(contractAddress: AztecAddress, instance: ContractInstance, aztecNode: AztecNode, header: BlockHeader): Promise<import("@aztec/foundation/schemas").Fr>;
|
|
17
|
-
export declare function syncState(contractAddress: AztecAddress, contractStore: ContractStore, functionToInvokeAfterSync: FunctionSelector | null, utilityExecutor: (privateSyncCall: FunctionCall) => Promise<any>): Promise<any>;
|
|
18
|
-
/**
|
|
19
|
-
* Ensures the contract's private state is synchronized and that the PXE holds the current class artifact for
|
|
20
|
-
* the contract.
|
|
21
|
-
*/
|
|
22
|
-
export declare function ensureContractSynced(contractAddress: AztecAddress, functionToInvokeAfterSync: FunctionSelector | null, utilityExecutor: (call: FunctionCall) => Promise<any>, aztecNode: AztecNode, contractStore: ContractStore, header: BlockHeader): Promise<void>;
|
|
23
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb250cmFjdF9zeW5jL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQ3hFLE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBRWhFLE9BQU8sS0FBSyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFFL0QsT0FBTyxLQUFLLEVBQUUsU0FBUyxFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFDakUsT0FBTyxLQUFLLEVBQUUsV0FBVyxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFFcEQsT0FBTyxLQUFLLEVBQUUsYUFBYSxFQUFFLE1BQU0sNkNBQTZDLENBQUM7QUFFakY7Ozs7Ozs7O0dBUUc7QUFDSCx3QkFBc0Isa0JBQWtCLENBQ3RDLGVBQWUsRUFBRSxZQUFZLEVBQzdCLFFBQVEsRUFBRSxnQkFBZ0IsRUFDMUIsU0FBUyxFQUFFLFNBQVMsRUFDcEIsTUFBTSxFQUFFLFdBQVcsbURBY3BCO0FBRUQsd0JBQXNCLFNBQVMsQ0FDN0IsZUFBZSxFQUFFLFlBQVksRUFDN0IsYUFBYSxFQUFFLGFBQWEsRUFDNUIseUJBQXlCLEVBQUUsZ0JBQWdCLEdBQUcsSUFBSSxFQUNsRCxlQUFlLEVBQUUsQ0FBQyxlQUFlLEVBQUUsWUFBWSxLQUFLLE9BQU8sQ0FBQyxHQUFHLENBQUMsZ0JBYWpFO0FBMEJEOzs7R0FHRztBQUNILHdCQUFzQixvQkFBb0IsQ0FDeEMsZUFBZSxFQUFFLFlBQVksRUFDN0IseUJBQXlCLEVBQUUsZ0JBQWdCLEdBQUcsSUFBSSxFQUNsRCxlQUFlLEVBQUUsQ0FBQyxJQUFJLEVBQUUsWUFBWSxLQUFLLE9BQU8sQ0FBQyxHQUFHLENBQUMsRUFDckQsU0FBUyxFQUFFLFNBQVMsRUFDcEIsYUFBYSxFQUFFLGFBQWEsRUFDNUIsTUFBTSxFQUFFLFdBQVcsR0FDbEIsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUtmIn0=
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contract_sync/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAEjF;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CACtC,eAAe,EAAE,YAAY,EAC7B,QAAQ,EAAE,gBAAgB,EAC1B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,WAAW,mDAcpB;AAED,wBAAsB,SAAS,CAC7B,eAAe,EAAE,YAAY,EAC7B,aAAa,EAAE,aAAa,EAC5B,yBAAyB,EAAE,gBAAgB,GAAG,IAAI,EAClD,eAAe,EAAE,CAAC,eAAe,EAAE,YAAY,KAAK,OAAO,CAAC,GAAG,CAAC,gBAajE;AA0BD;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,eAAe,EAAE,YAAY,EAC7B,yBAAyB,EAAE,gBAAgB,GAAG,IAAI,EAClD,eAAe,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC,GAAG,CAAC,EACrD,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,IAAI,CAAC,CAKf"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { PrivateKernelCircuitPublicInputs } from '@aztec/stdlib/kernel';
|
|
2
|
-
import type { UInt64 } from '@aztec/stdlib/types';
|
|
3
|
-
export declare function computeTxIncludeByTimestamp(previousKernel: PrivateKernelCircuitPublicInputs, maxDuration?: number): UInt64;
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcHV0ZV90eF9pbmNsdWRlX2J5X3RpbWVzdGFtcC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3ByaXZhdGVfa2VybmVsL2hpbnRzL2NvbXB1dGVfdHhfaW5jbHVkZV9ieV90aW1lc3RhbXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxLQUFLLEVBQUUsZ0NBQWdDLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUM3RSxPQUFPLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQXFCbEQsd0JBQWdCLDJCQUEyQixDQUN6QyxjQUFjLEVBQUUsZ0NBQWdDLEVBQ2hELFdBQVcsU0FBb0MsR0FDOUMsTUFBTSxDQStCUiJ9
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compute_tx_include_by_timestamp.d.ts","sourceRoot":"","sources":["../../../src/private_kernel/hints/compute_tx_include_by_timestamp.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAqBlD,wBAAgB,2BAA2B,CACzC,cAAc,EAAE,gCAAgC,EAChD,WAAW,SAAoC,GAC9C,MAAM,CA+BR"}
|