Alekos Filini (@afilini) - Developer at BHB Network
Chapter 1 - How does Bitcoin work?
Chapter 2 - Brief history of assets on blockchains
Chapter 3 - Why RGB?
Chapter 4 - The RGB protocol
Chapter 1
A purely peer-to-peer version of electronic cash that allow online
payments to be sent directly from one party to another without going through a
financial institution. [...]
The network timestamps transactions by hashing them into an ongoing chain of
hash-based proof-of-work, forming a record that cannot be changed without redoing
the proof-of-work.
A purely peer-to-peer version of electronic cash that allow online
payments to be sent directly from one party to another without going through a
financial institution. [...]
The network timestamps transactions by hashing them into an ongoing chain of
hash-based proof-of-work, forming a record that cannot be changed without redoing
the proof-of-work.
A purely peer-to-peer version of electronic cash that allow online
payments to be sent directly from one party to another without going through a
financial institution. [...]
The network timestamps transactions by hashing them into an ongoing chain of
hash-based proof-of-work, forming a record that cannot be changed without redoing
the proof-of-work.
A purely peer-to-peer version of electronic cash that allow online
payments to be sent directly from one party to another without going through a
financial institution. [...]
The network timestamps transactions by hashing them into an ongoing chain of
hash-based proof-of-work, forming a record that cannot be changed without redoing
the proof-of-work.
A purely peer-to-peer version of electronic cash that allow online
payments to be sent directly from one party to another without going through a
financial institution. [...]
The network timestamps transactions by hashing them into an ongoing chain of
hash-based proof-of-work, forming a record that cannot be changed without redoing
the proof-of-work.
Terminology
Assumptions
Chapter 2
Chapter 3
Chapter 4
OP_RETURN <data>
OP_DUP OP_HASH160 <h(P_new)> OP_EQUALVERIFY OP_CHECKSIG
Bitcoin TX
{
"vin": [
{
"txid": "......",
"vout": 0
}
],
"vout": [
{
"amount": 10,
"scriptPubKey": "OP_RETURN <h(proof)>"
}
]
}
{
"vout": [
{
"asset_id": "STARBUCKS_COIN",
"amount": 100,
"type": "NEW_OUTPUT",
"index": 0
}
]
}
def verify_rgb_proof(proof):
bitcoin_transaction = bitcoin.get(proof.bitcoin_txid)
assert bitcoin_transaction.valid()
assert bitcoin_transaction.verify_commitment(proof)
if proof.type == 'ISSUANCE' and len(proof.inputs) == 0:
return True
assert sum(proof.out_value) == sum(proof.in_value)
assert all([verify_rgb_proof(input) for input in proof.inputs])
return True
Specifications: https://github.com/rgb-org/spec
Alpha code: https://github.com/rgb-org/rgb