Skip to content

Commit

Permalink
stratum protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
HarukaMa committed Jul 7, 2022
1 parent 0000045 commit 0000046
Show file tree
Hide file tree
Showing 14 changed files with 922 additions and 84 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,5 @@ target/
# End of https://www.toptal.com/developers/gitignore/api/clion+all,rust

.env
*.iml
*.iml
*~
62 changes: 54 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ snarkvm-algorithms = { git = "https://github.com/HarukaMa/snarkVM.git", branch =
#snarkos = { path = "../../src/snarkOS" }
#snarkos-storage = { path = "../../src/snarkOS/storage" }
snarkos = { git = "https://github.com/HarukaMa/snarkOS.git", branch = "custom-pool-staging" }
snarkos-storage = { git = "https://github.com/HarukaMa/snarkOS.git", branch = "custom-pool-staging", features = [] }
snarkos-storage = { git = "https://github.com/HarukaMa/snarkOS.git", branch = "custom-pool-staging"}
tracing = "0.1.35"
tracing-log = "0.1.3"
tracing-subscriber = "0.3.11"
Expand All @@ -30,6 +30,14 @@ byteorder = "1.4.3"
warp = "0.3.2"
tokio-postgres = "0.7.6"
dotenv = "0.15.0"
json-rpc-types = "1.0.2"
semver = "1.0.12"
hex = "0.4.3"
rayon = "1.5.3"
num_cpus = "1.13.1"

[dependencies.aleo-stratum]
path = "./stratum"

[dependencies.deadpool-postgres]
version = "0.10.2"
Expand All @@ -56,7 +64,8 @@ version = "1.19.2"
features = [
"rt-multi-thread",
"macros",
"sync"
"sync",
"time",
]

[dependencies.rocksdb]
Expand Down
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ A mining pool server for the Aleo network.

## Why a Standalone Server?

1. I wanted to separate the mining pool part from the network node as ledger syncing sometimes interferes with the mining pool operations.
2. I wanted to use a more efficient network protocol for pool - miner communication.
1. I want to separate the mining pool part from the network node as ledger syncing sometimes interferes with the mining pool operations.
2. I want to use a more efficient network protocol for pool - miner communication.
3. Making too many changes to the snarkOS code could be a bad idea as I still need to sync with upstream code.
4. It's easier to test the mining pool with a standalone server.
5. It's also easier to add more features to a smaller codebase.

## Features

1. ~~A stratum-like protocol for pool - miner communication.~~ ditching this as I want a really general protocol, ideally standardized
1. A stratum protocol. Specs coming soon.
2. A good enough automatic difficulty targeting system. (Needs more test under high load)
3. Stats for pool and provers.

Expand All @@ -23,7 +23,7 @@ A mining pool server for the Aleo network.
Undergoing a lot of rewrite:

- ~~Use RDBMS instead of RocksDB for most of the data storage~~
- Use a real stratum protocol for pool - miner communication
- ~~Use a real stratum protocol for pool - miner communication~~
- ~~Rework the difficulty targeting system~~
- Decide if more API endpoints are needed -- many of the work should be offloaded to frontends
- Payout system step 1 - allocate rewards to provers after confirmation
Expand Down
Loading

0 comments on commit 0000046

Please sign in to comment.