In POG, transactions are contained in blocks. These blocks must be verified by more than 60% of Prime Delegates to be accepted by the network.
For more information on this process, check out voting
Blocks contain several fields:
|timestamp||u64||64 bit||seconds of UTC time since Unix epoch (defined by the first node which sees the transaction)|
|signature||bytes||512 bit||signature of the block contents|
|publicKey||bytes||256 bit||account's public key|
|version||enum||up to 32 bit||block version|
|signatureType||varint||up to 32 bit||only Ed25519 currently|
|height||varint (unsigned)||up to 64 bit||the block height (block index); starts at 0|
|balance||varint (unsigned)||up to 64 bit||the new account ballance after applying all transactions|
|previous||bytes (optional)||256 bit||hash of the previous block|
|transactions||Transaction||variable||all transactions included in the block (limited to 255 unique transactions)|
Block IDs have to be unique as long as the block content is a valid new block, so block hashes are their ids.
Newley-created blocks need to be published to all Prime Delegates. These then publish their decision (accept or deny the block) to all other Prime Delegates and a subset of non-prime representatives (gossip about gossip).
To learn more about delegates, check out our page about them
There are currently 4 different types of transactions:
To create a new account, the account owner must create the open block.
|type||enum||variable||Managed Account (0) or Autonomous Account (1)|
This sends the funds out of the owners account and sets the block to pending until it is
claimed by a receiving account.
|reviever||bytes||up to 32 bit||account pog.network is being transfered to|
|amount||uint64||64 bit||amount of pog.network transfered to that account|
|data||bytes||variable||any data associated with the transaction|
Since only the account owner can add blocks to their own account chain, receiving funds involves creating a
claim block to collect the pending transaction.
|transactionID||bytes||up to 32 bit||transaction being claimed|
Assigns a new delegate for the account.
|representative||bytes||192 bit||account being delegated|
To ensure transaction IDs are unique, they're calculated as follows:
tx_id = sha3(block_hash + tx_hash);
Block and Transaction IDs should always be encoded as bytes when used over the wire. When presented on user-facing interfaces, like for addresses z-base-32 should be used.
However, in addition to this they should be prefixed with
txn- (there prefixes should be optional but be displayed by default).
blk-t518zdq98f6yah4c18zgyirkyouz5zq4wzaj8gw3wuej897hs5jo (56 chars)