在 Ethereum dapp 中,任何涉及状态改动的交易都需要消耗 Gas,这限制了很多没有钱包或者 ETH 的用户对 dapp 的采用。

理念

让非以太用户能够访问智能合约 (如dapps),允许合约接受“接听来电”,即为来电付费。

让合约在可公开访问的渠道上“监听”(例如web URL)。鼓励节点运行 “加油站” 来促进这一点。不需要网络更改,只需最小的契约更改。

概述

目前,与dapps通信需要支付 ETH 的 Gas 费用,这限制了 Ethereum 用户对 dapp 的使用。

因此,合约所有者可能希望支付 Gas 以增加用户获取,或者让他们的用户用法定货币支付 Gas。

或者,第三方可能希望补贴某些合约的 Gas 成本。

类似 EIP-1077 中描述的解决方案可以允许来自没有 ETH 的地址的事务(为合约调用转发 Gas)。

加油站网络是遵循 EIP-1077 的,它通过鼓励节点运行加油站来解决这个问题,在加油站,没有 Gas 的交易可以“增加燃料”。

该网络由一个被所有参与 dapp 的合约所信任的单一公共合约和一个分散的中继节点(加油站)网络组成,这些节点被激励去监听 web 或 whisper 等非以太接口,为交易付费,并从该合约中获得补偿。

任何人都可以验证受信任的契约,否则系统就是不可信的。

只要有至少一家诚实的加油站,加油站就不能审查交易。

破坏这一制度的企图可以被证明是连锁的,违反者将受到惩罚。

EIP-1613 动机

  1. 提高用户对合约的采用

    消除用户获取 ETH 的麻烦。交易仍由 ETH 支付,但费用可由 dapp 承担或由用户通过其他方式支付。

    消除与区块链直接交互的需要,同时保持分散和审查阻力。契约可以在多个公共通道上“侦听”,用户可以通过通用协议与契约进行交互,即使在严格的环境中,通常也允许使用通用协议。

  2. Ethereum 节点在不需要采矿设备的情况下获得收入来源。整个网络都受益于拥有更多的节点。

  3. 不需要修改协议。加油站网络通过智能协议自组织,dapps 通过实现接口与网络交互。

具体

https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1613.md#specification

原理

https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1613.md#rationale

向后兼容性

加油站网络是作为智能契约和外部实体实现的,不需要任何网络更改。

Dapp 添加加油站将保持向后兼容已有的应用和用户。添加的方法应用于现有的方法之上,因此不需要对现有的应用程序进行更改。

实现 GSN 兼容的合约

https://docs.openzeppelin.com/contracts/2.x/gsn

Refer:Gas Station Network

Link:https://www.cnblogs.com/farwish/p/12532659.html

[Ethereum] Gas Station Network (GSN) eip-1613 与 Gas Relay Network (GRN) eip-1077的更多相关文章

  1. [LeetCode] Gas Station 加油站问题

    There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You ...

  2. PAT 1072. Gas Station (30)

    A gas station has to be built at such a location that the minimum distance between the station and a ...

  3. Leetcode 134 Gas Station

    There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You ...

  4. 【leetcode】Gas Station

    Gas Station There are N gas stations along a circular route, where the amount of gas at station i is ...

  5. [LeetCode] Gas Station

    Recording my thought on the go might be fun when I check back later, so this kinda blog has no inten ...

  6. 20. Candy && Gas Station

    Candy There are N children standing in a line. Each child is assigned a rating value. You are giving ...

  7. LeetCode——Gas Station

    There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You ...

  8. Gas Station

    Description: There are N gas stations along a circular route, where the amount of gas at station i i ...

  9. Gas Station [LeetCode]

    There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You ...

  10. 【LeetCode OJ】Gas Station

    Problem link: http://oj.leetcode.com/problems/gas-station/ We can solve this problem by following al ...

随机推荐

  1. kali局域网断网攻击

    首先我们打开我们熟悉的kali linux操作系统,利用指令: ifconfig 来确认本机的ip地址 确认了本机的ip地址之后,利用一下的指令查看局域网下所有ip: fping -g 本机IP地址/ ...

  2. API接口开发规范

    API接口是不同软件系统之间进行通信的重要方式,良好的API接口设计规范可以提高系统的可维护性.可扩展性和易用性.本文介绍了一套详细的API接口开发规范,包括命名规范.请求和响应规范.安全规范等内容, ...

  3. flutter3-dylive仿抖音App实例|Flutter3+Getx实战短视频直播应用

    原创研发flutter3+getX+mediaKit跨平台仿抖音app短视频直播实战Flutter3-DouYin. flutter3_dylive使用最新跨平台技术flutter3.x+dart3+ ...

  4. 计算机网络-Keep Alive

    问题背景 介绍两个经典的网络问题, 问题1: 访问位于Azure Application Gateway之后的nodejs server, 偶尔会触发502 问题2: 请求一个Azure App Se ...

  5. 使用Razor模板动态生成代码

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...

  6. ftp安装与配置 云服务器 CentOS7

    1.FTP的安装 #安装 yum install -y vsftpd #设置开机启动 systemctl enable vsftpd.service #启动 systemctl start vsftp ...

  7. 聊聊大模型"打字机"效果的背后技术——SSE

    SSE:Server Sent Event:服务器发送事件. Server-Sent Events(SSE)是一种由服务器向客户端推送实时数据的技术.它是构建基于事件的.服务器到客户端的通信的一种方法 ...

  8. KingbaseES 物化视图与源表的依赖关系

    KingbaseES例程_重建物化视图的源表 概述 数据结构的修改步骤,数据表先删除,然后创建.如果数据表是物化视图的源表,则提示依赖关系. Oracle的实施 创建数据表和物化视图 create t ...

  9. #dp,二项式反演,容斥#CF285E Positions in Permutations

    题目 问有多少个长度为 \(n\) 的排列 \(P\) 满足 \(|P_i-i|=1\) 的 \(i\) 的个数恰好为 \(k\) 个 分析 设 \(dp_{i,j,k}\) 表示前 \(i\) 个数 ...

  10. 深入解析 Java 面向对象编程与类属性应用

    Java 面向对象编程 面向对象编程 (OOP) 是一种编程范式,它将程序组织成对象.对象包含数据和操作数据的方法. OOP 的优势: 更快.更易于执行 提供清晰的结构 代码更易于维护.修改和调试 提 ...