@aztec/txe 0.0.0-test.1 → 0.0.1-commit.b655e406

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 (86) hide show
  1. package/dest/bin/index.js +3 -2
  2. package/dest/index.d.ts.map +1 -1
  3. package/dest/index.js +78 -49
  4. package/dest/oracle/interfaces.d.ts +54 -0
  5. package/dest/oracle/interfaces.d.ts.map +1 -0
  6. package/dest/oracle/interfaces.js +3 -0
  7. package/dest/oracle/txe_oracle_public_context.d.ts +34 -0
  8. package/dest/oracle/txe_oracle_public_context.d.ts.map +1 -0
  9. package/dest/oracle/txe_oracle_public_context.js +124 -0
  10. package/dest/oracle/txe_oracle_top_level_context.d.ts +56 -0
  11. package/dest/oracle/txe_oracle_top_level_context.d.ts.map +1 -0
  12. package/dest/oracle/txe_oracle_top_level_context.js +423 -0
  13. package/dest/rpc_translator.d.ts +237 -0
  14. package/dest/rpc_translator.d.ts.map +1 -0
  15. package/dest/rpc_translator.js +617 -0
  16. package/dest/state_machine/archiver.d.ts +61 -0
  17. package/dest/state_machine/archiver.d.ts.map +1 -0
  18. package/dest/state_machine/archiver.js +118 -0
  19. package/dest/state_machine/dummy_p2p_client.d.ts +52 -0
  20. package/dest/state_machine/dummy_p2p_client.d.ts.map +1 -0
  21. package/dest/state_machine/dummy_p2p_client.js +133 -0
  22. package/dest/state_machine/global_variable_builder.d.ts +9 -0
  23. package/dest/state_machine/global_variable_builder.d.ts.map +1 -0
  24. package/dest/state_machine/global_variable_builder.js +10 -0
  25. package/dest/state_machine/index.d.ts +16 -0
  26. package/dest/state_machine/index.d.ts.map +1 -0
  27. package/dest/state_machine/index.js +51 -0
  28. package/dest/state_machine/mock_epoch_cache.d.ts +25 -0
  29. package/dest/state_machine/mock_epoch_cache.d.ts.map +1 -0
  30. package/dest/state_machine/mock_epoch_cache.js +50 -0
  31. package/dest/state_machine/synchronizer.d.ts +32 -0
  32. package/dest/state_machine/synchronizer.d.ts.map +1 -0
  33. package/dest/state_machine/synchronizer.js +58 -0
  34. package/dest/txe_session.d.ts +67 -0
  35. package/dest/txe_session.d.ts.map +1 -0
  36. package/dest/txe_session.js +253 -0
  37. package/dest/util/encoding.d.ts +26 -8
  38. package/dest/util/encoding.d.ts.map +1 -1
  39. package/dest/util/encoding.js +65 -10
  40. package/dest/util/txe_contract_data_provider.d.ts +12 -0
  41. package/dest/util/txe_contract_data_provider.d.ts.map +1 -0
  42. package/dest/util/txe_contract_data_provider.js +22 -0
  43. package/dest/util/txe_public_contract_data_source.d.ts +8 -8
  44. package/dest/util/txe_public_contract_data_source.d.ts.map +1 -1
  45. package/dest/util/txe_public_contract_data_source.js +36 -57
  46. package/dest/utils/block_creation.d.ts +13 -0
  47. package/dest/utils/block_creation.d.ts.map +1 -0
  48. package/dest/utils/block_creation.js +24 -0
  49. package/dest/utils/tx_effect_creation.d.ts +5 -0
  50. package/dest/utils/tx_effect_creation.d.ts.map +1 -0
  51. package/dest/utils/tx_effect_creation.js +16 -0
  52. package/package.json +27 -22
  53. package/src/bin/index.ts +3 -2
  54. package/src/index.ts +92 -64
  55. package/src/oracle/interfaces.ts +83 -0
  56. package/src/oracle/txe_oracle_public_context.ts +165 -0
  57. package/src/oracle/txe_oracle_top_level_context.ts +658 -0
  58. package/src/rpc_translator.ts +1013 -0
  59. package/src/state_machine/archiver.ts +151 -0
  60. package/src/state_machine/dummy_p2p_client.ts +197 -0
  61. package/src/state_machine/global_variable_builder.ts +20 -0
  62. package/src/state_machine/index.ts +77 -0
  63. package/src/state_machine/mock_epoch_cache.ts +67 -0
  64. package/src/state_machine/synchronizer.ts +87 -0
  65. package/src/txe_session.ts +432 -0
  66. package/src/util/encoding.ts +84 -10
  67. package/src/util/txe_contract_data_provider.ts +36 -0
  68. package/src/util/txe_public_contract_data_source.ts +40 -56
  69. package/src/utils/block_creation.ts +62 -0
  70. package/src/utils/tx_effect_creation.ts +37 -0
  71. package/dest/node/txe_node.d.ts +0 -358
  72. package/dest/node/txe_node.d.ts.map +0 -1
  73. package/dest/node/txe_node.js +0 -504
  74. package/dest/oracle/txe_oracle.d.ts +0 -152
  75. package/dest/oracle/txe_oracle.d.ts.map +0 -1
  76. package/dest/oracle/txe_oracle.js +0 -833
  77. package/dest/txe_service/txe_service.d.ts +0 -212
  78. package/dest/txe_service/txe_service.d.ts.map +0 -1
  79. package/dest/txe_service/txe_service.js +0 -572
  80. package/dest/util/txe_world_state_db.d.ts +0 -14
  81. package/dest/util/txe_world_state_db.d.ts.map +0 -1
  82. package/dest/util/txe_world_state_db.js +0 -27
  83. package/src/node/txe_node.ts +0 -725
  84. package/src/oracle/txe_oracle.ts +0 -1241
  85. package/src/txe_service/txe_service.ts +0 -749
  86. package/src/util/txe_world_state_db.ts +0 -38
package/dest/bin/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env -S node --no-warnings
2
- import { createLogger } from '@aztec/aztec.js';
2
+ import { createLogger } from '@aztec/aztec.js/log';
3
3
  import { startHttpRpcServer } from '@aztec/foundation/json-rpc/server';
4
4
  import { createTXERpcServer } from '../index.js';
5
5
  /**
@@ -14,10 +14,11 @@ import { createTXERpcServer } from '../index.js';
14
14
  logger.info('Received SIGTERM.');
15
15
  process.exit(0);
16
16
  });
17
- const logger = createLogger('txe:service');
17
+ const logger = createLogger('txe:rpc');
18
18
  logger.info(`Setting up TXE...`);
19
19
  const txeServer = createTXERpcServer(logger);
20
20
  const { port } = await startHttpRpcServer(txeServer, {
21
+ host: '127.0.0.1',
21
22
  port: TXE_PORT,
22
23
  timeoutMs: 1e3 * 60 * 5
23
24
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AA+LpD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,iEAIhD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AA6NpD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,iEAIhD"}
package/dest/index.js CHANGED
@@ -1,15 +1,25 @@
1
1
  import { SchnorrAccountContractArtifact } from '@aztec/accounts/schnorr';
2
- import { AztecAddress, Fr, PublicKeys, deriveKeys, getContractInstanceFromDeployParams, loadContractArtifact } from '@aztec/aztec.js';
2
+ import { loadContractArtifact } from '@aztec/aztec.js/abi';
3
+ import { AztecAddress } from '@aztec/aztec.js/addresses';
4
+ import { getContractInstanceFromInstantiationParams } from '@aztec/aztec.js/contracts';
5
+ import { Fr } from '@aztec/aztec.js/fields';
6
+ import { PublicKeys, deriveKeys } from '@aztec/aztec.js/keys';
3
7
  import { createSafeJsonRpcServer } from '@aztec/foundation/json-rpc/server';
4
8
  import { protocolContractNames } from '@aztec/protocol-contracts';
5
9
  import { BundledProtocolContractsProvider } from '@aztec/protocol-contracts/providers/bundle';
10
+ import { computeArtifactHash } from '@aztec/stdlib/contract';
11
+ import { createHash } from 'crypto';
12
+ import { createReadStream } from 'fs';
6
13
  import { readFile, readdir } from 'fs/promises';
7
- import { join } from 'path';
14
+ import { join, parse } from 'path';
8
15
  import { z } from 'zod';
9
- import { TXEService } from './txe_service/txe_service.js';
10
- import { ForeignCallArgsSchema, ForeignCallResultSchema, fromArray, fromSingle, toForeignCallResult, toSingle } from './util/encoding.js';
11
- const TXESessions = new Map();
12
- const TXEArtifactsCache = new Map();
16
+ import { TXESession } from './txe_session.js';
17
+ import { ForeignCallArgsSchema, ForeignCallResultSchema, fromArray, fromSingle, toSingle } from './util/encoding.js';
18
+ const sessions = new Map();
19
+ /*
20
+ * TXE typically has to load the same contract artifacts over and over again for multiple tests,
21
+ * so we cache them here to avoid both loading them from disk repeatedly and computing their artifact hashes
22
+ */ const TXEArtifactsCache = new Map();
13
23
  const TXEForeignCallInputSchema = z.object({
14
24
  // eslint-disable-next-line camelcase
15
25
  session_id: z.number().int().nonnegative(),
@@ -26,44 +36,65 @@ class TXEDispatcher {
26
36
  constructor(logger){
27
37
  this.logger = logger;
28
38
  }
39
+ fastHashFile(path) {
40
+ return new Promise((resolve)=>{
41
+ const fd = createReadStream(path);
42
+ const hash = createHash('sha1');
43
+ hash.setEncoding('hex');
44
+ fd.on('end', function() {
45
+ hash.end();
46
+ resolve(hash.read());
47
+ });
48
+ fd.pipe(hash);
49
+ });
50
+ }
29
51
  async #processDeployInputs({ inputs, root_path: rootPath, package_name: packageName }) {
30
- const [pathStr, contractName, initializer] = inputs.slice(0, 3).map((input)=>fromArray(input).map((char)=>String.fromCharCode(char.toNumber())).join(''));
31
- const decodedArgs = fromArray(inputs[4]);
32
- const secret = fromSingle(inputs[5]);
52
+ const [contractPath, initializer] = inputs.slice(0, 2).map((input)=>fromArray(input).map((char)=>String.fromCharCode(char.toNumber())).join(''));
53
+ const decodedArgs = fromArray(inputs[3]);
54
+ const secret = fromSingle(inputs[4]);
33
55
  const publicKeys = secret.equals(Fr.ZERO) ? PublicKeys.default() : (await deriveKeys(secret)).publicKeys;
34
56
  const publicKeysHash = await publicKeys.hash();
35
- const cacheKey = `${pathStr}-${contractName}-${initializer}-${decodedArgs.map((arg)=>arg.toString()).join('-')}-${publicKeysHash.toString()}`;
36
- let artifact;
57
+ let artifactPath = '';
58
+ const { dir: contractDirectory, base: contractFilename } = parse(contractPath);
59
+ if (contractDirectory) {
60
+ if (contractDirectory.includes('@')) {
61
+ // We're deploying a contract that belongs in a workspace
62
+ // env.deploy("../path/to/workspace/root@packageName/contractName")
63
+ const [workspace, pkg] = contractDirectory.split('@');
64
+ const targetPath = join(rootPath, workspace, '/target');
65
+ this.logger.debug(`Looking for compiled artifact in workspace ${targetPath}`);
66
+ artifactPath = join(targetPath, `${pkg}-${contractFilename}.json`);
67
+ } else {
68
+ // We're deploying a standalone external contract
69
+ // env.deploy("../path/to/contract/root/contractName")
70
+ const targetPath = join(rootPath, contractDirectory, '/target');
71
+ this.logger.debug(`Looking for compiled artifact in ${targetPath}`);
72
+ [artifactPath] = (await readdir(targetPath)).filter((file)=>file.endsWith(`-${contractFilename}.json`));
73
+ }
74
+ } else {
75
+ // We're deploying a local contract
76
+ // env.deploy("contractName")
77
+ artifactPath = join(rootPath, './target', `${packageName}-${contractFilename}.json`);
78
+ }
79
+ const fileHash = await this.fastHashFile(artifactPath);
80
+ const cacheKey = `${contractDirectory ?? ''}-${contractFilename}-${initializer}-${decodedArgs.map((arg)=>arg.toString()).join('-')}-${publicKeysHash}-${fileHash}`;
37
81
  let instance;
82
+ let artifact;
38
83
  if (TXEArtifactsCache.has(cacheKey)) {
39
84
  this.logger.debug(`Using cached artifact for ${cacheKey}`);
40
85
  ({ artifact, instance } = TXEArtifactsCache.get(cacheKey));
41
86
  } else {
42
- let artifactPath = '';
43
- // We're deploying the contract under test
44
- // env.deploy_self("contractName")
45
- if (!pathStr) {
46
- artifactPath = join(rootPath, './target', `${packageName}-${contractName}.json`);
47
- } else {
48
- // We're deploying a contract that belongs in a workspace
49
- // env.deploy("../path/to/workspace/root@packageName", "contractName")
50
- if (pathStr.includes('@')) {
51
- const [workspace, pkg] = pathStr.split('@');
52
- const targetPath = join(rootPath, workspace, './target');
53
- this.logger.debug(`Looking for compiled artifact in workspace ${targetPath}`);
54
- artifactPath = join(targetPath, `${pkg}-${contractName}.json`);
55
- } else {
56
- // We're deploying a standalone contract
57
- // env.deploy("../path/to/contract/root", "contractName")
58
- const targetPath = join(rootPath, pathStr, './target');
59
- this.logger.debug(`Looking for compiled artifact in ${targetPath}`);
60
- [artifactPath] = (await readdir(targetPath)).filter((file)=>file.endsWith(`-${contractName}.json`));
61
- }
62
- }
63
87
  this.logger.debug(`Loading compiled artifact ${artifactPath}`);
64
- artifact = loadContractArtifact(JSON.parse(await readFile(artifactPath, 'utf-8')));
88
+ const artifactJSON = JSON.parse(await readFile(artifactPath, 'utf-8'));
89
+ const artifactWithoutHash = loadContractArtifact(artifactJSON);
90
+ artifact = {
91
+ ...artifactWithoutHash,
92
+ // Artifact hash is *very* expensive to compute, so we do it here once
93
+ // and the TXE contract data provider can cache it
94
+ artifactHash: await computeArtifactHash(artifactWithoutHash)
95
+ };
65
96
  this.logger.debug(`Deploy ${artifact.name} with initializer ${initializer}(${decodedArgs}) and public keys hash ${publicKeysHash.toString()}`);
66
- instance = await getContractInstanceFromDeployParams(artifact, {
97
+ instance = await getContractInstanceFromInstantiationParams(artifact, {
67
98
  constructorArgs: decodedArgs,
68
99
  skipArgsDecoding: true,
69
100
  salt: Fr.ONE,
@@ -76,7 +107,7 @@ class TXEDispatcher {
76
107
  instance
77
108
  });
78
109
  }
79
- inputs.splice(0, 2, artifact, instance, toSingle(secret));
110
+ inputs.splice(0, 1, artifact, instance, toSingle(secret));
80
111
  }
81
112
  async #processAddAccountInputs({ inputs }) {
82
113
  const secret = fromSingle(inputs[0]);
@@ -92,8 +123,13 @@ class TXEDispatcher {
92
123
  keys.publicKeys.masterIncomingViewingPublicKey.x,
93
124
  keys.publicKeys.masterIncomingViewingPublicKey.y
94
125
  ];
95
- artifact = SchnorrAccountContractArtifact;
96
- instance = await getContractInstanceFromDeployParams(artifact, {
126
+ artifact = {
127
+ ...SchnorrAccountContractArtifact,
128
+ // Artifact hash is *very* expensive to compute, so we do it here once
129
+ // and the TXE contract data provider can cache it
130
+ artifactHash: await computeArtifactHash(SchnorrAccountContractArtifact)
131
+ };
132
+ instance = await getContractInstanceFromInstantiationParams(artifact, {
97
133
  constructorArgs: args,
98
134
  skipArgsDecoding: true,
99
135
  salt: Fr.ONE,
@@ -112,33 +148,26 @@ class TXEDispatcher {
112
148
  async resolve_foreign_call(callData) {
113
149
  const { session_id: sessionId, function: functionName, inputs } = callData;
114
150
  this.logger.debug(`Calling ${functionName} on session ${sessionId}`);
115
- if (!TXESessions.has(sessionId) && functionName != 'reset') {
151
+ if (!sessions.has(sessionId)) {
116
152
  this.logger.debug(`Creating new session ${sessionId}`);
117
153
  if (!this.protocolContracts) {
118
154
  this.protocolContracts = await Promise.all(protocolContractNames.map((name)=>new BundledProtocolContractsProvider().getProtocolContractArtifact(name)));
119
155
  }
120
- TXESessions.set(sessionId, await TXEService.init(this.logger, this.protocolContracts));
156
+ sessions.set(sessionId, await TXESession.init(this.protocolContracts));
121
157
  }
122
158
  switch(functionName){
123
- case 'reset':
124
- {
125
- TXESessions.delete(sessionId) && this.logger.debug(`Called reset on session ${sessionId}, yeeting it out of existence`);
126
- return toForeignCallResult([]);
127
- }
128
- case 'deploy':
159
+ case 'txeDeploy':
129
160
  {
130
161
  await this.#processDeployInputs(callData);
131
162
  break;
132
163
  }
133
- case 'addAccount':
164
+ case 'txeAddAccount':
134
165
  {
135
166
  await this.#processAddAccountInputs(callData);
136
167
  break;
137
168
  }
138
169
  }
139
- const txeService = TXESessions.get(sessionId);
140
- const response = await txeService[functionName](...inputs);
141
- return response;
170
+ return await sessions.get(sessionId).processFunction(functionName, inputs);
142
171
  }
143
172
  }
144
173
  const TXEDispatcherApiSchema = {
@@ -0,0 +1,54 @@
1
+ import type { ContractArtifact } from '@aztec/aztec.js/abi';
2
+ import { CompleteAddress } from '@aztec/aztec.js/addresses';
3
+ import type { ContractInstanceWithAddress } from '@aztec/aztec.js/contracts';
4
+ import { TxHash } from '@aztec/aztec.js/tx';
5
+ import type { Fr } from '@aztec/foundation/fields';
6
+ import type { FunctionSelector } from '@aztec/stdlib/abi';
7
+ import type { AztecAddress } from '@aztec/stdlib/aztec-address';
8
+ import type { UInt32, UInt64 } from '@aztec/stdlib/types';
9
+ /**
10
+ * Oracle methods associated with the execution of an Aztec #[external("public")] function.
11
+ *
12
+ * Note that real contracts have their Brillig calls to these be transpiled into opcodes, the oracles are only executed
13
+ * as such when running the original Brillig code, e.g. when invoking functions that interact with a PublicContext
14
+ * directly in a Noir test.
15
+ */
16
+ export interface IAvmExecutionOracle {
17
+ isAvm: true;
18
+ avmOpcodeAddress(): Promise<AztecAddress>;
19
+ avmOpcodeSender(): Promise<AztecAddress>;
20
+ avmOpcodeBlockNumber(): Promise<UInt32>;
21
+ avmOpcodeTimestamp(): Promise<bigint>;
22
+ avmOpcodeIsStaticCall(): Promise<boolean>;
23
+ avmOpcodeChainId(): Promise<Fr>;
24
+ avmOpcodeVersion(): Promise<Fr>;
25
+ avmOpcodeEmitNullifier(nullifier: Fr): Promise<void>;
26
+ avmOpcodeEmitNoteHash(noteHash: Fr): Promise<void>;
27
+ avmOpcodeNullifierExists(innerNullifier: Fr, targetAddress: AztecAddress): Promise<boolean>;
28
+ avmOpcodeStorageWrite(slot: Fr, value: Fr): Promise<void>;
29
+ avmOpcodeStorageRead(slot: Fr): Promise<Fr>;
30
+ }
31
+ /**
32
+ * Oracle methods associated with the execution of an Aztec Noir test.
33
+ */
34
+ export interface ITxeExecutionOracle {
35
+ isTxe: true;
36
+ txeGetNextBlockNumber(): Promise<number>;
37
+ txeGetNextBlockTimestamp(): Promise<UInt64>;
38
+ txeAdvanceBlocksBy(blocks: number): Promise<void>;
39
+ txeAdvanceTimestampBy(duration: UInt64): void;
40
+ txeDeploy(artifact: ContractArtifact, instance: ContractInstanceWithAddress, foreignSecret: Fr): Promise<void>;
41
+ txeCreateAccount(secret: Fr): Promise<CompleteAddress>;
42
+ txeAddAccount(artifact: ContractArtifact, instance: ContractInstanceWithAddress, secret: Fr): Promise<CompleteAddress>;
43
+ txeAddAuthWitness(address: AztecAddress, messageHash: Fr): Promise<void>;
44
+ txeGetLastBlockTimestamp(): Promise<bigint>;
45
+ txeGetLastTxEffects(): Promise<{
46
+ txHash: TxHash;
47
+ noteHashes: Fr[];
48
+ nullifiers: Fr[];
49
+ }>;
50
+ txePrivateCallNewFlow(from: AztecAddress, targetContractAddress: AztecAddress, functionSelector: FunctionSelector, args: Fr[], argsHash: Fr, isStaticCall: boolean): Promise<Fr[]>;
51
+ txeSimulateUtilityFunction(targetContractAddress: AztecAddress, functionSelector: FunctionSelector, args: Fr[]): Promise<Fr[]>;
52
+ txePublicCallNewFlow(from: AztecAddress, targetContractAddress: AztecAddress, calldata: Fr[], isStaticCall: boolean): Promise<Fr[]>;
53
+ }
54
+ //# sourceMappingURL=interfaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../src/oracle/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAQ1D;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,IAAI,CAAC;IAEZ,gBAAgB,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC;IAC1C,eAAe,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC;IACzC,oBAAoB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACxC,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACtC,qBAAqB,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAC1C,gBAAgB,IAAI,OAAO,CAAC,EAAE,CAAC,CAAC;IAChC,gBAAgB,IAAI,OAAO,CAAC,EAAE,CAAC,CAAC;IAChC,sBAAsB,CAAC,SAAS,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,qBAAqB,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,UAAU,EAAE,EAAE,EAAE,CAAC;KAClB,CAAC,CAAC;IACH,qBAAqB,CACnB,IAAI,EAAE,YAAY,EAClB,qBAAqB,EAAE,YAAY,EACnC,gBAAgB,EAAE,gBAAgB,EAClC,IAAI,EAAE,EAAE,EAAE,EACV,QAAQ,EAAE,EAAE,EACZ,YAAY,EAAE,OAAO,GACpB,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;IACjB,0BAA0B,CACxB,qBAAqB,EAAE,YAAY,EACnC,gBAAgB,EAAE,gBAAgB,EAClC,IAAI,EAAE,EAAE,EAAE,GACT,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;IACjB,oBAAoB,CAClB,IAAI,EAAE,YAAY,EAClB,qBAAqB,EAAE,YAAY,EACnC,QAAQ,EAAE,EAAE,EAAE,EACd,YAAY,EAAE,OAAO,GACpB,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;CAClB"}
@@ -0,0 +1,3 @@
1
+ /**
2
+ * Oracle methods associated with the execution of an Aztec Noir test.
3
+ */ export { };
@@ -0,0 +1,34 @@
1
+ import { Fr } from '@aztec/foundation/fields';
2
+ import { AztecAddress } from '@aztec/stdlib/aztec-address';
3
+ import { L2Block } from '@aztec/stdlib/block';
4
+ import { type MerkleTreeWriteOperations } from '@aztec/stdlib/trees';
5
+ import { GlobalVariables } from '@aztec/stdlib/tx';
6
+ import type { UInt32 } from '@aztec/stdlib/types';
7
+ import type { IAvmExecutionOracle } from './interfaces.js';
8
+ export declare class TXEOraclePublicContext implements IAvmExecutionOracle {
9
+ private contractAddress;
10
+ private forkedWorldTrees;
11
+ private txRequestHash;
12
+ private globalVariables;
13
+ isAvm: true;
14
+ private logger;
15
+ private transientUniqueNoteHashes;
16
+ private transientSiloedNullifiers;
17
+ private publicDataWrites;
18
+ constructor(contractAddress: AztecAddress, forkedWorldTrees: MerkleTreeWriteOperations, txRequestHash: Fr, globalVariables: GlobalVariables);
19
+ avmOpcodeAddress(): Promise<AztecAddress>;
20
+ avmOpcodeSender(): Promise<AztecAddress>;
21
+ avmOpcodeBlockNumber(): Promise<UInt32>;
22
+ avmOpcodeTimestamp(): Promise<bigint>;
23
+ avmOpcodeIsStaticCall(): Promise<boolean>;
24
+ avmOpcodeChainId(): Promise<Fr>;
25
+ avmOpcodeVersion(): Promise<Fr>;
26
+ avmOpcodeEmitNullifier(nullifier: Fr): Promise<void>;
27
+ avmOpcodeEmitNoteHash(noteHash: Fr): Promise<void>;
28
+ avmOpcodeNullifierExists(innerNullifier: Fr, targetAddress: AztecAddress): Promise<boolean>;
29
+ avmOpcodeStorageWrite(slot: Fr, value: Fr): Promise<void>;
30
+ avmOpcodeStorageRead(slot: Fr): Promise<Fr>;
31
+ close(): Promise<L2Block>;
32
+ private makeTxEffect;
33
+ }
34
+ //# sourceMappingURL=txe_oracle_public_context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"txe_oracle_public_context.d.ts","sourceRoot":"","sources":["../../src/oracle/txe_oracle_public_context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAG9C,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAQ,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAGpD,OAAO,EAEL,KAAK,yBAAyB,EAG/B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAoB,MAAM,kBAAkB,CAAC;AACrE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,qBAAa,sBAAuB,YAAW,mBAAmB;IAS9D,OAAO,CAAC,eAAe;IACvB,OAAO,CAAC,gBAAgB;IACxB,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,eAAe;IAXzB,KAAK,EAAG,IAAI,CAAU;IAEtB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,yBAAyB,CAAY;IAC7C,OAAO,CAAC,yBAAyB,CAAY;IAC7C,OAAO,CAAC,gBAAgB,CAAyB;gBAGvC,eAAe,EAAE,YAAY,EAC7B,gBAAgB,EAAE,yBAAyB,EAC3C,aAAa,EAAE,EAAE,EACjB,eAAe,EAAE,eAAe;IAW1C,gBAAgB,IAAI,OAAO,CAAC,YAAY,CAAC;IAIzC,eAAe,IAAI,OAAO,CAAC,YAAY,CAAC;IAIxC,oBAAoB,IAAI,OAAO,CAAC,MAAM,CAAC;IAIvC,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC;IAIrC,qBAAqB,IAAI,OAAO,CAAC,OAAO,CAAC;IAIzC,gBAAgB,IAAI,OAAO,CAAC,EAAE,CAAC;IAI/B,gBAAgB,IAAI,OAAO,CAAC,EAAE,CAAC;IAIzB,sBAAsB,CAAC,SAAS,EAAE,EAAE;IAKpC,qBAAqB,CAAC,QAAQ,EAAE,EAAE;IAMlC,wBAAwB,CAAC,cAAc,EAAE,EAAE,EAAE,aAAa,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC;IAW3F,qBAAqB,CAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE;IAYzC,oBAAoB,CAAC,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC;IAuB3C,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC;IAwB/B,OAAO,CAAC,YAAY;CAarB"}
@@ -0,0 +1,124 @@
1
+ import { Fr } from '@aztec/foundation/fields';
2
+ import { createLogger } from '@aztec/foundation/log';
3
+ import { PublicDataWrite } from '@aztec/stdlib/avm';
4
+ import { AztecAddress } from '@aztec/stdlib/aztec-address';
5
+ import { Body, L2Block } from '@aztec/stdlib/block';
6
+ import { computePublicDataTreeLeafSlot, siloNoteHash, siloNullifier } from '@aztec/stdlib/hash';
7
+ import { makeAppendOnlyTreeSnapshot } from '@aztec/stdlib/testing';
8
+ import { MerkleTreeId, PublicDataTreeLeaf } from '@aztec/stdlib/trees';
9
+ import { TxEffect, TxHash } from '@aztec/stdlib/tx';
10
+ import { insertTxEffectIntoWorldTrees, makeTXEBlockHeader } from '../utils/block_creation.js';
11
+ export class TXEOraclePublicContext {
12
+ contractAddress;
13
+ forkedWorldTrees;
14
+ txRequestHash;
15
+ globalVariables;
16
+ isAvm;
17
+ logger;
18
+ transientUniqueNoteHashes;
19
+ transientSiloedNullifiers;
20
+ publicDataWrites;
21
+ constructor(contractAddress, forkedWorldTrees, txRequestHash, globalVariables){
22
+ this.contractAddress = contractAddress;
23
+ this.forkedWorldTrees = forkedWorldTrees;
24
+ this.txRequestHash = txRequestHash;
25
+ this.globalVariables = globalVariables;
26
+ this.isAvm = true;
27
+ this.transientUniqueNoteHashes = [];
28
+ this.transientSiloedNullifiers = [];
29
+ this.publicDataWrites = [];
30
+ this.logger = createLogger('txe:public_context');
31
+ this.logger.debug('Entering Public Context', {
32
+ contractAddress,
33
+ blockNumber: globalVariables.blockNumber,
34
+ timestamp: globalVariables.timestamp
35
+ });
36
+ }
37
+ avmOpcodeAddress() {
38
+ return Promise.resolve(this.contractAddress);
39
+ }
40
+ avmOpcodeSender() {
41
+ return Promise.resolve(AztecAddress.ZERO); // todo: change?
42
+ }
43
+ avmOpcodeBlockNumber() {
44
+ return Promise.resolve(this.globalVariables.blockNumber);
45
+ }
46
+ avmOpcodeTimestamp() {
47
+ return Promise.resolve(this.globalVariables.timestamp);
48
+ }
49
+ avmOpcodeIsStaticCall() {
50
+ return Promise.resolve(false);
51
+ }
52
+ avmOpcodeChainId() {
53
+ return Promise.resolve(this.globalVariables.chainId);
54
+ }
55
+ avmOpcodeVersion() {
56
+ return Promise.resolve(this.globalVariables.version);
57
+ }
58
+ async avmOpcodeEmitNullifier(nullifier) {
59
+ const siloedNullifier = await siloNullifier(this.contractAddress, nullifier);
60
+ this.transientSiloedNullifiers.push(siloedNullifier);
61
+ }
62
+ async avmOpcodeEmitNoteHash(noteHash) {
63
+ const siloedNoteHash = await siloNoteHash(this.contractAddress, noteHash);
64
+ // TODO: make the note hash unique - they are only siloed right now
65
+ this.transientUniqueNoteHashes.push(siloedNoteHash);
66
+ }
67
+ async avmOpcodeNullifierExists(innerNullifier, targetAddress) {
68
+ const nullifier = await siloNullifier(targetAddress, innerNullifier);
69
+ const treeIndex = (await this.forkedWorldTrees.findLeafIndices(MerkleTreeId.NULLIFIER_TREE, [
70
+ nullifier.toBuffer()
71
+ ]))[0];
72
+ const transientIndex = this.transientSiloedNullifiers.find((n)=>n.equals(nullifier));
73
+ return treeIndex !== undefined || transientIndex !== undefined;
74
+ }
75
+ async avmOpcodeStorageWrite(slot, value) {
76
+ this.logger.debug('AVM storage write', {
77
+ slot,
78
+ value
79
+ });
80
+ const dataWrite = new PublicDataWrite(await computePublicDataTreeLeafSlot(this.contractAddress, slot), value);
81
+ this.publicDataWrites.push(dataWrite);
82
+ await this.forkedWorldTrees.sequentialInsert(MerkleTreeId.PUBLIC_DATA_TREE, [
83
+ new PublicDataTreeLeaf(dataWrite.leafSlot, dataWrite.value).toBuffer()
84
+ ]);
85
+ }
86
+ async avmOpcodeStorageRead(slot) {
87
+ const leafSlot = await computePublicDataTreeLeafSlot(this.contractAddress, slot);
88
+ const lowLeafResult = await this.forkedWorldTrees.getPreviousValueIndex(MerkleTreeId.PUBLIC_DATA_TREE, leafSlot.toBigInt());
89
+ const value = !lowLeafResult || !lowLeafResult.alreadyPresent ? Fr.ZERO : (await this.forkedWorldTrees.getLeafPreimage(MerkleTreeId.PUBLIC_DATA_TREE, lowLeafResult.index)).leaf.value;
90
+ this.logger.debug('AVM storage read', {
91
+ slot,
92
+ value
93
+ });
94
+ return value;
95
+ }
96
+ async close() {
97
+ this.logger.debug('Exiting Public Context, building block with collected side effects', {
98
+ blockNumber: this.globalVariables.blockNumber
99
+ });
100
+ const txEffect = this.makeTxEffect();
101
+ await insertTxEffectIntoWorldTrees(txEffect, this.forkedWorldTrees);
102
+ const block = new L2Block(makeAppendOnlyTreeSnapshot(), await makeTXEBlockHeader(this.forkedWorldTrees, this.globalVariables), new Body([
103
+ txEffect
104
+ ]));
105
+ await this.forkedWorldTrees.close();
106
+ this.logger.debug('Exited PublicContext with built block', {
107
+ blockNumber: block.number,
108
+ txEffects: block.body.txEffects
109
+ });
110
+ return block;
111
+ }
112
+ makeTxEffect() {
113
+ const txEffect = TxEffect.empty();
114
+ txEffect.noteHashes = this.transientUniqueNoteHashes;
115
+ txEffect.nullifiers = [
116
+ this.txRequestHash,
117
+ ...this.transientSiloedNullifiers
118
+ ];
119
+ txEffect.publicDataWrites = this.publicDataWrites;
120
+ // TODO: support public logs
121
+ txEffect.txHash = new TxHash(new Fr(this.globalVariables.blockNumber));
122
+ return txEffect;
123
+ }
124
+ }
@@ -0,0 +1,56 @@
1
+ import { Fr } from '@aztec/foundation/fields';
2
+ import type { KeyStore } from '@aztec/key-store';
3
+ import { AddressDataProvider, PXEOracleInterface } from '@aztec/pxe/server';
4
+ import { type IMiscOracle } from '@aztec/pxe/simulator';
5
+ import { type ContractArtifact, FunctionSelector } from '@aztec/stdlib/abi';
6
+ import { AuthWitness } from '@aztec/stdlib/auth-witness';
7
+ import { AztecAddress } from '@aztec/stdlib/aztec-address';
8
+ import { type ContractInstanceWithAddress } from '@aztec/stdlib/contract';
9
+ import { TxHash } from '@aztec/stdlib/tx';
10
+ import type { UInt64 } from '@aztec/stdlib/types';
11
+ import type { TXEStateMachine } from '../state_machine/index.js';
12
+ import type { TXEAccountDataProvider } from '../util/txe_account_data_provider.js';
13
+ import type { TXEContractDataProvider } from '../util/txe_contract_data_provider.js';
14
+ import type { ITxeExecutionOracle } from './interfaces.js';
15
+ export declare class TXEOracleTopLevelContext implements IMiscOracle, ITxeExecutionOracle {
16
+ private stateMachine;
17
+ private contractDataProvider;
18
+ private keyStore;
19
+ private addressDataProvider;
20
+ private accountDataProvider;
21
+ private pxeOracleInterface;
22
+ private nextBlockTimestamp;
23
+ private version;
24
+ private chainId;
25
+ private authwits;
26
+ isMisc: true;
27
+ isTxe: true;
28
+ private logger;
29
+ constructor(stateMachine: TXEStateMachine, contractDataProvider: TXEContractDataProvider, keyStore: KeyStore, addressDataProvider: AddressDataProvider, accountDataProvider: TXEAccountDataProvider, pxeOracleInterface: PXEOracleInterface, nextBlockTimestamp: bigint, version: Fr, chainId: Fr, authwits: Map<string, AuthWitness>);
30
+ utilityAssertCompatibleOracleVersion(version: number): void;
31
+ utilityGetRandomField(): Fr;
32
+ utilityDebugLog(level: number, message: string, fields: Fr[]): void;
33
+ txeGetNextBlockNumber(): Promise<number>;
34
+ txeGetNextBlockTimestamp(): Promise<bigint>;
35
+ txeGetLastBlockTimestamp(): Promise<bigint>;
36
+ txeGetLastTxEffects(): Promise<{
37
+ txHash: TxHash;
38
+ noteHashes: Fr[];
39
+ nullifiers: Fr[];
40
+ }>;
41
+ txeAdvanceBlocksBy(blocks: number): Promise<void>;
42
+ txeAdvanceTimestampBy(duration: UInt64): void;
43
+ txeDeploy(artifact: ContractArtifact, instance: ContractInstanceWithAddress, secret: Fr): Promise<void>;
44
+ txeAddAccount(artifact: ContractArtifact, instance: ContractInstanceWithAddress, secret: Fr): Promise<import("@aztec/stdlib/contract").CompleteAddress>;
45
+ txeCreateAccount(secret: Fr): Promise<import("@aztec/stdlib/contract").CompleteAddress>;
46
+ txeAddAuthWitness(address: AztecAddress, messageHash: Fr): Promise<void>;
47
+ mineBlock(options?: {
48
+ nullifiers?: Fr[];
49
+ }): Promise<void>;
50
+ txePrivateCallNewFlow(from: AztecAddress, targetContractAddress: AztecAddress | undefined, functionSelector: FunctionSelector | undefined, args: Fr[], argsHash?: Fr, isStaticCall?: boolean): Promise<Fr[]>;
51
+ txePublicCallNewFlow(from: AztecAddress, targetContractAddress: AztecAddress, calldata: Fr[], isStaticCall: boolean): Promise<Fr[]>;
52
+ txeSimulateUtilityFunction(targetContractAddress: AztecAddress, functionSelector: FunctionSelector, args: Fr[]): Promise<Fr[]>;
53
+ close(): [bigint, Map<string, AuthWitness>];
54
+ private getLastBlockNumber;
55
+ }
56
+ //# sourceMappingURL=txe_oracle_top_level_context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"txe_oracle_top_level_context.d.ts","sourceRoot":"","sources":["../../src/oracle/txe_oracle_top_level_context.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAG9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EACL,mBAAmB,EAEnB,kBAAkB,EAEnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAIL,KAAK,WAAW,EAMjB,MAAM,sBAAsB,CAAC;AAgB9B,OAAO,EAAE,KAAK,gBAAgB,EAAE,gBAAgB,EAAgB,MAAM,mBAAmB,CAAC;AAC1F,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,OAAO,EAAE,KAAK,2BAA2B,EAAyB,MAAM,wBAAwB,CAAC;AAYjG,OAAO,EASL,MAAM,EAEP,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAOrF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,qBAAa,wBAAyB,YAAW,WAAW,EAAE,mBAAmB;IAO7E,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,oBAAoB;IAC5B,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,mBAAmB;IAC3B,OAAO,CAAC,mBAAmB;IAC3B,OAAO,CAAC,kBAAkB;IAC1B,OAAO,CAAC,kB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