COMP6452 Flashcards
Asset Tokenisation =
representing the ownership rights of real-world assets as digital tokens on a blockchain.
Minting an NFT
publishing a unique instance of your ERC721 token on the blockchain
Ledger =
shared append-only database of blocks of TXs. It is one list, but operators are in a peer-to-peer network
What are the types of DLT Systems
permissionless, permissioned, public, private
What is the goal of a distributed ledger?
Decentralised trustless environment achieved through replication, transparency and cross checked-data. Don’t trust any individual node, but the whole network.
Full vs distributed ledger
Full means the whole ledger is replicated at all parties, while shared means parts are replicated across multiple parties.
With multiple copies of a ledger, need to
ensure it is maintained and consistent.
The double spending problem could arise if
the ledger synchronisation is built to accomodate inconsistencies.
Sender times are not reliable due to
drift and skew, and could be changed to game the system
Instead of relying on sender times, should rely on
nodes/replicas to agree on a global ordering of transactions
CAP theorem states
it is impossible for a web service to provide consistency, availability and partition-tolerance at the same time.
What is mandatory in distributed systems?
Partition tolerance
Describe the structure of a blockchain
Collection of ordered TXs from a block’s body
Summary of those TXs & hash of previous block forms a block’s header
Collection of blocks form a blockchain
- blocks are built through distributed set of nodes via mining
- nodes agree on contents of a block, order of blocks & who has the right to build a block
Describe the node network infrastructure
Peer to peer network of nodes, each with same rights to update the ledger
Each node hosts a replica of the ledger which allows high availability and efficient read access
Communicate via gossip protocol for TX propogation and consensus protocol for agreement (generally super majoritty agreemnet i.e. 2/3 is required to detemine what changes are needed)
Non functional properties of blockchains
+ Integrity, non-repudiation
+ read / - write availability
+ read / - write latency
- confidentiality
- modifiability
- throughput, scalability, big data
What roles can blockchains play in an arhcitecture?
Storage, Communication, Computation, Achritectural, and asset management and control
Replicated and distributed ledger is kind of like
a linked list with hash pointers
hashing =
converts a large volume of data into a small datum, i.e. maps arbitrary-sized data to fixed-size data
Properties of cryptographic hash functions =
deterministic
small change -> massive change in hash value
quick to compute
one-way function, cannot invert it
infeasible to hash-collision
Merkle tree =
binary tree built using hashes
Alllows efficient and secure verification of contents of large data structures
Can efficiently demonstrate a leaf node is part of a given hash tree
For BCs,
leaves of the tree are hashes of TXs
You concatenate two leaves and calculate another hash and continue this until the root of the tree is reached
Public Key Cryptography =
System that uses a public key which may be disseminated widely and a private key that is only known to the owner i.e. assymetric cryptography
What is the one base cryptocurrency that a platform has called?
Native currency
native currency can only be acquired by?
mining or purchasing from cryptocurrency exchanges
What is a 1st Gen Blockchain?
Bitcoin!
Where users create, sign and announce TXs to the netwrok
Miners then receive the TXs, include them in a new block and then try to append them to the chain of blocks. Once, the TX is part of the data structure it has officially taken place.
What is the state of the blockchain?
Account of balances of all users
Result from the genesis block and set of TXs included since
As TXs are grouped into blocks, when a new block is adde, the entire system moves from one descrete state to anotehr
What is a TX Fee?
It is where the sum of outputs is less than the sum of inputs and is given as incentives for miners to contribute computing power and storage
TX output is bound to
Owner’s public key
Describe the format of TXs
Outputs of TXs become inputs of a new TX, such that they form a link
Balance of an address/account is the sum of all of UTXOs associated with the address
State of the blockchain = all the UTXO’s in system
What does a block contain
Container of TXs
Identified by a hash
linked to previous block
includes a (not very accurate) timestamp
includes a nonce, which is the proof of the ability to produce the block
Uses a merkle tree to capture ordered list of TXs
What is the overall process of creating a new block through mining?
Recieve a new block ->
Aggregation ->
Header Construction ->
Solve Puzzle ->
Propagation
What happens in the aggregation stage of creating a new block>
Remove TXs that are included in teh newly annoucned block from the pool of TXs
Aggregate a subset of the remaining valid TXs and add coinbase TX as the 1st TX of the next block
What happens in the header construction stage of create a new block?
Construct a merkele tree to summarise all included TXs
Include hash of previous block
What happens in the solving puzzle stage of creating a new block?
Find solution to Proof-of-work algorithm called hashcash
Result will be inserted into the block header if successful
What happens in the propogation stage of creating a new block>
Immediately propogate new block to other nodes
Characteistics of PoW
difficult to complete answer, easy to validate
difficulty of problem is automically adjusted with time
It basically involves sending different nonces until one matches.
How can a tie be broken in the announcement of a new block?
Take the longest history of blocks as the main chain, that is, the one that recieved the most computation
Nakamoto Consensus
Wait for several new blocks to be added after the 1st inclusion of the TX in a block. This allows forks to be resolved. It bitcoin 6 blocks is sufificent which is currently 1 hour long.
What are the two rewards for a miner?
Block reward = new cryptocurrencies generate as part of block generation are assigned to the miner.
TX fees = fees paid by users to get their TXs included in the block
How can you increase the chance of getting your TX included in a block?
Higher TX fee
What is a 2nd generation blockchain?
It is a ledger that can store/transact any kind of data
Blockchain that fully supports smart contracts
On Sep 15, 2022 what did ethereum switch?
Its consenus algorithm, from PoW to Proof of Stake.
PoS = protocols which select validatros / miners in proportion to their quantity of holdings in their associated cryptocurrency i.e. ETH.
instead of selecting a miner to build the next block based on its computing power, a miner is selected based on the amount of ETH it stakes.
Bitcoin uses UTXO, while ethereum uses
Account-balance model where the ledger maintains the balance of each account
Each account is bound to the owner’s public key
How are transactions structures in 2nd Gen Ethereum
TXs and blocks are uniquely identified by their hashes
Txs from the same account are ordered by a sequence called the nonce.
How is TX fee calculated in ethereum?
gas limit x gas price
Describe the block format structure in ethereum
Maintains state of all accounts (world state)
-> Includes account balances, data stored and smart contracts
Has the list of TXs
List of TX receipts
Ethereum uses 3 Merkle trees, one each for intergity of World state, TXs, TX receipts.