[{"data":1,"prerenderedAt":331},["ShallowReactive",2],{"project-15945490":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":34,"aspects":35,"strip":42,"post_text":44,"what":45,"said":84,"maker_in_thread":177,"shape":187,"grid":191,"attempts":292,"same_week":293,"maker_shows":37,"maker_hidden":323,"reader_version":324,"card":325},"15945490","dumbcoin","An educational blockchain implementation in Python","title","Show HN: An educational blockchain implementation in Python","https:\u002F\u002Fgithub.com\u002Fjulienr\u002Fipynb_playground\u002Fblob\u002Fmaster\u002Fbitcoin\u002Fdumbcoin\u002Fdumbcoin.ipynb","github.com","jre",1513513926,2017,412,41,32,2242,2,"legend","learning_science","blockchain education","other",[24,25,26,27,28],"blockchain","python","proof of work","educational","jupyter notebook","debated",0.115,{"positive":32,"neutral":33,"mixed":33,"critical":32},4,3,14,{"docs":36,"execution":38,"idea":40,"design":41},{"positive":37,"critical":18},1,{"positive":39,"critical":37},0,{"positive":33,"critical":37},{"positive":39,"critical":39},[37,39,39,37,39,33,39,39,39,39,39,39,43,37,39,39,33,39,39,43,39,43,39,33,39,39,39,39,39,33,39,33,39,39,43,33,39,39,39,37],5,null,{"problem":46,"audience":44,"pricing":44,"motivation":53,"time_to_build":44,"stack":57,"openness":81,"stage":82,"team_size":83},{"value":47,"source":48,"evidence":49},"Explaining how blockchain works by implementing mining, block and transaction validation","maker",[50],{"id":51,"by":11,"text":52},"15946300","OP here. erikb is spot on in the sibling comment. This hasn't been expert-reviewed, hasn't been audited so I'm pretty confident there is a bug somewhere that I don't know about.…",{"value":54,"source":48,"evidence":55},"Educational purpose, to understand the algorithmic parts of blockchain",[56],{"id":51,"by":11,"text":52},[58,63,75],{"value":59,"source":48,"evidence":60},"Python",[61],{"id":62},"post",{"value":64,"source":65,"evidence":66},"Jupyter notebook","commenter",[67,71],{"id":68,"by":69,"text":70},"15946137","tree_of_item","It's a Jupyter notebook: http:\u002F\u002Fjupyter.org\u002F",{"id":72,"by":73,"text":74},"15946150","theuly","What the author wrote is a IPython \u002F Jupyter notebook [0], which is implemented as a JSON document [1]. The notebooks are pretty much markdown with runnable code blocks in…",{"value":76,"source":48,"evidence":77},"pycryptodome",[78],{"id":79,"by":11,"text":80},"15947145","No good reason for RSA vs ECDSA. I was just more familiar with RSA, but apparently pycryptodome supports ECDSA as well, so I guess the change should be minimal.","open_source","launched","unknown",{"praise":85,"objections":112,"requests":137,"questions":146,"alternatives":158},[86,101],{"value":87,"source":65,"evidence":88},"Simplest, clear walkthrough of blockchain steps",[89,93,97],{"id":90,"by":91,"text":92},"15945775","westurner","Thanks! Simplest explanation I've seen. Here's an nbviewer link (which, like base58, works on\u002Fover a phone):…",{"id":94,"by":95,"text":96},"15945698","ivan_ah","Very good writeup that shows all the steps. Note it uses MD5 hash instead of SHA256 so not exactly bitcoin. I wonder how much more work would be to make the code fully implement…",{"id":98,"by":99,"text":100},"15946080","heynk","This is great. Just last weekend I did the same thing, coding a very basic blockchain in Python for educational purposes. You tackled wallets, which I didn't get to yet, so that…",{"value":102,"source":65,"evidence":103},"Good resource for learning by building from scratch",[104,108],{"id":105,"by":106,"text":107},"15945973","geraldbauer","FYI: Great blockchain (from sratch) starter article. At the Awesome Blockchains page [1] I collect starter blockchains and articles (in Python, Ruby, JavaScript, etc.) the idea…",{"id":109,"by":110,"text":111},"15945949","brodo","Coll project. I think having educational * implementations in Python is great in general. Better then having just an article about it...",[113,123,131],{"value":114,"source":65,"evidence":115},"Insecure in places, and only one disclaimer rather than marking which parts are insecure",[116,120],{"id":117,"by":118,"text":119},"15945727","magnat","> It is NOT secure neither a real blockchain and you should NOT use this for anything else than educational purposes. It would be nice if non-secure parts of implementation or…",{"id":121,"by":118,"text":122},"15947431","> I'm not sure how much clearer you could mark that. It's not about this warning. It's about that it's the only warning. From the intro and from discussion here on HN, I imply…",{"value":124,"source":65,"evidence":125},"Uses MD5 instead of SHA256 and omits Merkle trees and networking",[126,127],{"id":94,"by":95,"text":96},{"id":128,"by":129,"text":130},"15946099","vinn124","nice walkthrough. also, not sure why folks are nitpicking about minor things like security disclaimers, number of sha256 hashes, md5, etc. while ignoring nontrivial gaps (eg no…",{"value":132,"source":65,"evidence":133},"Several bugs in verify_block, transaction validation and mining",[134],{"id":135,"by":118,"text":136},"15947342","> I'll also try to point out more explicitly which parts I think are not secure. Things I've noticed: * Use of floating point arithmetic. * Non-reproducible serialization in…",[138,142],{"value":139,"source":65,"evidence":140},"Mark insecure parts more explicitly",[141],{"id":117,"by":118,"text":119},{"value":143,"source":65,"evidence":144},"Explain how nodes communicate and broadcast blocks",[145],{"id":98,"by":99,"text":100},[147,154],{"value":148,"source":65,"evidence":149},"How to convert an educational implementation to a serious one",[150],{"id":151,"by":152,"text":153},"15947943","antman","So is there a non educational implementation of blockhain that someone could use\u002Fparametrize\u002Fconfigure? Something that is not educational but more industrial strength? What must…",{"value":155,"source":65,"evidence":156},"Where error messages get logged",[157],{"id":90,"by":91,"text":92},[159,166,170],{"value":160,"source":65,"evidence":161},"basiccoin",[162],{"id":163,"by":164,"text":165},"15945689","h4l0","For the last couple of months, there have been many educational, simple implementations that explains blockchain technology, I guess thanks to crypto bubble. I wish these were…",{"value":167,"source":65,"evidence":168},"halocoin",[169],{"id":163,"by":164,"text":165},{"value":171,"source":65,"evidence":172},"tinychain",[173],{"id":174,"by":175,"text":176},"15949588","jobeirne","Something from a few months back that's a bit closer to Bitcoin's actual implementation but at a similar level of readability: https:\u002F\u002Fgithub.com\u002Fjamesob\u002Ftinychain",{"comments":178,"answered":43,"key":179},8,[180,181,184],{"id":51,"text":52},{"id":182,"text":183},"15947843","Those are all very good points I didn't think about, thanks for these. I'll fix the two bugs with verify_block and the possibility for a miner to inject invalid a output > input…",{"id":185,"text":186},"15946474","Thanks for the precision regarding the hash. Regarding the error, they are logged when a verify_block\u002Ftransaction returns False, just to be a bit more explicit about what failed.…",{"commenters":188,"max_depth":178,"maker_replies":178,"first_comment_mins":189,"lifespan_hours":190},27,58,17,[192,194,198,200,202,204,207,210,213,215,217,220,224,228,229,232,233,235,236,238,240,243,244,247,248,250,253,256,259,262,266,268,270,273,275,276,278,282,283,284,287],[117,39,37,193,118,39],"project\u002Fcritical\u002Fdocs",[195,39,39,196,197,39],"15945889","commenter\u002Fneutral\u002Fnone","erikb",[51,39,39,199,11,37],"maker\u002Fneutral\u002Fdocs",[135,39,37,201,118,39],"project\u002Fcritical\u002Fexecution",[182,39,39,203,11,37],"maker\u002Fpositive\u002Fexecution",[205,39,33,206,91,39],"15947982","project\u002Fneutral\u002Fexecution",[208,39,39,196,209,39],"15948355","Cyph0n",[211,39,39,196,212,39],"15948434","cpburns2009",[214,39,39,196,209,39],"15948448",[216,39,39,196,91,39],"15949077",[218,39,39,196,219,39],"15948229","tfha",[221,39,39,222,223,39],"15946343","other\u002Fneutral\u002Fnone","johnwheeler",[225,39,43,226,227,39],"15946552","project\u002Fpositive\u002Fdocs","bogomipz",[121,39,37,193,118,39],[230,39,39,196,231,39],"15947251","olalonde",[163,37,39,222,164,39],[90,18,33,234,91,39],"project\u002Fmixed\u002Fidea",[185,18,39,206,11,37],[237,18,39,222,91,39],"15947406",[105,33,43,239,106,39],"project\u002Fpositive\u002Fidea",[241,33,39,242,11,37],"15946325","maker\u002Fpositive\u002Fnone",[98,32,43,239,99,39],[245,32,39,246,11,37],"15946321","maker\u002Fneutral\u002Fnone",[94,43,33,234,95,39],[249,43,39,196,164,39],"15945773",[251,43,39,196,252,39],"15945830","Gargoyle",[254,43,39,196,255,39],"15946051","pmorici",[257,43,39,196,258,39],"15946035","krisives",[260,43,39,261,11,37],"15946348","project\u002Fneutral\u002Fidea",[263,43,33,264,265,39],"15947098","project\u002Fneutral\u002Fdesign","ecesena",[79,43,39,267,11,37],"maker\u002Fneutral\u002Fdesign",[128,269,33,234,129,39],6,[271,269,39,272,11,37],"15946377","maker\u002Fneutral\u002Fidea",[174,274,39,222,175,39],7,[109,178,43,239,110,39],[151,277,33,261,152,39],9,[279,280,39,222,281,39],"15946110",10,"satellitec4t",[68,280,39,222,69,39],[72,280,39,222,73,39],[285,280,39,222,286,39],"15946161","haraldooo",[288,289,37,290,291,39],"15947582",11,"project\u002Fcritical\u002Fidea","partycoder",[],[294,299,304,309,314,318],{"id":295,"name":296,"points":297,"category":298},"15972402","Termipal",195,"dev_tools",{"id":300,"name":301,"points":302,"category":303},"15925736","Servers.lol",150,"web_saas",{"id":305,"name":306,"points":307,"category":308},"15919646","PyFunctional",129,"languages",{"id":310,"name":311,"points":312,"category":313},"15950325","pm-as-code",122,"productivity",{"id":315,"name":316,"points":317,"category":313},"15945658","Darkwire.io",118,{"id":319,"name":320,"points":321,"category":322},"15945808","word2vec-spam-filter",104,"ai",false,"v2",{"id":326,"name":5,"line":6,"ai":323,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":327,"top":18,"kw":328,"maker":11,"domain":10,"tier":19,"attempts":39,"strip":329,"url":9,"mix":330,"praise":87,"objection":114,"sub":21},15945490,0.12,[24,25,26,27,28],"1001030000005100300505030000030300530001",[32,33,33,32],1793990967919]