New block types

CORE

The new version presumes blocks with technical information on the blockchain in addition to the existing ones:

  • blocks of block confirmation,
  • blocks of rejected transaction information.

New blocks go along with the main ones. First comes the block size in int64 format, then the block itself.

Confirmation Blocks

They are introduced for more timely provision of blocks confirmation information to the main chain. Also, there is an option to confirm forging blocks and state blocks without a need to create a regular block.

Block format:

NameTypeSizeDescription
1block_typeuint64_t8Block type - 0x1100111167452301
2block_timestampuint64_t8Block creation time
3prev_hasharray32Block hash to which confirmations belong
4tx_sizevarint1-9Confirmation transaction size
5ApproveRecordarraytx_sizeConfirmation transaction
6...Steps 4 and 5
Not step 7
7tx_size = 0varint1If transaction size is zero, a block ends

Confirmation transaction format:

NameTypeSizeDescription
1block_hasharray32Block hash which is confirmed
2sign_sizevarint1-9Signature size
3signarraysign_sizeHash signature
4pubk_sizevarint1-9Public key size
5pub_keyarraypubk_sizeThe public key by which the hash was signed

Information blocks of rejected transactions

They inform users about the reasons for transaction rejection by the Core.

Block format:

1block_typeuint64_t8Block type - 0x3300111167452301
2block_timestampuint64_t8Block creation time
3block_timestamparray32Block hash with the relevance of which transactions were rejected
4sign_sizevarint1-9Signature size
5signarraysign_sizeTransaction signature (from the public key end to the block end)
6pubk_sizevarint1-9Public key size
7pubkarraypubk_sizeThe public key by which transactions were signed
8tx_sizevarint1-9Confirmation transaction size
9RejectedTXInfoarraytx_sizeConfirmation transaction
10...Steps 8 and 9
Not step 11
11tx_size = 0varint1If transaction size is zero, a block ends

Confirmation transaction format:

NameTypeSizeDescription
1tx_hasharray32Hash of reject transaction
2reasonvarint1-9Error code that rejected the transaction

Decoding error codes:

ReasonCode
1A transaction was sent from a zero wallet0xff01
2The fee is not enough to send a transaction0xff02
3There is not enough funds in wallet to complete a transaction0xff03
4There is a wrong nonce0xff04
5There is not enough funds in wallet to complete a transaction0xff05
6There is an invalid sender or receiver address format0x0404