diff --git a/circuits/cpp/barretenberg/ts/src/examples/simple.rawtest.ts b/circuits/cpp/barretenberg/ts/src/examples/simple.rawtest.ts deleted file mode 100644 index 179489ac952..00000000000 --- a/circuits/cpp/barretenberg/ts/src/examples/simple.rawtest.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Crs } from '../crs/index.js'; -import createDebug from 'debug'; -import { newBarretenbergApiAsync } from '../factory/index.js'; -import { RawBuffer } from '../types/index.js'; - -createDebug.enable('*'); -const debug = createDebug('simple_test'); - -async function main() { - const CIRCUIT_SIZE = 2 ** 19; - - debug('starting test...'); - const api = await newBarretenbergApiAsync(); - - // Important to init slab allocator as first thing, to ensure maximum memory efficiency. - await api.commonInitSlabAllocator(CIRCUIT_SIZE); - - // Plus 1 needed! - const crs = await Crs.new(CIRCUIT_SIZE + 1); - await api.srsInitSrs(new RawBuffer(crs.getG1Data()), crs.numPoints, new RawBuffer(crs.getG2Data())); - - const iterations = 10; - let totalTime = 0; - for (let i = 0; i < iterations; ++i) { - const start = new Date().getTime(); - debug(`iteration ${i} starting...`); - await api.examplesSimpleCreateAndVerifyProof(); - totalTime += new Date().getTime() - start; - } - - await api.destroy(); - - debug(`avg iteration time: ${totalTime / iterations}ms`); - debug('test complete.'); -} - -void main(); diff --git a/circuits/cpp/barretenberg/ts/src/types/point.ts b/circuits/cpp/barretenberg/ts/src/types/point.ts deleted file mode 100644 index 0e97450abfe..00000000000 --- a/circuits/cpp/barretenberg/ts/src/types/point.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Fr } from './index.js'; -import { BufferReader } from '../serialize/buffer_reader.js'; - -export class Point { - static SIZE_IN_BYTES = 64; - static EMPTY = new Point(Fr.ZERO, Fr.ZERO); - - constructor(public readonly x: Fr, public readonly y: Fr) {} - - static random() { - // TODO: This is not a point on the curve! - return new Point(Fr.random(), Fr.random()); - } - - static fromBuffer(buffer: Uint8Array | BufferReader) { - const reader = BufferReader.asReader(buffer); - return new this(Fr.fromBuffer(reader), Fr.fromBuffer(reader)); - } - - static fromString(address: string) { - return Point.fromBuffer(Buffer.from(address.replace(/^0x/i, ''), 'hex')); - } - - toBuffer() { - return Buffer.concat([this.x.toBuffer(), this.y.toBuffer()]); - } - - toString() { - return '0x' + this.toBuffer().toString('hex'); - } - - equals(rhs: Point) { - return this.x.equals(rhs.x) && this.y.equals(rhs.y); - } -} diff --git a/circuits/cpp/barretenberg/ts/webpack.config.js b/circuits/cpp/barretenberg/ts/webpack.config.js deleted file mode 100644 index 5c8623b2301..00000000000 --- a/circuits/cpp/barretenberg/ts/webpack.config.js +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Builds the web version of the worker, and outputs it to the dest directory. - */ -import { resolve, dirname } from 'path'; -import { fileURLToPath } from 'url'; -import ResolveTypeScriptPlugin from 'resolve-typescript-plugin'; -import CopyWebpackPlugin from 'copy-webpack-plugin'; -import HtmlWebpackPlugin from 'html-webpack-plugin'; -import webpack from 'webpack'; -// import { createRequire } from 'module'; - -// const require = createRequire(import.meta.url); - -export default { - target: 'web', - mode: 'production', - entry: { - barretenberg_wasm: './src/barretenberg_wasm/browser/worker.ts', - simple_test: './src/examples/simple.rawtest.ts', - }, - module: { - rules: [ - { - test: /\.tsx?$/, - use: [{ loader: 'ts-loader', options: { transpileOnly: true, onlyCompileBundledFiles: true } }], - }, - ], - }, - output: { - path: resolve(dirname(fileURLToPath(import.meta.url)), './dest'), - filename: '[name].js', - }, - plugins: [ - new HtmlWebpackPlugin({ inject: false, template: './src/index.html' }), - new webpack.DefinePlugin({ 'process.env.NODE_DEBUG': false }), - new webpack.ProvidePlugin({ Buffer: ['buffer', 'Buffer'] }), - new CopyWebpackPlugin({ - patterns: [ - { - // Point directly to the built file, not the symlink, else copy-on-change doesn't work... - from: `../cpp/build-wasm/bin/barretenberg.wasm`, - to: 'barretenberg.wasm', - }, - { - from: `../cpp/build-wasm-threads/bin/barretenberg.wasm`, - to: 'barretenberg-threads.wasm', - }, - ], - }), - ], - resolve: { - alias: { - './node/index.js': './browser/index.js', - }, - plugins: [new ResolveTypeScriptPlugin()], - }, - devServer: { - hot: false, - client: { - logging: 'none', - overlay: false, - }, - headers: { - 'Cross-Origin-Opener-Policy': 'same-origin', - 'Cross-Origin-Embedder-Policy': 'require-corp', - }, - }, -}; diff --git a/l1-contracts/README.md b/l1-contracts/README.md index 14f53e9059a..d3385a2c9f3 100644 --- a/l1-contracts/README.md +++ b/l1-contracts/README.md @@ -1,6 +1,6 @@ # L1 Contracts -This directory contains the Ethereum smart contract that we will be using for progressing the state of the Rollup. +This directory contains the Ethereum smart contract used for progressing the state of the Rollup. ## Installation