Pack (Header & body)

Pack Header:

  1. scan range - to tell how far this pack has scanned, so the value is start block-tx number & end block-tx number. block-tx number is a combination number of eth block + its associated tx index, for example, a bridge tx was found in block#150291023, and it positions at 1022th place in the block, therefore block-tx number will be 1502910231022.

Pack Body (list of bridge tx):

  1. txhash - txhash, for sc to check to prevent double transfer.

  2. token address - token contract address

  3. recipient - recipient address

  4. amount - token amount to transact.

it's safe, because:

  1. geth node applies uint64 to store block number and EVM (solidity) supports uint64.

  2. Max uint64 value would be 18,446,744,073,709,551,615 and up to this writting, eth block number is 13,400,089, so adding up of 4 digits for tx index is still far to reach max uint64 value.

  3. Throughout growth of ethereum and bsc blockchain

ethereum highest tx per block ever hit was 1431 txs in block#13,002,929 bsc highest tx per block ever hit was 3897 txs in block#12,938,453.

  1. Therefore adding of 4 digits for tx index is enough to support up to 10,000 txs.

Last updated