Skip to content

Commit

Permalink
Merge pull request #10 from kendricktan/master
Browse files Browse the repository at this point in the history
Added Encryption, flow, repository + code cleanup
  • Loading branch information
barryWhiteHat committed Sep 15, 2019
2 parents 36a9d31 + 1488162 commit 5dce8c5
Show file tree
Hide file tree
Showing 38 changed files with 74,259 additions and 1,297,632 deletions.
3 changes: 3 additions & 0 deletions .babelrc
@@ -0,0 +1,3 @@
{
"presets": ["flow", "@babel/preset-flow"]
}
101 changes: 101 additions & 0 deletions .dockerignore
@@ -0,0 +1,101 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# Stuff we can auto-generate
proving_key.json
verification_key.json
witness.json
public.json
proof.json
circuit.json
input.json

app/circuits/

.vscode/
73 changes: 73 additions & 0 deletions .eslintrc
@@ -0,0 +1,73 @@
{
"parser": "babel-eslint",
"plugins": [
"flowtype"
],
"extends": [
"plugin:flowtype/recommended",
"standard",
"standard-flow"
],
"globals": {
"BigInt": "readonly"
},
"rules": {
"flowtype/boolean-style": [
2,
"boolean"
],
"flowtype/define-flow-type": 1,
"flowtype/delimiter-dangle": [
2,
"never"
],
"flowtype/generic-spacing": [
2,
"never"
],
"flowtype/no-mixed": 2,
"flowtype/no-types-missing-file-annotation": 2,
"flowtype/no-weak-types": 2,
"flowtype/object-type-delimiter": [
2,
"comma"
],
"flowtype/require-parameter-type": 2,
"flowtype/require-readonly-react-props": 0,
"flowtype/require-return-type": [
2,
"always",
{
"annotateUndefined": "never"
}
],
"flowtype/require-valid-file-annotation": 2,
"flowtype/semi": [
2,
"always"
],
"flowtype/space-after-type-colon": [
2,
"always"
],
"flowtype/space-before-generic-bracket": [
2,
"never"
],
"flowtype/space-before-type-colon": [
2,
"never"
],
"flowtype/union-intersection-spacing": [
2,
"always"
],
"flowtype/use-flow-type": 1,
"flowtype/valid-syntax": 1
},
"settings": {
"flowtype": {
"onlyFilesWithFlowAnnotation": false
}
}
}
14 changes: 14 additions & 0 deletions .flowconfig
@@ -0,0 +1,14 @@
[ignore]
.*/node_modules/.*

[include]

[libs]
flow-typed

[lints]

[options]
all=true

[strict]
101 changes: 101 additions & 0 deletions .gitignore
@@ -0,0 +1,101 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# Stuff we can auto-generate
proving_key.json
verification_key.json
witness.json
public.json
proof.json
circuit.json
input.json

app/circuits/

.vscode/
13 changes: 13 additions & 0 deletions Dockerfile
@@ -0,0 +1,13 @@
FROM node:10.16.3-jessie

COPY . /maci

WORKDIR /maci

RUN yarn install

# RUN yarn circuit:compile
# RUN yarn circuit:setup
# RUN yarn circuit:generatewitness

ENTRYPOINT [ "/bin/bash", "-c", "sleep 10000" ]
1 change: 1 addition & 0 deletions LICENSE
@@ -1,6 +1,7 @@
MIT License

Copyright (c) 2019 barryWhiteHat
Copyright (c) 2019 Kendrick Tan

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
38 changes: 32 additions & 6 deletions README.md
@@ -1,12 +1,38 @@
# maci
Minimal anti collusion infrastructure

# Intro
# MACI
Minimal Anti-Collusion Infrastructure

This project is based upon https://ethresear.ch/t/minimal-anti-collusion-infrastructure

# Contribution
# Developing on MACI

MACI is tested with `node v10.16.3`

```bash
yarn install

yarn circuit:compile
yarn circuit:setup
yarn circuit:generateverifier

# Runs app/utils/crypto.js .... for now ....
# Will make it prettier dw
yarn circuit:test
```

## With Docker

```bash
docker build -t maci .
docker exec -it $(docker run -t -d maci) /bin/bash

yarn circuit:compile
yarn circuit:setup
yarn circuit:generateverifier

yarn circuit:test # app/utils/crypto.js
```

# Contribution
We are actively seeking help on implementing this project please join https://t.me/joinchat/LUgOpE7J2gstRcZqdERyvw and ask about contributions

And check the help wanted issues.
And check the help wanted issues.

0 comments on commit 5dce8c5

Please sign in to comment.