zoukankan      html  css  js  c++  java
  • ethereum

    blockchain

    https://ethereum.org/zh/developers/docs/intro-to-ethereum/

    分布式 数据库, 不可篡改

    A blockchain is best described as a public database that is updated and shared across many computers in a network.

    "Block" refers to the fact that data and state are stored in sequential batches or "blocks". If you send ETH to someone else, the transaction data needs to be added to a block for it to be successful.

    "Chain" refers to the fact that each block cryptographically references its parent. A block's data cannot be changed without changing all subsequent blocks, which would require the consensus of the entire network.

    Ethereum

    区块链的一个实现

    In the Ethereum universe, there is a single, canonical computer (called the Ethereum Virtual Machine, or EVM) whose state everyone on the Ethereum network agrees on. Everyone who participates in the Ethereum network (every Ethereum node) keeps a copy of the state of this computer. Additionally, any participant can broadcast a request for this computer to perform arbitrary computation. Whenever such a request is broadcast, other participants on the network verify, validate, and carry out (“execute”) the computation. This causes a state change in the EVM, which is committed and propagated throughout the entire network.

    smart contracts

    运行在以太坊上的程序。

    In practice, participants don’t write new code every time they want to request a computation on the EVM. Rather, application developers upload programs (reusable snippets of code) into EVM storage, and then users make requests for the execution of these code snippets with varying parameters. We call the programs uploaded to and executed by the network smart contracts.

    https://ethfans.org/posts/exchange-on-blockchain

    dapps

    去中心化应用, 是 smart contract 和 前端的组合。

    A decentralized application (dapp) is an application built on a decentralized network that combines a smart contract and a frontend user interface. Note, in Ethereum smart-contracts are accessible and transparent – like open APIs – so your dapp can even include a smart contract that someone else has written

    Web3

    运行在区块链上的dapps。

    https://ethereum.org/zh/developers/docs/web2-vs-web3/

    Web2 refers to the version of the internet most of us know today. An internet dominated by companies that provide services in exchange for your personal data. Web3, in the context of Ethereum, refers to decentralized apps that run on the blockchain. These are apps that allow anyone to participate without monetising their personal data.

    ether

    https://ethereum.org/zh/developers/docs/intro-to-ethereum/

    以太币,加密货币,允许在区块链上执行计算。

    The purpose of Ether, the cryptocurrency, is to allow for the existence of a market for computation. Such a market provides an economic incentive for participants to verify/execute transaction requests and to provide computational resources to the network.

    https://ethfans.org/posts/exchange-on-blockchain

    区块链一定要有“币”吗?

    https://www.sohu.com/a/222874142_100110373#:~:text=%E7%A7%81%E6%9C%89%E9%93%BE%E4%B8%8D%E9%9C%80%E8%A6%81%E5%B8%81%E5%AD%98,%E6%9C%89%E9%93%BE%E6%98%AF%E4%B8%AD%E5%BF%83%E5%8C%96%E7%9A%84%E3%80%82

    那什么情况下可以不需要“币”?

    私有链不需要币存在,但是,私有链是中心化的。中心化的私有链,其受一个中心化的管理者完全管理,可以随意更改私有链上的内容,这与区块链技术是相悖的。对于一个企业而言,与其用私有链,为什么不直接用中心化的数据库呢,可能数据库技术更成熟一些,效果更好。

    联盟链可能需要币,也可以不用币,取决于联盟内部的具体设计。联盟链的管理者里面有一个带头的,所以也可以在一定程度上看成是私有链。

    私有链和联盟链的价值由其管理者赋予,比如IBM的联盟链,如果IBM倒了,除非其将管理权完全交给下一个接棒这,否则其构建的联盟链将一文不值。

    公有链一定要有币存在吗?

    下面分三条回答这个问题:

    公有链必须依赖币的存在。公有链通过世界各地分布的节点来获得其系统的稳定性和不可篡改性,而这些性质是公有链赖以生存的根本。试想一下,如果比特币系统不稳定或者可以轻易篡改,那么比特币将一文不值。这些节点不是某一个或几个公司设立的,否则等同于私有链或联盟链,这些节点必须是有好多参与者动态构建的。而这些节点的存在,必然需要某种激励的存在,否则这些节点的构建者为什么要参与你这个系统呢。而这种激励必须与区块链系统是一体的,必须是币。

    Ethereum stack

    https://ethereum.org/zh/developers/docs/ethereum-stack/

    Like any software stack, the complete "Ethereum stack" will vary from project to project depending on your business goals.

    There are, however, core technologies of Ethereum that help provide a mental model for how software applications interact with the Ethereum blockchain. Understanding the layers of the stack will help you understand the different ways that Ethereum can be integrated into software projects.

    remix -- 合约在线编辑

    https://remix.ethereum.org/#optimize=false&runs=200&evmVersion=null&version=soljson-v0.8.1+commit.df193b15.js

    soliditylang

    https://docs.soliditylang.org/en/latest/contracts.html

    https://solidity-cn.readthedocs.io/zh/develop/index.html

    Rimble

    https://rimble.consensys.design/

    Rimble is an open-source library of React components and guides to help you make dApps everyone can use.

    thegraph

    https://thegraph.com/

    The Graph is an indexing protocol for querying networks like Ethereum and IPFS. Anyone can build and publish open APIs, called subgraphs, making data easily accessible.

    Tutorial & Code

    https://www.freecodecamp.org/news/full-stack-ethereum-development/

    https://github.com/dabit3/full-stack-ethereum

    hardhat

    https://hardhat.org/

    Flexible. Extensible. Fast.

    Ethereum development environment for professionals

    https://hardhat.org/getting-started/#quick-start

    This guide will explore the basics of creating a Hardhat project.

    A barebones installation with no plugins allows you to create your own tasks, compile your Solidity code, run your tests and run Hardhat Network, a local development network you can deploy your contracts to.

    黑客松模板

    https://github.com/cinnabarhorse/buidler-hackathon-boilerplate

    metamask issue

    https://hardhat.org/metamask-issue.html

    If you are using MetaMask with Hardhat Network, you might get an error like this when you send a transaction:

    Incompatible EIP155-based V 2710 and chain id 31337. See the second parameter of the Transaction constructor to set the chain id.
    

    This is because MetaMask mistakenly assumes all networks in http://localhost:8545 to have a chain id of 1337, but Hardhat uses a different number by default. Please voice your support for MetaMask to fix this on the MetaMask issue about it

    .

    https://github.com/MetaMask/metamask-extension/issues/10290

    The solution is to manually change the project's configuration so that 1337 is used as chainId. This causes unnecessary friction.

    Code参考

    https://github.com/dappuniversity/eth-todo-list

    https://github.com/austintgriffith/scaffold-eth

    出处:http://www.cnblogs.com/lightsong/ 本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接。
  • 相关阅读:
    sublime text3中html的使用
    WEB如何入门?各种渗透攻击如何入门?
    考思科认证NA过程的学习笔记
    HTML URL 编码(学习笔记)
    学习HTML过程中的笔记
    必学
    playfair密码
    二三级计算机考试时间
    DAY 135 VUE
    DAY 134 RBAC
  • 原文地址:https://www.cnblogs.com/lightsong/p/14850160.html
Copyright © 2011-2022 走看看