aboutsummaryrefslogtreecommitdiffstats
path: root/src/handlers.rs
Commit message (Collapse)AuthorAgeFilesLines
* BugfixYigit Sever2021-04-201-6/+6
| | | | Users cannot authenticate twice now
* BugfixYigit Sever2021-04-191-4/+26
| | | | | It was possible (and hilarious) to mint a new block with just one transaction, by repeating it 5 times, lol
* Transaction hashing should be easierYigit Sever2021-04-181-4/+7
|
* Verbose JWT error message in transactionsYigit Sever2021-04-181-2/+3
|
* Bugfix and useful error messagesYigit Sever2021-04-181-8/+20
|
* New user and verbose JWT errorsYigit Sever2021-04-181-1/+1
|
* Temporarily reduce block limitYigit Sever2021-04-181-1/+1
|
* Fix transaction blocking bugYigit Sever2021-04-181-1/+1
| | | | | | We used to insert transactions by their source field. Then we started using by (actually unique). This bug caused only one bank transaction to exist at any time
* Rename functions and move checksYigit Sever2021-04-171-31/+21
| | | | Proposals are authenticated, no need to parrot
* Implement block/tx boundsYigit Sever2021-04-171-9/+39
|
* Add existing user get supportYigit Sever2021-04-161-9/+20
|
* Passing auth testYigit Sever2021-04-161-5/+4
|
* Almost passsing authYigit Sever2021-04-161-5/+9
|
* work on post auth transaction 201 testalpaylan2021-04-161-4/+1
|
* Merge remote-tracking branch 'origin/main'Yigit Sever2021-04-161-2/+4
|\
| * work on post auth transaction 201 testalpaylan2021-04-161-2/+4
| |
* | Writing auth testYigit Sever2021-04-161-0/+1
|/
* handle double transaction.alpaylan2021-04-161-0/+12
|
* Fix deadlockYigit Sever2021-04-161-5/+6
|
* Check correct bitsYigit Sever2021-04-161-2/+2
|
* Load users from disk at startYigit Sever2021-04-161-13/+23
|
* Cleaned up user authenticationYigit Sever2021-04-151-14/+122
| | | | Removed TODOs, unrolled unwraps
* Listen to clippyYigit Sever2021-04-151-19/+6
|
* Remove lorems and inpsumsesYigit Sever2021-04-151-1/+1
|
* shed unused functionYigit Sever2021-04-151-11/+0
|
* [WIP] Add template supportYigit Sever2021-04-151-1/+18
|
* Implement the bank accountYigit Sever2021-04-141-4/+16
|
* Transactions return as dictYigit Sever2021-04-141-3/+4
|
* Implement coinbase rewardYigit Sever2021-04-141-8/+16
|
* Accepted block transactions play out nowYigit Sever2021-04-141-33/+72
|
* [WIP] Rough authentication process doneYigit Sever2021-04-141-0/+11
|
* [WIP] Fix silly bugYigit Sever2021-04-141-2/+2
|
* [WIP] Let user know their fingerprintYigit Sever2021-04-141-3/+6
|
* [WIP] Address users by their fingerprintYigit Sever2021-04-141-3/+5
|
* [WIP] Remove unnecessary importsYigit Sever2021-04-141-1/+1
|
* [WIP] Rough authentication process doneYigit Sever2021-04-141-22/+60
|
* Add auth documentationYigit Sever2021-04-141-2/+33
|
* [WIP] Initial implementation of user authYigit Sever2021-04-141-2/+32
| | | | | | There is a dance involved and everything Write down specs for RSA and AES, padding scheme, ugh.
* embed user passwds to the code structs.alpaylan2021-04-141-1/+1
|
* Simplify the block validation processYigit Sever2021-04-141-19/+16
| | | | 2 TODOs down!
* remove unused part.alpaylan2021-04-141-12/+1
|
* add balance check to transactions.alpaylan2021-04-141-0/+35
|
* Add empty block testYigit Sever2021-04-141-0/+2
|
* Add verbose error messagesYigit Sever2021-04-131-59/+138
| | | | | | | | | Not happy with the solution one bit but using error.rs at https://blog.logrocket.com/create-an-async-crud-web-service-in-rust-with-warp/ was not working Basically we just handcraft every single response on the spot, there is some repetition and it's ugly but need to move on
* Refactor authorized propose functionsYigit Sever2021-04-131-125/+190
| | | | | | | | | | | | | | They were getting spaghetti so; new function: handlers::authorize_proposer(), handles the jwt stuff, NOT async and _may_ cause trouble down the road but then again the stuff it does used to be (repeated) in the functions so how bad can it be If else chains were getting unwieldy; https://refactoring.com/catalog/replaceNestedConditionalWithGuardClauses.html so now everything is returning early, might make verbose error handling easier
* Require authorization for Block POSTYigit Sever2021-04-131-50/+92
| | | | | Not tested because it's impossible to follow without verbose error messages, failing 1 test
* HousekeepingYigit Sever2021-04-131-66/+62
| | | | | | Moved tests out of routes.rs into their own file Learned how to use lib.rs, now we have cargo doc support as well
* implement user authentication using jwtalpaylan2021-04-121-4/+56
|
* six rightmost zeros for miningalpaylan2021-04-121-2/+2
|
* Implement proof-of-workYigit Sever2021-04-121-16/+38
| | | | | | | | Using blacke2s: https://docs.rs/blake2/0.9.1/blake2/ Using this guy's hash checker https://gist.github.com/gkbrk/2e4835e3a17b3fb6e1e7 blacke2s with 5 bits 0 can mine a block between 20 seconds to 359 during my tests, hope it'll be fun