Skip to content

Commit

Permalink
Merge pull request #26 from idky137/add_jsonrpc
Browse files Browse the repository at this point in the history
Add jsonrpc
  • Loading branch information
Oscar-Pepper authored Jul 18, 2024
2 parents b119bf9 + cba31b9 commit 1cbd634
Show file tree
Hide file tree
Showing 28 changed files with 5,859 additions and 447 deletions.
1,644 changes: 1,462 additions & 182 deletions Cargo.lock

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ nym-bin-common = { git = "https://github.com/nymtech/nym", branch = "master" }
nym-sphinx-anonymous-replies = { git = "https://github.com/nymtech/nym", branch = "master" }

http = "0.2.4"
tokio = { version = "1", features = ["full"] }
tokio = { version = "1.37.0", features = ["full"] }
tonic = "0.10.2"
prost = "0.12"
bytes = "1.1"
http-body = "0.4.4"


hyper = { version = "0.14.28", features = ["full"] }
hyper-rustls = { version = "0.23", features = ["http2"] }
tower = { version = "0.4.13" }
tokio-rustls = "0.23"
rustls-pemfile = "1.0.0"

16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
# Zingo-Proxy
A(n eventual) replacement for lightwalletd, written in Rust.

Currently connects to a lightwalletd, and acts as a man-in-the-middle proxy that does nothing.
Each RPC we wish to support will be added individually, by connecting to zebrad and doing any nessisary processing.
Eventually, we'll no longer have any calls that need to use the lightwalletd, and it can be removed from the network stack entirely.
A rust implemented, nym enhanced, lightwalletd for Zcash.

A note to developers/consumers/contributers: The end goal is not an exact one-to-one port of all existing lwd functionaliy.
We currently plan to hold the Service and Darkside RPC implementations, along with a Nym counterpart to the service RPCs for sending and recieving currency over the Nym Mixnet. And a Lightweight gRPC server for testing and development (this may be fleshed out to be a mainnet LightWalletD alternative in the future but is currently not a priority and will depend on zebrad).
We currently plan to hold the Service and Darkside RPC implementations, along with a Nym counterpart to the service RPCs for sending and recieving currency over the Nym Mixnet.

# Security Vulnerability Disclosure
If you believe you have discovered a security issue, please contact us at:

[email protected]

# Zingo-RPC
will eventually hold the rust implementations of the LightWallet Service and Darkside RPCs, along with the wallet-side and server-side Nym Service implementations.
Will eventually hold the rust implementations of the LightWallet Service and Darkside RPCs, along with the wallet-side and server-side Nym Service implementations.

# Zingo-ProxyD
A lightweight gRPC server for testing and development. Zingo-ProxyD also has a basic nym server, currently only receives send_transaction commands send over the mixnet.
Currently a lightweight gRPC server for testing and development. Zingo-ProxyD also has a basic nym server, currently only receives send_transaction commands send over the mixnet.
This should not be used to run mainnet nodes in its current form as it lacks the queueing and error checking logic necessary.

Under the "nym_poc" feature flag Zingo-ProxyD can also act as a Nym powered proxy between zcash wallets and Zingo-ProxyD, capable of sending zcash transactions over the Nym Mixnet.
Expand All @@ -32,7 +28,7 @@ Our plan is to first enable wallets to send and recieve transactions via a nym p

# Dependencies
1) zebrad <https://github.com/ZcashFoundation/zebra.git>
2) lightwalletd <https://github.com/zcash/lightwalletd.git>
2) lightwalletd <https://github.com/zcash/lightwalletd.git> [require for testing]
3) zingolib <https://github.com/zingolabs/zingolib.git> [if running zingo-cli]
4) zcashd, zcash-cli <https://github.com/zcash/zcash> [required for integration tests until zebrad has working regtest mode]

Expand All @@ -45,7 +41,6 @@ Our plan is to first enable wallets to send and recieve transactions via a nym p
# zingoproxyd
- To run zingo-cli through zingo-proxy, connecting to lightwalletd/zebrad locally:
1) Run `$ zebrad --config #PATH_TO_ZINGO_PROXY/zebrad.toml start`
2) Run `$ ./lightwalletd --no-tls-very-insecure --zcash-conf-path $PATH_TO_ZINGO_PROXY/zcash.conf --data-dir . --log-file /dev/stdout`
3) Run `$ cargo run`

From zingolib:
Expand All @@ -55,7 +50,6 @@ From zingolib:
The walletside Nym implementations are moving to ease wallet integration but the POC walletside nym server is still available under the "nym_poc" feature flag.
- To run the POC:
1) Run `$ zebrad --config #PATH_TO_ZINGO_PROXY/zebrad.toml start`
2) Run `$ ./lightwalletd --no-tls-very-insecure --zcash-conf-path $PATH_TO_ZINGO_PROXY/zcash.conf --data-dir . --log-file /dev/stdout`
3) Run `$ cargo run`
4) Copy nym address displayed
5) Run `$ cargo run --features "nym_poc" -- <nym address copied>`
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ shardtree = "0.3"
json = "0.12.4"
log = "0.4.17"
itertools = "0.10.5"
serde_json = "1.0.107"
serde_json = "1.0.117"
hex = "0.4"
Loading

0 comments on commit 1cbd634

Please sign in to comment.