6 ms·
Rewriting my toy blockchain in Rust
- kurinikku 5y agoRe: loading issues, I uploaded a pdf version to GitHub. Hope this helps! https://github.com/savarin/readcoin-rust/blob/main/post.pdf https://github.com/savarin/readcoin-rust/blob/main/post.pdf Random plug - Bradfield CSI applications are open, highly recommend. https://bradfieldcs.com/csi https://bradfieldcs.com/csi
- shaneprrlt 5y agoHow can I buy in, I've got a feeling this is gonna moon, diamond hands all the way. /s/joke
- vmception 5y agoCopy and paste and just post a notice about it. A few small exchanges will list for free or very cheaply and they’ll typically run a node or two, which helps the initial security of your blockchain.
- cableshaft 5y agoConnect your crypto wallet, to this completely legit website with a slightly different domain name than the real domain name, add like, 3ETH to your wallet, and agree to the transaction. I promise it's official and you're not approving me taking all the crypto and NFTs out of your wallet. (Joke, by the way. Although something that can happen if you're not careful).
- davemp 5y ago> At this stage, I could spend time optimizing the code. Ideas include (thanks to Andrey Petrov) isolating int-to-byte conversions, using bitmaps to determine leading zero bytes, and reducing allocations by using arrays. Another easy speed up would be using an intrinsic [0] to count leading zeroes which would just call the lzcnt instruction [1] (or equivalent) and skip the need for a loop for difficulty <=64. [0]: https://doc.rust-lang.org/std/primitive.u32.html#method.leading_zeros https://doc.rust-lang.org/std/primitive.u32.html#method.lead... [1]: https://www.felixcloutier.com/x86/lzcnt https://www.felixcloutier.com/x86/lzcnt
- Kiro 5y agoOT but why would anyone create two fresh accounts just to post those two dead/flagged comments?
- AtlasBarfed 5y agoI was ruminating on blockchains today. So, say a coin blockchain from the CAP perspective: Well, obviously it is distributed, so you want Partition Tolerance. Well, obviously it is financial, so you need Consistency. Well, obviously you always want to be able to use it so you need Availability. But you can only pick two...
- PretzelPirate 5y agoYou only get two, availability and partition tolerance. Consistency is more akin to an eventual consistency model. There may be two blocks found at the same time that are sent out to the network. At some point, nodes which accepted the minority block will re-org and become consistent with the rest of the network. Re-orgs are why you wait for X confirmations before trusting that a transaction is finalized.
- donkarma 5y ago
- woah 5y agoWorks OK for me. It's on Notion, a Google Docs competitor that gets heavy usage. Maybe something is wrong with your browser
- notfed 5y agoWhat a hacker-news-worthy first comment! On mobile the website worked great for me. Writing a blockchain is an eye opening task, I commend the OP for doing this and giving us all some inspiration.
- sweetheart 5y agoWorked perfectly well for me on laptop + Chrome. I should just start using my Notion to blog a bit...
- nefitty 5y agoWhy would we ignore the medium if the medium is the message?
- garren 5y agoI was recently toying with writing a blockchain in python (lots of great examples in case I get stuck), but this is a great intro to doing it in rust. I haven’t finished off The Rust Book yet, even so this looks pretty accessible. (Also load fine for me on an old iPad)
- nicoburns 5y agoSounds like a perfect metaphor for blockchain applications!
- deleted 5y ago[deleted]
- dang 5y ago"Please don't complain about tangential annoyances—things like article or website formats, name collisions, or back-button breakage. They're too common to be interesting." https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- benatkin 5y agoThis might help me with my analysis of Solana and Avalanche. Solana supports Rust smart contracts. First time I tried to load it I got an error, but I'm sure I'll be able to view it sooner or later. Can confirm Notion is not great.
- knownjorbist 5y agoPolkadot is also Rust-native.
- cliftonk 5y agoAlso cosmos/terra. Mainstream ethereum dev tools are also moving to rust. See https://github.com/gakonst/foundry https://github.com/gakonst/foundry which speeds up smart contract testing by an order of magnitude (and more soon thx to improved parallelization).
- vmception 5y agoRe: Eth tool, it compiles it down to bytecode? Are block explorers prepared to show non-solidity code if the dev made the info available?
- jalapeno84 5y ago
- jalapenomunger 5y ago