@aztec/world-state 0.0.1-commit.3469e52 → 0.0.1-commit.35158ae7e

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 (43) hide show
  1. package/dest/instrumentation/instrumentation.d.ts +1 -1
  2. package/dest/instrumentation/instrumentation.d.ts.map +1 -1
  3. package/dest/instrumentation/instrumentation.js +9 -2
  4. package/dest/native/fork_checkpoint.d.ts +7 -1
  5. package/dest/native/fork_checkpoint.d.ts.map +1 -1
  6. package/dest/native/fork_checkpoint.js +15 -3
  7. package/dest/native/merkle_trees_facade.d.ts +5 -5
  8. package/dest/native/merkle_trees_facade.d.ts.map +1 -1
  9. package/dest/native/merkle_trees_facade.js +9 -6
  10. package/dest/native/message.d.ts +14 -5
  11. package/dest/native/message.d.ts.map +1 -1
  12. package/dest/native/native_world_state.d.ts +7 -7
  13. package/dest/native/native_world_state.d.ts.map +1 -1
  14. package/dest/native/native_world_state.js +9 -8
  15. package/dest/native/native_world_state_instance.d.ts +3 -3
  16. package/dest/native/native_world_state_instance.d.ts.map +1 -1
  17. package/dest/native/native_world_state_instance.js +4 -4
  18. package/dest/synchronizer/config.d.ts +3 -5
  19. package/dest/synchronizer/config.d.ts.map +1 -1
  20. package/dest/synchronizer/config.js +7 -9
  21. package/dest/synchronizer/factory.d.ts +5 -4
  22. package/dest/synchronizer/factory.d.ts.map +1 -1
  23. package/dest/synchronizer/factory.js +5 -5
  24. package/dest/synchronizer/server_world_state_synchronizer.d.ts +4 -4
  25. package/dest/synchronizer/server_world_state_synchronizer.d.ts.map +1 -1
  26. package/dest/synchronizer/server_world_state_synchronizer.js +78 -20
  27. package/dest/test/utils.d.ts +6 -6
  28. package/dest/test/utils.d.ts.map +1 -1
  29. package/dest/test/utils.js +3 -3
  30. package/dest/world-state-db/merkle_tree_db.d.ts +3 -12
  31. package/dest/world-state-db/merkle_tree_db.d.ts.map +1 -1
  32. package/package.json +9 -10
  33. package/src/instrumentation/instrumentation.ts +9 -1
  34. package/src/native/fork_checkpoint.ts +19 -3
  35. package/src/native/merkle_trees_facade.ts +14 -7
  36. package/src/native/message.ts +15 -4
  37. package/src/native/native_world_state.ts +22 -10
  38. package/src/native/native_world_state_instance.ts +6 -4
  39. package/src/synchronizer/config.ts +8 -19
  40. package/src/synchronizer/factory.ts +8 -2
  41. package/src/synchronizer/server_world_state_synchronizer.ts +97 -29
  42. package/src/test/utils.ts +4 -4
  43. package/src/world-state-db/merkle_tree_db.ts +2 -12
@@ -1,14 +1,12 @@
1
1
  import { MAX_NULLIFIERS_PER_TX, MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX } from '@aztec/constants';
2
2
  import type { BlockNumber } from '@aztec/foundation/branded-types';
3
3
  import type { Fr } from '@aztec/foundation/curves/bn254';
4
- import type { IndexedTreeSnapshot, TreeSnapshot } from '@aztec/merkle-tree';
5
- import type { L2BlockNew } from '@aztec/stdlib/block';
4
+ import type { L2Block } from '@aztec/stdlib/block';
6
5
  import type {
7
6
  ForkMerkleTreeOperations,
8
7
  MerkleTreeReadOperations,
9
8
  ReadonlyWorldStateAccess,
10
9
  } from '@aztec/stdlib/interfaces/server';
11
- import type { MerkleTreeId } from '@aztec/stdlib/trees';
12
10
 
13
11
  import type { WorldStateStatusFull, WorldStateStatusSummary } from '../native/message.js';
14
12
 
@@ -31,21 +29,13 @@ export const INITIAL_NULLIFIER_TREE_SIZE = 2 * MAX_NULLIFIERS_PER_TX;
31
29
 
32
30
  export const INITIAL_PUBLIC_DATA_TREE_SIZE = 2 * MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX;
33
31
 
34
- export type TreeSnapshots = {
35
- [MerkleTreeId.NULLIFIER_TREE]: IndexedTreeSnapshot;
36
- [MerkleTreeId.NOTE_HASH_TREE]: TreeSnapshot<Fr>;
37
- [MerkleTreeId.PUBLIC_DATA_TREE]: IndexedTreeSnapshot;
38
- [MerkleTreeId.L1_TO_L2_MESSAGE_TREE]: TreeSnapshot<Fr>;
39
- [MerkleTreeId.ARCHIVE]: TreeSnapshot<Fr>;
40
- };
41
-
42
32
  export interface MerkleTreeAdminDatabase extends ForkMerkleTreeOperations, ReadonlyWorldStateAccess {
43
33
  /**
44
34
  * Handles a single L2 block (i.e. Inserts the new note hashes into the merkle tree).
45
35
  * @param block - The L2 block to handle.
46
36
  * @param l1ToL2Messages - The L1 to L2 messages for the block.
47
37
  */
48
- handleL2BlockAndMessages(block: L2BlockNew, l1ToL2Messages: Fr[]): Promise<WorldStateStatusFull>;
38
+ handleL2BlockAndMessages(block: L2Block, l1ToL2Messages: Fr[]): Promise<WorldStateStatusFull>;
49
39
 
50
40
  /**
51
41
  * Gets a handle that allows reading the latest committed state