What is a transaction?

The term "transaction" used in Ledgerium blockchain refers to the signed data package that stores a message that will be sent from an externally owned account to another account on the blockchain.

Transactions contain:

  • the recipient of the message

  • a signature identifying the sender and proving their intention to send the message via the blockchain to the recipient

  • VALUE field - The amount of wei to transfer from the sender to the recipient

  • an optional data field, which can contain the message sent to a contract

  • a STARTGAS value, representing the maximum number of computational steps the transaction execution is allowed to take

  • a GASPRICE value, representing "Wei per gas". One Wei corresponds to 0.000000000000000001 XLG

Transaction Processing

One of the key features of Ledgerium blockchain is Transaction Privacy. We introduce the notion of 'Public Transactions' and 'Private Transactions'.

How does transaction get into the Ledgerium blockchain?

  1. If you need to transfer XLG, you should first make a transaction using Ledgerium wallet with your private key. Once done, the transaction is then broadcasted to the block producer node.

  2. Node is a server that keeps a full record of transactions on the Ledgerium blockchain. Once your transaction reaches the node, it’s automatically added to the mempool.

  3. Mempool is a pool of transactions that are waiting to be confirmed.

  4. If other nodes see your transaction it will be also visible on the block explorer with a status “Unconfirmed or Pending Transaction”.

  5. The next step: Block Producer node approves your transaction. They just pick it up from the mempool and include it in a block. The block added to the blockchain and your XLG gets automatically transferred to the sender's address.

  6. The full process for Ledgerium Blockchain often takes 5 seconds to get transaction included into the block. After it, you will see on a block explorer that the transaction status changed to “Confirmed”.

Public Transactions

'Public Transactions' are those transactions whose payload is visible to all participants of the Ledgerium blockchain network. It would be more appropriate to call them 'common' or 'global' transactions', but 'Public' is used to contrast with 'Private' transactions.

Examples of Public Transactions may include Market Data updates from some service provider or some reference data update such as a correction to a Bond Security definition.

Private Transactions

'Private Transactions' are those Transactions whose payload is only visible to the network participants whose tessera node public keys are specified in the privateFor parameter of the Transaction. privateFor can take multiple public keys in a comma-separated list.

Public vs Private Transaction handling

Public Transaction is sent to an Account that holds Contract code, each participant will execute the same code and their underlying Global StateDBs will be updated accordingly.

Private Transactions are submitted to Ledgerium block producer node and then block producer node sends the payload to its peer Tessera node. Tessera gives back the hash of the Encrypted Payload. The hash is added to the block producer node's local StateDBs.

Participants that are a party to the Transaction will be able to replace the hash with the actual payload via their Tessera instance, whilst those participants that are not a party will only see the hash.

The result is that if a Private transaction is sent to an Account that holds Contract code, those participants who are not a party to the Transaction will simply end-up skipping the Transaction, and therefore not execute the Contract code. However those participants that are a party to the Transaction will replace the hash with the original Payload before calling the EVM for execution, and their StateDB will be updated accordingly. In the absence of making corresponding changes to the geth client, these two sets of participants would, therefore, end up with different StateDBs and not be able to reach consensus.

Private Transaction Process Flow

Please refer Private Transaction Flow section under Tessera