@aztec-labs/txe 6.0.0-rc.2 → 6.0.0-rc.4
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/{AuthRegistry-D4AMU6IY.js → AuthRegistry-C3LO5PQT.js} +1 -1
- package/dest/{AuthRegistry-D4AMU6IY.js.map → AuthRegistry-C3LO5PQT.js.map} +2 -2
- package/dest/{ContractClassRegistry-S7D45BCK.js → ContractClassRegistry-KVMXSCYB.js} +1 -1
- package/dest/{ContractClassRegistry-S7D45BCK.js.map → ContractClassRegistry-KVMXSCYB.js.map} +1 -1
- package/dest/{ContractInstanceRegistry-4SMQNNNF.js → ContractInstanceRegistry-G6UG2R2Y.js} +1 -1
- package/dest/{ContractInstanceRegistry-4SMQNNNF.js.map → ContractInstanceRegistry-G6UG2R2Y.js.map} +1 -1
- package/dest/{FeeJuice-WRM3OBPA.js → FeeJuice-BVKXV3SG.js} +1 -1
- package/dest/{FeeJuice-WRM3OBPA.js.map → FeeJuice-BVKXV3SG.js.map} +1 -1
- package/dest/HandshakeRegistry-PPBWWSQT.js +3 -0
- package/dest/HandshakeRegistry-PPBWWSQT.js.map +7 -0
- package/dest/{MultiCallEntrypoint-BZHVJDJ4.js → MultiCallEntrypoint-IYWSWPCG.js} +1 -1
- package/dest/{MultiCallEntrypoint-BZHVJDJ4.js.map → MultiCallEntrypoint-IYWSWPCG.js.map} +2 -2
- package/dest/SchnorrAccount-5JEEB3OZ.js +3 -0
- package/dest/SchnorrAccount-5JEEB3OZ.js.map +7 -0
- package/dest/SchnorrInitializerlessAccount-J2EBUSWO.js +3 -0
- package/dest/SchnorrInitializerlessAccount-J2EBUSWO.js.map +7 -0
- package/dest/bin/index.js +1 -1
- package/dest/bin/index.js.map +2 -2
- package/dest/bin/oracle_test_server.js +2 -1
- package/dest/{chunk-WID4ZVPG.js → chunk-2RLJ3PK7.js} +6 -6
- package/dest/{chunk-WID4ZVPG.js.map → chunk-2RLJ3PK7.js.map} +3 -3
- package/dest/chunk-CQW7U3VW.js +259 -0
- package/dest/chunk-CQW7U3VW.js.map +7 -0
- package/dest/metafile.json +1765 -806
- package/dest/oracle/test-resolver/default_fixtures.d.ts +1 -1
- package/dest/oracle/test-resolver/default_fixtures.d.ts.map +1 -1
- package/dest/oracle/test-resolver/default_fixtures.js +14 -1
- package/dest/oracle/txe_oracle_registry.d.ts +6 -5
- package/dest/oracle/txe_oracle_registry.d.ts.map +1 -1
- package/dest/oracle/txe_oracle_top_level_context.js +1 -3
- package/dest/rpc_server.d.ts +1 -1
- package/dest/rpc_server.d.ts.map +1 -1
- package/dest/rpc_server.js +2 -1
- package/dest/rpc_translator.d.ts +2 -1
- package/dest/rpc_translator.d.ts.map +1 -1
- package/dest/rpc_translator.js +8 -0
- package/dest/server.bundle.js +1 -1
- package/dest/state_machine/mock_epoch_cache.d.ts +9 -9
- package/dest/state_machine/mock_epoch_cache.d.ts.map +1 -1
- package/dest/state_machine/mock_epoch_cache.js +22 -10
- package/dest/utils/encoding.d.ts +2 -1
- package/dest/utils/encoding.d.ts.map +1 -1
- package/dest/utils/encoding.js +1 -0
- package/dest/worker.bundle.js +1 -1
- package/dest/worker.bundle.js.map +2 -2
- package/dest/worker.js +2 -1
- package/package.json +17 -17
- package/src/bin/index.ts +3 -1
- package/src/bin/oracle_test_server.ts +2 -1
- package/src/oracle/test-resolver/default_fixtures.ts +9 -0
- package/src/oracle/txe_oracle_top_level_context.ts +1 -1
- package/src/rpc_server.ts +2 -1
- package/src/rpc_translator.ts +10 -0
- package/src/state_machine/mock_epoch_cache.ts +22 -19
- package/src/utils/encoding.ts +1 -0
- package/src/worker.ts +2 -1
- package/dest/HandshakeRegistry-E4OOHTZI.js +0 -3
- package/dest/HandshakeRegistry-E4OOHTZI.js.map +0 -7
- package/dest/SchnorrAccount-S44RGBAO.js +0 -3
- package/dest/SchnorrAccount-S44RGBAO.js.map +0 -7
- package/dest/SchnorrInitializerlessAccount-APNGITUR.js +0 -3
- package/dest/SchnorrInitializerlessAccount-APNGITUR.js.map +0 -7
- package/dest/chunk-LDLEXPIR.js +0 -259
- package/dest/chunk-LDLEXPIR.js.map +0 -7
|
@@ -193,7 +193,7 @@ export class TXEOracleTopLevelContext implements IMiscOracle, ITxeExecutionOracl
|
|
|
193
193
|
}
|
|
194
194
|
const levelName = LogLevels[level];
|
|
195
195
|
|
|
196
|
-
this.logger[levelName](
|
|
196
|
+
this.logger.createChild('debug_log')[levelName](applyStringFormatting(message, fields));
|
|
197
197
|
return Promise.resolve();
|
|
198
198
|
}
|
|
199
199
|
|
package/src/rpc_server.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getEnv } from '@aztec-labs/foundation/config/env';
|
|
1
2
|
import { createSafeJsonRpcServer } from '@aztec-labs/foundation/json-rpc/server';
|
|
2
3
|
import type { Logger } from '@aztec-labs/foundation/log';
|
|
3
4
|
import type { Socket } from 'node:net';
|
|
@@ -25,7 +26,7 @@ type TaggedSocket = Socket & { [SESSION_SYMBOL]?: number };
|
|
|
25
26
|
* Lives in its own module so the worker bundle does not pull in the HTTP server stack.
|
|
26
27
|
*/
|
|
27
28
|
export async function createTXERpcServer(logger: Logger) {
|
|
28
|
-
const workerCount = Number(
|
|
29
|
+
const workerCount = Number(getEnv().TXE_WORKERS);
|
|
29
30
|
let dispatcher: TXEDispatcher | TXEDispatcherPool;
|
|
30
31
|
if (workerCount === 1) {
|
|
31
32
|
const { dataDir, schnorrClassId } = await buildSharedContractStore();
|
package/src/rpc_translator.ts
CHANGED
|
@@ -517,6 +517,16 @@ export class RPCTranslator {
|
|
|
517
517
|
});
|
|
518
518
|
}
|
|
519
519
|
|
|
520
|
+
// eslint-disable-next-line camelcase
|
|
521
|
+
aztec_utl_tryGetL1ToL2MembershipWitness(...inputs: ForeignCallArgs) {
|
|
522
|
+
return callTxeHandler({
|
|
523
|
+
oracle: 'aztec_utl_tryGetL1ToL2MembershipWitness',
|
|
524
|
+
inputs,
|
|
525
|
+
handler: ([messageHash, nullifier]) =>
|
|
526
|
+
this.handlerAsUtility().tryGetL1ToL2MembershipWitness(messageHash, nullifier),
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
|
|
520
530
|
// eslint-disable-next-line camelcase
|
|
521
531
|
aztec_utl_getAuthWitness(...inputs: ForeignCallArgs) {
|
|
522
532
|
return callTxeHandler({
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
CommitteeLookup,
|
|
3
|
+
CommitteeMembershipLookup,
|
|
4
|
+
EpochAndSlot,
|
|
5
|
+
EpochCacheInterface,
|
|
6
|
+
EscapeHatchLookup,
|
|
7
|
+
ProposerLookup,
|
|
8
|
+
SlotTag,
|
|
9
|
+
} from '@aztec-labs/epoch-cache';
|
|
2
10
|
import { EpochNumber, SlotNumber } from '@aztec-labs/foundation/branded-types';
|
|
3
|
-
import { EthAddress } from '@aztec-labs/foundation/eth-address';
|
|
11
|
+
import type { EthAddress } from '@aztec-labs/foundation/eth-address';
|
|
4
12
|
import { EmptyL1RollupConstants, type L1RollupConstants } from '@aztec-labs/stdlib/epoch-helpers';
|
|
5
13
|
|
|
6
14
|
/**
|
|
@@ -8,13 +16,8 @@ import { EmptyL1RollupConstants, type L1RollupConstants } from '@aztec-labs/stdl
|
|
|
8
16
|
* Since in TXE we don't validate transactions, mock suffices here.
|
|
9
17
|
*/
|
|
10
18
|
export class MockEpochCache implements EpochCacheInterface {
|
|
11
|
-
getCommittee(_slot: SlotTag = 'now'): Promise<
|
|
12
|
-
return Promise.resolve({
|
|
13
|
-
committee: undefined,
|
|
14
|
-
seed: 0n,
|
|
15
|
-
epoch: EpochNumber.ZERO,
|
|
16
|
-
isEscapeHatchOpen: false,
|
|
17
|
-
});
|
|
19
|
+
getCommittee(_slot: SlotTag = 'now'): Promise<CommitteeLookup> {
|
|
20
|
+
return Promise.resolve({ state: 'none', seed: 0n, epoch: EpochNumber.ZERO, isEscapeHatchOpen: false });
|
|
18
21
|
}
|
|
19
22
|
|
|
20
23
|
getSlotNow(): SlotNumber {
|
|
@@ -77,28 +80,28 @@ export class MockEpochCache implements EpochCacheInterface {
|
|
|
77
80
|
};
|
|
78
81
|
}
|
|
79
82
|
|
|
80
|
-
|
|
81
|
-
return Promise.resolve(
|
|
83
|
+
lookupProposer(_slot: SlotNumber): Promise<ProposerLookup> {
|
|
84
|
+
return Promise.resolve({ state: 'none' });
|
|
82
85
|
}
|
|
83
86
|
|
|
84
|
-
|
|
85
|
-
return Promise.resolve(
|
|
87
|
+
lookupMembership(_slot: SlotTag, _validator: EthAddress): Promise<CommitteeMembershipLookup<boolean>> {
|
|
88
|
+
return Promise.resolve({ state: 'none' });
|
|
86
89
|
}
|
|
87
90
|
|
|
88
91
|
getRegisteredValidators(): Promise<EthAddress[]> {
|
|
89
92
|
return Promise.resolve([]);
|
|
90
93
|
}
|
|
91
94
|
|
|
92
|
-
filterInCommittee(_slot: SlotTag, _validators: EthAddress[]): Promise<EthAddress[]
|
|
93
|
-
return Promise.resolve(
|
|
95
|
+
filterInCommittee(_slot: SlotTag, _validators: EthAddress[]): Promise<CommitteeMembershipLookup<EthAddress[]>> {
|
|
96
|
+
return Promise.resolve({ state: 'none' });
|
|
94
97
|
}
|
|
95
98
|
|
|
96
|
-
|
|
97
|
-
return Promise.resolve(false);
|
|
99
|
+
lookupEscapeHatch(_epoch: EpochNumber): Promise<EscapeHatchLookup> {
|
|
100
|
+
return Promise.resolve({ state: 'none', isEscapeHatchOpen: false });
|
|
98
101
|
}
|
|
99
102
|
|
|
100
|
-
|
|
101
|
-
return Promise.resolve(false);
|
|
103
|
+
lookupEscapeHatchAtSlot(_slot: SlotTag): Promise<EscapeHatchLookup> {
|
|
104
|
+
return Promise.resolve({ state: 'none', isEscapeHatchOpen: false });
|
|
102
105
|
}
|
|
103
106
|
|
|
104
107
|
getL1Constants(): L1RollupConstants {
|
package/src/utils/encoding.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { type ContractArtifact, ContractArtifactSchema } from '@aztec-labs/stdli
|
|
|
5
5
|
import { AztecAddress } from '@aztec-labs/stdlib/aztec-address';
|
|
6
6
|
import { BlockHash } from '@aztec-labs/stdlib/block';
|
|
7
7
|
import { type ContractInstanceWithAddress, ContractInstanceWithAddressSchema } from '@aztec-labs/stdlib/contract';
|
|
8
|
+
import { Buffer } from 'buffer';
|
|
8
9
|
import { z } from 'zod';
|
|
9
10
|
|
|
10
11
|
export type ForeignCallSingle = string;
|
package/src/worker.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BackendType, Barretenberg, BarretenbergSync } from '@aztec-foundation/bb.js';
|
|
2
2
|
|
|
3
|
+
import { getEnv } from '@aztec-labs/foundation/config/env';
|
|
3
4
|
import { type Logger, createLogger } from '@aztec-labs/foundation/log';
|
|
4
5
|
import { parentPort, workerData } from 'node:worker_threads';
|
|
5
6
|
|
|
@@ -63,7 +64,7 @@ function serializeError(err: unknown): SerializedError {
|
|
|
63
64
|
// Periodic memstat for diagnostic builds — set TXE_WORKER_MEMSTAT=1 to enable. Posts JS-heap
|
|
64
65
|
// breakdown + active-session count back to the dispatcher so we can attribute RSS growth
|
|
65
66
|
// between V8 heap (would show in heapUsed) and native (LMDB / world-state / WASM).
|
|
66
|
-
if (
|
|
67
|
+
if (getEnv().TXE_WORKER_MEMSTAT === '1') {
|
|
67
68
|
setInterval(() => {
|
|
68
69
|
const m = process.memoryUsage();
|
|
69
70
|
port.postMessage({
|