Rust in Blockchain #0 – May 2019

Welcome to the first edition of Rust in Blockchain, the hypest newsletter about the hypest combination of technologies.

Blockchain technology brings together cryptography, mathematics, game theory, and economics to create distributed systems with uniquely powerful security properties. Rust is a high-performance programming language uniquely suited to creating secure distributed systems. Every edition we bring you the latest developer news related to blockchain technology in Rust, with the ambition of building a greater developer community around this family of projects. For more about why developers choose Rust for their blockchain projects, read Why Rust.


Project updates


Byteorder crate does not play nicely with our “non-blocking” IO #2820 It is entirely possible for a u64 or other multi-byte value here to cause the non-blocking IO to fail on a partial read. So comes the question, Rust IO is kind of janky as they do not get any type safety here in terms of blocking/non-blocking behavior.

Consider adopting a new git branching model #2779 Having discussed the git branching model, the team finally, decided to stay with the current model, with an action point taken to simplify the documentation for newcomers to understand and follow.

Db/store full (forked) blocks cleanup #2585 The key takeaway from this thread, was to compact the blocks db periodically to remove historical full blocks from the db older than one week (which is based on the current chain by traversing back from the head of the chain). It was also stated, that you wouldn’t clean forked blocks up and the blocks will remain in the db indefinitely. Please check the thread for more discussion.




Cross compile x86_64-unknown-linux-musl #903 Rocksdb depends on C++ standard library heavily, which might need a real C++ for musl to work.

Static Build CKB on CentOS 7 for exchanges #626 A centos 7 install guide.

Write a tool to dump well known hashes into a readable file #562 Doitian made a tool to dump various hashes into a file and commit that file into the repository.

Memorize hash #549 Zhangsoledad suggests fetching hashes from the database instead of computing them.

Feat: Use snappy to compress large messages #859 Use snappy to compress large messages (Driftluo), which saves bandwidth with CPU overhead.

New verification model #913 Verification model changes.


Chore: add an example named is13 #61 Mohanson as a newcomer of CKB-VM contributes an example for easier starting.

Feat: W^X initial implementation #53 Xxuejie adds initial W^X implementation to CKB-VM, which also fixes a memory overflow situation in the assembly based interpreter.

Feat: shrink VM’s memory from 16MB to 4MB #52 It reduces the load on requesting zero paged memory, providing enough time to come up with a better solution that doesn’t require zero pages. Plus, 4MB is still enough for a lot of use cases.




How to get an ordered linked_map? #2631 Liuchengxu has a use case of generating a validator set from the top candidates in the staking module. With the election algorithm which is similar to the one before phragmen, they have to sort the candidates based on their total nominations to get the top ones.

Question: how to import `blake2_512` into runtime for wasm #2605 Thiolliere explained for implementing blake2_512 for std and no_std in a similar way to blake2_256, you need to modifie sr-io/with_std, sr-io/without_std and core/executor/src/wasm_executor.

Smart Contract deployment: Invalid transaction: FullBlock on empty block #2566 The team increased the gas block limit to solve the smart contract deployment issue.

Document storage key generating algorithm #2443 A breaking change.


Node-specific limit on size of parachain candidates to validate. #148 Rphmeier said validate_collation should reject block_data that is too big with an error code indicating that the block data is considered invalid but due to arbitrary reason. Most of which would happen in the validation crate, except for the portion in the CLI.



Need better architecture for transaction forwarding #4071 Pgarg66 found the problem that, the current transaction forwarding logic may not keep up with leader rotation, and in turn cause unnecessary load on the network and Proposed solutions as well.



Plans for pairing and #76 Afck said, there are several projects that use pairing and would like to contribute to it. How does Zcash deal with PRs merge?



Long chain attacks could disrupt the network #4336 (Source: Solana)

Problem long chain generated with a faster ASIC could lock the node out from the real network. Proposed Solution The proposed block should be near the local generated PoH before a node considers voting for it.



CKB Testnet First Run

Antonio shares his experience on how to start mining on CKB testnet.

Why Blockchain is Hard


Lessons Learned from Teaching Over 500 Developers or: Why You Should Level Up

To understand Bitcoin deeper through reading/coding/teaching.

Instead Of Solving The ‘Blockchain Trilemma’, Focus On Building A Vibrant Cryptoeconomy

Blockchain-flavored WASI


[Video] Understanding Blockchain Programming Languages in 7 Minutes.

[Video] Blockchain in Rust series

[Audio] Rust-Bitcoin, Threats to Bitcoin & Bitcoin Data Science



June 6-14 | Online

The WorkFork Online Hackathon

June 8-9 | Breaking Bitcoin, Amsterdam

Breaking Bitcoin [Training & Hackathon]

June 14-16 | San Francisco

BUIDL San Francisco [Blockchain Hackathon]

June 20 | Zurich Switzerland

Swiss Blockchain Hackathon

June 24-26 | Zug, Switzerland

Crypto Valley Conference

June 28-29 | Firenze FI, Italy





The Blockchain Jobs Report, 2019


Senior Rust Developer


Blockchain Runtime Engineers


Blockchain Engineer


Interesting things

Rust Cryptography Working Group

Thread: wins, missteps, and next steps at Holochain and Holo.



A huge thank you to Mike, Ash, Brian, Alexandra and Ben for your contributions and helping bring this newsletter to fruition. We finally made it!


Join the action on our subreddit ❤️

Leave a Reply