Skip to content

BOE Introduction

BlockGeek edited this page Apr 24, 2019 · 3 revisions

“BOE” is an abbreviation for “blockchain offload engine”. It makes use of the concurrent processing capability of FPGA to accelerate transactions and block processing on blockchain nodes. HPB’s prometheus corresponds deeply with pseudo-random sequences of BOE to ensure that nodes in the network can operate quickly, stably and safely. The following is a detailed introduction to the BOE workflow from two aspects: transaction check and pseudo-random sequence.

1 Transaction Check

Generally speaking, transactions on HPB include the following steps:

  • Receive transaction data from the client

  • Restore public key with BOE and get the sender's public key

  • Calculate the sender's account address based on the public key

  • Verify the legality of the transaction based on the account balance and Nonce

  • If verified as legal, place it in the trading pool and wait to be packed and uploaded onto the block.

  • Transaction is completed once the account gets uploaded onto the block

    flow1

Figure 1: Transaction Flow Chart

Of the aforementioned steps, step 2 in which public keys are restored is the major one. Steps to go about it include:

  • The main program packages the transaction data into a network package
  • BOE receives data from the NIC (network interface controller)
  • Use protocol modules to analyze the protocols
  • Put the data in the corresponding task queue according to the type of the operation
  • Use task scheduling modules to put the task from the queue to the ECC arithmetic module
  • Reassemble the packet and send the result back to the NIC
  • The main program receives the data returned by BOE, and analyzes it to get the public key.

Figure 2 BOE Block Diagram

2 Prometheus Random Sequence

HPB’s Prometheus and BOE are connected in such a way that each block node is specified by the pseudo-random sequence generated by BOE.

The main process is as follows:

  • Each node stands ready to generate blocks
  • Acquire Hash sequences from previous block headers
  • Calculate NewHash based on current Hash sent to BOE
  • Acquire index of outbound nodes for this particular round based on NewHash and the total remaining number of nodes in the current snapshot.
  • If the current node turns out not the node calculated above, a short delay will occur.
  • If the current node turns out to be the one calculated above, the block will be generated and broadcasted immediately.
  • After all other nodes are synchronized to the block, repeat steps 2-4 to verify whether producers of the blocks are selected out nodes in the previous steps.

flow3

​ Figure 3: BOE Block Generation Flow

The calculation of random numbers is a major function of BOE. The procedure includes the following steps:

  • The main program gets the current sequence hash from the block header, forms a packet and sends it to BOE.
  • BOE receives data from the NIC
  • Use protocol modules to analyze the protocols
  • Put the data in the corresponding task queue according to the type of the operation
  • Use task scheduling modules to put the task from the queue to the random sequence operation module
  • Reassemble the packet and send the result to the NIC
  • The main program receives the data returned by BOE and parses it to get NewHash

1548774223928


Figure 4 BOE Work Block Diagram

Clone this wiki locally