Skip to content

Commit

Permalink
add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ycryptx committed Nov 27, 2023
1 parent 371bfeb commit 519b284
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,30 @@ You may bring your own ZkApp Rollup implemented in any way you see fit. However,

After implementing [these](rollup/src/generics.ts) abstractions, make sure to use them in the sequencer by updating [mapper.ts](sequencer/src/mapper.ts), [reducer.ts](sequencer/src/reducer.ts) [compiler.ts](sequencer/src/compiler.ts) and [sequencer.ts](sequencer/src/sequencer.ts).

To start the sequencer:
```bash
yarn sequencer start
```
This starts up a grpc server which can be used to run the demos (You can call `make run-demo` to run a basic demo). You can modify the server code to fit your needs [here](sequencer/src/server/services/sequencer.ts).

The core of the sequencer code is in [sequencer/src/map-reduce/](sequencer/src/map-reduce/client/client.ts). You can use it directly to run the map-reduce operation as such:
```typescript
const MODE = MODES.EMR
const REGION = 'eu-central-1'
const client = new MapReduceClient<RollupProof>(MODE, REGION);

// First we need to upload your transactions to S3
const txUploader = client.uploader.uploadTransactionsToS3();
const transactions: MyTransaction[] = [/* ...your transactions */]
for (const tx of transactions) {
txUploader.write(tx.serialize());
}
inputFileUrl = await txUploader.end();

// Then we can initialize a Hadoop cluster and start the map-reduce operation
const accumulatedProof = await this.mapReduce.process(inputFileUrl, transactions.length);
```

## [Deployment](./accumulator/infra/README.md)
TODO: missing a general overview including explanation about deployment of the sequencer, the hadoop cluster, and instructions about terraform

Expand Down

0 comments on commit 519b284

Please sign in to comment.