Remove unused POW code, will revisit later.

This commit is contained in:
Adam Ierymenko 2016-10-13 13:17:30 -07:00
parent e2509af163
commit 93b4ac5cb2
4 changed files with 0 additions and 211 deletions

View file

@ -891,8 +891,6 @@ public:
*/
VERB_MULTICAST_FRAME = 0x0e,
// 0x0f is reserved for an old deprecated message
/**
* Push of potential endpoints for direct communication:
* <[2] 16-bit number of paths>
@ -1044,49 +1042,6 @@ public:
*/
VERB_CIRCUIT_TEST_REPORT = 0x12,
/**
* Request proof of work:
* <[1] 8-bit proof of work type>
* <[1] 8-bit proof of work difficulty>
* <[2] 16-bit length of proof of work challenge>
* <[...] proof of work challenge>
*
* This requests that a peer perform a proof of work calucation. It can be
* sent by highly trusted peers (e.g. root servers, network controllers)
* under suspected denial of service conditions in an attempt to filter
* out "non-serious" peers and remain responsive to those proving their
* intent to actually communicate.
*
* If the peer obliges to perform the work, it does so and responds with
* an OK containing the result. Otherwise it may ignore the message or
* response with an ERROR_INVALID_REQUEST or ERROR_UNSUPPORTED_OPERATION.
*
* Proof of work type IDs:
* 0x01 - Salsa20/12+SHA512 hashcash function
*
* Salsa20/12+SHA512 is based on the following composite hash function:
*
* (1) Compute SHA512(candidate)
* (2) Use the first 256 bits of the result of #1 as a key to encrypt
* 131072 zero bytes with Salsa20/12 (with a zero IV).
* (3) Compute SHA512(the result of step #2)
* (4) Accept this candiate if the first [difficulty] bits of the result
* from step #3 are zero. Otherwise generate a new candidate and try
* again.
*
* This is performed repeatedly on candidates generated by appending the
* supplied challenge to an arbitrary nonce until a valid candidate
* is found. This chosen prepended nonce is then returned as the result
* in OK.
*
* OK payload:
* <[2] 16-bit length of result>
* <[...] computed proof of work>
*
* ERROR has no payload.
*/
VERB_REQUEST_PROOF_OF_WORK = 0x13,
/**
* A message with arbitrary user-definable content:
* <[8] 64-bit arbitrary message type ID>