[][src]Module rchain_v1::rchain

Structs

Account

Represents an account on the blockchain This is basically the primary part of the "world state" of the blockchain It is the final status after performing all blocks in order

Block

One single part of the blockchain. Basically contains a list of transactions

Blockchain

The actual Blockchain container

Transaction

Stores a request to the blockchain

Enums

AccountType

We can support different types of accounts which could be used to represent different roles within the system This is just for later extension, for now we will only use User accounts

TransactionData

A single operation to be stored on the chain Noticeable, enums in rust actually can carry data in a tuple-like structure (CreateUserAccount) or a dictionary-like (the ChangeStoreValue)

Traits

WorldState

Represents the current state of the blockchain after all Blocks are executed A world state is technically not necessary since we always could build the information by iterating through all the blocks. Generally, this doesn't seem like a good option However, we do not force the actual Blockchain to implement a WorldState but rather behave like having one. This trait therefore just defines an expected interface into our Blockchain (Actually it doesn't even care if we the information is stored within a blockchain)

Functions

byte_vector_to_string

Will take an array of bytes and transform it into a string by interpreting every byte as an character due to RFC 1023 that's not possible @Link https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md (trait and parameters are not within the local crate) Will take an array of bytes and transform it into a string by interpreting every byte as an character