비트코인

7월 13일 뉴스 Segwit2x Testnet이 의도치 않게 포크되어, 블록 생성이 막히다

올커넥티드 2017. 7. 16. 15:48

Segwit2x Testnet Unintentionally Forks, Prevents Blocks From Being Created

Segwit2x Testnet이 의도치 않게 포크되어, 블록 생성이 막히다

2017-07-11    Bitcoinist

출처: http://bitcoinist.com/segwit2x-testnet-unintentionally-forks-prevents-blocks-from-being-created/

Yesterday, the testnet(*) for the most recent Bitcoin scaling proposal, Segwit2x, experienced a fork in the chain, causing the creation of new blocks to halt completely for just around twenty hours.

어제, Bitcoin의 최근 Scaling 프로포잘(=확장성 확대를 위한 커뮤니티의 제안)을 위한 Testnet(*)인 Segwit2x가 Chain 포크를 겪었는데, 이것은 약 20시간동안 새로운 블록이 생성되는 것을 완전히 막았다.

(*) Testnet 이란

The testnet is an alternative Bitcoin block chain, to be used for testing. Testnet coins are separate and distinct from actual bitcoins, and are never supposed to have any value. ...

Testnet이란 Bitcoin의 Alternative 블록체인이다. 그리고 이 Testnet은 Testing을 위해 사용된다. Testnet 코인은 실제의 Bitcoin과 분리되어 있는 "다른" 코인이다. 그리고 결정적으로 어떤 가치도 가지지 않는 코인이다. ...

출처: https://en.bitcoin.it/wiki/Testnet

http://coinjoa.co.kr/wys2/file_attach/2017/06/29/1498721432-45.jpg

What is Segwit2x?
Segwit2x란 무엇인가?

The controversial change to the protocol calls for activation of segregated witness with signaling from 80% of the hash rate with a hardfork to raise the blocksize parameter to 2 MB scheduled for three months after activation. This compromise comes after over a year of infighting over different scaling solutions and has the backing of many of the industry’s top organizations.

프로토콜에 대한 이 논란 많은 Change는 하드포크를 감행하고 그 시점으로부터 3개월동안 Block 사이즈를 2MB로 확장을 위한 (전체 네트워크의) Segregated Witness의 활성화를 필요로 하는데 그에는 80%에 달하는 Hash Rate가 소요된다. (현재의 1MB Block 사이즈를 해결하기 위해 도출된) 이 타협안은 업계 내에서 Scaling(확장성 확보를 위한) 다양한 해결책들이 서로 싸우고 다퉈 나온 결과이다. 그리고 결정적으로 업계 Top 조직체들의 지지를 등에 업고 있다.

A separate testnet was launched weeks ago to provide an environment in which this new piece of software can be developed and see what potential effects it would have on the real Bitcoin network. The testnet is a completely separate blockchain, with separate miners, separate coins, separate nodes, and most importantly, separate consensus rules that decide whether or not a block is valid.

이 분리된 Testnet은 몇주 전에 런치됐는데, 그 목적은 새로운 Software를 개발했을 때 그것이 실제 Bitcoin 네트워크에 끼치는 잠재적 영향을 미리 볼 수 있는 환경을 제공하는 것에 있다. 이 Testnet은 채굴자들, 코인들, Node들 그리고 무엇보다 (블록의 유효 여부를 결정하는) 컨센서스 룰이 분리된, 말그대로 완전히 (Bitcoin과) 분리된 블록체인이다.

The developers working on Segwit2x are working against the clock; with the growing threat of BIP 148(**) looming on the horizon, Segwit needs to be activated by August 1st to avoid a chain split.

Segwit2x 개발자들은 곧 닥칠 BIP 148(**)을 앞두고 시한을 다투고 있는데, Chain Split을 피하기 위해서는 8월 1일까지는 Segwit을 활성화시킬 필요가 있다.

(**) UASF, MASF 그리고 BIP 148

UASF은 무엇인가?
What is a UASF?

UASF stands for User Activated Soft Fork. It’s a mechanism where the activation time of a soft fork occurs on a specified date enforced by full nodes, a concept sometimes referred to as the economic majority. A UASF requires a lot of industry support and coordination, which is good practice for eventual hard forks which requires even more industry coordination. In the past, a UASF was successfully carried out to activate the P2SH soft fork (BIP16). The UASF concept was combined with SegWit activation in the BIP148 proposal which can be found here: github.com/bitcoin/bips/blob/master/bip-0148.mediawiki.

UASF 란 User Activated Soft Fork의 줄임말이다 (User 주도의 소프트 포크).  
이 UASF 소프트 포크의 메커니즘은 전체 Node에 의해 강제된 특정일자에 소프트 포크를 활성화시키는 방식이다. 때때로 다수주도경제라는 개념으로 언급되기도 한다. UASF는 업계의 많은 지지와 협력을 필요로 한다. 더 많은 업계의 협력을 필요로 하는 궁극적인 하드 포크 개념으로 가기 위한 좋은 방법이기도 하다. 과거에 P2SH 소프트 포크 (BIP16)를 활성화 시키기 위해 UASF가 수행된 바 있다. BIP148 프로포잘에서 SegWit 활성화에 이 UASF 개념이 결합돼 있다. 이러한 BIP148에 대한 내용은 다음 링크에서 찾아볼 수 있다: 위의 원문 링크 참조.

MASF은 무엇인가?
What is a MASF?

MASF stands for Miner Activated Soft Fork. It’s a mechanism by which miners trigger activation of soft forks when a majority signals the readiness to upgrade. This allows for a faster activation time for the soft fork, leaving full nodes to upgrade at their leisure. This method is a tradeoff, because it puts trust in the hash power actually enforcing the new rules. If they do not, it can cause various invalid chains on the network. For example, this was the case with BIP66, when hashpower indicated they had upgraded when in fact more than 50% had not. The other tradeoff is that the method allows a small number of hash power to veto activation of the soft fork for everyone on the network. Overall, if everyone cooperates, this method is very convenient and has been used to successfully activate multiple soft forks in the past such as BIP65 CLTV and BIP112 CSV.

MASF란 Miner Activated Soft Fork의 줄임말이다 (Miner 주도의 소프트 포크).
이 MASF 소프트 포크의 메커니즘은 다수가 Upgrade를 위해 준비됐다는 신호를 보낼 때 Miner들이 소프트 포크의 활성화를 촉발시키는 방식이다. 이러한 방식은 전체 Node들이 각자가 편할 때 Upgrade할 수 있게 하고, 소프트 포크에 소요되는 시간을 단축시킨다는 특징이 있다. 이 방법은 일종의 Trade-off (무언가를 주고 그 대가로 다른 것을 받는 형식)인데, 그 이유는 실제로 새로운 룰을 집행하는 동력인 Hash Power (해쉬 파워)에 힘을 실어주기 때문이다. 만약 Trade-off 을 하지 않는다면, 네트워크에는 다양한 종류의 유효하지 않은 체인들이 발생할 수 있다. 실제 있었던 BIP66의 경우를 예로 들면, Hash Power가 스스로 Upgrade 됐다고 가리켰었는데, 실제로는 50%가 넘게 Upgrade가 되지 않았었다. 다른 Trade-off 방법dmfh 적은 수의 Hash Power가 네트워크의 모두(=모든 Hash Power)를 위해 소프트 포크의 활성화를 거부할 수 있도록 하는 방식이 있다. 전반적으로 말해, 모든 Hash Power가 협력할 경우 이것은 매우 편리한 방식이 될 수 있다. 그리고 이 방식은 과거에 있었던 BIP65 CLTV나 BIP112 CSV에서 복수의 소프트 포크를 성공적으로 활성화시키는 데 사용된 바 있는 방법이다.

BIP148은 무엇인가?
What is BIP148?

BIP148 is a UASF that is designed to cause the existing SegWit MASF deployment to cause activation in all existing SegWit capable node software (which currently is 80% of the network nodes). How does BIP148 Work? From August 1st, 2017, miners are required to signal readiness for SegWit by creating blocks with the version bit 1. This will cause all SegWit ready nodes, which make up over 80% of the network, to activate and begin enforcement. Link for reference: luke.dashjr.org/programs/bitcoin/files/charts/segwit.html. Miners must also check blocks prior to their own and ensure that they also signal for SegWit, and only build on those blocks.

BIP148은 (현재 네트워크 Node의 80%를 차지하는)모든 기존 SegWit Capable Node Software에서 기존 SegWit MASF 배치를 유발하도록 디자인된 UASF이다. BIP148은 어떻게 작동하는가? 2017년 8월 1일부터, Miner들은 "bit 1" 버전으로 블록을 생성함으로써 SegWit 준비를 위한 신호를 보낼 필요가 있다. 이것은 모든 SegWit이 Node를 준비하도록 촉발하고, 네트워크의 80% 이상을 구성하게 될 것이다. 참조 링크: 위의 원문 링크 참조.
Miner들은 또한 자신이 소유한 블록, 그 이전의 블록들도 확인해야만 한다. 그리고 그들 (=그 블록들) 또한 SegWit를 위한 신호를 보내고 있음을 확신하고 있어야 하며, 그러한 (SegWit 신호를 보내고 있는 확신이 드는) 블록들 위에서 SegWit을 구축해야 한다.

http://www.uasf.co/img/bitcoin-nodes-segwit.png

출처: http://www.uasf.co/

An Accidental Fork
우연한 포크

The development team hit a pothole of sorts on Monday when the testnet unintentionally forked and caused the network to essentially go down for almost a full day along with creating two incompatible testnets. Not a single block was created during this period as developers rushed to find the cause and a solution to the problem.
지난 월요일에 Testnet이 의도치 않게 포크되어 (Testnet의) 네트워크가 거의 하루종일 다운될 수 밖에 없었는데 이 때 조화되지 않는 두개의 Testnet이 생성됐다. 그리고 개발팀은 그 날 바닥을 칠 수 밖에 없었다. 개발자들이 문제의 원인과 해결책을 찾기 위해 서두르는 동안 단 하나의 블록도 생성되지 않았다.


 

btc1 testnet irrevocably forks. https://t.co/GNH84Jblq4
— UASF Cosmic (@bhec39) July 10, 2017

btc1 Testnet이 불가역적으로 포크됐다. - UASF Cosmic / 2017년 7월 10일

The reason for the fork was found to be that when the chain hit a certain block number, the first block that began the chain allowing for 2MB blocks needed to be over 1MB. Since it is a testnet and lacks a real user base, the mempool(***) was essentially empty. There weren’t enough transactions being made to add up to greater than 1MB, causing the fork.
이 (예기치 않은) 포크의 원인은 (블록)체인의 결합을 끊을 때 특정 블록에서 끊는데, 그 특정 블록이 새로운 블록체인의 첫번째 블록체인이 되는 것에 있었다. 이 첫번째 블록은 다른 블록과 다르게 1MB가 아닌 2MB까지 용량이 허용되는 특징이 있기 때문이다. 이것은(말그대로) "테스트"Net 이고 실제 유저층이 없었기 때문에, MemPool(***) 이 본질적으로 비어 있었다. - 그런데 이 첫번째 블록이 생성되기 위한 충분한 트랜잭션(주석: 1MB 이상의 거래기록이 쌓이지 않음)이 없었기 때문에 포크로 이어지게 된 것이다.

(***) Bitcoin Mempool이란

The bitcoin mempool is a collection of all transactions waiting to receive a network confirmation. Every time a bitcoin transaction is broadcasted to the network, it takes an average of 10 minutes before it receives the first confirmation. However, depending on how many pending transactions there are in the mempool at any given time, that 10-minute windows can be larger. Over the past few months, there have been multiple mempool incidents causing significant transaction confirmation delays.

Bitcoin Mempool은 네트워크의 컨펌을 기다리는 모든 트랜잭션(거래)의 집합을 말한다. 매번 Bitcoin 거래는 네트워크에 브로드캐스트될 때마다, 첫번째 컨펌을 받기까지 평균 10분 정도가 소요된다. 하지만 Mempool에서 보류 중인 트랜잭션이 얼마나 많냐에 따라, 10분이 더 걸릴 수 있다. 지난 몇개월 동안, 대량의 심각한 트랜잭션 컨펌 지연을 야기하는 Mempool 사고가 대량으로 발생하고 있다.

출처: https://themerkle.com/what-is-the-bitcoin-mempool/+&cd=3&hl=en&ct=clnk&gl=kr


 

Two Sides of the Story
스토리의 두가지 측면

Much of the community who is against the proposal are calling this definitive proof that these programmers are not up to the task of working on a piece of software that controls a nearly $40 billion industry. Others argue that with the deadline approaching and a release date set for July 21st, there’s no way they’ll be able to iron out all the potential bugs in the software.

이 프로포잘에 반대하는 대다수의 공동체들은 이것이 약 400억 달러의 산업을 좌지우지하는 소프트웨어 하나를 두고 프로그래머들이 일을 안하고 있다는 확정적인 증거로 본다. 또 어떤 이들은 7월 21일로 데드라인이 잡힌 상황에서 소프트웨어에 있는 모든 잠재적인 버그들을 해결하기란 불가능하다고 주장한다.

The team, lead by Jeff Garzik, has spoken out since, saying the fork is a result of a testnet miner activating the fork without the preparation needed from the rest of the people on the testnet. While it is obviously a problem that needs to be fixed, developers argue that the point of the testnet is to test new software.

Jeff Garzik이 이끄는 팀은, 이 포크가 Testnet의 Miner가 testnet의 나머지 사람들에게 필요한 준비 없이, 활성화시킨 결과라고 말했다. 이것은 고쳐야 하는 분명한 문제긴 하지만, 개발자들은 testnet의 목적이 새로운 소프트웨어를 시험하는 것이라고 주장한다.Jeff Garzik

In a message on the Segwit2x working group mailing list Garzik wrote:
Garzik은 Segwit2x 워킹 그룹 메일링 리스트에 다음과 같은 메시지를 적었다.

Someone added mining power to testnet5 and accelerated it to the HF-on-block-X activation point. Although unexpected timing, this is otherwise a good field test.
누군가가 testnet5에 mining power(채굴 파워)를 더했고, testnet5를 HF-on-block-X 활성화 지점으로 가속시켰다. 예상하지 못한 타이밍이었지만, 달리 말하면 좋은 Field Test이기도 하다.

Matthew Hrones