This turns the project into a monorepo using pnpm workspaces, dramatically simplifying the build process. It also fixes a lot of bugs and just generally makes the codebase a lot cleaner.
IMPOST
Yet Another Pow capTCHA.
What is this
IMPOST is a proof of work based challenge-response system that is designed to ward off spam and abuse.
Basic configuration notes
Leading zeroes takes in a difficulty from 1 to 64, this indicates the number of
leading hexidecimal zeroes that are required for a problem to be solved. The
probability for a digit to be a zero is 1/16^D where D is the difficulty.
The following chart is provided for a baseline of the theoretical expected
average iterations it would take to solve challenge of difficulty D.
D |
expected average iterations |
|---|---|
| 1 | 16 |
| 2 | 256 |
| 3 | 4,096 |
| 4 | 65,536 |
| 5 | 1,048,576 |
| 6 | 16,777,216 |
| 7 | 268,435,456 |
| 8 | 4,294,967,296 |
Target Number takes in a max number of iterations, M, to be solved. The
probability that a solution is solved will be 1/targetNumber. This provides a
more preciese way of determining the difficulty of a challenge. With leading
zeroes, there is only a theoretical chance that a solution is found within a
certain number of iterations. With target number, there is a gurantee that a
solution will be found in, at most, M iterations.
Interesting links and blogs I used while writing this
- Anubis for inspiration. (once again, I have some strong opinions on Anubis, but thats is still neithehrere nor there)
- "Proof of Mutex: Outspeeding Anubis with Valid PoW" by yumechi
- https://www.arkoselabs.com/blog/proof-of-work-invisible-security-visible-results/ for giving me hope that PoW is not a fruitless endeavor for captchas.
- ALTCHA purely to see how another option in the space works. (I have some choice words about the implementation of ALTCHA, but I digress. No code from ALTCHA was used in this project.)
- The monero project for its list of algorithms they use in xmrig, and some inspiration.