2021-11-25
6754
#blockchain#rust
Mario Zupan
79492
Nov 25, 2021 ⋅ 24 min read

How to build a blockchain in Rust

Mario Zupan I'm a self-employed Software Engineer and Trainer living in Vienna, Austria. I've worked at several companies and in multiple fields building, maintaining and operating distributed systems at scale using Java, Kotlin, Node, Go and Rust. I also taught advanced software engineering courses for several years at the University of Applied Sciences FH Joanneum in Graz and worked as a technical trainer, empowering other software engineers to reach their full potential. Currently, I work as a freelance software engineer and trainer again, looking to help companies build high-quality software solutions. Check out my personal blog: http://www.zupzup.org.

Recent posts:

Rust logo over black marble background.

Handling memory leaks in Rust

Learn how to manage memory leaks in Rust, avoid unsafe behavior, and use tools like weak references to ensure efficient programs.

Ukeje Goodness
Nov 20, 2024 ⋅ 4 min read
Robot pretending to be a person.

Using curl-impersonate in Node.js to avoid blocks

Bypass anti-bot measures in Node.js with curl-impersonate. Learn how it mimics browsers to overcome bot detection for web scraping.

Antonello Zanini
Nov 20, 2024 ⋅ 13 min read
Solving Eventual Consistency In Frontend

Solving eventual consistency in frontend

Handle frontend data discrepancies with eventual consistency using WebSockets, Docker Compose, and practical code examples.

Kayode Adeniyi
Nov 19, 2024 ⋅ 6 min read
How To Use Lazy Initialization Pattern With Rust 1.80

How to use the lazy initialization pattern with Rust 1.80

Efficient initializing is crucial to smooth-running websites. One way to optimize that process is through lazy initialization in Rust 1.80.

Yashodhan Joshi
Nov 18, 2024 ⋅ 5 min read
View all posts

9 Replies to "How to build a blockchain in Rust"

  1. Your article is too good. and thank you very much for sharing your blog with us. It looks very different and unique.

  2. There’s some weird bug in your binary hashes… If a hash starts with “0000”, its binary repr would start with 16 zeros, not only two. But I can’t pinpoint where it is.

  3. Hey I followed this tutorial and I have a bunch of generic reference errors, for example on the static variables in p2p.rs. like pub static KEYS: Lazy = Lazy::new….
    which I replaced with KEYS: Lazy = Lazy::new….
    it seems odd that throwing around a bunch of explicit turbo fish is fixing my errors (ultimately leading to more errors) esspecially since they arent present in this code. Could there be a change in the base packages?
    is it possible I am missing some crate or module, or using the wrong ones?
    I am new to Rust, is there something basic concept I could be missing, sorry I dont have more info I am just very confused

  4. does this still work? I got a bunch of missing generic errors, and the code was copied exactly, maybe I am using the wrong crates or modules

  5. Thx for your articles, I’m really enjoy reading it. Cause it’s the end of the workday I haven’t finished it. I’ll get back to it soon. What I really want to say is your articles are really interesting and it’s not the first one in which I’m interested in and where I can find answers to my questions. Thx for your time and detailed guides!

  6. I dont care if this code works till now but i’m learning so much, my second day of learning rust, and with an interest in blockchain, its a great start. if anyone can share the repo of the updates code or something, I’d really appreciate it

  7. Why nobody writes documents without test it? Your codes have too many missing things. For example you must write `pub response_sender: mpsc::UnboundedSender`, but your code is `pub response_sender: mpsc::UnboundedSender`. We’re just learning, how can we find the missing pieces?

Leave a Reply