블록체인 현재 문제
- 프라이버시 문제
- 블록체인 용량
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. |
블록체인 현재 문제
zk-SNARKs의 도입으로
https://github.com/ethereum/devp2p/blob/master/rlpx.md
RLPx는 cryptographic peer-to-peer 네트워크이면서 프로토콜 모음이다. 이는 애플리케이션이 p2p network를 통해 전송 수단 또는 인터페이스를 제공한다.
RLPx의 현재 버전은 Ethereum을 위한 네트워크 레이어를 제공한다.
목표
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://github.com/ethereum/wiki/wiki/Ethereum-Wire-Protocol
Ethereum client를 구동하고 있는 노드가 peer-to-peer 커뮤니케이션은 ÐΞVp2p Wire Protocol을 구동한다.
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;
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) |
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() |
api.post('/', async (req, res) => { | |
const serializedTx = req.body.serializedTx; | |
try { | |
web3.eth.sendSignedTransaction(serializedTx) | |
.on('receipt', receipt => { | |
return res.status(200).json({ | |
code: 0, | |
message: 'success', | |
response: { | |
txhash: receipt.transactionHash, |