Skip to content

tonwhales/ai-agent

Repository files navigation

Protocol

Inputs

  • Job ID - unsigned int 32 bit
  • h0-h7 - unsigned int 32 bit
  • data - 64 bytes
  • iterations - unsigned int 32 bit

Outputs

  • output_hash - 32 bytes
  • output_random - 32 bytes

Job Packet

  • HEADER: 0xa461a18c (magic number)
  • JOB_ID: 4 bytes
  • H0-H7: 8 * 4 = 32 bytes
  • DATA: 64 bytes
  • ITERATIONS: 4 bytes

┌──────┬──────┬──┬──┬──┬──┬──┬──┬──┬──┬─────────┬──────────┐ │HEADER│JOB_ID│H0│H1│H2│H3│H4│H5│H6│H7│DATA ....│ITERATIONS│ └──────┴──────┴──┴──┴──┴──┴──┴──┴──┴──┴─────────┴──────────┘

┌─────┬────────────┬─────┬────┐ │NONCE│48 bytes....│NONCE│TAIL│ └─────┴────────────┴─────┴────┘

Job Packet

  • HEADER: 0x4294379b (magic number)
  • JOB_ID: 4 bytes
  • OUTPUT_HASH: 32 bytes
  • OUTPUT_DATA: 64 bytes

┌──────┬──────┬───────────┬───────────┐ │HEADER│JOB_ID│OUTPUT_HASH│OUTPUT_DATA│ └──────┴──────┴───────────┴───────────┘

Example

Input:

a461a18c
3ef5d0bb
da5698be17b9b46962335799779fbeca8ce5d491c0d26243bafef9ea1837a9d8
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000
00000001
  • JobID: 3ef5d0bb
  • H: [3663108286, 398046313, 1647531929, 2006957770, 2363872401, 3235013187, 3137272298, 406301144]
  • Data: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000
  • Iterations: 1

Output:

4294379b
3ef5d0bb
409a7f83ac6b31dc8c77e3ec18038f209bd2f545e0f4177c2e2381aa4e067b49
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000
  • JobID: 3ef5d0bb
  • Output: 409a7f83ac6b31dc8c77e3ec18038f209bd2f545e0f4177c2e2381aa4e067b49
  • Output Data: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published