@aztec/world-state 0.0.0-test.1 → 0.0.1-commit.03f7ef2
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/index.d.ts +1 -1
- package/dest/instrumentation/instrumentation.d.ts +6 -4
- package/dest/instrumentation/instrumentation.d.ts.map +1 -1
- package/dest/instrumentation/instrumentation.js +16 -8
- package/dest/native/bench_metrics.d.ts +23 -0
- package/dest/native/bench_metrics.d.ts.map +1 -0
- package/dest/native/bench_metrics.js +81 -0
- package/dest/native/fork_checkpoint.d.ts +1 -1
- package/dest/native/fork_checkpoint.d.ts.map +1 -1
- package/dest/native/index.d.ts +1 -1
- package/dest/native/merkle_trees_facade.d.ts +19 -7
- package/dest/native/merkle_trees_facade.d.ts.map +1 -1
- package/dest/native/merkle_trees_facade.js +62 -11
- package/dest/native/message.d.ts +72 -51
- package/dest/native/message.d.ts.map +1 -1
- package/dest/native/message.js +61 -61
- package/dest/native/native_world_state.d.ts +28 -20
- package/dest/native/native_world_state.d.ts.map +1 -1
- package/dest/native/native_world_state.js +97 -36
- package/dest/native/native_world_state_instance.d.ts +20 -4
- package/dest/native/native_world_state_instance.d.ts.map +1 -1
- package/dest/native/native_world_state_instance.js +42 -3
- package/dest/native/world_state_ops_queue.d.ts +1 -1
- package/dest/native/world_state_ops_queue.d.ts.map +1 -1
- package/dest/native/world_state_ops_queue.js +1 -1
- package/dest/synchronizer/config.d.ts +12 -2
- package/dest/synchronizer/config.d.ts.map +1 -1
- package/dest/synchronizer/config.js +26 -1
- package/dest/synchronizer/errors.d.ts +4 -0
- package/dest/synchronizer/errors.d.ts.map +1 -0
- package/dest/synchronizer/errors.js +5 -0
- package/dest/synchronizer/factory.d.ts +9 -2
- package/dest/synchronizer/factory.d.ts.map +1 -1
- package/dest/synchronizer/factory.js +9 -4
- package/dest/synchronizer/index.d.ts +1 -1
- package/dest/synchronizer/server_world_state_synchronizer.d.ts +20 -29
- package/dest/synchronizer/server_world_state_synchronizer.d.ts.map +1 -1
- package/dest/synchronizer/server_world_state_synchronizer.js +94 -70
- package/dest/test/index.d.ts +1 -1
- package/dest/test/utils.d.ts +16 -9
- package/dest/test/utils.d.ts.map +1 -1
- package/dest/test/utils.js +56 -49
- package/dest/testing.d.ts +3 -3
- package/dest/testing.d.ts.map +1 -1
- package/dest/testing.js +7 -11
- package/dest/world-state-db/index.d.ts +1 -1
- package/dest/world-state-db/merkle_tree_db.d.ts +12 -9
- package/dest/world-state-db/merkle_tree_db.d.ts.map +1 -1
- package/package.json +24 -24
- package/src/instrumentation/instrumentation.ts +22 -10
- package/src/native/bench_metrics.ts +91 -0
- package/src/native/merkle_trees_facade.ts +73 -17
- package/src/native/message.ts +92 -73
- package/src/native/native_world_state.ts +118 -50
- package/src/native/native_world_state_instance.ts +59 -8
- package/src/native/world_state_ops_queue.ts +1 -1
- package/src/synchronizer/config.ts +47 -2
- package/src/synchronizer/errors.ts +5 -0
- package/src/synchronizer/factory.ts +31 -8
- package/src/synchronizer/server_world_state_synchronizer.ts +132 -93
- package/src/test/utils.ts +94 -84
- package/src/testing.ts +4 -8
- package/src/world-state-db/merkle_tree_db.ts +12 -8
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { MAX_NULLIFIERS_PER_TX, MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX } from '@aztec/constants';
|
|
2
|
-
import type {
|
|
2
|
+
import type { BlockNumber } from '@aztec/foundation/branded-types';
|
|
3
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
4
|
import type { IndexedTreeSnapshot, TreeSnapshot } from '@aztec/merkle-tree';
|
|
4
|
-
import type {
|
|
5
|
+
import type { L2BlockNew } from '@aztec/stdlib/block';
|
|
5
6
|
import type { ForkMerkleTreeOperations, MerkleTreeReadOperations } from '@aztec/stdlib/interfaces/server';
|
|
6
7
|
import type { MerkleTreeId } from '@aztec/stdlib/trees';
|
|
7
8
|
|
|
@@ -40,7 +41,7 @@ export interface MerkleTreeAdminDatabase extends ForkMerkleTreeOperations {
|
|
|
40
41
|
* @param block - The L2 block to handle.
|
|
41
42
|
* @param l1ToL2Messages - The L1 to L2 messages for the block.
|
|
42
43
|
*/
|
|
43
|
-
handleL2BlockAndMessages(block:
|
|
44
|
+
handleL2BlockAndMessages(block: L2BlockNew, l1ToL2Messages: Fr[]): Promise<WorldStateStatusFull>;
|
|
44
45
|
|
|
45
46
|
/**
|
|
46
47
|
* Gets a handle that allows reading the latest committed state
|
|
@@ -52,21 +53,21 @@ export interface MerkleTreeAdminDatabase extends ForkMerkleTreeOperations {
|
|
|
52
53
|
* @param toBlockNumber The block number of the new oldest historical block
|
|
53
54
|
* @returns The new WorldStateStatus
|
|
54
55
|
*/
|
|
55
|
-
removeHistoricalBlocks(toBlockNumber:
|
|
56
|
+
removeHistoricalBlocks(toBlockNumber: BlockNumber): Promise<WorldStateStatusFull>;
|
|
56
57
|
|
|
57
58
|
/**
|
|
58
59
|
* Removes all pending blocks down to but not including the given block number
|
|
59
60
|
* @param toBlockNumber The block number of the new tip of the pending chain,
|
|
60
61
|
* @returns The new WorldStateStatus
|
|
61
62
|
*/
|
|
62
|
-
unwindBlocks(toBlockNumber:
|
|
63
|
+
unwindBlocks(toBlockNumber: BlockNumber): Promise<WorldStateStatusFull>;
|
|
63
64
|
|
|
64
65
|
/**
|
|
65
|
-
* Advances the
|
|
66
|
-
* @param toBlockNumber The block number that is now the tip of the
|
|
66
|
+
* Advances the finalized block number to be the number provided
|
|
67
|
+
* @param toBlockNumber The block number that is now the tip of the finalized chain
|
|
67
68
|
* @returns The new WorldStateStatus
|
|
68
69
|
*/
|
|
69
|
-
|
|
70
|
+
setFinalized(toBlockNumber: BlockNumber): Promise<WorldStateStatusSummary>;
|
|
70
71
|
|
|
71
72
|
/**
|
|
72
73
|
* Gets the current status summary of the database.
|
|
@@ -76,4 +77,7 @@ export interface MerkleTreeAdminDatabase extends ForkMerkleTreeOperations {
|
|
|
76
77
|
|
|
77
78
|
/** Stops the database */
|
|
78
79
|
close(): Promise<void>;
|
|
80
|
+
|
|
81
|
+
/** Deletes the db. */
|
|
82
|
+
clear(): Promise<void>;
|
|
79
83
|
}
|