btcollider/arch.md

55 lines
1.6 KiB
Markdown
Raw Normal View History

2018-04-04 13:18:34 +00:00
# Architecture #
## Partitioning ##
# Protocol #
| t | Client | Server | Comment |
|---|--------|--------|---------------|
| 2 | <CMD> | | Send command |
where `<CMD> = WRK | RES | REP`
(Work | Result | Report)
## WRK ##
Ask for work package
| t | Client | Server | Comment |
|---|--------|----------|--------------------------------------------------|
| 2 | WRK | | Send work command |
| 3 | | <WRKPKG> | Work package: Start key, end key, number of keys |
| 4 | ACK | | Ack work |
where `<WRKPKG> = <HEX1> <HEX2> <INT>`
`<HEX1> a 160 bit hex number`
`<HEX2> a 160 bit hex number strictly greater than <HEX1>`
`<INT> a 32 bit unsigned integer equalling <HEX1> - <HEX2> in base 10`
## RES ##
MUST follow proper WRK
Respond with result for work block.
| t | Client | Server | Comment |
|---|--------------|--------|-----------------------------------------------------|
| 2 | RES <WRKPKG> | | Send result command with corresponding work package |
| 3 | | ACK | Ack receiving |
| 4 | <RES> | | Result type |
| 5 | | ACK | Ack receiving |
where `<RES> = NIL | ACK`
if SUC:
| 6 | <HEX> | | Private key hex if found |
| 7 | | ACK | Ack receiving |
## REP ##
TODO
# TODO #
[ ] Admin communication
[ ] Admin interface
[ ] Adapt brainflyer