From 59ea3bd25b1f113168333eccdc9ffc4acd98cfe6 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Mon, 19 Apr 2021 18:23:22 +0300 Subject: Initial commit --- content/block_docs.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 content/block_docs.md (limited to 'content/block_docs.md') diff --git a/content/block_docs.md b/content/block_docs.md new file mode 100644 index 0000000..92880b6 --- /dev/null +++ b/content/block_docs.md @@ -0,0 +1,43 @@ ++++ +title = "Blocks" +description = "Block Documentation" +weight = 10 ++++ + +A block that was proposed to commit Transactions in `transaction_list` to the +ledger with a nonce that made `hash` valid; 6 zeroes at the left hand side of the +hash (24 bytes). + +We are _mining_ using [blake2s](https://www.blake2.net/) algorithm, which produces 256 bit hashes. Hash/second is roughly {{ exp(num="20x10", exponent="3") }} on my machine, a new block can be mined in around 4-6 minutes. + +# Requests + +## GET +A HTTP `GET` request to [/block](/block) endpoint will return the latest mined block. + +## POST + +A HTTP `POST` request with Authorization using JWT will allow you to propose your own blocks. + +# Fields +``` +transaction_list: [array of Fingerprints] +nonce: unsigned 32-bit integer +timestamp: ISO 8601 T