traders_free custom_top_html:no
default debug random = 2 / type = READ / detected = READ

비탈릭이 이더리움 스마트 컨트랙트를 위한 새로운 언어 개발에 몰두하고 있답니다.

이미 3가지의 언어가 있지만, 이번 개스비를 두고 이루어진 DoS 공격에 대햔 보다 근본적인 해결책을 모색하고 있는 것 같습니다.

 

새 언어의 이름은 viper 입니다. 아직 아이디어 단계이지만, 기본골격은 거의 갖추어진 것 같군요.

파이썬에 익숙한 사람에게는 이해하기 쉬운 것 같군요. 스트롱 타입을 가지고 있는 점이 파이썬과는 다르네요.

그리고 개스 계산을 정확히 하기 위해 while 문을 지원하지 않고, 정해진 루프 숫자를 쓰는 for 구문만 지원하는군요.

 

https://github.com/ethereum/viper

 

the features in Viper are:

  • Types. Serpent had not types, and you could even do things like seq(x = array(5), y = array(5), z=x + y) and get out a completely random memory location that could theoretically point to anything. Viper prevents you from doing something that silly, and only allows you to add things that are numbers, doesn't allow you to array-access things that are not arrays, etc. Types can be either inferred, or can be declared via the x = type syntax.
  • There are five major types supported: num, decimal, address, bytes32, bool. Num are 128-bit signed numbers (this makes overflow checking easier), decimals are fixed point numbers where the integral component is 128-bit signed and the fractional component is base-10 with ten decimal places. Decimal fixed point is considered to be a very good choice in finance due to its ability to exactly store base-10 fractional values (eg. $15.2857) and is even mandated in some applications for this reason. Addresses, bytes32 and booleans are self-explanatory.
  • Total functional. There are no while loops; the only looping construct that exists is a for i in range(n): do_stuff statement, where nMUST be a constant nonzero positive integer. This means that for allvalid Viper code it is possible to compute a precise upper-limit on gas consumption, resolving many classes of security issues.
  • Same sorts of complex and composite data structures that you can find in Serpent
  • ABI compatibility
  • Bounds checking for array accesses
  • Overflow and zero-division checking for arithmetic

Here is a code example:

 

# Global variables
funders = {num: [sender(address), value(num)]}
nextFunderIndex = num
beneficiary = address
deadline = num
goal = num
refundIndex = num

# Constructor
def __init__(_beneficiary: address, _goal: num, _timelimit: num):
    self.beneficiary = _beneficiary
    self.deadline = block.timestamp + _timelimit
    self.goal = _goal

# Participate in the crowdfund
def participate():
    assert block.timestamp < self.deadline
    nfi = self.nextFunderIndex
    self.funders[nfi].sender = msg.sender
    self.funders[nfi].value = msg.value
    self.nextFunderIndex = nfi + 1

# Is the crowdfund expired?
def expired() -> bool(const):
    return block.timestamp >= self.deadline

# Has the goal been reached?
def reached() -> bool(const):
    return self.balance >= self.goal

# Send money to beneficiary if sufficient
def finalize():
    assert block.timestamp >= self.deadline and self.balance >= self.goal
    selfdestruct(self.beneficiary)

# If balance insufficient, refund
def refund():
    assert block.timestamp >= self.deadline and self.balance < self.goal
    # Refund everyone in a loop
    ind = self.refundIndex
    for i in range(30):
        if ind + i >= self.nextFunderIndex:
            self.refundIndex = self.nextFunderIndex
            return
        send(self.funders[ind + i].sender, self.funders[ind + i].value)
        self.funders[ind + i].sender = "0x0000000000000000000000000000000000000000"
        self.funders[ind + i].value = 0
    self.refundIndex = ind + 30

Compiler and tests are here: http://github.com/ethereum/viper

9

atomrigs님의 서명

 

한국이더리움 사용자 그룹: https://www.facebook.com/groups/ethereumkorea/

블로그:  https://www.facten.co.kr/news/articleList.html?sc_sub_section_code=S2N13&view_type=sm

 

댓글 12
default debug random = 0 / type = READ / detected = READ

List of Articles
번호 제목 추천 수 조회 수 글쓴이 날짜
6135 그야말로 대 폭락이네요.. 모든 코인 대폭락이네요.   전체 코인 마캣캡 $1000억불 무너질듯요. ..   무섭네요.. 다시 올라갈수는 있으려나... ㅠ.ㅠ 14 1 4548
쥐방울
2017.06.15
6134 빗코 전부 털었음 한국 수면(?)프리미엄 꺼지기 전에 전량 매도 ㄷ ㄷ;;   어디까지 떨어지고 올라오련가 모르겠네욤 12 0 3476
요나
2017.06.15
6133 의미심장한 차트   시가총액 시장점유율 차트인데 흥미롭네요 비트코인을 시장에서 전부 청산해도 이더리움을 못 사는 상황이 벌어지면 비코의 운명은 어찌 될지 ㅋㅋ 운명의 날이 다가오고 있네요 6 file 0 3413
네오
2017.06.15
6132 거래소마다 가격차이가 엄청 나네요 이거만 보면   폴로닉스에서 이더리움 하나 사다가 코빗 지갑에 넣고 팔면 그냥 앉은자리에서 몇만원 버는거 아닌가요? 19 file 0 3248
kcm
2017.06.15
6131 ZEC 폭등각? *** 답변 댓글이 있을 때 글 내용 삭제시 경고 없이 계정이 정지됩니다. *** *** 개인정보가 포함된 경우 혹은 불법적인 요소의 수정은 가능합니다.*** -----------------------------------------------------------... 9 0 2549
제3땅굴
2017.06.15
6130 드뎌 리플(XRP)이 빛을 보는 군요. *** 답변 댓글이 있을 때 글 내용 삭제시 경고 없이 계정이 정지됩니다. *** *** 개인정보가 포함된 경우 혹은 불법적인 요소의 수정은 가능합니다.*** -----------------------------------------------------------... 16 0 3871
여수
2017.06.14
6129 이더 전송수수료, 이거 너무 비싼거 아닐까요? *** 답변 댓글이 있을 때 글 내용 삭제시 경고 없이 계정이 정지됩니다. *** *** 개인정보가 포함된 경우 혹은 불법적인 요소의 수정은 가능합니다.*** -----------------------------------------------------------... 12 3 2588
꿀맨
2017.06.14
6128 코인원 이메일 인증 *** 답변 댓글이 있을 때 글 내용 삭제시 경고 없이 계정이 정지됩니다. *** *** 개인정보가 포함된 경우 혹은 불법적인 요소의 수정은 가능합니다.*** -----------------------------------------------------------... 6 0 1653
꿀맨
2017.06.14
6127 비트메인 하드포크선언 *** 답변 댓글이 있을 때 글 내용 삭제시 경고 없이 계정이 정지됩니다. *** *** 개인정보가 포함된 경우 혹은 불법적인 요소의 수정은 가능합니다.*** -----------------------------------------------------------... 5 0 3275
리맹
2017.06.14
6126 제 Unconfirmed Transaction 은 오래 걸리네요.ㅜㅠ *** 답변 댓글이 있을 때 글 내용 삭제시 경고 없이 계정이 정지됩니다. *** *** 개인정보가 포함된 경우 혹은 불법적인 요소의 수정은 가능합니다.*** -----------------------------------------------------------... 4 1 920
MinH
2017.06.14
6125 EEA 일정표 라구하네요 트레이딩 하시는데 도움될려나 모르겟네요 *** 답변 댓글이 있을 때 글 내용 삭제시 경고 없이 계정이 정지됩니다. *** *** 개인정보가 포함된 경우 혹은 불법적인 요소의 수정은 가능합니다.*** -----------------------------------------------------------... 1 file 0 3006
헌쓰
2017.06.14
6124 제트캐시 가격이 아름답군요. *** 답변 댓글이 있을 때 글 내용 삭제시 경고 없이 계정이 정지됩니다. *** *** 개인정보가 포함된 경우 혹은 불법적인 요소의 수정은 가능합니다.*** -----------------------------------------------------------... 6 0 2685
딜쨔응
2017.06.14
6123 빗썸 코인가격 상하한가. 급등락있을 때가 많고 그 때 마다 서버 다운인데. *** 답변 댓글이 있을 때 글 내용 삭제시 경고 없이 계정이 정지됩니다. *** *** 개인정보가 포함된 경우 혹은 불법적인 요소의 수정은 가능합니다.*** -----------------------------------------------------------... 4 0 1423
무표정으로
2017.06.14
6122 이더리움 트레이딩 (그냥 하는 소리임)   주중으로   30만원대  진입할것으로  보입니다, (40~41만원도  좋은  타이밍입니다)   38~39만원대  온다면  줏어  담으세요,   마지막  30만원대 일것 같습니다,   그리고  50만원으로  빠르게 직행할듯,,   ** 투... 7 0 2600
채굴업자
2017.06.14
6121 작게 오래먹을 요량으로 폴로닉스에서 렌딩하는데 1억 정도 굴리구요 렌딩으로 중간중간 대기열로 빠진거 챙기고 전체 이자율을 0.13%대로 관리해주니 하루에 꼬박꼬박 10만원 정도 들어오네요... 직접투자할때 돈은 벌었지만 심신이 피폐해짐을 느껴 이렇게 갈아타니... 37 2 6476
쑝카챤챤
2017.06.14
6120 이번에 음란물사이트 잡혀서 압수된 비트코인이 공매에 부쳐진다네요. *** 답변 댓글이 있을 때 글 내용 삭제시 경고 없이 계정이 정지됩니다. *** *** 개인정보가 포함된 경우 혹은 불법적인 요소의 수정은 가능합니다.*** -----------------------------------------------------------... 8 0 2542
페이리아
2017.06.14
6119 rx580 8g 가격 문의 *** 답변 댓글이 있을 때 글 내용 삭제시 경고 없이 계정이 정지됩니다. *** *** 개인정보가 포함된 경우 혹은 불법적인 요소의 수정은 가능합니다.*** -----------------------------------------------------------... 13 0 1520
반질이
2017.06.14
6118 Bitfinex에서 거래 개시한 IOTA, 시작하자마자 코인 마켓캡 7위 *** 답변 댓글이 있을 때 글 내용 삭제시 경고 없이 계정이 정지됩니다. *** *** 개인정보가 포함된 경우 혹은 불법적인 요소의 수정은 가능합니다.*** -----------------------------------------------------------... 4 0 2406
leftsword
2017.06.14
6117 트레이딩시 궁금한점 *** 답변 댓글이 있을 때 글 내용 삭제시 경고 없이 계정이 정지됩니다. *** *** 개인정보가 포함된 경우 혹은 불법적인 요소의 수정은 가능합니다.*** -----------------------------------------------------------... 0 703
하아잇맨
2017.06.14
6116 폴로닉스 출금 관련 안녕하세요 폴로닉스 출금 관련 문의드립니다 원래사용하던 이메일계정을 스팸 메일때문에 삭제했더니 이메일 컨펌이 안되서 폴로닉스에서 출금을 못하고 있습니다 가입할때 사용했던 메일주소는 변경 못하는 건지요?... 3 0 841
kenshinpower
2017.06.13
목록
Board Pagination Prev 1 ... 852 853 854 855 856 857 858 859 860 861 ... 1163 Next
/ 1163
default debug random = 0 / type = READ / detected = READ