ethereum

论文阅读笔记《An Overview of Smart Contract: Architecture, Applications, and Future Trends》

拜拜、爱过 提交于 2020-02-17 06:46:16
题目:An Overview of Smart Contract: Architecture, Applications, and Future Trends 关键词: smart contract 摘要: 智能合约在金融服务、预测市场、IoT(Internet of Things物联网)等领域存在广泛应用的同时,还存在安全和隐私等问题。本文全面介绍区块链支持的智能合约。 系统地介绍了智能合约的基本框架、操作机制、平台以及编程语言; 讨论应用场景和存在挑战; 描述智能合约的最新进展和未来的发展趋势(e.g.平行区块链-parallel blockchain)。 介绍: 智能合约是按照协议条款自动执行(self-executing)的合同。bitcoin等加密货币代表的区块链技术称为blockchain 1.0 时代,具有去中心(decentralization)、防篡改(tamper-resistant)、匿名性(anonymity)和可审计(auditability)。但由于比特币脚本语言的限制,无法编写复杂的智能合约。以太坊(Ethereum)等平台的出现使得用户能够在区块链上运行自定义的程序,且编程语言满足图灵完备(Turing-complete)。以此被称为blockchain2.0。 智能合约存在安全挑战。2016年6月,递归调用攻击(Recursive calls

以太坊钱包连接私链

隐身守侯 提交于 2020-01-29 00:17:25
/Applications/Ethereum Wallet.app/Contents/MacOS/Ethereum Wallet" --rpc http://localhost:8545 /Applications/Ethereum Wallet.app/Contents/MacOS/Ethereum Wallet" --rpc /Users/guo/geth/data/geth.ipc 来源: CSDN 作者: ゞIT,java 链接: https://blog.csdn.net/weixin_37719934/article/details/103999104

Questions about contract calling another contract

拈花ヽ惹草 提交于 2020-01-23 12:17:27
问题 Need help with two related Solidity questions. Question 1. Say, I have a contract calling another one: contract B { function f1() { ... } } contract A { B b; function f() { b.f1(); } } Will msg.sender for f1 be same as for f() ? Of will it be an address of a contract A ? Question 2. Say, I have contracts A and B. I want to have contract A { B b; A(address addr) { b = B(addr); } } In other language, I would use B b = null; in declaration, to avoid double initialization, but it does not work in

Questions about contract calling another contract

半腔热情 提交于 2020-01-23 12:17:08
问题 Need help with two related Solidity questions. Question 1. Say, I have a contract calling another one: contract B { function f1() { ... } } contract A { B b; function f() { b.f1(); } } Will msg.sender for f1 be same as for f() ? Of will it be an address of a contract A ? Question 2. Say, I have contracts A and B. I want to have contract A { B b; A(address addr) { b = B(addr); } } In other language, I would use B b = null; in declaration, to avoid double initialization, but it does not work in

科普贴 | 以太坊网络中的Gas Limit 和 Gas Price 是什么概念?

牧云@^-^@ 提交于 2020-01-23 05:38:12
接触以太坊的同学都听过 Gas/ Gas Price/ Gas Limit,那么这些词汇究竟是什么意思? 还有,为什么有时候你的ETH转账会很慢?如何提高ETH转账速度? Ethereum平台 Vitalik Buterin于2015年7月推出了全球市值第二大加密货币的平台叫做Ethereum。 该平台目标是为开发人员提供一个开放、分布式网络,允许启动自己的分散式应用程序(DApps)和智能合约。 若比特币网络是对等支付系统,则以太坊被设计为通过分散式虚拟机(EVM)执行程序代码。 Ethereum网络与Bitcoin不同,前者里不仅运行一种加密货币,除了ETH之外,还有Gas和Gas Limit。 它们不仅允许用户支付交易费用,还可以启动智能合约和DApps,并将数据存储在区块链中。 Gas 是什么? Gas 翻译成中文就是“燃气”,是以太坊世界的燃料,它决定了以太坊网络生态系统的正常运行。 Gas 用来衡量执行某些动作需要多少“工作量”,这些“工作量”就是为了执行该动作支付给网络的费用额。通俗理解,Gas 是给矿工的佣金,并以 ETH 支付,无论是交易、执行智能合约并启动 DApps,还是支付数据存储费用,都需要用到 Gas。 ▲gas 的工作原理 Gas Limit 和 Gas Price 是什么? ETH 与其他加密货币不同,其作用不仅限于支付还用维护网络,一枚 ETH

以太坊私链与智能合约部署学习(博主修正篇)—— 第一篇

廉价感情. 提交于 2020-01-14 18:42:32
以太坊(Ethereum)自2017年5月诞生以来,发展迅速。作为了一个小白,博主初步打算上个车,过个瘾。那什么是以太坊?请参看度娘的解释(https://baike.baidu.com/item/%E4%BB%A5%E5%A4%AA%E5%9D%8A/20865117?fr=aladdin)。 事物是个新事物,也是个好东西,但资料不多,所以小白博主也只能慢慢找寻资料,慢慢记录自己填坑的过程。 第一篇的主题是:以太坊私链的创建:) 一、配置环境与软件安装 1、安装geth 以下的资料来自:http://8btc.com/article-4537-1.html MAC OSX 首先确保已安装 homebrew,没有安装过的可以在命令行下执行/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 进行安装 brew tap ethereum/ethereum brew install ethereum WINDOWS 访问 https://geth.ethereum.org/downloads/ 下载并安装 Geth for Windows LINUX git clone https://github.com/ethereum/go

Do blockchains contain a websocket server?

倖福魔咒の 提交于 2020-01-14 10:44:47
问题 I was recently reading about blockchains and am very intrigued by this technology. I had a few questions regarding blockchains: Do Blockchains use web-sockets to transmit information between users? If yes then is the information(blocks) sent always a JSON object? Do all users have the entire copy of the blockchain, do they each just see a partial copy of the blockchain? if yes then how big can the file get? Also, what determines transactions/second? I read bitcoin does about 7transactions

Send Raw Transaction Ethereum infura nodejs npm

我的梦境 提交于 2020-01-14 10:42:49
问题 I'm currently trying to implement an ethereum Node Connection to my Typescript/ Node Project. I'm connection to the "Infura" node server where i need to sign my transaction locally. Well, anyway. I'm signing my transaction using the npm package "ethereumjs-tx" and everything looks great. When i'm using "sendRawTransaction" from web3 my response is an tx-id which means my transaction should be allready in the Blockchain. Well... it isn't My sign Transaction Function is below. private

Are there null like thing in solidity

家住魔仙堡 提交于 2020-01-12 04:23:12
问题 struct buyer{ uint amount; Status status; } mapping(address=>buyer) public buyers; mapping(uint=>address) buyerIndex; uint public buyerNum; //Order a product. function(){ uint doubleValue=value*2; uint amount=msg.value/doubleValue; if(buyers[msg.sender]==null){ //Error in this line buyer abuyer=buyer({amount:amount,status:Status.Created}); //Error in this line buyerNum++; buyerIndex[buyerNum]=msg.sender; buyers[msg.sender]=abuyer; }else{ buyers[msg.sender].amount+=amount; } Order(msg.sender

How to deploy truffle contract to dev network when using inheritance?

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-05 07:36:09
问题 I have been attempting to deploy a contract using the Truffle framework, I have recently been testing these contracts on the development network. My contract was very large and when I attempted to deploy it to a test net, I was instructed to split it up so that the contract wouldn't exceed the gas limit. Although, bearing in mind this contract did deploy onto the development network with the default gas limit. So I took out parts of the contract and derived another contract from the base and