pragma solidity ^0.4.24;
contract StorageTest {
// saved at index 0
uint storedUint256 = 15; // actually stored value: 0x000000000000000000000000000000000000000000000000000000000000000f
// get stored value: 0x0f = 15
// constant variable is not stored in a storage. available only in code
uint constant constUint256 = 16;| owner = web3.eth.accounts[0] | |
| buyer = web3.eth.accounts[1] | |
| signer = web3.eth.accounts[3] // verified address that allows conversions with higher gas price | |
| defaultGasPriceLimit = 20000000000 | |
| // BancorNetwork init configuration= | |
| ContractRegistry.new().then(instance => contractRegistry = instance) | |
| ContractIds.new().then(instance => contractIds = instance) | |
| ContractFeatures.new().then(instance => contractFeatures = instance) | |
| contractFeaturesId = contractIds.CONTRACT_FEATURES.call() |
| owner1 = web3.eth.accounts[0] | |
| owner2 = web3.eth.accounts[1] | |
| owner3 = web3.eth.accounts[2] | |
| to = web3.eth.accounts[3] | |
| HanwhaToken.new('HanwhaToken', 'HWT', 18, [1911772800, 1914451199]).then(i => token = i) | |
| MultiSigWallet.new([owner1, owner2, owner3], 2).then(i => wallet = i) | |
| token.mint(wallet.address, 100) | |
| token.balanceOf(wallet.address) |
https://github.com/ethereum/wiki/wiki/Ethereum-Wire-Protocol
Ethereum client를 구동하고 있는 노드가 peer-to-peer 커뮤니케이션은 ÐΞVp2p Wire Protocol을 구동한다.
- 두 peer는 연결하고 Hello를 말하고 Status message를 전송한다. Status는 Total Difficulty(TD)와 best block의 hash다.
- total difficulty: 현재 블록의 difficulty의 총합이다. difficulty란 새로운 block을 마이너가 마이닝할 때 해시 값을 찾기 위해 얼마나 brute force를 했는지를 수량화할 수 있는 값이다. e.g. block #0 difficulty: 1, total difficulty: 1
https://github.com/ethereum/wiki/wiki/%C3%90%CE%9EVp2p-Wire-Protocol
peer-to-peer 커뮤니케이션을 위해, node들은 Ethereum/Whisper/&c를 구동한다. client들은 심플한 wire-protocol에 의해 작동되도록 디자인되어 있다. 이 wire-protocol은 기존의 ÐΞV 기술과 RLP와 같은 표준을 사용한다.
ÐΞVp2p 노드들은 RLPx를 사용하여 message를 보냄으로써 커뮤니케이션한다. RLPx는 encrypted, authenticated transport protocol이다. 피어는 자신이 원하는 모든 TCP 포트에서 연결을 알리고 허용 할 수 있지만, 기본 TCP가 connection-oriented 매체를 제공하지만, ÐΞVp2p 노드들은 패킷의 관점에서 통신한다. RLPx는 이러한 packet들은 보내거나 받는 facilities를 제공한다.
TODO: https://github.com/ethereum/devp2p/blob/master/rlpx.md (RLPx)
- 왜 탈중앙화가 중요한가? — 크리스 딕슨: https://medium.com/hashed-kr/why-decentralization-matters-kr-1966d129c37a
- 사실합의로 바라본 화폐의 역사: https://medium.com/hashed-kr/history-of-money-consensus-kr-9ddebb06f099
- 탈중앙화란 무엇인가 — 비탈릭 부테린: https://medium.com/hashed-kr/the-meaning-of-decentralization-kr-f7942cf9fed6
- 혁명은 언제나 변두리에서 시작된다. - https://brunch.co.kr/@thomas00128/2
- 존최 인터뷰 - http://www.hashedpost.com/2018/01/hashed-post-ethereum-research-jon-choi.html
- 블록체인, 디지탈 세계의 유일성 - https://steemit.com/coinkorea/@tintom/aquky?fbclid=iwar0k4tkb7eg-4zqbfqm-o_ncvi2hkot7i8z7-ormlogywpw2gvj-
- WebAssembly (WASM)와 Ethereum 2.0; EVM - WASM 인스트럭션셋 전환 논란, 간단하게 톺아보기 - https://unifiedh.com/wasm-and-ethereum-20
- 블록체인에 대한 nonce의 입장 - https://brunch.co.kr/@nonce/23?fbclid=IwAR1HehybrzDC1_f2XhCXLlxFc_RXzdTbIAaABEggCkbLgAX1mp4YmDpuT8E#comment
- 현실의 인터넷 - https://medium.com/hashed-kr/internet-of-reality-kr-bef633b7b208
- 블록체인/암호화폐의 사회적, 역사적 의미 - https://brunch.co.kr/@bumgeunsong/53
https://github.com/ethereum/devp2p/blob/master/rlpx.md
RLPx는 cryptographic peer-to-peer 네트워크이면서 프로토콜 모음이다. 이는 애플리케이션이 p2p network를 통해 전송 수단 또는 인터페이스를 제공한다.
RLPx의 현재 버전은 Ethereum을 위한 네트워크 레이어를 제공한다.
목표
블록체인 현재 문제
- 프라이버시 문제
- 블록체인 용량
zk-SNARKs의 도입으로
- 익명성을 보장한다.
| pragma solidity ^0.4.18; | |
| /** | |
| * @title Proxy | |
| * @dev Gives the possibility to delegate any call to a foreign implementation. | |
| */ | |
| contract Proxy { | |
| /** | |
| * @dev Tells the address of the implementation where every call will be delegated. |
| // handle access control/permission | |
| contract ProxyStorage { | |
| address public implementation; | |
| } | |
| contract Proxy is ProxyStorage { | |
| constructor(address _impl) public { | |
| // check that its valid before setting the address | |
| implementation = _impl; | |
| } |