This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate nodes for each account, sending an receiving money.
- Loading branch information
Showing
32 changed files
with
1,869 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DATABASE_URL=demodb.sqlite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/target | ||
**/*.rs.bk | ||
Cargo.lock | ||
demodb.sqlite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
[package] | ||
name = "zkvm-demo" | ||
version = "0.1.0" | ||
authors = ["Oleg Andreev <oleganza@gmail.com>"] | ||
edition = "2018" | ||
|
||
[dependencies] | ||
rand = "0.6" | ||
rocket = "0.4.2" | ||
diesel = { version = "1.0.0", features = ["postgres"] } | ||
dotenv = "0.9.0" | ||
merlin = "1.0.1" | ||
curve25519-dalek = { version = "1.0.1", features = ["serde"] } | ||
serde = { version = "1.0", features=["derive"] } | ||
rand_chacha = "0.1" | ||
hex = "^0.3" | ||
|
||
[dependencies.bulletproofs] | ||
git = "https://github.com/dalek-cryptography/bulletproofs" | ||
branch = "develop" | ||
features = ["yoloproofs"] | ||
|
||
[dependencies.keytree] | ||
path = "../keytree" | ||
|
||
[dependencies.musig] | ||
path = "../musig" | ||
|
||
[dependencies.zkvm] | ||
path = "../zkvm" | ||
|
||
[dependencies.accounts] | ||
path = "../accounts" | ||
|
||
[dependencies.rocket_contrib] | ||
version = "0.4.2" | ||
default-features = false | ||
features = ["handlebars_templates", "tera_templates", "serve", "diesel_sqlite_pool"] | ||
|
||
[dependencies.serde_json] | ||
git = "https://github.com/oleganza/json" | ||
#path = "../../../rust/serde-json" | ||
branch = "binary-support" | ||
features = ["binary_hex"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# ZkVM demo | ||
|
||
## Schema | ||
|
||
### Nodes | ||
|
||
``` | ||
- id | ||
- blockchain_state | ||
- xprv | ||
- account sequence number | ||
- confirmed_utxos | ||
- pending_utxos | ||
``` | ||
|
||
### Blocks | ||
|
||
``` | ||
- block height | ||
- block_json | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[global.databases] | ||
demodb = { url = "demodb.sqlite" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# For documentation on how to configure this file, | ||
# see diesel.rs/guides/configuring-diesel-cli | ||
|
||
[print_schema] | ||
file = "src/schema.rs" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
DROP TABLE blocks; | ||
DROP TABLE assets; | ||
DROP TABLE nodes; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
CREATE TABLE IF NOT EXISTS block_records ( | ||
height integer PRIMARY KEY NOT NULL, | ||
block_json text NOT NULL, | ||
state_json text NOT NULL | ||
); | ||
|
||
CREATE TABLE IF NOT EXISTS asset_records ( | ||
alias varchar PRIMARY KEY NOT NULL, | ||
key_json text NOT NULL | ||
); | ||
|
||
CREATE TABLE IF NOT EXISTS node_records ( | ||
alias varchar PRIMARY KEY NOT NULL, | ||
state_json text NOT NULL | ||
); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nightly-2019-08-19 |
Oops, something went wrong.