Skip to content

Glossary and key concepts

Adrien LF edited this page Aug 31, 2022 · 5 revisions

Where is the money ?

  • Wallet: a set of private keys (with their associated public key and address)
  • address: hash (often of a public key). Tokens, rolls and/or bytecode are associated with an address. An address is associated with a thread for sharding purposes.
  • smart contract address: a specific kind of address that was generated by bytecode execution, that is not associated with a private key. Hence it is immutable. Note : a deletion mechanism can be implemented in the associated byte code.
  • sequential vs parallel balance: there are two ledgers. One ledger is the parallel ledger. Transaction, roll sell and roll buy operation interact with that ledger. An address can spend coins only in its own thread. ie the operations it produced that spend parallel coins can only be included in blocks produced at a slot on the thread associated with that address. The other ledger is in the smart contracts world. Blocks are executed one after the other, not in parallel, so there is no constraint on where an address can spend coins. This ledger is funded by transferring coins from the parallel ledger. If you want to credit back some coins to the parallel ledger, there is a special operation, but you'll wait until the end of the cycle before coins are back on the parallel ledger.
  • final balance: balance at the latest final blocks
  • locked balance: balance that comes from a roll sell. It is locked for a cycle before being usable again
  • candidate balance: balance at latest blocks
  • ledger vs balance:the ledger is the long term memory of the blockchain. For every address it may contain a balance, some bytecode, a map of hashes to bytes)
  • staking address: address that has at least one roll

Graph stuff

  • compatibility graph: graph of all compatible blocks (see https://arxiv.org/pdf/1803.09029.pdf and https://github.com/massalabs/massa/discussions/2161 for more information on compatibility rules). Theoretical construction. Never computed for real.
  • head incompatibility graph: graph of incompatible active blocks (see https://arxiv.org/pdf/1803.09029.pdf). The really computed part. -> As is we don't understand the difference with the definition just above
  • final: a block becomes final if its fitness is higher than a protocol defined threshold.
  • stale: a block is stale when it is incompatible with a final block
  • fitness: for a block: 1 + number of endorsement included in the block. for a clique: sum of its blocks fitness. Used to determine if a block is final or not
  • blockclique: the clique of higher fitness

Consensus and block production

  • proof of stake: https://en.wikipedia.org/wiki/Proof_of_stake a consensus mechanism based on the amount of coin.
  • baking/block generation: baking is not used in massa.
  • epoch: this term is not used in massa
  • thread: addresses are sharded across threads.
  • period: on a thread, a block is produced every period
  • cycle: config defined number of huge periods. Unit of time for roll changes. Last for about 30 minutes.
  • slot: point in time defined by it's period and thread, at which a block should be created
  • slashing:not yet implemented
  • staker: owner of at least one roll. They are expected to create blocks and endorsements when selected.
  • roll: akin to a lottery ticket to be selected for block and endorsement creation. A roll costs 100 MAS. The more rolls you have, the more chances you have to be selected to produce a block
  • endorsement: part of a block header, used to improve security. Any staker can be selected to create an endorsement. They are produced automatically by any node with at least a staking address. For example: when a staker 1 creates a block A that reference a block B as parent in the same thread created by staker 2, if they were selected staker 3 can produce an endorsement citing block B and staker 1 can include that endorsement in block A. (see https://arxiv.org/pdf/1803.09029.pdf).
  • block: a block is produced by a staker. They are produced automatically by any node with at least a staking address.It includes operation and is checked by other stakers. It becomes final when enough blocks were produced on top of it.

How to interact with the blockchain

  • operation: the only way to inject information in the blockchain. It is produced by an emitter that will provide a fee. The operation will be valid (ie includable in a block) only for a limited amount of time. Can be a simple transaction, a roll buy, a roll sell or a smart contract operation. The latter will execute bytecode on the block chain, but will not store anything in the ledger by default. It can call function that will interact with the ledger (ex: create smart contract address, transfer coins, call smart contract etc). -> "The latter will execute bytecode on the block chain, but will not store anything in the ledger by default" I'd say that most smart-contract operation write on the blockchain. Otherwise you would do a read only operation as it's free. no because if you want you can execute bytecode that contains just a coin transfer. it will interact with the block chain but it won't store any byte code
  • transaction: coin transfer between a sender (that created and signed this operation) and a receiver.

Miscellaneous

  • peer VS node: 1 peer <=> 1 ip address, whereas 1 node <=> 1 public key. A peer can run multiple nodes
  • node address: address used to identify a node. Not related to a staking address
Clone this wiki locally