版權聲明:
以下內容來自微信公共帳號“EOS技術愛好者”,搜索“EOSTechLover”即可訂閱,翻譯Gavin,校對Lochaiching。轉載必須保留以上聲明。僅授權原文轉載。
本文原文鏈接為https://busy.org/@iang/life-is-a-cabaret-or-how-to-split-and-merge-a-blockchain ,由本號“EOS技術愛好者”翻譯。
"EOS技術愛好者"全程由EOShenzhen運營,喜歡我們請為我們投票(EOShenzhen的投票賬號:eoshenzhenio)!
Life is a Cabaret... Or how to split and merge a blockchain
人生是一場歌劇表演......或者如何拆分或合并區塊鏈
作者:Ian Grigg
翻譯:Gavin
校對:Lochaiching
Imagine we have a perfect message and a perfect blockchain and a perfect musical?
想象一下,我們有一個完美的信息環境,一個完善的區塊鏈和一個完美的音樂?
Imagine our perfect blockchain has entered into the entertainment business and we're casting Liza and Michael and Helmut and all for the 7pm session of that And then along comes Crypt-XO, noted lover of theatrics, and asks, how does a message-based blockchain fork?
想象一下,我們趨于完善的區塊鏈已經進入到了娛樂行業,我們正在挑選Liza、Michael 和Helmut,以及所有娛樂行業的人都參加7點的晚會,然后Crypt-XO(一位著名的戲劇愛好者)問,一個基于消息的區塊鏈是如何分叉的?
That made me wonder @iang _fc how is a message based blockchain hard forked? Differences?
Because that’s a good question - how does one do that? - I spent a day thinking about this. And I drew up a plan. Even more challenging and interesting, I drew up the notion of merging two chains that had forked.
因為這是一個很好的問題——如何做到這一點?我花了一天的時間思考這個問題。
我擬定了一個計劃。更有挑戰性和更有趣的是,我提出了合并兩個已經分叉的鏈的概念。
I mean, really - if a chain can fork, it can merge, right? “It stands to reason…” It happens all the time in the theatre business, I saw it in the movie.
我的意思是,如果一個鏈可以分叉,那它就可以合并,對吧?“這是有道理的……”它在戲劇行業中時常發生著,在電影中也能看到它。
"The curtain is yours" says an injured Richard Burbage to an embattled Will Shakespeare.
So we know that theatres can merge. Splitting a currency is as easy as splitting a theatre it seems, as proven by those fine productions, Bitcoin on Broadway and Ethereum at the Albert Hall . Merging seems plausible, and while I was tussling with the precise meaning of how to merge a currency, it occurred to me that, no matter the song - "Money makes the world go round..." the world isn't just about money.
我們知道劇院可以合并,分裂一種貨幣就像分裂一座劇院一樣容易,百老匯的比特幣和Albert音樂廳的以太坊就是這樣證明的。合并似乎是合理的,當我正在努力思考如何定義合并貨幣的確切的含義時,我突然想到歌曲中的——“金錢讓世界運轉”,世界不僅僅是關于金錢的。
In the theatre production of Cabaret , tickets were of course sold-out months earlier.Now that our blockchain has forked, and the tickets are available twice, how does that work?
在劇院演出的歌舞表演中,門票在幾個月前就已經售罄。現在我們的區塊鏈已經有了分叉,門票被購買兩次,這該如何運作呢?
Do the seats fork as well? Do the actors sing and dance twice as fast?
座位也可以分叉嗎?還是演員們盡可能快地唱兩次歌和跳兩次舞?
The world is also about companies. So what about a DAC? In this case, a Distributed Autonomous Corporation (or a DAO in the slightly unfortunate Ethereum lingo) has issued 100% of its ownership to its shareholders. On a fork, do the shareholders pick up 200% shares, 100% on the left chain and 100% on the right? Do the CEO and all the staff have to work twice as hard to pay twice the dividends? Do the staff get twice the salaries? What happens when the taxman turns up?
世界就像公司一樣運作,那DAC呢?在這種情況下,一個分布式的自治公司(或者說是一個DAO,嚴格上不能算是以太坊術語)已經把它的全部所有權都交給了它的股東。在分叉上,股東們是否會獲得200%的股份呢,100%在左鏈,100%在右邊嗎?CEO和所有員工是否必須努力完成兩倍的工作量,才能支付兩倍的股息嗎?員工的薪水是兩倍嗎?當有稅務員的時候又會發生什么呢?
Or grandma's house? When Mattereum has completed its fine legal work to get grandma's house onto the blockchain, and it forks, do we now have two houses? Two shares? Two grandmas? Do the grandmas have to let twice as many rooms, perhaps day rooms and night rooms?
或者這種情況出現在祖母的房子,會怎么樣呢?當Mattereum完成了完整的法律流程把祖母的房子放在區塊鏈上,接著分叉了,那我們現在有兩套房子了嗎?雙倍股份?兩個祖母?祖母們要讓房子里有兩倍的房間,或許說分成白天的房間和晚上的房間?
If truly, "money makes the world go around," does a fork make the world go round twice as fast? I can see one advantage to the Bitcoin and Ethereum notion of forks and that is if the central bank were to adopt blockchain - then it would have the option of forking to do massive quantitative easing. Think about the benefits! If the Fed had issued a One True FedCoin, then 2008 crisis would have been a snap – fork and ease. Two One True FedCoins is twice better, the economists will say it so!
如果這些能實現,“錢能讓世界運轉”,那分叉能讓世界以兩倍速度運轉嗎?我可以看到Bitcoin和Ethereum分叉概念的一個優勢,那就是如果中央銀行采用區塊鏈,那么它就可以選擇進行大規模的量化寬松政策。想想其中益處!如果美聯儲發行了一種One True FedCoin,那么2008年的金融危機將會是一個斷裂-分叉-緩解的過程。
兩種One True FedCoin將獲得翻倍的利益,經濟學家會這么說!
Or, if the EU is facing rebellion in the fringe states, then Grexit, Brexit, Prexit and be blessed! The Brits could have been quite happily dealing in Broyos while the Greeks would be spending up big on Greuyos.
或者,如果歐盟面臨邊緣國家的叛亂,希臘退歐、英國脫歐,那么Prexit就會受到祝福!希臘人在Greuyos大肆揮霍時,英國人可能會非常樂意在布Broyos做生意。
There's something for everyone in a fork. And that's the problem - it's a concept that only a charity or aid NGO or other mystics could find sane. Actual accountants, actual owners, actual people who actually count and account, in the mathematical meaning of the term, cannot deal with the notion that yesterday there was one, and today there are two.
分叉每個人都可以找到適合自己的東西,這就是問題所在——這是一個只有慈善機構或援助非政府組織,或其他神秘主義者才能找到理想的概念。 現實中的會計師、所有者和計算管理賬戶的人 ,在該術語嚴格的數學意義上,不能處理“昨天有一個,今天有兩個”的概念。
Maybe, yes to twice the money, but NO to twice the obligations.
也許,是的,是兩倍的錢,但不是兩倍的義務。
Part of the deal with a contract is that the parties enter into a commitment that there is only one deal, one pile of cash, one trade. You can’t fork your partner’s intent, and therefore you can’t fork a contract. At least, and expect the contract to survive. It’s only in the extraordinary circumstances of the cryptocurrency code-as-contract can you fork, and that’s not a feature, it’s a bug. A chain that can fork, or achain that permits a contract to fork, is not doing contracts.
合同交易的部分是,雙方承諾只有一張協議、一堆現金、一筆交易。 你不能分叉你合作伙伴的意圖,因此你不能分叉合同,至少期望合約存在下來。 只有在加密貨幣代碼的特殊情況下才能實現合約,而且這不是一個功能,而是一個漏洞。 可以分叉或者允許合約分叉的鏈不能稱為合約。
So, all is not lost. In a messaging based blockchain such as EOS, it should be possible to write the contracts to handle a fork. Basically, although two forks can exist independently (and there is a scenario for that) the contract should act as one thing.both chains is likely conflicted. So it can simply freeze any key or account where a message is seen from both chains and entering the contract into a forking conflict.
所以,一切都不會消失。在基于消息傳遞的區塊鏈(例如EOS)中,應該可以編寫合約來處理分叉。基本上雖然兩個分叉鏈可以獨立存在(并且有這樣的場景),合約應該是針對一件事。這兩個鏈很可能存在沖突。因此,它可以簡單地凍結從兩個鏈中看到消息并將合約輸入分叉沖突的任何密鑰或帳戶。
A requirement for this might be that a message has to indicate which chain it is referring to. I suspect this is possible by referring to a block header, something called TAPOS or Transaction As Proof Of Stake . Some thinking to do there, but basically this means that a software agent that is dealing with your account and your contracted value should be careful not to write messages referring to two separate, forked block headers because the contract is likely to interpret that as a fork and freeze out that agent entirely. Until a revoke message is received to undo one of the sides. Maybe.
對此的要求可能是消息必須指示它所引用的鏈。 我認為這是可能的,通過引用區塊頭文件,稱為TAPOS或Transaction As Proof Of Stake。 有些人想這么做,但實際上這意味著處理你的帳戶和你的合約定義值的軟件代理應該十分小心地不要引用兩個單獨的分叉區塊的頭文件,因為合約很可能將其解釋為分叉并完全凍結該代理。直到收到撤消消息撤消其中一方。 也許是這樣的情況。
As I say, there is some thinking to be done there (does the above create an option?) but it does rather hint that we can handle a fork on a message-based chain with enough hard love.
正如我所說,有一些想法可以在那里完成(上面是否創建了一個選項?)但它確實暗示了我們可以用足夠強硬的態度來處理基于消息的區塊鏈上的分叉。
On a state-based chain, which is the flip side of Crypt-XO's question, that's much harder. In a UTXO-based system, the code is tied into the transactions, so each transaction is authoritative in and of itself and therefore it does not refer to the fork at all. With EOS at least this is solved by the message-based paradigm. (I'm unsure if Ethereum survives here because it is both message and state based, just to double up on the complexity and confusion).
在一個基于state的區塊鏈中,這是Crypt-XO問題的另一面,這要困難得多。在基于UTXO的系統中,代碼被綁定到交易中,因此每個交易本身都是權威的,因此它根本不需要引用分叉。至少對于EOS來說,這可以通過基于消息范式來解決。(我不確定以太坊是否能在這種情況下生存下去,因為它既是基于信息又是基于state的,這就增加復雜性和混亂度)。
Anyway. I'd just like to put a stake in the heart of the fork. The notion that a blockchain can just fork because we're all a bit different, and all the value forks too is death to business. It's like candy for kids, crack for weeders, push-button QE for governments, and frankly, it kills practically every smart contract. The fact that blockchains are running around doing the fork & doubling down on the money indicates nobody can run a smart contract on those chains and hope for it to handle value.
無論如何,我只是想把寶壓在分叉的核心上。區塊鏈可以因為我們都有分歧而分叉,但所有價值的分叉對商業意義來說都意味著死亡。這就像孩子們的糖果,除草機的破碎聲,政府的開關按鈕,說白了,它幾乎扼殺了所有的智能合約。事實上,區塊鏈正在進行分叉并使資金倍增,這表明沒有人能夠在這些鏈上運行一份智能合約,更別說讓它處理數值。
And what's a smart contract if it isn't handling value? Heaven knows what would happen to all those token sales on Ethereum if it were to fork today. If that worries you, just remember, Liza had the last word on depression.
如果它不能處理數值,還能算得是智能合約嗎? 誰都不知道如果它今天要分叉了,那么以太坊上的所有代幣會怎么賣出去。 如果這同時也讓你擔心了,請關心一下Liza在抑郁前說的最后一句話:
"What good is sitting alone in your room?
Come hear the music play
Life is a Cabaret, old chum
Come to the Cabaret"
“獨自坐在房間里有什么好處?”
來聽音樂吧~
生活就像一場歌舞表演,老朋友
來看表演吧~”
本文圖片來源于英文原文
了解更多關于EOShenzhen:
關于我們更多聯系:
Website:https://eoshenzhen.io
Steem:https://steemit.com/@eoshenzhen
Busy:https://busy.org/@eoshenzhen
Telegram:https://t.me/eoshenzhen
Twitter:https://twitter.com/eostechlover
簡書:EOS技術愛好者
新浪微博:EOSTechLover
EOShenzhen的投票賬號:eoshenzhenio