@aztec/txe 5.0.0-nightly.20260708 → 5.0.0-nightly.20260709
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/SchnorrAccount-Z2WDW5N7.js +3 -0
- package/dest/SchnorrAccount-Z2WDW5N7.js.map +7 -0
- package/dest/{SchnorrInitializerlessAccount-3AKXYJQI.js → SchnorrInitializerlessAccount-3V4B7CP6.js} +1 -1
- package/dest/{SchnorrInitializerlessAccount-3AKXYJQI.js.map → SchnorrInitializerlessAccount-3V4B7CP6.js.map} +1 -1
- package/dest/bin/index.js +1 -1
- package/dest/{chunk-HLH2NBQI.js → chunk-23X4GHAA.js} +4 -4
- package/dest/{chunk-HLH2NBQI.js.map → chunk-23X4GHAA.js.map} +3 -3
- package/dest/{chunk-2LYGEVHI.js → chunk-Y75V5534.js} +2 -2
- package/dest/metafile.json +139 -62
- package/dest/oracle/interfaces.d.ts +6 -2
- package/dest/oracle/interfaces.d.ts.map +1 -1
- package/dest/oracle/tagging_secret_strategy.d.ts +12 -0
- package/dest/oracle/tagging_secret_strategy.d.ts.map +1 -0
- package/dest/oracle/tagging_secret_strategy.js +12 -0
- package/dest/oracle/txe_oracle_registry.d.ts +3 -3
- package/dest/oracle/txe_oracle_registry.d.ts.map +1 -1
- package/dest/oracle/txe_oracle_registry.js +7 -3
- package/dest/oracle/txe_oracle_top_level_context.d.ts +6 -5
- package/dest/oracle/txe_oracle_top_level_context.d.ts.map +1 -1
- package/dest/oracle/txe_oracle_top_level_context.js +17 -10
- package/dest/oracle/txe_oracle_version.d.ts +3 -3
- package/dest/oracle/txe_oracle_version.js +3 -3
- package/dest/rpc_translator.d.ts +3 -3
- package/dest/rpc_translator.d.ts.map +1 -1
- package/dest/rpc_translator.js +6 -6
- package/dest/server.bundle.js +1 -1
- package/dest/txe_session.d.ts +2 -2
- package/dest/txe_session.d.ts.map +1 -1
- package/dest/txe_session.js +8 -8
- package/dest/worker.bundle.js +1 -1
- package/package.json +17 -17
- package/src/oracle/interfaces.ts +8 -1
- package/src/oracle/tagging_secret_strategy.ts +25 -0
- package/src/oracle/txe_oracle_registry.ts +6 -3
- package/src/oracle/txe_oracle_top_level_context.ts +19 -9
- package/src/oracle/txe_oracle_version.ts +3 -3
- package/src/rpc_translator.ts +8 -7
- package/src/txe_session.ts +10 -8
- package/dest/SchnorrAccount-Y2WZTBJF.js +0 -3
- package/dest/SchnorrAccount-Y2WZTBJF.js.map +0 -7
- /package/dest/{chunk-2LYGEVHI.js.map → chunk-Y75V5534.js.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/txe",
|
|
3
|
-
"version": "5.0.0-nightly.
|
|
3
|
+
"version": "5.0.0-nightly.20260709",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./server": {
|
|
@@ -69,22 +69,22 @@
|
|
|
69
69
|
]
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@aztec/accounts": "5.0.0-nightly.
|
|
73
|
-
"@aztec/archiver": "5.0.0-nightly.
|
|
74
|
-
"@aztec/aztec-node": "5.0.0-nightly.
|
|
75
|
-
"@aztec/aztec.js": "5.0.0-nightly.
|
|
76
|
-
"@aztec/bb-prover": "5.0.0-nightly.
|
|
77
|
-
"@aztec/bb.js": "5.0.0-nightly.
|
|
78
|
-
"@aztec/constants": "5.0.0-nightly.
|
|
79
|
-
"@aztec/foundation": "5.0.0-nightly.
|
|
80
|
-
"@aztec/key-store": "5.0.0-nightly.
|
|
81
|
-
"@aztec/kv-store": "5.0.0-nightly.
|
|
82
|
-
"@aztec/protocol-contracts": "5.0.0-nightly.
|
|
83
|
-
"@aztec/pxe": "5.0.0-nightly.
|
|
84
|
-
"@aztec/simulator": "5.0.0-nightly.
|
|
85
|
-
"@aztec/standard-contracts": "5.0.0-nightly.
|
|
86
|
-
"@aztec/stdlib": "5.0.0-nightly.
|
|
87
|
-
"@aztec/world-state": "5.0.0-nightly.
|
|
72
|
+
"@aztec/accounts": "5.0.0-nightly.20260709",
|
|
73
|
+
"@aztec/archiver": "5.0.0-nightly.20260709",
|
|
74
|
+
"@aztec/aztec-node": "5.0.0-nightly.20260709",
|
|
75
|
+
"@aztec/aztec.js": "5.0.0-nightly.20260709",
|
|
76
|
+
"@aztec/bb-prover": "5.0.0-nightly.20260709",
|
|
77
|
+
"@aztec/bb.js": "5.0.0-nightly.20260709",
|
|
78
|
+
"@aztec/constants": "5.0.0-nightly.20260709",
|
|
79
|
+
"@aztec/foundation": "5.0.0-nightly.20260709",
|
|
80
|
+
"@aztec/key-store": "5.0.0-nightly.20260709",
|
|
81
|
+
"@aztec/kv-store": "5.0.0-nightly.20260709",
|
|
82
|
+
"@aztec/protocol-contracts": "5.0.0-nightly.20260709",
|
|
83
|
+
"@aztec/pxe": "5.0.0-nightly.20260709",
|
|
84
|
+
"@aztec/simulator": "5.0.0-nightly.20260709",
|
|
85
|
+
"@aztec/standard-contracts": "5.0.0-nightly.20260709",
|
|
86
|
+
"@aztec/stdlib": "5.0.0-nightly.20260709",
|
|
87
|
+
"@aztec/world-state": "5.0.0-nightly.20260709",
|
|
88
88
|
"msgpackr": "^1.11.2",
|
|
89
89
|
"zod": "^4"
|
|
90
90
|
},
|
package/src/oracle/interfaces.ts
CHANGED
|
@@ -73,7 +73,14 @@ export interface ITxeExecutionOracle {
|
|
|
73
73
|
addAccount(secret: Fr): Promise<CompleteAddress>;
|
|
74
74
|
addAuthWitness(address: AztecAddress, messageHash: Fr): Promise<void>;
|
|
75
75
|
sendL1ToL2Message(content: Fr, secretHash: Fr, sender: EthAddress, recipient: AztecAddress): Promise<Fr>;
|
|
76
|
-
|
|
76
|
+
/**
|
|
77
|
+
* Configures the tagging secret strategy the test's simulated wallet resolves for each delivery mode. A `none`
|
|
78
|
+
* clears that mode, so it falls back to the default strategy (or, when both modes end up unset, to no hook at all).
|
|
79
|
+
*/
|
|
80
|
+
setTaggingSecretStrategies(
|
|
81
|
+
unconstrainedStrategy: Option<TaggingSecretStrategy>,
|
|
82
|
+
constrainedStrategy: Option<TaggingSecretStrategy>,
|
|
83
|
+
): void;
|
|
77
84
|
getLastBlockTimestamp(): Promise<bigint>;
|
|
78
85
|
getLastTxEffects(): Promise<{
|
|
79
86
|
txHash: TxHash;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DEFAULT_TAGGING_SECRET_STRATEGY,
|
|
3
|
+
type ResolveTaggingSecretStrategy,
|
|
4
|
+
type TaggingSecretStrategy,
|
|
5
|
+
} from '@aztec/pxe/server';
|
|
6
|
+
import type { AppTaggingSecretKind } from '@aztec/stdlib/logs';
|
|
7
|
+
|
|
8
|
+
/** The tagging secret strategies a TXE test has configured, keyed by delivery mode. Absence means "not configured". */
|
|
9
|
+
export type TXETaggingSecretStrategies = Map<AppTaggingSecretKind, TaggingSecretStrategy>;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Builds the `resolveTaggingSecretStrategy` hook backing the `aztec_txe_setTaggingSecretStrategies` oracle. Returns
|
|
13
|
+
* `undefined` when no strategy is configured, so PXE's own no-hook default path is exercised. When at least one mode
|
|
14
|
+
* is configured, modes without an entry resolve to {@link DEFAULT_TAGGING_SECRET_STRATEGY}, matching what PXE would
|
|
15
|
+
* apply without a hook.
|
|
16
|
+
*/
|
|
17
|
+
export function makeResolveTaggingSecretStrategyHook(
|
|
18
|
+
strategies: TXETaggingSecretStrategies,
|
|
19
|
+
): ResolveTaggingSecretStrategy | undefined {
|
|
20
|
+
if (strategies.size === 0) {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return ({ deliveryMode }) => Promise.resolve(strategies.get(deliveryMode) ?? DEFAULT_TAGGING_SECRET_STRATEGY);
|
|
25
|
+
}
|
|
@@ -67,7 +67,7 @@ const GAS_SETTINGS: TypeMapping<GasSettings> = {
|
|
|
67
67
|
};
|
|
68
68
|
|
|
69
69
|
// Tagging secret strategy discriminants. Must match the Noir test helper `TaggingSecretStrategy` in
|
|
70
|
-
// aztec-nr `test/helpers/tagging_secret_strategy.nr`. This is a test-only oracle (only `
|
|
70
|
+
// aztec-nr `test/helpers/tagging_secret_strategy.nr`. This is a test-only oracle (only `set_tagging_secret_strategies`
|
|
71
71
|
// reads it), so the mapping lives here on the TXE side rather than in the production oracle type mappings.
|
|
72
72
|
const STRATEGY_NON_INTERACTIVE_HANDSHAKE = 1;
|
|
73
73
|
const STRATEGY_ARBITRARY_SECRET = 2;
|
|
@@ -320,8 +320,11 @@ export const TXE_ORACLE_REGISTRY = {
|
|
|
320
320
|
returnType: FIELD,
|
|
321
321
|
}),
|
|
322
322
|
|
|
323
|
-
|
|
324
|
-
params: [
|
|
323
|
+
aztec_txe_setTaggingSecretStrategies: makeEntry({
|
|
324
|
+
params: [
|
|
325
|
+
{ name: 'unconstrainedStrategy', type: OPTION(TAGGING_SECRET_STRATEGY) },
|
|
326
|
+
{ name: 'constrainedStrategy', type: OPTION(TAGGING_SECRET_STRATEGY) },
|
|
327
|
+
],
|
|
325
328
|
}),
|
|
326
329
|
|
|
327
330
|
aztec_txe_getLastBlockTimestamp: makeEntry({
|
|
@@ -73,6 +73,7 @@ import {
|
|
|
73
73
|
} from '@aztec/stdlib/kernel';
|
|
74
74
|
import { deriveKeys, hashPublicKey } from '@aztec/stdlib/keys';
|
|
75
75
|
import type { PrivateLog } from '@aztec/stdlib/logs';
|
|
76
|
+
import { AppTaggingSecretKind } from '@aztec/stdlib/logs';
|
|
76
77
|
import { L1Actor, L1ToL2Message, L2Actor } from '@aztec/stdlib/messaging';
|
|
77
78
|
import { ChonkProof } from '@aztec/stdlib/proofs';
|
|
78
79
|
import { makeGlobalVariables } from '@aztec/stdlib/testing';
|
|
@@ -99,6 +100,7 @@ import type { TXEAccountStore } from '../utils/txe_account_store.js';
|
|
|
99
100
|
import type { TXEArtifactResolver } from '../utils/txe_artifact_resolver.js';
|
|
100
101
|
import { TXEPublicContractDataSource } from '../utils/txe_public_contract_data_source.js';
|
|
101
102
|
import type { ITxeExecutionOracle } from './interfaces.js';
|
|
103
|
+
import { type TXETaggingSecretStrategies, makeResolveTaggingSecretStrategyHook } from './tagging_secret_strategy.js';
|
|
102
104
|
|
|
103
105
|
export class TXEOracleTopLevelContext implements IMiscOracle, ITxeExecutionOracle {
|
|
104
106
|
isMisc = true as const;
|
|
@@ -123,7 +125,7 @@ export class TXEOracleTopLevelContext implements IMiscOracle, ITxeExecutionOracl
|
|
|
123
125
|
private version: Fr,
|
|
124
126
|
private chainId: Fr,
|
|
125
127
|
private authwits: Map<string, AuthWitness>,
|
|
126
|
-
private
|
|
128
|
+
private taggingSecretStrategies: TXETaggingSecretStrategies,
|
|
127
129
|
private readonly artifactResolver: TXEArtifactResolver,
|
|
128
130
|
private readonly rootPath: string,
|
|
129
131
|
private readonly packageName: string,
|
|
@@ -356,8 +358,19 @@ export class TXEOracleTopLevelContext implements IMiscOracle, ITxeExecutionOracl
|
|
|
356
358
|
this.authwits.set(authWitness.requestHash.toString(), authWitness);
|
|
357
359
|
}
|
|
358
360
|
|
|
359
|
-
|
|
360
|
-
|
|
361
|
+
setTaggingSecretStrategies(
|
|
362
|
+
unconstrainedStrategy: Option<TaggingSecretStrategy>,
|
|
363
|
+
constrainedStrategy: Option<TaggingSecretStrategy>,
|
|
364
|
+
): void {
|
|
365
|
+
const apply = (mode: AppTaggingSecretKind, strategy: Option<TaggingSecretStrategy>) => {
|
|
366
|
+
if (strategy.isSome()) {
|
|
367
|
+
this.taggingSecretStrategies.set(mode, strategy.value);
|
|
368
|
+
} else {
|
|
369
|
+
this.taggingSecretStrategies.delete(mode);
|
|
370
|
+
}
|
|
371
|
+
};
|
|
372
|
+
apply(AppTaggingSecretKind.UNCONSTRAINED, unconstrainedStrategy);
|
|
373
|
+
apply(AppTaggingSecretKind.CONSTRAINED, constrainedStrategy);
|
|
361
374
|
}
|
|
362
375
|
|
|
363
376
|
async sendL1ToL2Message(content: Fr, secretHash: Fr, sender: EthAddress, recipient: AztecAddress): Promise<Fr> {
|
|
@@ -471,7 +484,6 @@ export class TXEOracleTopLevelContext implements IMiscOracle, ITxeExecutionOracl
|
|
|
471
484
|
const simulator = new WASMSimulator();
|
|
472
485
|
|
|
473
486
|
const transientArrayService = new TransientArrayService();
|
|
474
|
-
const taggingSecretStrategy = this.taggingSecretStrategy;
|
|
475
487
|
const privateExecutionOracle = new PrivateExecutionOracle({
|
|
476
488
|
argsHash,
|
|
477
489
|
txContext,
|
|
@@ -510,9 +522,7 @@ export class TXEOracleTopLevelContext implements IMiscOracle, ITxeExecutionOracl
|
|
|
510
522
|
isStaticCall ? 'private view' : 'private',
|
|
511
523
|
authorizedUtilityCallTargets,
|
|
512
524
|
),
|
|
513
|
-
|
|
514
|
-
// strategy is exercised.
|
|
515
|
-
resolveTaggingSecretStrategy: taggingSecretStrategy ? () => Promise.resolve(taggingSecretStrategy) : undefined,
|
|
525
|
+
resolveTaggingSecretStrategy: makeResolveTaggingSecretStrategyHook(this.taggingSecretStrategies),
|
|
516
526
|
}),
|
|
517
527
|
transientArrayService,
|
|
518
528
|
});
|
|
@@ -964,9 +974,9 @@ export class TXEOracleTopLevelContext implements IMiscOracle, ITxeExecutionOracl
|
|
|
964
974
|
}
|
|
965
975
|
}
|
|
966
976
|
|
|
967
|
-
close(): [bigint, Map<string, AuthWitness>,
|
|
977
|
+
close(): [bigint, Map<string, AuthWitness>, TXETaggingSecretStrategies] {
|
|
968
978
|
this.logger.debug('Exiting Top Level Context');
|
|
969
|
-
return [this.nextBlockTimestamp, this.authwits, this.
|
|
979
|
+
return [this.nextBlockTimestamp, this.authwits, this.taggingSecretStrategies];
|
|
970
980
|
}
|
|
971
981
|
|
|
972
982
|
private async getLastBlockNumber(): Promise<BlockNumber> {
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*
|
|
6
6
|
* The Noir counterparts are in `noir-projects/aztec-nr/aztec/src/test/helpers/txe_oracles.nr`.
|
|
7
7
|
*/
|
|
8
|
-
export const TXE_ORACLE_VERSION_MAJOR =
|
|
9
|
-
export const TXE_ORACLE_VERSION_MINOR =
|
|
8
|
+
export const TXE_ORACLE_VERSION_MAJOR = 3;
|
|
9
|
+
export const TXE_ORACLE_VERSION_MINOR = 0;
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* This hash is computed from the TXE oracle interfaces (IAvmExecutionOracle and ITxeExecutionOracle) and is used to
|
|
@@ -14,4 +14,4 @@ export const TXE_ORACLE_VERSION_MINOR = 3;
|
|
|
14
14
|
* - TXE_ORACLE_VERSION_MAJOR (and reset MINOR to 0) for breaking changes, or
|
|
15
15
|
* - TXE_ORACLE_VERSION_MINOR for additive changes (new oracle method added).
|
|
16
16
|
*/
|
|
17
|
-
export const TXE_ORACLE_INTERFACE_HASH = '
|
|
17
|
+
export const TXE_ORACLE_INTERFACE_HASH = 'bea75bd85baebd7aa1438efb1defab496d27540bc805a8d854bb74b8d45fd859';
|
package/src/rpc_translator.ts
CHANGED
|
@@ -221,11 +221,12 @@ export class RPCTranslator {
|
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
// eslint-disable-next-line camelcase
|
|
224
|
-
|
|
224
|
+
aztec_txe_setTaggingSecretStrategies(...inputs: ForeignCallArgs) {
|
|
225
225
|
return callTxeHandler({
|
|
226
|
-
oracle: '
|
|
226
|
+
oracle: 'aztec_txe_setTaggingSecretStrategies',
|
|
227
227
|
inputs,
|
|
228
|
-
handler: ([
|
|
228
|
+
handler: ([unconstrainedStrategy, constrainedStrategy]) =>
|
|
229
|
+
this.handlerAsTxe().setTaggingSecretStrategies(unconstrainedStrategy, constrainedStrategy),
|
|
229
230
|
});
|
|
230
231
|
}
|
|
231
232
|
|
|
@@ -488,12 +489,12 @@ export class RPCTranslator {
|
|
|
488
489
|
}
|
|
489
490
|
|
|
490
491
|
// eslint-disable-next-line camelcase
|
|
491
|
-
|
|
492
|
+
aztec_utl_getL1ToL2MembershipWitnessV2(...inputs: ForeignCallArgs) {
|
|
492
493
|
return callTxeHandler({
|
|
493
|
-
oracle: '
|
|
494
|
+
oracle: 'aztec_utl_getL1ToL2MembershipWitnessV2',
|
|
494
495
|
inputs,
|
|
495
|
-
handler: ([
|
|
496
|
-
this.handlerAsUtility().
|
|
496
|
+
handler: ([messageHash, nullifier]) =>
|
|
497
|
+
this.handlerAsUtility().getL1ToL2MembershipWitnessV2(messageHash, nullifier),
|
|
497
498
|
});
|
|
498
499
|
}
|
|
499
500
|
|
package/src/txe_session.ts
CHANGED
|
@@ -20,7 +20,6 @@ import {
|
|
|
20
20
|
RecipientTaggingStore,
|
|
21
21
|
SenderTaggingStore,
|
|
22
22
|
TaggingSecretSourcesStore,
|
|
23
|
-
type TaggingSecretStrategy,
|
|
24
23
|
composeHooks,
|
|
25
24
|
} from '@aztec/pxe/server';
|
|
26
25
|
import {
|
|
@@ -58,6 +57,10 @@ import { z } from 'zod';
|
|
|
58
57
|
|
|
59
58
|
import { DEFAULT_ADDRESS, MAX_OFFCHAIN_EFFECTS_PER_TXE_QUERY, MAX_OFFCHAIN_EFFECT_LEN } from './constants.js';
|
|
60
59
|
import type { IAvmExecutionOracle, ITxeExecutionOracle } from './oracle/interfaces.js';
|
|
60
|
+
import {
|
|
61
|
+
type TXETaggingSecretStrategies,
|
|
62
|
+
makeResolveTaggingSecretStrategyHook,
|
|
63
|
+
} from './oracle/tagging_secret_strategy.js';
|
|
61
64
|
import { TXEOraclePublicContext } from './oracle/txe_oracle_public_context.js';
|
|
62
65
|
import { callTxeLegacyHandler } from './oracle/txe_oracle_registry.js';
|
|
63
66
|
import { TXEOracleTopLevelContext } from './oracle/txe_oracle_top_level_context.js';
|
|
@@ -237,7 +240,7 @@ function emptyLastCallState(): LastCallState {
|
|
|
237
240
|
export class TXESession implements TXESessionStateHandler {
|
|
238
241
|
private state: SessionState = { name: 'TOP_LEVEL' };
|
|
239
242
|
private authwits: Map<string, AuthWitness> = new Map();
|
|
240
|
-
private
|
|
243
|
+
private taggingSecretStrategies: TXETaggingSecretStrategies = new Map();
|
|
241
244
|
private lastCallInfo: LastCallState = emptyLastCallState();
|
|
242
245
|
private txeOracleVersion: { major: number; minor: number } | undefined;
|
|
243
246
|
|
|
@@ -357,7 +360,7 @@ export class TXESession implements TXESessionStateHandler {
|
|
|
357
360
|
version,
|
|
358
361
|
chainId,
|
|
359
362
|
new Map(),
|
|
360
|
-
|
|
363
|
+
new Map(),
|
|
361
364
|
artifactResolver,
|
|
362
365
|
rootPath,
|
|
363
366
|
packageName,
|
|
@@ -687,7 +690,7 @@ export class TXESession implements TXESessionStateHandler {
|
|
|
687
690
|
this.version,
|
|
688
691
|
this.chainId,
|
|
689
692
|
this.authwits,
|
|
690
|
-
this.
|
|
693
|
+
this.taggingSecretStrategies,
|
|
691
694
|
this.artifactResolver,
|
|
692
695
|
this.rootPath,
|
|
693
696
|
this.packageName,
|
|
@@ -737,7 +740,6 @@ export class TXESession implements TXESessionStateHandler {
|
|
|
737
740
|
this.stateMachine.contractClassService,
|
|
738
741
|
anchorBlock!,
|
|
739
742
|
);
|
|
740
|
-
const taggingSecretStrategy = this.taggingSecretStrategy;
|
|
741
743
|
this.oracleHandler = new TXEPrivateExecutionOracle({
|
|
742
744
|
argsHash: Fr.ZERO,
|
|
743
745
|
txContext: new TxContext(this.chainId, this.version, gasSettings),
|
|
@@ -767,7 +769,7 @@ export class TXESession implements TXESessionStateHandler {
|
|
|
767
769
|
txResolver: this.stateMachine.txResolver,
|
|
768
770
|
simulator: new WASMSimulator(),
|
|
769
771
|
hooks: composeHooks({
|
|
770
|
-
resolveTaggingSecretStrategy:
|
|
772
|
+
resolveTaggingSecretStrategy: makeResolveTaggingSecretStrategyHook(this.taggingSecretStrategies),
|
|
771
773
|
}),
|
|
772
774
|
transientArrayService,
|
|
773
775
|
});
|
|
@@ -890,13 +892,13 @@ export class TXESession implements TXESessionStateHandler {
|
|
|
890
892
|
// accounts to PXE (via `addAccount`), etc. This is a slight inconsistency in the working model of this class, but
|
|
891
893
|
// is not too bad. The `close` call below therefore only hands back the session-scoped values that a test
|
|
892
894
|
// sets directly at the top level, outside any contract execution (e.g. via `advanceTimestampBy`,
|
|
893
|
-
// `addAuthWitness`, `
|
|
895
|
+
// `addAuthWitness`, `setTaggingSecretStrategies`). The oracle handler is discarded on every state transition,
|
|
894
896
|
// so the session must seed these values into the contexts it creates later.
|
|
895
897
|
|
|
896
898
|
// TODO: persisting authwits this way is quite unfortunate: they create a temporary utility context that would
|
|
897
899
|
// otherwise reset them, so we'd not be able to pass more than one per execution. Ideally authwits would be passed
|
|
898
900
|
// alongside a contract call instead of pre-seeded.
|
|
899
|
-
[this.nextBlockTimestamp, this.authwits, this.
|
|
901
|
+
[this.nextBlockTimestamp, this.authwits, this.taggingSecretStrategies] = (
|
|
900
902
|
this.oracleHandler as TXEOracleTopLevelContext
|
|
901
903
|
).close();
|
|
902
904
|
}
|