From 72f1381122986925915ad6c394a637435a2a62ef Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Sat, 16 Apr 2022 17:08:08 +0300 Subject: remove gradecoin pubkey --- .gitignore | 1 + static/gradecoin.pub | 9 --------- 2 files changed, 1 insertion(+), 9 deletions(-) delete mode 100644 static/gradecoin.pub diff --git a/.gitignore b/.gitignore index 364fdec..cbfa313 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ public/ +static/gradecoin.pub diff --git a/static/gradecoin.pub b/static/gradecoin.pub deleted file mode 100644 index ffe2f12..0000000 --- a/static/gradecoin.pub +++ /dev/null @@ -1,9 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyGuqiCPGcguy+Y9TH7Bl -7XlEsalyqb9bYlzpbV0dnqZ3lPkEPkuOhkN+GcuiV6iXtSwyh7nB+xTRXKJFRUBO -/jbN8jfcxVwBu0JxjF3v1YRBxbOHhz2A295mbKD9xHQCKxkfYBNkUXxj8gd+GaDv -QiSW5NdrX/lEkvqfGtdEX1m2+HdcG0+3YW24Xg0znhCwLr+sorLuJaDy9Xa0Uo+D -PWGC5s001U/BxkCIWJ+eJQCb7Bv+9vXb8BGRK/ecMb/fb6h5O+8fgB64RCHMgcc2 -v+Q/dPt8kHX1OJdMuYUrUJGACppMQY3W6e1HdlRIBcZKL2LMZ2CrIB/2D5LiJhPT -hQIDAQAB ------END PUBLIC KEY----- -- cgit v1.2.3-70-g09d2 From b7c7e9845cec4d9056fb99e86bec6912a3914171 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Sat, 16 Apr 2022 17:31:28 +0300 Subject: Update for 2022 spring --- config.toml | 3 ++- content/_index.md | 38 ++++++++++++++++++++++++++------------ content/block_docs.md | 6 +++--- templates/index.html | 4 ++-- 4 files changed, 33 insertions(+), 18 deletions(-) diff --git a/config.toml b/config.toml index 4843f8d..4779870 100644 --- a/config.toml +++ b/config.toml @@ -23,6 +23,7 @@ highlight_theme = "subway-moscow" juice_logo_name = "Gradecoin" juice_logo_path = "gradecoin.png" juice_extra_menu = [ - { title = "why?", link = "https://twitter.com/marysuewriter/status/1391264859774275584?s=20"} + { title = "why?", link = "https://twitter.com/fppf_gf/status/1465754756564099072"}, + { title = "whyyy?", link = "https://www.youtube.com/watch?v=YQ_xWvX1n9g"} ] diff --git a/content/_index.md b/content/_index.md index cbdcff5..036fc57 100644 --- a/content/_index.md +++ b/content/_index.md @@ -4,14 +4,17 @@ sort_by = "weight" +++ # Welcome to Gradecoin! -Blockchains are incredibly simple yet can appear very complicated, we will see how they work and practice programming _production_ cryptography code. +Blockchains are incredibly simple but they can seem very complicated. +We will see how they work and practice programming _production grade_ cryptography code. -This server is the sandbox for the PA1, it's currently running the Gradecoin application. Gradecoin is the faux currency we will use to simulate a blockchain network. At the end of the simulation, the amount of Gradecoin you hold will be your PA1 grade. +This server is the sandbox for PA1 and it iss currently running the Gradecoin application. +Gradecoin is the faux currency we will use to simulate a blockchain network. +**At the end of the simulation, the amount of Gradecoin you hold will be your PA1 grade.** **A quick summary**: authenticate yourself to the system using public key encryption. Craft [Transaction](@/transaction_docs.md) proposals and tag them using [JWTs](@/JWT.md). -When there are enough transactions then you can propose [Blocks](@/block_docs.md) in the same way. -Blocks need to be _mined_ beforehand using Proof-of-work, or brute force. +When there are enough transactions then you can propose [Blocks](@/block_docs.md). +Blocks need to be _mined_ beforehand using Proof-of-work a.k.a. brute force. Gradecoin offers 3 endpoints at [/register](/register), [/block](/block) and [/transaction](/transaction). You can only send GET requests to /block and /transaction without authorization. The server is programmed in [RESTful](https://www.service-architecture.com/articles/web-services/representational_state_transfer_rest.html) architecture, there are no `DELETE`, `PUT` or `UPDATE` operations, though. @@ -35,7 +38,9 @@ Gradecoin uses 2048 bit RSA keypairs. # Services -Please respect the system and others. Keep your request rate below a reasonable limit. Programming a bot is absolutely fine as long as it's not aggressively sending requests. +Please respect the system and others. +Keep your request rate below a reasonable limit. +Programming a bot is absolutely fine as long as it's not aggressively sending requests. ## /register - Create your own 2048 bit RSA `keypair` @@ -62,13 +67,15 @@ Please respect the system and others. Keep your request rate below a reasonable > `Authorization`: The request header should have Bearer JWT.Token signed with Student Public Key ## /user -- Looking for people to conduct business with? Everyone is listed here! 🤖👋 are bots who are very eager to transact with you. I've trained them personally. +- Looking for people to conduct business with? Everyone is listed here! +🤖👋 are bots who are very eager to transact with you. +I've trained them personally using state-of-the-art neural networks running on thousands of TPUs. # Questions ## This all sound complicated! -- I've drawn inspiration from [actual Bitcoin transactions](https://explorer.bitcoin.com/btc) and [warp](https://github.com/seanmonstar/warp/blob/master/examples/todos.rs). The simplicity of the system is how little interfaces it has. +- I've drawn inspiration from [actual Bitcoin transactions](https://explorer.bitcoin.com/btc) and [warp](https://github.com/seanmonstar/warp/blob/master/examples/todos.rs). The system has only 3 interfaces. It's simple once you read everything over a couple of times. - Don't know where to start? Gradecoin uses RESTful API; simple `curl` commands or even your browser will work! [This website can help as well](https://curl.trillworks.com/). -- [JWT Debugger](https://jwt.io) and the corresponding [RFC](https://tools.ietf.org/html/rfc7519). +- Check out [JWT Debugger](https://jwt.io) and the corresponding [RFC](https://tools.ietf.org/html/rfc7519). - Remember that you are absolutely encouraged to grab off-the-shelf implementations for every cryptography primitive you will use. You can start by finding a code snippet to generate a RSA keypair? - Check out [misc](@/misc_docs.md) for everything else you might be curious about. @@ -84,20 +91,27 @@ Thank you! Please [let me know](mailto:yigit@ceng.metu.edu.tr) so we can solve i ## I hacked the server! That wasn't supposed to happen :( I did not place any intentional vulnerabilities to the system so if you cracked something, it was not intended. Please don't abuse it and let me know so I can patch it. +## I want to contribute! +Thank you! The code for Gradecoin and this site are open source so you can take a look and let me know if you have any improvements, corrections, typos to point out or whatever. +Both documentation (this site) and code contributions are appreciated. +[My git server](https://git.yigitsever.com/) will be somewhat ahead of the [GitHub](https://github.com/yigitsever/gradecoin) repository but I will sync them at every major milestone. + ## Submission? -At the end of the _simulation_, your Gradecoin balance will be your grade. I will also expect a unique client programmed in either; +At the end of the _simulation_, your Gradecoin balance will be your grade. I will also expect your client for submission, programmed in either; + - c - c++ +- dart/typescript +- go - perl -- rust - python -- dart/typescript +- rust - random assortment of bash scripts If your favourite programming language is missing please let me know 🤷? ## Can my friends play? -Probably not at this point. I've allowed a couple of people during the testnet phase but don't intend to any more. +Sure! They can get in contact with me until the end of the testnet phase. ## How and or Why? - [Built](https://xkcd.com/2314/), [with](https://lofi.cafe/) [Rust](https://xkcd.com/2418/) diff --git a/content/block_docs.md b/content/block_docs.md index 228277c..2eec2ac 100644 --- a/content/block_docs.md +++ b/content/block_docs.md @@ -7,8 +7,8 @@ weight = 10 > Blocks commit proposed transactions into the ledger. > A transaction that do not appear on a valid block is not accepted by the network. -Blocks in Gradecoin are proposed to commit [Transactions](@/transaction_docs.md) that were proposed previously to the system. -`transaction_list` of the Block should be filled with valid transactions to be committed. +We use Blocks to commit proposed [Transactions](@/transaction_docs.md) to the ledger in order to realize them. +`transaction_list` of the Block is filled with valid transactions. Blocks are valid when they are proposed with a `nonce` that produces a `hash` value with 6 zeroes (24 bits) at the left hand side. We are _mining_ using [blake2s](https://www.blake2.net/) algorithm, which produces 256 bit hashes. @@ -53,7 +53,7 @@ If the resulting hash is valid, then you can create a `Block` JSON object with t Fill this with the `hash` value you found during the mining process. # Block Rules -- Blocks should include some minimum number of transactions. +- Blocks have to include a minimum number of transactions. - Blocks cannot have duplicate transactions. # References diff --git a/templates/index.html b/templates/index.html index d255b71..9dba13b 100644 --- a/templates/index.html +++ b/templates/index.html @@ -12,7 +12,7 @@ Mine your own grades