Eve-Relay/consts.ts
2025-02-22 14:30:46 +01:00

20 lines
673 B
TypeScript

/**
* Minimum required Proof of Work (PoW) difficulty for note acceptance.
*
* Notes with PoW below this threshold will be rejected without decryption attempts.
* This threshold serves as a DoS protection mechanism for the CCN in case of
* public key compromise.
*/
export const MIN_POW = 8;
/**
* Target Proof of Work (PoW) difficulty for relay-generated notes.
*
* Defines the PoW difficulty level that the relay will compute when generating
* and encrypting its own notes before broadcasting them to the network.
*
* Expected Performance on modern hardware (2025):
* - Difficulty 8: ~1ms
* - Difficulty 21: ~5-6 seconds
*/
export const POW_TO_MINE = 10;