@aztec/txe 0.0.1-commit.3469e52 → 0.0.1-commit.59e663cd

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 (39) hide show
  1. package/dest/oracle/interfaces.d.ts +2 -2
  2. package/dest/oracle/interfaces.d.ts.map +1 -1
  3. package/dest/oracle/txe_oracle_public_context.d.ts +4 -4
  4. package/dest/oracle/txe_oracle_public_context.d.ts.map +1 -1
  5. package/dest/oracle/txe_oracle_public_context.js +3 -2
  6. package/dest/oracle/txe_oracle_top_level_context.d.ts +1 -1
  7. package/dest/oracle/txe_oracle_top_level_context.d.ts.map +1 -1
  8. package/dest/oracle/txe_oracle_top_level_context.js +3 -3
  9. package/dest/rpc_translator.d.ts +10 -4
  10. package/dest/rpc_translator.d.ts.map +1 -1
  11. package/dest/rpc_translator.js +32 -19
  12. package/dest/state_machine/archiver.d.ts +2 -2
  13. package/dest/state_machine/archiver.d.ts.map +1 -1
  14. package/dest/state_machine/archiver.js +5 -6
  15. package/dest/state_machine/index.d.ts +3 -3
  16. package/dest/state_machine/index.d.ts.map +1 -1
  17. package/dest/state_machine/index.js +18 -9
  18. package/dest/state_machine/mock_epoch_cache.d.ts +4 -2
  19. package/dest/state_machine/mock_epoch_cache.d.ts.map +1 -1
  20. package/dest/state_machine/mock_epoch_cache.js +2 -1
  21. package/dest/state_machine/synchronizer.d.ts +3 -3
  22. package/dest/state_machine/synchronizer.d.ts.map +1 -1
  23. package/dest/txe_session.d.ts +1 -1
  24. package/dest/txe_session.d.ts.map +1 -1
  25. package/dest/txe_session.js +5 -4
  26. package/dest/utils/block_creation.d.ts +5 -5
  27. package/dest/utils/block_creation.d.ts.map +1 -1
  28. package/dest/utils/block_creation.js +5 -5
  29. package/package.json +15 -15
  30. package/src/oracle/interfaces.ts +1 -1
  31. package/src/oracle/txe_oracle_public_context.ts +5 -5
  32. package/src/oracle/txe_oracle_top_level_context.ts +3 -2
  33. package/src/rpc_translator.ts +36 -22
  34. package/src/state_machine/archiver.ts +4 -8
  35. package/src/state_machine/index.ts +26 -12
  36. package/src/state_machine/mock_epoch_cache.ts +2 -1
  37. package/src/state_machine/synchronizer.ts +2 -2
  38. package/src/txe_session.ts +10 -2
  39. package/src/utils/block_creation.ts +6 -6
@@ -7,7 +7,7 @@ import {
7
7
  import { BlockNumber, CheckpointNumber, IndexWithinCheckpoint } from '@aztec/foundation/branded-types';
8
8
  import { padArrayEnd } from '@aztec/foundation/collection';
9
9
  import { Fr } from '@aztec/foundation/curves/bn254';
10
- import { Body, L2BlockNew } from '@aztec/stdlib/block';
10
+ import { Body, L2Block } from '@aztec/stdlib/block';
11
11
  import { AppendOnlyTreeSnapshot, MerkleTreeId, type MerkleTreeWriteOperations } from '@aztec/stdlib/trees';
12
12
  import { BlockHeader, GlobalVariables, TxEffect } from '@aztec/stdlib/tx';
13
13
 
@@ -61,7 +61,7 @@ export async function makeTXEBlockHeader(
61
61
  }
62
62
 
63
63
  /**
64
- * Creates an L2BlockNew with proper archive chaining.
64
+ * Creates an L2Block with proper archive chaining.
65
65
  * This function:
66
66
  * 1. Gets the current archive state as lastArchive for the header
67
67
  * 2. Creates the block header
@@ -71,13 +71,13 @@ export async function makeTXEBlockHeader(
71
71
  * @param worldTrees - The world trees to read/write from
72
72
  * @param globalVariables - Global variables for the block
73
73
  * @param txEffects - Transaction effects to include in the block
74
- * @returns The created L2BlockNew with proper archive chaining
74
+ * @returns The created L2Block with proper archive chaining
75
75
  */
76
76
  export async function makeTXEBlock(
77
77
  worldTrees: MerkleTreeWriteOperations,
78
78
  globalVariables: GlobalVariables,
79
79
  txEffects: TxEffect[],
80
- ): Promise<L2BlockNew> {
80
+ ): Promise<L2Block> {
81
81
  const header = await makeTXEBlockHeader(worldTrees, globalVariables);
82
82
 
83
83
  // Update the archive tree with this block's header hash
@@ -87,9 +87,9 @@ export async function makeTXEBlock(
87
87
  const newArchiveInfo = await worldTrees.getTreeInfo(MerkleTreeId.ARCHIVE);
88
88
  const newArchive = new AppendOnlyTreeSnapshot(new Fr(newArchiveInfo.root), Number(newArchiveInfo.size));
89
89
 
90
- // L2BlockNew requires checkpointNumber and indexWithinCheckpoint
90
+ // L2Block requires checkpointNumber and indexWithinCheckpoint
91
91
  const checkpointNumber = CheckpointNumber.fromBlockNumber(globalVariables.blockNumber);
92
92
  const indexWithinCheckpoint = IndexWithinCheckpoint(0);
93
93
 
94
- return new L2BlockNew(newArchive, header, new Body(txEffects), checkpointNumber, indexWithinCheckpoint);
94
+ return new L2Block(newArchive, header, new Body(txEffects), checkpointNumber, indexWithinCheckpoint);
95
95
  }