This is a Go project implementing a Wisdom server and client. The server provides a wisdom quote to clients after they solve a proof-of-work challenge. The client sends requests to the server to get these wisdom quotes.
There were no requirements mentioned for the PoW challenge (like ASIC-resistance or memory-hardness), so I decided to implement the simplest hashcash-like PoW algorithm using SHA-256 function. The difficulty of the challenge is adjusted by COMPLEXITY variable in .env file. The difficulty is the expected number of leading zeros in the hash of the concatenation of the challenge value and nonce, i.e. the challenge solution.
- Make
- Docker
The server can be built and started with the following commands:
make build-server
make run-server
The client can be built and started with the following commands:
make build-client
make run-client