Browse Source

Add stuff for modified parity.

Thomas Kerber 1 year ago
parent
commit
96ff533d0f
10 changed files with 109 additions and 1 deletions
  1. 2
    1
      .gitignore
  2. 6
    0
      .gitmodules
  3. 15
    0
      Makefile
  4. 7
    0
      bin/pinocchio-prove.sh
  5. 2
    0
      node.pwds
  6. 17
    0
      node0.toml
  7. 17
    0
      node1.toml
  8. 1
    0
      parity
  9. 1
    0
      pinocchio
  10. 41
    0
      testchain.json

+ 2
- 1
.gitignore View File

@@ -2,4 +2,5 @@
2 2
 *.log
3 3
 *.toc
4 4
 *.pdf
5
-/pinocchio
5
+/bin/pinocchio.exe
6
+/bin/parity

+ 6
- 0
.gitmodules View File

@@ -1,3 +1,9 @@
1 1
 [submodule "solidity"]
2 2
 	path = solidity
3 3
 	url = git@tkerber.org:uni/solidity.git
4
+[submodule "pinocchio"]
5
+	path = pinocchio
6
+	url = https://git01.codeplex.com/vc
7
+[submodule "parity"]
8
+	path = parity
9
+	url = git@tkerber.org:uni/parity.git

+ 15
- 0
Makefile View File

@@ -0,0 +1,15 @@
1
+.PHONY: all clean
2
+
3
+all: bin/pinocchio.exe bin/parity
4
+
5
+clean:
6
+	rm -f bin/piocchio.exe
7
+
8
+bin/pinocchio.exe: pinocchio/pinocchio/pinocchio-v0.5.3.exe
9
+	cp $< $@
10
+
11
+bin/parity: parity/target/release/parity
12
+	cp $< $@
13
+
14
+parity/target/release/parity:
15
+	cd parity && cargo build --release

+ 7
- 0
bin/pinocchio-prove.sh View File

@@ -0,0 +1,7 @@
1
+#!/bin/bash
2
+mkdir -p /tmp/pinocchio
3
+cd /tmp/pinocchio
4
+# TODO: implement.
5
+# Goal: calling pinocchio-prove.sh <circuit> <inputs> outputs a hex encoded proof, and a hex encoded outputs.
6
+# Goal: calling pinocchio-verify.sh <circuit> <inputs> <outputs> <proof> has no output, but exists with status 0 if succeeded, and 1 otherwise.
7
+wine "$(dirname "$(readlink -f "$0")")/pinocchio.exe"

+ 2
- 0
node.pwds View File

@@ -0,0 +1,2 @@
1
+node0
2
+node1

+ 17
- 0
node0.toml View File

@@ -0,0 +1,17 @@
1
+[parity]
2
+chain = "testchain.json"
3
+base_path = "/tmp/parity0"
4
+[network]
5
+port = 30300
6
+[rpc]
7
+port = 8540
8
+apis = ["web3", "eth", "net", "personal", "parity", "parity_set", "traces", "rpc", "parity_accounts"]
9
+[ui]
10
+port = 8180
11
+[dapps]
12
+port = 8080
13
+[account]
14
+password = ["node.pwds"]
15
+[mining]
16
+engine_signer = "0x00bd138abd70e2f00903268f3db08f2d25677c9e"
17
+reseal_on_txs = "none"

+ 17
- 0
node1.toml View File

@@ -0,0 +1,17 @@
1
+[parity]
2
+chain = "testchain.json"
3
+base_path = "/tmp/parity1"
4
+[network]
5
+port = 30301
6
+[rpc]
7
+port = 8541
8
+apis = ["web3", "eth", "net", "personal", "parity", "parity_set", "traces", "rpc", "parity_accounts"]
9
+[ui]
10
+port = 8181
11
+[dapps]
12
+port = 8081
13
+[account]
14
+password = ["node.pwds"]
15
+[mining]
16
+engine_signer = "0x00aa39d30f0d20ff03a22ccfc30b7efbfca597c2"
17
+reseal_on_txs = "none"

+ 1
- 0
parity

@@ -0,0 +1 @@
1
+Subproject commit ff96e93d2fd8d32a922b633efa198596e8214eee

+ 1
- 0
pinocchio

@@ -0,0 +1 @@
1
+Subproject commit 0df1815c3e0c9911e2857ef9209b7b8e9a2bcffd

+ 41
- 0
testchain.json View File

@@ -0,0 +1,41 @@
1
+{
2
+    "name": "VC Test Chain",
3
+    "dataDir": "vctest",
4
+    "engine": {
5
+        "authorityRound": {
6
+            "params": {
7
+                "gasLimitBoundDivisor": "0x400",
8
+                "stepDuration": "5",
9
+                "validators" : {
10
+                    "list": [
11
+                        "0x00bd138abd70e2f00903268f3db08f2d25677c9e",
12
+                        "0x00aa39d30f0d20ff03a22ccfc30b7efbfca597c2"
13
+                    ]
14
+                }
15
+            }
16
+        }
17
+    },
18
+    "params": {
19
+        "maximumExtraDataSize": "0x20",
20
+        "minGasLimit": "0x1388",
21
+        "networkID" : "0x2323"
22
+    },
23
+    "genesis": {
24
+        "seal": {
25
+            "authorityRound": {
26
+                "step": "0x0",
27
+                "signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
28
+            }
29
+        },
30
+        "difficulty": "0x20000",
31
+        "gasLimit": "0x5B8D80"
32
+    },
33
+    "accounts": {
34
+        "0x0000000000000000000000000000000000000001": { "balance": "1", "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } },
35
+        "0x0000000000000000000000000000000000000002": { "balance": "1", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } },
36
+        "0x0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
37
+        "0x0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
38
+        "0x0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "verify", "pricing": { "linear": { "base": 15, "word": 3 } } } },
39
+        "0x004ec07d2329997267ec62b4166639513386f32e": { "balance": "10000000000000000000000" }
40
+    }
41
+}

Loading…
Cancel
Save