@aztec/pxe 0.31.0 → 0.32.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dest/contract_data_oracle/index.d.ts +6 -6
  2. package/dest/contract_data_oracle/index.d.ts.map +1 -1
  3. package/dest/contract_data_oracle/index.js +1 -1
  4. package/dest/contract_data_oracle/private_functions_tree.d.ts +3 -3
  5. package/dest/contract_data_oracle/private_functions_tree.d.ts.map +1 -1
  6. package/dest/database/contracts/contract_artifact_db.d.ts +2 -2
  7. package/dest/database/contracts/contract_artifact_db.d.ts.map +1 -1
  8. package/dest/database/contracts/contract_instance_db.d.ts +2 -2
  9. package/dest/database/contracts/contract_instance_db.d.ts.map +1 -1
  10. package/dest/database/deferred_note_dao.d.ts +1 -1
  11. package/dest/database/deferred_note_dao.d.ts.map +1 -1
  12. package/dest/database/deferred_note_dao.js +2 -2
  13. package/dest/database/kv_pxe_database.d.ts +6 -6
  14. package/dest/database/kv_pxe_database.d.ts.map +1 -1
  15. package/dest/database/kv_pxe_database.js +1 -1
  16. package/dest/database/note_dao.d.ts +2 -2
  17. package/dest/database/note_dao.d.ts.map +1 -1
  18. package/dest/database/note_dao.js +13 -13
  19. package/dest/database/pxe_database.d.ts +10 -10
  20. package/dest/database/pxe_database.d.ts.map +1 -1
  21. package/dest/database/pxe_database_test_suite.d.ts +1 -1
  22. package/dest/database/pxe_database_test_suite.d.ts.map +1 -1
  23. package/dest/database/pxe_database_test_suite.js +1 -1
  24. package/dest/kernel_oracle/index.d.ts +4 -4
  25. package/dest/kernel_oracle/index.d.ts.map +1 -1
  26. package/dest/kernel_prover/hints_builder.d.ts +3 -3
  27. package/dest/kernel_prover/hints_builder.d.ts.map +1 -1
  28. package/dest/kernel_prover/kernel_prover.d.ts +4 -4
  29. package/dest/kernel_prover/kernel_prover.d.ts.map +1 -1
  30. package/dest/kernel_prover/kernel_prover.js +1 -1
  31. package/dest/kernel_prover/proof_creator.d.ts +2 -2
  32. package/dest/kernel_prover/proof_creator.d.ts.map +1 -1
  33. package/dest/kernel_prover/proving_data_oracle.d.ts +3 -3
  34. package/dest/kernel_prover/proving_data_oracle.d.ts.map +1 -1
  35. package/dest/note_processor/note_processor.d.ts +6 -6
  36. package/dest/note_processor/note_processor.d.ts.map +1 -1
  37. package/dest/note_processor/note_processor.js +3 -3
  38. package/dest/note_processor/produce_note_dao.d.ts +3 -3
  39. package/dest/note_processor/produce_note_dao.d.ts.map +1 -1
  40. package/dest/note_processor/produce_note_dao.js +1 -1
  41. package/dest/pxe_http/pxe_http_server.d.ts +1 -1
  42. package/dest/pxe_http/pxe_http_server.d.ts.map +1 -1
  43. package/dest/pxe_http/pxe_http_server.js +3 -3
  44. package/dest/pxe_service/create_pxe_service.d.ts +2 -2
  45. package/dest/pxe_service/create_pxe_service.d.ts.map +1 -1
  46. package/dest/pxe_service/pxe_service.d.ts +7 -7
  47. package/dest/pxe_service/pxe_service.d.ts.map +1 -1
  48. package/dest/pxe_service/pxe_service.js +4 -4
  49. package/dest/pxe_service/test/pxe_test_suite.d.ts +1 -1
  50. package/dest/pxe_service/test/pxe_test_suite.d.ts.map +1 -1
  51. package/dest/simulator/index.d.ts +2 -2
  52. package/dest/simulator/index.d.ts.map +1 -1
  53. package/dest/simulator_oracle/index.d.ts +7 -7
  54. package/dest/simulator_oracle/index.d.ts.map +1 -1
  55. package/dest/simulator_oracle/index.js +1 -1
  56. package/dest/synchronizer/synchronizer.d.ts +4 -4
  57. package/dest/synchronizer/synchronizer.d.ts.map +1 -1
  58. package/dest/synchronizer/synchronizer.js +2 -2
  59. package/package.json +12 -12
  60. package/src/contract_data_oracle/index.ts +9 -9
  61. package/src/contract_data_oracle/private_functions_tree.ts +3 -3
  62. package/src/database/contracts/contract_artifact_db.ts +2 -2
  63. package/src/database/contracts/contract_instance_db.ts +2 -2
  64. package/src/database/deferred_note_dao.ts +7 -7
  65. package/src/database/kv_pxe_database.ts +12 -6
  66. package/src/database/note_dao.ts +14 -14
  67. package/src/database/pxe_database.ts +11 -11
  68. package/src/database/pxe_database_test_suite.ts +3 -3
  69. package/src/kernel_oracle/index.ts +9 -9
  70. package/src/kernel_prover/hints_builder.ts +9 -9
  71. package/src/kernel_prover/kernel_prover.ts +9 -9
  72. package/src/kernel_prover/proof_creator.ts +9 -9
  73. package/src/kernel_prover/proving_data_oracle.ts +11 -11
  74. package/src/note_processor/note_processor.ts +18 -8
  75. package/src/note_processor/produce_note_dao.ts +3 -3
  76. package/src/pxe_http/pxe_http_server.ts +4 -3
  77. package/src/pxe_service/create_pxe_service.ts +2 -2
  78. package/src/pxe_service/pxe_service.ts +30 -29
  79. package/src/pxe_service/test/pxe_test_suite.ts +1 -1
  80. package/src/simulator/index.ts +2 -2
  81. package/src/simulator_oracle/index.ts +19 -19
  82. package/src/synchronizer/synchronizer.ts +15 -8
@@ -1,60 +1,61 @@
1
1
  import {
2
- AuthWitness,
3
- AztecNode,
2
+ type AuthWitness,
3
+ type AztecNode,
4
+ EncryptedTxL2Logs,
4
5
  ExtendedNote,
5
- FunctionCall,
6
- GetUnencryptedLogsResponse,
7
- KeyStore,
8
- L2Block,
9
- LogFilter,
6
+ type FunctionCall,
7
+ type GetUnencryptedLogsResponse,
8
+ type KeyStore,
9
+ type L2Block,
10
+ type LogFilter,
10
11
  MerkleTreeId,
11
- NoteFilter,
12
- PXE,
12
+ type NoteFilter,
13
+ type PXE,
13
14
  SimulationError,
14
15
  Tx,
15
- TxEffect,
16
- TxExecutionRequest,
17
- TxHash,
18
- TxL2Logs,
19
- TxReceipt,
16
+ type TxEffect,
17
+ type TxExecutionRequest,
18
+ type TxHash,
19
+ type TxReceipt,
20
+ UnencryptedTxL2Logs,
20
21
  isNoirCallStackUnresolved,
21
22
  } from '@aztec/circuit-types';
22
- import { TxPXEProcessingStats } from '@aztec/circuit-types/stats';
23
+ import { type TxPXEProcessingStats } from '@aztec/circuit-types/stats';
23
24
  import {
24
25
  AztecAddress,
25
26
  CallRequest,
26
27
  CompleteAddress,
27
28
  FunctionData,
28
- GrumpkinPrivateKey,
29
+ type GrumpkinPrivateKey,
29
30
  MAX_NON_REVERTIBLE_PUBLIC_CALL_STACK_LENGTH_PER_TX,
30
31
  MAX_REVERTIBLE_PUBLIC_CALL_STACK_LENGTH_PER_TX,
31
- PartialAddress,
32
- PrivateKernelTailCircuitPublicInputs,
33
- PublicCallRequest,
32
+ type PartialAddress,
33
+ type PrivateKernelTailCircuitPublicInputs,
34
+ type PublicCallRequest,
34
35
  computeContractClassId,
35
36
  getContractClassFromArtifact,
36
37
  } from '@aztec/circuits.js';
37
38
  import { computeCommitmentNonce, siloNullifier } from '@aztec/circuits.js/hash';
38
- import { ContractArtifact, DecodedReturn, FunctionSelector, encodeArguments } from '@aztec/foundation/abi';
39
+ import { type ContractArtifact, type DecodedReturn, FunctionSelector, encodeArguments } from '@aztec/foundation/abi';
39
40
  import { arrayNonEmptyLength, padArrayEnd } from '@aztec/foundation/collection';
40
41
  import { Fr } from '@aztec/foundation/fields';
41
42
  import { SerialQueue } from '@aztec/foundation/fifo';
42
- import { DebugLogger, createDebugLogger } from '@aztec/foundation/log';
43
+ import { type DebugLogger, createDebugLogger } from '@aztec/foundation/log';
43
44
  import { Timer } from '@aztec/foundation/timer';
44
45
  import {
45
- AcirSimulator,
46
- ExecutionResult,
46
+ type AcirSimulator,
47
+ type ExecutionResult,
47
48
  collectEncryptedLogs,
48
49
  collectEnqueuedPublicFunctionCalls,
49
50
  collectUnencryptedLogs,
50
51
  resolveOpcodeLocations,
51
52
  } from '@aztec/simulator';
52
- import { ContractClassWithId, ContractInstanceWithAddress } from '@aztec/types/contracts';
53
- import { NodeInfo } from '@aztec/types/interfaces';
53
+ import { type ContractClassWithId, type ContractInstanceWithAddress } from '@aztec/types/contracts';
54
+ import { type NodeInfo } from '@aztec/types/interfaces';
54
55
 
55
- import { PXEServiceConfig, getPackageInfo } from '../config/index.js';
56
+ import { type PXEServiceConfig, getPackageInfo } from '../config/index.js';
56
57
  import { ContractDataOracle } from '../contract_data_oracle/index.js';
57
- import { PxeDatabase } from '../database/index.js';
58
+ import { type PxeDatabase } from '../database/index.js';
58
59
  import { NoteDao } from '../database/note_dao.js';
59
60
  import { KernelOracle } from '../kernel_oracle/index.js';
60
61
  import { KernelProver } from '../kernel_prover/kernel_prover.js';
@@ -621,8 +622,8 @@ export class PXEService implements PXE {
621
622
  `Needs setup: ${publicInputs.needsSetup}, needs app logic: ${publicInputs.needsAppLogic}, needs teardown: ${publicInputs.needsTeardown}`,
622
623
  );
623
624
 
624
- const encryptedLogs = new TxL2Logs(collectEncryptedLogs(executionResult));
625
- const unencryptedLogs = new TxL2Logs(collectUnencryptedLogs(executionResult));
625
+ const encryptedLogs = new EncryptedTxL2Logs(collectEncryptedLogs(executionResult));
626
+ const unencryptedLogs = new UnencryptedTxL2Logs(collectUnencryptedLogs(executionResult));
626
627
  const enqueuedPublicFunctions = collectEnqueuedPublicFunctionCalls(executionResult);
627
628
 
628
629
  // HACK(#1639): Manually patches the ordering of the public call stack
@@ -1,5 +1,5 @@
1
1
  import {
2
- PXE,
2
+ type PXE,
3
3
  TxExecutionRequest,
4
4
  randomContractArtifact,
5
5
  randomContractInstanceWithAddress,
@@ -1,8 +1,8 @@
1
- import { AztecNode, KeyStore } from '@aztec/circuit-types';
1
+ import { type AztecNode, type KeyStore } from '@aztec/circuit-types';
2
2
  import { AcirSimulator } from '@aztec/simulator';
3
3
 
4
4
  import { ContractDataOracle } from '../contract_data_oracle/index.js';
5
- import { PxeDatabase } from '../database/pxe_database.js';
5
+ import { type PxeDatabase } from '../database/pxe_database.js';
6
6
  import { SimulatorOracle } from '../simulator_oracle/index.js';
7
7
 
8
8
  /**
@@ -1,30 +1,30 @@
1
1
  import {
2
- AztecNode,
3
- KeyStore,
4
- L2Block,
2
+ type AztecNode,
3
+ type KeyStore,
4
+ type L2Block,
5
5
  MerkleTreeId,
6
- NoteStatus,
7
- NullifierMembershipWitness,
8
- PublicDataWitness,
9
- SiblingPath,
6
+ type NoteStatus,
7
+ type NullifierMembershipWitness,
8
+ type PublicDataWitness,
9
+ type SiblingPath,
10
10
  } from '@aztec/circuit-types';
11
11
  import {
12
- AztecAddress,
13
- CompleteAddress,
14
- EthAddress,
15
- Fr,
16
- FunctionSelector,
17
- Header,
18
- L1_TO_L2_MSG_TREE_HEIGHT,
12
+ type AztecAddress,
13
+ type CompleteAddress,
14
+ type EthAddress,
15
+ type Fr,
16
+ type FunctionSelector,
17
+ type Header,
18
+ type L1_TO_L2_MSG_TREE_HEIGHT,
19
19
  } from '@aztec/circuits.js';
20
20
  import { computeL1ToL2MessageNullifier } from '@aztec/circuits.js/hash';
21
- import { FunctionArtifactWithDebugMetadata, getFunctionArtifactWithDebugMetadata } from '@aztec/foundation/abi';
21
+ import { type FunctionArtifactWithDebugMetadata, getFunctionArtifactWithDebugMetadata } from '@aztec/foundation/abi';
22
22
  import { createDebugLogger } from '@aztec/foundation/log';
23
- import { DBOracle, KeyPair, MessageLoadOracleInputs } from '@aztec/simulator';
24
- import { ContractInstance } from '@aztec/types/contracts';
23
+ import { type DBOracle, type KeyPair, MessageLoadOracleInputs } from '@aztec/simulator';
24
+ import { type ContractInstance } from '@aztec/types/contracts';
25
25
 
26
- import { ContractDataOracle } from '../contract_data_oracle/index.js';
27
- import { PxeDatabase } from '../database/index.js';
26
+ import { type ContractDataOracle } from '../contract_data_oracle/index.js';
27
+ import { type PxeDatabase } from '../database/index.js';
28
28
 
29
29
  /**
30
30
  * A data oracle that provides information needed for simulating a transaction.
@@ -1,13 +1,20 @@
1
- import { AztecNode, KeyStore, L2BlockContext, L2BlockL2Logs, MerkleTreeId, TxHash } from '@aztec/circuit-types';
2
- import { NoteProcessorCaughtUpStats } from '@aztec/circuit-types/stats';
3
- import { AztecAddress, Fr, INITIAL_L2_BLOCK_NUM, PublicKey } from '@aztec/circuits.js';
4
- import { SerialQueue } from '@aztec/foundation/fifo';
5
- import { DebugLogger, createDebugLogger } from '@aztec/foundation/log';
1
+ import {
2
+ type AztecNode,
3
+ type KeyStore,
4
+ L2BlockContext,
5
+ L2BlockL2Logs,
6
+ MerkleTreeId,
7
+ type TxHash,
8
+ } from '@aztec/circuit-types';
9
+ import { type NoteProcessorCaughtUpStats } from '@aztec/circuit-types/stats';
10
+ import { type AztecAddress, type Fr, INITIAL_L2_BLOCK_NUM, type PublicKey } from '@aztec/circuits.js';
11
+ import { type SerialQueue } from '@aztec/foundation/fifo';
12
+ import { type DebugLogger, createDebugLogger } from '@aztec/foundation/log';
6
13
  import { RunningPromise } from '@aztec/foundation/running-promise';
7
14
 
8
- import { DeferredNoteDao } from '../database/deferred_note_dao.js';
9
- import { PxeDatabase } from '../database/index.js';
10
- import { NoteDao } from '../database/note_dao.js';
15
+ import { type DeferredNoteDao } from '../database/deferred_note_dao.js';
16
+ import { type PxeDatabase } from '../database/index.js';
17
+ import { type NoteDao } from '../database/note_dao.js';
11
18
  import { NoteProcessor } from '../note_processor/index.js';
12
19
 
13
20
  /**