-
⚙ @caffeinatedgazehttp localhost:5000/chain
"chain": [ { "index": 0, "nonce": 0, "previous_hash": "0", "timestamp": 1604575119.7091022, "transactions": [] }, { "index": 1, "nonce": 563, "previous_hash": "1f7ccc57480fdb61be097d2981938859553883f172c833bc712ec38586af5ab1", "timestamp": 1604575119.709153, "transactions": [ { "author": null, "in_transaction": "Miner's compensation", "output": { "Alice": 1337 } }, { "author": null, "in_transaction": "Miner's compensation", "output": { "MINER_WALLET_ADDR": 0 } } ] }, { "index": 2, "nonce": 1312, "previous_hash": "00e6629d965c927e88e9ac20068e28f9047c8e8f3e88de2f30fb4301b692f5d5", "timestamp": 1604575119.7158642, "transactions": [ { "author": "Alice", "in_transaction": "38a05fb0bc9ef23ecc11f982946ffb65eae46ab8554277455116e8dfe8dfe3fa", "output": { "Alice": 1330, "Bob": 3.5 } }, { "author": null, "in_transaction": "Miner's compensation", "output": { "MINER_WALLET_ADDR": 3.5 } } ] }, { "index": 3, "nonce": 109, "previous_hash": "006cb624931a9e28734c9e2aed1c0363ea66387cc4083c7c637d554d8f683814", "timestamp": 1604575119.74252, "transactions": [ { "author": "Bob", "in_transaction": "ffa735b3f6ffa316857825975784262e0ca117696ee63dda83555d5ce53de13c", "output": { "Bob": 0.9, "Sami": 2.1 } }, { "author": null, "in_transaction": "Miner's compensation", "output": { "MINER_WALLET_ADDR": 0.5 } } ] }, { "index": 4, "nonce": 600, "previous_hash": "00a79cedb340b5f6953df9aed82a695f0559388a46dac128e878e849955b45bc", "timestamp": 1604575119.744612, "transactions": [ { "author": "Sami", "in_transaction": "a0558143da09d3b3d9678d3c9833585afa6473ebb0baa2e78b2d19148f080d20", "output": { "Alice": 2, "Sami": 0.05 } }, { "author": null, "in_transaction": "Miner's compensation", "output": { "MINER_WALLET_ADDR": 0.050000000000000266 } } ] } ], "length": 5 }
Edited by Mikhail Liamets -
⚙ @caffeinatedgaze-
Please, see the output of
/chain
above -
What are the modifications/assumptions that you made?
Introduced a transaction entity, basic miner's compensation management through UTXO model, thus, making it similar to Bitcoin
We also assume that transaction authors are not fraudulent and use input transactions of their own
- What are the missing parts in the previously existing code?
No miner's compensation management, no UTXO and no proper entity for transaction data, no crypto is used for authentication
- Please, check out the code from the snippet at the very top
Edited by Mikhail Liamets -
Please register or sign in to comment