MCPcopy Index your code
hub / github.com/SmartPool/smartpool-client

github.com/SmartPool/smartpool-client @v0.2.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2.2 ↗ · + Follow
663 symbols 1,648 edges 80 files 205 documented · 31%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Smartpool - The first decentralized mining pool based on smart contract (alpha)

Gitter

Ropsten testnet

Smartpool is live on Ropsten testnet. This repository consists of the client software. The smart contract repository is here.

Requirements

OS

The client is currently tested only on Mac OS and Ubuntu.

Golang compiler

Golang compiler version 1.7 or higher.

Parity client

Ethereum Parity client version 1.5.9 or higher.

Geth client

Ethereum Geth client needs to be compiled from source.

Ethminer

We support CPU and GPU mining with ethminer version 1.2.9 or higher.

ETH balance

To run smartpool you must have a Ropsten testnet account with least 0.5 Ether. You can get testnet Ethers from metamask faucets or ping us on our gitter channel.

Note: To get Ether from metamask faucet, you need to install metamask browser add-on.

Installation

  1. git clone https://github.com/SmartPool/smartpool-client.git
  2. cd smartpool-client
  3. ./compile.sh

Note: If you are on MacOS, there is a issue with Go and XCode 8.3 that might make you see killed ./smartpool error. To fix this issue, please run build/env.sh go build -o smartpool -ldflags -s cmd/ropsten/ropsten.go instead of ./compile.sh.

Running

  1. Run Geth on Ropsten testnet: geth --testnet --fast --rpc --rpcapi "db,eth,net,web3,miner" or Parity: parity --chain ropsten --jsonrpc-apis "web3,eth,net,parity,traces,rpc,parity_set"
  2. Run smartpool client ./smartpool --keystore keystore_path --miner account. Where
  3. keystore_path is a path to a directory that contains your account key. E.g., $HOME/.local/share/io.parity.ethereum/keys/kovan/.
  4. account is the address of your account. E.g., 0x2ba80fe2811f8e0ea5eabf8e07697f7e9f5ae56c.
  5. E.g., ./smartpool --keystore ~/Library/Ethereum/testnet/keystore --miner 0xe034afdcc2ba0441ff215ee9ba0da3e86450108d.
  6. Enter your key passphrase.
  7. Run ethminer -F localhost:1633 or ethminer -G -F localhost:1633 if you mine with your GPU.

Kovan testnet

Smartpool is also live on Kovan testnet.

Parity client

Ethereum Parity client version 1.5.9 or higher.

ETH balance

To run smartpool you must have a testnet Kovan account with least 0.5 Ether. You can get testnet Ethers from faucets.

Installation

  1. git clone https://github.com/SmartPool/smartpool-client.git
  2. cd smartpool-client
  3. ./kovan_compile.sh

Running

  1. Run Parity on Kovan testnet. parity --chain kovan --jsonrpc-apis "web3,eth,net,parity,traces,rpc,parity_set"
  2. Run smartpool client ./kovan --keystore keystore_path --miner account --spcontract 0x0398ae5a974FE8179B6B0ab9baF4d5f366E932Bf. Where
  3. keystore_path is a path to a directory that contains your account key. E.g., $HOME/.local/share/io.parity.ethereum/keys/kovan/.
  4. account is the address of your account. E.g., 0x2ba80fe2811f8e0ea5eabf8e07697f7e9f5ae56c
  5. Enter your key passphrase.
  6. Run ethminer -F localhost:1633 or ethminer -G -F localhost:1633 if you mine with your GPU.

Support

Contact us at gitter for support.

Extension points exported contracts — how you extend this code

ShareReceiver (Interface)
ShareReceiver represents SmartPool itself which accepts solutions from miners. [4 implementers]
interfaces.go
ClaimRepo (Interface)
ClaimRepo holds many claims but only 1 active clam at a time which is storing coming shares. [3 implementers]
protocol/claim_repo.go
Work (Interface)
Work represents SmartPool work that miner needs to solve to have valid shares. Work is easier (has smaller difficulty) t [2 …
types.go
NodeData (Interface)
(no doc) [2 implementers]
mtree/merkle_tree.go
DAGReader (Interface)
DAGReader provides a way for smartpool to retrieve DAG dataset. How the DAG is retrieve is upto structs implementing the
ethereum/dag_reader.go
ContractClient (Interface)
(no doc) [2 implementers]
ethereum/contract_client.go
RPCClient (Interface)
(no doc) [1 implementers]
ethereum/rpc_client.go
Counter (Interface)
(no doc)
mtree/aug_mt.go

Core symbols most depended-on inside this repo

Printf
called by 177
interfaces.go
Hex
called by 33
types.go
Big
called by 23
types.go
AcceptSolution
called by 21
types.go
BlockHeader
called by 13
ethereum/share.go
MinerAddress
called by 12
interfaces.go
ContractAddress
called by 11
interfaces.go
NumShares
called by 10
types.go

Shape

Method 364
Function 189
Struct 65
Interface 18
Class 14
TypeAlias 8
FuncType 3
Enum 2

Languages

Go88%
C7%
C++5%

Modules by API surface

ethereum/geth/generated_test_pool.go91 symbols
types.go37 symbols
interfaces.go32 symbols
ethereum/ethash/ethash.go32 symbols
ethereum/geth/generated_pool_monitor_client.go31 symbols
ethereum/ethash/src/libethash/internal.c23 symbols
ethereum/geth/rpc.go21 symbols
protocol/smartpool_test.go19 symbols
ethereum/share.go19 symbols
protocol/claim.go18 symbols
mtree/merkle_tree.go18 symbols
mtree/aug_mt.go16 symbols

For agents

$ claude mcp add smartpool-client \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact