基于区块链的毕业设计Watch the Burn ? – 小心烧伤?

本文提供基于区块链的毕业设计国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,基于区块链的毕业设计Watch the Burn ? – 小心烧伤? 是一篇很好的国外资料

Watch the Burn ?

When EIP-1559 gets deployed, ETH will be burned in every block if transactions exist. This website will show you how much ETH got burned in total and per block.

If you have a local Ethereum (we use geth but you can use any ETH client) instance, you can update REACT_APP_WEB3_URL in .env.production.local to your local ETH instance and run this offline! The instructions below show how to deploy it to a remote website under nginx.

Watch the Burn ? - 小心烧伤? Watch the Burn ? - 小心烧伤?

Donate towards Server Costs ?

The costs of running this experiment is pretty high since it requires a dev version of Geth to be up and running which requires lots of memory and cpu. The VM and SSD storage currently costs exactly $150/month USD. If you would like to help out with the costs, please reach out to me.

If you would like to tip, my ethereum address is mansour.eth, or my gitcoin grant.

Setup dev environment

Setting up the environment requires a geth instance, daemon geth proxy, and react web app. Optionally, you can install the varnish cache in between.

Setup geth

  1. Clone geth and build docker image. Assumes /data on local system exists

    git clone https://github.com/ethereum/go-ethereum.git cd go-ethereum docker build -t ethereum-node . mkdir /data 
  2. To run Geth inside Docker, run one of the following:

    • Mainnet
       docker run --net=host --name=geth -dti -v /data:/data ethereum-node --datadir=/data/mainnet --mainnet --port=3030 --http --http.port=8545 --http.api="net,web3,eth" --http.corsdomain="localhost"  --ws --ws.port=8546 --ws.api="net,web3,eth" --ws.origins="*" --maxpeers=100 

Setup the Geth Proxy Daemon

  1. Easiest thing is use docker.

     docker build -t geth-proxy ./daemon 
  2. Run the docker instance against your geth.

    docker run -d --name=geth-proxy --restart=on-failure:3 --net=host -v /data/geth-proxy:/data geth-proxy --addr=:8080 --geth-endpoint-http=http://localhost:8545 --geth-endpoint-websocket=ws://localhost:8546 --db-path=/data/mainnet.db --development 

    If you include --initializedb it will start initializing the database since EIP-London, will take time. If you take it out, then it basically just starts at the current head.

Optional: Varnish cache to cache all Geth RPC calls

  1. Easiest thing is use docker.

     docker build -t geth-varnish ./cache 
  2. Run the docker instance against your geth.

    docker run -d --name geth-cache --net host -e GETH_HTTP_HOST=localhost -e GETH_HTTP_PORT=8545 -e VARNISH_PORT=8081 -e CACHE_SIZE=1g geth-varnish 
  3. Run the daemon against the varnish port.

    docker run -d --name=geth-proxy --restart=on-failure:3 --net=host -v /data/geth-proxy:/data geth-proxy --addr=:8080 --geth-endpoint-http=http://localhost:8081 --geth-endpoint-websocket=ws://localhost:8546 --db-path=/data/mainnet.db --development 

Setup web dev environment

  1. Create env file:

    cp .env .env.local 
  2. Add your geth ws url to .env.local point it to your daemon port:

    REACT_APP_WEB3_URL=localhost:8080 
  3. Install packages

    npm install 
  4. Run the web app:

    npm start 
  5. Launch the web app (goerli):

    open http://mainnet.go.localhost:3000: 

Some devops maintenance

Send transactions to testnet

Install web3 CLI client curl -LSs https://raw.githubusercontent.com/gochain/web3/master/install.sh | sh use it to create a test account, and you can use it to send transactions.

Access geth console If you ran the mainnet docker geth, you can just do, not rm is there so it cleans the container up after closing!:

docker run --rm -ti -v /data:/data ethereum-node --datadir=/data/mainnet attach   

观察燃烧?

当部署EIP-1559时,如果存在事务,ETH将在每个块中烧掉。本网站将向您展示ETH的总燃烧量和每个街区的燃烧量

如果您有本地以太坊eth(我们使用geth,但您可以使用任何ETH客户端)实例,您可以将.env.production.local中的REACT_APP_WEB3_URL更新到您的本地ETH实例并脱机运行!下面的说明显示了如何将其部署到nginx下的远程网站

<Watch the Burn ?><Watch the Burn ?>Watch the Burn ? - 小心烧伤?

运行此实验的成本非常高,因为它需要启动和运行开发版本的Geth,这需要大量内存和cpu。VM和SSD存储目前的价格正好是每月150美元。如果你想帮忙支付费用,请联系我

如果您想给小费,我的以太坊eth地址是mansour.eth,或者我的gitcoin grant

设置环境需要geth实例、守护程序geth代理和react web app。或者,您可以在两者之间安装varnish缓存

克隆geth并构建docker映像。假设本地系统上存在/数据

要在Docker中运行Geth,请运行以下操作之一:

最简单的方法是使用Docker

针对geth运行docker实例

如果包含–initializedb,它将开始初始化数据库,因为EIP London需要时间。如果你把它拿出来,它基本上就从当前的头部开始

最简单的就是使用docker

针对geth运行docker实例

针对varnish端口运行守护程序

创建环境文件:

将geth ws url添加到.env.local并将其指向守护程序端口:

安装软件包

运行web应用:

启动web应用(goerli):

将事务发送到testnet

安装web3 CLI客户端curl-LSshttps://raw.githubusercontent.com/gochain/web3/master/install.sh |sh使用它用于创建测试帐户,您可以使用它发送事务

访问geth控制台如果您运行mainnet docker geth,您只需执行以下操作,而rm不在,因此它会在关闭后清理容器!:

观察燃烧?

捐助服务器成本?

设置开发环境⚙

设置geth

设置geth代理守护程序

可选:清漆缓存以缓存所有geth RPC调用

设置web开发环境

一些devops维护

克隆geth并构建docker映像。假设本地系统上存在git克隆/数据https://github.com/ethereum/go-ethereum.git cd go以太坊ethdocker构建-t以太坊eth节点。mkdir/data

  • 要在Docker内部运行Geth,请运行以下操作之一:Mainnet Docker run–net=host–name=Geth-dti-v/data:/data以太坊eth节点–datadir=/data/Mainnet–Mainnet–port=3030–http–http–http.port=8545–http.api=“net,web3,eth”-http.corsdomain localhost–ws–ws.port=8546–ws.api=“net,web3,eth”-ws.origins=“*”–maxpeers=100
  • Mainnet docker run–net=host–name=geth-dti-v/data:/data以太坊eth节点–datadir=/data/Mainnet–Mainnet–port=3030–http–http.port=8545–http.api=“net,web3,eth”-http.corsdomain localhost–ws–ws.port=8546–ws.api=“net,web3,eth“-ws.origins=“*”–maxpeers=100
  • 最简单的事情是使用docker。docker build-t geth proxy./daemon
  • 针对您的geth运行docker实例。docker run-d–name=geth proxy–restart=on failure:3–net=host-v/data/geth proxy:/data geth proxy–addr=:8080–geth endpoint http=http://localhost:8545 –geth endpoint websocket=ws://localhost:8546–db path=/data/mainnet.db–development如果包含–initializedb它将从EIP London开始初始化数据库,这需要时间。如果你把它拿出来,它基本上就从当前的头部开始
  • 针对您的geth运行docker实例。docker run-d–name geth cache–net host-e geth_HTTP_host=localhost-e geth_HTTP_PORT=8545-e VARNISH_PORT=8081-e cache_SIZE=1g geth VARNISH
  • 针对VARNISH端口运行守护程序。docker run-d–name=geth proxy–restart=on failure:3–net=host-v/data/geth proxy:/data geth proxy–addr=:8080–geth endpoint http=http://localhost:8081 –geth endpoint websocket=ws://localhost:8546–db path=/data/mainnet.db–development
  • 创建环境文件:cp.env.env.local
  • 将geth ws url添加到.env.local将其指向守护程序端口:REACTu APPu WEB3u URL=localhost:8080安装程序包npm Install运行web应用程序:npm start启动web应用程序(goerli):打开http://mainnet.go.localhost:3000:
  • 捐助服务器成本?

    运行此实验的成本非常高,因为它需要启动和运行开发版本的Geth,这需要大量内存和cpu。VM和SSD存储目前的价格正好是每月150美元。如果你想帮忙支付费用,请联系我

    如果您想给小费,我的以太坊eth地址是mansour.eth,或者我的gitcoin grant

    设置开发环境⚙

    设置环境需要geth实例、守护程序geth代理和react web app。或者,您可以在两者之间安装varnish缓存

    设置geth

    1. 要在Docker内部运行Geth,请运行以下操作之一:Mainnet Docker run–net=host–name=Geth-dti-v/data:/data以太坊eth节点–datadir=/data/Mainnet–Mainnet–port=3030–http–http–http.port=8545–http.api=“net,web3,eth”-http.corsdomain localhost–ws–ws.port=8546–ws.api=“net,web3,eth”-ws.origins=“*”–maxpeers=100
    2. Mainnet docker run–net=host–name=geth-dti-v/data:/data以太坊eth节点–datadir=/data/Mainnet–Mainnet–port=3030–http–http.port=8545–http.api=“net,web3,eth”-http.corsdomain localhost–ws–ws.port=8546–ws.api=“net,web3,eth“-ws.origins=“*”–maxpeers=100

    设置geth代理守护程序

    1. 针对您的geth运行docker实例。docker run-d–name=geth proxy–restart=on failure:3–net=host-v/data/geth proxy:/data geth proxy–addr=:8080–geth endpoint http=http://localhost:8545 –geth endpoint websocket=ws://localhost:8546–db path=/data/mainnet.db–development如果包含–initializedb它将从EIP London开始初始化数据库,这需要时间。如果你把它拿出来,它基本上就从当前的头部开始
    2. 针对您的geth运行docker实例。docker run-d–name geth cache–net host-e geth_HTTP_host=localhost-e geth_HTTP_PORT=8545-e VARNISH_PORT=8081-e cache_SIZE=1g geth VARNISH

    可选:清漆缓存以缓存所有geth RPC调用

    1. 针对VARNISH端口运行守护程序。docker run-d–name=geth proxy–restart=on failure:3–net=host-v/data/geth proxy:/data geth proxy–addr=:8080–geth endpoint http=http://localhost:8081 –geth endpoint websocket=ws://localhost:8546–db path=/data/mainnet.db–development
    2. 创建环境文件:cp.env.env.local
    3. 将geth ws url添加到.env.local将其指向守护程序端口:REACTu APPu WEB3u URL=localhost:8080安装程序包npm Install运行web应用程序:npm start启动web应用程序(goerli):打开http://mainnet.go.localhost:3000:

    设置web开发环境

    1. 创建环境文件:

      cp .env .env.local 
    2. 将geth ws url添加到.env.local并将其指向守护程序端口:

      REACT_APP_WEB3_URL=localhost:8080 
    3. 安装软件包

      npm install 
    4. 运行web应用:

      npm start 
    5. 启动web应用(goerli):

      open http://mainnet.go.localhost:3000: 

    Some devops maintenance

    将事务发送到testnet

    安装web3 CLI客户端curl-LSshttps://raw.githubusercontent.com/gochain/web3/master/install.sh |sh使用它用于创建测试帐户,您可以使用它发送事务

    访问geth控制台如果您运行mainnet docker geth,您只需执行以下操作,而rm不在,因此它会在关闭后清理容器!:

    docker run --rm -ti -v /data:/data ethereum-node --datadir=/data/mainnet attach   

    部分转自网络,侵权联系删除区块链源码网

    www.interchains.cc

    https://www.interchains.cc/23876.html

    区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 ! QQ3039046426
    区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » 基于区块链的毕业设计Watch the Burn ? – 小心烧伤?

    提供最优质的资源集合

    立即查看 了解详情