[Ethereum] Gas Station Network (GSN) eip-1613 与 Gas Relay Network (GRN) eip-1077
在 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的更多相关文章
- [LeetCode] Gas Station 加油站问题
There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You ...
- 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 ...
- 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 ...
- 【leetcode】Gas Station
Gas Station There are N gas stations along a circular route, where the amount of gas at station i is ...
- [LeetCode] Gas Station
Recording my thought on the go might be fun when I check back later, so this kinda blog has no inten ...
- 20. Candy && Gas Station
Candy There are N children standing in a line. Each child is assigned a rating value. You are giving ...
- LeetCode——Gas Station
There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You ...
- Gas Station
Description: There are N gas stations along a circular route, where the amount of gas at station i i ...
- Gas Station [LeetCode]
There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You ...
- 【LeetCode OJ】Gas Station
Problem link: http://oj.leetcode.com/problems/gas-station/ We can solve this problem by following al ...
随机推荐
- View之Canvas,Paint,Matrix,RectF等介绍
目录介绍 1.Paint画笔介绍 1.1 图形绘制 1.2 文本绘制 2.Canvas画布介绍 2.1 设置属性 2.2 画图[重点] 2.3 Canvas对象的获取方式 2.4 Canvas的作用 ...
- Elasticsearch按照某个字段去重查询
索引较多: index-1_t_order index-2_t_order index-32_t_order 根据pay_amount排序,order_no去重,最后分页. 说明:1.collapse ...
- matlab学习系列
matlab系列学习 1.学习缘由 本来已经学习过这个软件,了解了包括电路仿真在内的诸多功能,能够比较熟练地编写m文件和函数. 但是,在最近的依次练习中发现之前的许多操作都忘记了.有一些基本的语法都不 ...
- async/await 致WPF卡死问题
问题代码: xmal:一个按钮+一个显示框 1 <Button Width="100" Height="50" Margin="10" ...
- Android弹出UI界面---Toast
1.默认展示 1 // 第一个参数:当前的上下文环境.可用getApplicationContext()或this 2 // 第二个参数:要显示的字符串.也可是R.string中字符串ID 3 // ...
- #排列组合#C 模拟比赛
分析 由于每个选手的得分独立,考虑按照选手的最高得分降序排序 如果当前枚举到选手\(i\),首先记录\(o_i\)表示在选手\(i\)之前最小得分不低于选手\(i\)的最高得分 (必选,等于必选当且仅 ...
- Python - 字典1
字典用于存储键值对形式的数据.字典是一个有序.可更改的集合,不允许重复.从 Python 3.7 版本开始,字典是有序的.在 Python 3.6 及更早版本中,字典是无序的.字典用花括号编写,具有键 ...
- 第一视角看方法调用时的jvm
关于比较学术的jvm每个内存区域我之前都写过,就不重复赘述了,这里附上链接:https://www.cnblogs.com/gmt-hao/p/13603534.html, https://www.c ...
- C++调用Python-0:搭建环境
1.进入到Python安装目录 2.将Python安装目录中的 include 和 libs 文件夹放在 C++项目中 3.设置 附加包含目录 和 附加库目录.附加依赖项(python310_d.li ...
- openGauss数据库的安装与使用
VMware+CentOS7.6+OpenGauss2.0.1 极简版安装 环境准备 Arch:x86-64 OS:Win11 VMware:16.1.2 安装 CentOS 7.6 CentOS 镜 ...