Can we create the world's fastest blockchain using Zig?

Just a thought, but batway I can do it now if it is feasible and useful to build a lightning fast and completely secure blockchain, this could bridge the gap between non-public data storage Centralized as quickly as storing data on traditional databases.
I like Zig and let’s name this blockchain.

I am definitely no blockchain expert, but if it uses proof of work, then I think lightning fast is a bit of an oxymoron, more like burning hot and I don’t think the choice of programming language for the scaffolding around the core algorithms has a lot of influence over making an algorithm faster that is designed to be slow.

If you have an idea for an algorithm that can do that it would be interesting to hear, but it seems unlikely to me, personally I would guess that you maybe can create something that is maybe somewhere between 10x-100x slower.

I just don’t know how you would reach the capabilities of private centralized networks based on the physical limits of computation and communication/networking.

With something like a Gossip protocol - Wikipedia which is P2P instead of blockchain you probably would get a lot closer, but that only allows you to share stuff, you then would have to build other mechanisms on top of that, from what I have read a long while ago that is essentially what Hashgraph - Wikipedia does.
It seemed like an interesting algorithm, but it is patented and I don’t want to waste my time on stuff I can’t freely work on.

Naming a blockchain implementation “blockchain” seems counter productive to it being findable.

Overall I have to ask, are you serious, or are you meming/trolling?

If you are serious, then I think it would be helpful to get more concrete than, I have an idea and a name for it, the hard part is having something that is actually a novel way to approach a problem, basically having a different solution than what others have already discovered, that could come in the form of an algorithm, or reusing/finding an old algorithm and applying it in a new way.

I don’t think replacing some critical components that are likely written in C, with Zig will create enough value to make this implementation have a competitive advantage over others.

It still could be interesting as an project if you just have an interest in writing this in Zig.

But personally I don’t really want to write clones of anything, it also has to be something I find interesting and where I feel that there is at least some hope of me finding something new.

3 Likes

I’m quite sure he meant “let’s name «this blockchain»” not “let’s name this «blockchain»”.

Zig would be a perfectly cromulent implementation language for a blockchain of some sort, but it doesn’t serve as a differentiating feature. To be successful, the chain would need to stand out in some way, and “in Zig” is not even relevant, let alone sufficient, for that to be the case.

As you allude to, there is an inherent tradeoff between high-throughput-low-latency, and even being a blockchain in a useful sense of the term. No one has found a place in the design space which achieves “fast” in that sense without compromising on what makes the technology a blockchain.

If someone breaks out of that local maximum, sure, write it in Zig, why not. But it’s a tough algorithmic design problem, it’s not “Zig is a fast systems language so we can write a fast blockchain in it”. No one has accused C++ of being slow, or Bitcoin (written in C++) of being fast.

1 Like

Ahh that makes more sense.

1 Like

Feel free and I’m curious what your ideas are?
I’m not trolling and I’m serious about brainstorm about this issue

1 Like

Yeah, that’s what I mean. I look forward to applying Zig to develop new points in blockchain technology

Alright, I’ll bite. Here’s what that means to me.

The language itself (although important) is not in my mind the most important factor. The most important factor is the design and how it permits resource usage, pools memory, and groups operations.

If you want the fastest something then it’s worth pointing out what you think makes other implementations slow. So I’ll toss the question back to you - @SaitamaCoder, is there something in particular about existing architectures that you believe can be improved upon? If so, how do you see Zig playing into this?

2 Likes

Blockchain is a nebulous concept. With which blockchain are you comparing or competing (IPFS, BTC, …)? What Proof algorithm are you looking at (work, coverage, stake, identity, etc.)? What does fast mean? What usecase are you looking at? How are you going to assure people that this won’t be a ICO dump scheme?
Saying “lets make the world’s fastest blockchain” is like saying “let’s make the world’s fastest video game”. There is way more to it than just execution speed.

2 Likes

A lot of people must have seen this YouTube video on the Dave’s Garage channel where benchmark code written in Zig managed to outperform hand-written assembly and everything else. The notion that you can achieve fantastical performance gain simply by using Zig is definitely floating around out there in the Internet. I don’t know if it’s a good thing or not.

1 Like

It all compiles down to assembly at the end of the day. I love Zig, but if I was determined to get certain assembly for some problem, it probably wouldn’t be a language issue. Actually most of the issues I have with not getting optimal assembly are because of LLVM, not Zig.