ETHEREUM 의 장점이자 단점이 Transaction과 Contract GAS 시스템입니다.
본글은 2016년 9월 Contract DDOS 공격으로 이더리움 네트워크가 다운되거나, 채굴이 되지 않았던 상황에 대해서,
중장기적인 대책으로 공개했던 내용입니다.
In case of Ethereum, The Transaction and Contract GAS system is strong feature , in addition , it is also very weak feature.
I've Posted article at last year, when September 2016, Contract DDOS Attack makes Ethereum networks down and Can't mining ether, I've proposing method of solve gas fee problem, for future release of feature patch.
제가 그리는 블록체인에 스마트 콘트랙트를 위한 기본 아이디어로도 아래 기본을 보강하여 적용예정입니다.
I'll apply Gas fee auto change algorithm to my blockchain , what I've dreaming. It will be base of feature and More advanced feature will be applied also.
작년부터 여러 많은 아이디어들이 bitcointalk 이나, forum 등에서 제안이 되었죠.
From last year (2016) , Several Idea has discussed in bitcointalk, and forum.
저는 저의 방법론을 그때 올려놓은 것을 공유드립니다.
아래 URL 에 ENG/KOR 두버전이 있습니다.
I'm share the article what I've posted on gist , github.
Following URL has ENG/KOR version.
https://gist.github.com/trustfarm-dev/cbbc9aa1ab76983cb7dbaa329097c1c3
------------ 한글본 (KOREAN) ---------
Gas비 자동변경에 대한 아이디어.
애시 당초 ETHEREUM 을 보면, computer 와 smart contract 이 동작할수있는 코인 플랫폼이었다.
최근 DDOS 를 보았을때, ETHEREUM 노드가 잡아먹는 런타임 메모리가 16GB 가 넘어가고, 노드가 몇 10분을 헤메다, 뻣거나 이렇게 되었다.
lite 한 IoT 시스템에 올리기에는 소프트 사이즈가 문제가 아닌, 런타임 메모리 사용때문에 현실적으로 불가한 상황이다.
굳이 한다고 해도, 원격지 서버 노드에 접속해서 클라이언트 기능만 넣을수있지, Full node 는 힘든 상황이다.
메모리 제한을 할수있는 새로운 방법이 있어야 하고, 이를 적용한 포크 노드가 나와야 한다.
Gas 가격을 올리는 하드 포크를 하더라도, DDOS 를 막기는 힘들것이다.
단, DDOS 하려고 하는 자는 엄청난 가스 비용을 감내 해야 하는 상황인 것이지만, 다른 공격 루트는 또 찾을 것이기 때문이다.
하지만, Gas 비를 조정함으로서 DDOS 를 막는데는 상당한 도움을 줄것이다.
그래서, 거래소 처럼 실시간으로 Gas 사용비를 올렸다 내렸다 하는 블록체인 노드 시스템이 되었으면 어떨가 한다.
최근의 DDOS 나 Contract 이 빈번해져서, 전체 네트워크 상 트랜잭션에서 일정시간 수분 또는 수시간 , 특정 instruction 의 사용빈도가 높았다면, 자동으로 네트워크 통계를 기반으로 해당 instruction 의 가격이 올라간다.
사용하지 않으면, 기본값으로 환원한다.
기존 contract 중에서 Gas 비를 싸게 하기 위해서는 기존 기능중 많이 쓰는 contract 은 노드자체와 연결된 계정으로 등록을 하게 하여,
이컨트랙은 표준 Gas 비를 사용하여, Ethereum 기본 노드에 contract 서비스로 등록한다.
물론, Contract 에 대한 검증은 제3의 community 및 ethereum 재단 쪽에서 한다.
등록하려면 등록 Fee 를 납입한다. 일종의 Contract Certification 시스템이다.
이런 방안을 적용할수있다면, DDOS 를 막는데, 일정부분 역활을 할수있을것 같네요.
하지만, custom contract 의 개발은 많이 위축될수있겠어요.
또한, Certification 에 대한 거부감도 상당히 있을것 같구요.
이에 대한, 또다른 대안방안은 여럿있지만,
오늘은 여기까지 ~
기본 아이디어는 실시간 블록 트랜잭션 통계 기반의 Gas 비 자동변경방안 입니다.
---------------------- 영문본 (ENGLISH) ---------
(ENG) Ethereum-gas-fee-autochange.txt
Ethereum Contract GasFee Autochange Idea. review on recent DDOS attacks.
From the beginning ethereum has object to be a world computer and smart contract coin platform.
Recent days of DDOS attacks, ETHEREUM normal node (geth , parity) has over consumed 16GB of Runtime memory and sometimes stuck over 10s minutes, or finally, Out of Memory error occurs and down.
It's not suitable for lite IoT systems, it needs less consume of run-time memory, not by sw footprint.
If operate nodes, that's possible to lite client which connect remote full nodes.
Thus, It needs new method for limit memory usage and new forked node sw might be come out.
And, next monday (16th Oct,2016) plan to EVM instruction Gas Value increasing hard fork on Ethereum nodes (geth,parity).
Even though GAS price is increase, It'll not full cover prevent DDOS.
Cracker who try DDOS, needs tremendous GAS fee, but, There's another way to attack, they try to find.
But, Increasing GAS fee, It'll very helpful to prevent DDOS. It's clear.
So, I've thought Realtime Gas Fee auto changing idea. like a Exchange.
some minutes, or some hours, get statistics in contract usage transaction, some instruction's usage count has increase then increase Gas fee of that instruction, and longer time not using then decrease gas fee, and finally default gas fee.
Many usage of contract, they want to save Gas fee, register contract to nodes sw with given contract address.
This verified contract will consume less Gas fee.
In this case, Contract verification and certification will do by 3rd party trusted community or eth foundation.
And should pay Registration and Certification fee.
It's kind of Official Contract code certification system.
This kinds of algorhitm will be helpful prevent contract DDOS attacks.
But, Another Cons are ::
And Another idea will alternatives...
next time ~~~~
Base ideation come from Gas Fee Autochange based on Realtime block transaction statistics.