about summary refs log tree commit diff
path: root/users/wpcarro/scratch/blockchain/default.nix
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2021-10-31T02·05-0700
committerclbot <clbot@tvl.fyi>2022-01-08T06·00+0000
commit9098920f0afeed956118d46585148bc34ea7f125 (patch)
tree953bbadcdce01ac0f99e5f1ecf2e08689ff28885 /users/wpcarro/scratch/blockchain/default.nix
parentafabc77f74c9dfac8209de2fd8c0df59c9baafee (diff)
feat(wpcarro/scratch): create a proof-of-concept blockchain server r/3556
> You cannot get educated by this self-propagating system in which people study
> to pass exams, and teach others to pass exams, but nobody knows anything.  You
> learn something by doing it yourself, by asking questions, by thinking, and by
> experimenting.
> - Richard Feynman

In the spirit of learning by doing, I decided to implement a simple blockchain
server. More work remains, but I'm tired after working on this for ~2-3h. I'd
like to reimplement this from memory using a statically typed language like
Haskell. I'd also like to implement node
discovery (https://en.bitcoin.it/wiki/Satoshi_Client_Node_Discovery) because
that is still something I don't quite understand. But I'm signing-off for
now...

Change-Id: I74f424e7f52ffbf81eaad420d7d5205da66d33b5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4802
Tested-by: BuildkiteCI
Reviewed-by: wpcarro <wpcarro@gmail.com>
Autosubmit: wpcarro <wpcarro@gmail.com>
Diffstat (limited to 'users/wpcarro/scratch/blockchain/default.nix')
-rw-r--r--users/wpcarro/scratch/blockchain/default.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/users/wpcarro/scratch/blockchain/default.nix b/users/wpcarro/scratch/blockchain/default.nix
new file mode 100644
index 0000000000..745e7a5ab4
--- /dev/null
+++ b/users/wpcarro/scratch/blockchain/default.nix
@@ -0,0 +1,13 @@
+{ pkgs, ... }:
+
+let
+  pypkgs = pkgs.python3Packages;
+in pkgs.python3Packages.buildPythonApplication {
+  pname = "main";
+  src = ./.;
+  version = "0.0.1";
+  propagatedBuildInputs = with pypkgs; [
+    flask
+    requests
+  ];
+}