@aztec/txe 0.0.1-commit.684755437 → 0.0.1-commit.6b113946b
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/oracle/txe_oracle_top_level_context.d.ts +4 -3
- package/dest/oracle/txe_oracle_top_level_context.d.ts.map +1 -1
- package/dest/oracle/txe_oracle_top_level_context.js +7 -2
- package/dest/rpc_translator.d.ts +12 -7
- package/dest/rpc_translator.d.ts.map +1 -1
- package/dest/rpc_translator.js +42 -13
- package/dest/state_machine/archiver.d.ts +3 -3
- package/dest/state_machine/archiver.d.ts.map +1 -1
- package/dest/state_machine/archiver.js +5 -7
- package/dest/state_machine/index.d.ts +4 -2
- package/dest/state_machine/index.d.ts.map +1 -1
- package/dest/state_machine/index.js +6 -2
- package/dest/state_machine/mock_epoch_cache.d.ts +17 -3
- package/dest/state_machine/mock_epoch_cache.d.ts.map +1 -1
- package/dest/state_machine/mock_epoch_cache.js +32 -2
- package/dest/state_machine/synchronizer.d.ts +5 -5
- package/dest/state_machine/synchronizer.d.ts.map +1 -1
- package/dest/state_machine/synchronizer.js +3 -3
- package/dest/txe_session.d.ts +4 -3
- package/dest/txe_session.d.ts.map +1 -1
- package/dest/txe_session.js +15 -6
- package/package.json +15 -15
- package/src/oracle/txe_oracle_top_level_context.ts +5 -0
- package/src/rpc_translator.ts +59 -25
- package/src/state_machine/archiver.ts +5 -5
- package/src/state_machine/index.ts +5 -1
- package/src/state_machine/mock_epoch_cache.ts +42 -3
- package/src/state_machine/synchronizer.ts +4 -4
- package/src/txe_session.ts +14 -1
package/src/txe_session.ts
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
AnchorBlockStore,
|
|
10
10
|
CapsuleStore,
|
|
11
11
|
ContractStore,
|
|
12
|
+
ContractSyncService,
|
|
12
13
|
JobCoordinator,
|
|
13
14
|
NoteService,
|
|
14
15
|
NoteStore,
|
|
@@ -150,6 +151,7 @@ export class TXESession implements TXESessionStateHandler {
|
|
|
150
151
|
private chainId: Fr,
|
|
151
152
|
private version: Fr,
|
|
152
153
|
private nextBlockTimestamp: bigint,
|
|
154
|
+
private contractSyncService: ContractSyncService,
|
|
153
155
|
) {}
|
|
154
156
|
|
|
155
157
|
static async init(contractStore: ContractStore) {
|
|
@@ -185,6 +187,9 @@ export class TXESession implements TXESessionStateHandler {
|
|
|
185
187
|
|
|
186
188
|
const initialJobId = jobCoordinator.beginJob();
|
|
187
189
|
|
|
190
|
+
const logger = createLogger('txe:session');
|
|
191
|
+
const contractSyncService = new ContractSyncService(stateMachine.node, contractStore, noteStore, logger);
|
|
192
|
+
|
|
188
193
|
const topLevelOracleHandler = new TXEOracleTopLevelContext(
|
|
189
194
|
stateMachine,
|
|
190
195
|
contractStore,
|
|
@@ -201,11 +206,12 @@ export class TXESession implements TXESessionStateHandler {
|
|
|
201
206
|
version,
|
|
202
207
|
chainId,
|
|
203
208
|
new Map(),
|
|
209
|
+
contractSyncService,
|
|
204
210
|
);
|
|
205
211
|
await topLevelOracleHandler.advanceBlocksBy(1);
|
|
206
212
|
|
|
207
213
|
return new TXESession(
|
|
208
|
-
|
|
214
|
+
logger,
|
|
209
215
|
stateMachine,
|
|
210
216
|
topLevelOracleHandler,
|
|
211
217
|
contractStore,
|
|
@@ -223,6 +229,7 @@ export class TXESession implements TXESessionStateHandler {
|
|
|
223
229
|
version,
|
|
224
230
|
chainId,
|
|
225
231
|
nextBlockTimestamp,
|
|
232
|
+
contractSyncService,
|
|
226
233
|
);
|
|
227
234
|
}
|
|
228
235
|
|
|
@@ -309,6 +316,7 @@ export class TXESession implements TXESessionStateHandler {
|
|
|
309
316
|
this.version,
|
|
310
317
|
this.chainId,
|
|
311
318
|
this.authwits,
|
|
319
|
+
this.contractSyncService,
|
|
312
320
|
);
|
|
313
321
|
|
|
314
322
|
this.state = { name: 'TOP_LEVEL' };
|
|
@@ -369,6 +377,7 @@ export class TXESession implements TXESessionStateHandler {
|
|
|
369
377
|
contractSyncService: this.stateMachine.contractSyncService,
|
|
370
378
|
jobId: this.currentJobId,
|
|
371
379
|
scopes: 'ALL_SCOPES',
|
|
380
|
+
messageContextService: this.stateMachine.messageContextService,
|
|
372
381
|
});
|
|
373
382
|
|
|
374
383
|
// We store the note and tagging index caches fed into the PrivateExecutionOracle (along with some other auxiliary
|
|
@@ -437,6 +446,8 @@ export class TXESession implements TXESessionStateHandler {
|
|
|
437
446
|
senderAddressBookStore: this.senderAddressBookStore,
|
|
438
447
|
capsuleStore: this.capsuleStore,
|
|
439
448
|
privateEventStore: this.privateEventStore,
|
|
449
|
+
messageContextService: this.stateMachine.messageContextService,
|
|
450
|
+
contractSyncService: this.contractSyncService,
|
|
440
451
|
jobId: this.currentJobId,
|
|
441
452
|
scopes: 'ALL_SCOPES',
|
|
442
453
|
});
|
|
@@ -528,6 +539,8 @@ export class TXESession implements TXESessionStateHandler {
|
|
|
528
539
|
senderAddressBookStore: this.senderAddressBookStore,
|
|
529
540
|
capsuleStore: this.capsuleStore,
|
|
530
541
|
privateEventStore: this.privateEventStore,
|
|
542
|
+
messageContextService: this.stateMachine.messageContextService,
|
|
543
|
+
contractSyncService: this.contractSyncService,
|
|
531
544
|
jobId: this.currentJobId,
|
|
532
545
|
scopes,
|
|
533
546
|
});
|