警告:您可能成为了企图假冒本网站内容的目标。 我们检测到该网站被IFRAME包裹,这意味着与EOS Canada无关的人试图向您展示他们的内容与我们的内容相关,可能为了让您相信他们与EOS Canada有关。 我们与任何试图这样做的组织都没有联系,它也没有受到我们的认可



WARNING: you may have been the target of an attempt to misrepresent the content of this site. We detected that the site was wrapped in an IFRAME, which means that someone else, not associated with EOS Canada, attempted to show you their content combined in some way with ours, possibly to make you believe they are associated with EOS Canada. We are not associated with, and do not endorse, any organization attempting to do this.
background-flotant-top-right-01

Blog: EOS Block Producer Tips & News

background-flotant-top-left-01

Q&A - Microforks - Everything You Need to Know About Microforks on an EOS Blockchain

November 07, 2018 / by Alexandre Bourget

Microforks can happen on any blockchain. Alexandre explains what a microfork is, when one would happen, and why it would happen.
Still have questions? Join us in our Telegram channel


Transcription:

Microforks. Between different producers.

In this video, we're going to explain what are microforks and how we can avoid them, what are their cause. So here's a graph of a microfork. What happens is that you have Producer A producing a few blocks. And Producer B did not receive those blocks in time. So he started producing a block off of that one. He didn't see this one, and this one, and this one. So he created a chain that eventually was longer than this one.

This means this block here was not paid to Producer A, this one and this one either. So they're highly incentivized to work together to get better connectivity. Now the reason for that is that with a fast blockchain like EOS, with 0.5 seconds between blocks, it can take some time for a block to traverse the trans-oceanic cables to get to the other side of the world. So if you're in Montreal and you're shipping blocks to Taiwan, there's a little time involved. So we need to have good peering between block producers. Block producers work a lot, tirelessly day and night, to ensure good speed of connectivity.

Now where's the risk for transactions? It's that if you have a transaction that was put inside this block here, and you can imagine that it would be put in that block, because it was waiting in the memory for that producer. But what happens if the transaction expired at '5' here? It means it would not be included in '6'. So you had confirmation that your transaction was in a block, but boom it's forked out! And it's not inside the history anymore. So you need to handle that. That's a feature of an eventually consistent database.

So the team here is working on some tools, streaming APIs, to give you a clear view and a linear view of what is happening with your transactions so that you can get greater assurance and guarantees out of that streaming data. Check it out, it's at dfuse.io, there's a lot of great features, table deltas, we have all the streaming and REST APIs augmented, that and much more, check it out.

And by the way, we released a tool to explore those microforks. Take a look at this at grapher.eoscanada.com. You can punch in the number of blocks and then hit submit and it's going to generate a nice graph of what really happened. Over here, we're seeing blocks that were produced in the schedule for EOS New York and then someone has been eating those blocks, coming very late. And then eating that previous block here. And then missing some spots also. So what happened? Maybe nodeos failed, or CPU was too loaded, or something like that? If we take a look at this one here, we see that this one has also eaten a block. Maybe network latency between the end of the schedule - block 12 and 10. So take a look at grapher.eoscanada.com to explore these microforks.

So we saw about microforks, why they happen, what is their affect on the transaction, why

we don't want them to happen, how block producers are working tirelessly. Recently you might have seen the numbers shrink. They're working to have great connectivity to have a flawless blockchain.

I hope this helps!

Topics: microfork, Video, EOSIO, Block Producer, blockchain, Education

Alexandre Bourget

Written by Alexandre Bourget

Alexandre lives through technology. He wrote his first botnet at 12, later graduated in classical piano and went on to a prolific career in software engineering, with notable open source contributions. Alexandre co-founded two startups, including Bitcredits (a bitcoin payments processor, FounderFuel 2014 Spring Cohort). He then helped PasswordBox (acquired by Intel) craft their data stack and ended up as a lead Data Scientist in the Intel Security Consumer division. Today, Alexandre is very active in the blockchain space, advising several early stage companies. Alexandre taught programming for many years. He does live-coding presentations like no one else (Confoo, PyCon conferences) and is the lead organizer of Golang Montréal. You’ll often find him on Telegram, working through lines of code and bugs with others, doing what he can to help build the EOS community.

cubes-solid

ABCs of EOS

A glossary of terms that every EOS user should know.

MORE

Apply to Access Our Newsletter

Get exclusive insights into EOS blockchain technology