OpenZeppelin / openzeppelin-gsn-provider

Web3 provider for the Gas Station Network
MIT License
39 stars 29 forks source link

Relay hub reverts transaction because of `Not enough gasleft()` #36

Closed pertsev closed 5 years ago

pertsev commented 5 years ago

Description

Relayer sends a transaction but relayHub reverts it with the reason Not enough gasleft(). This project was made to reproduce the issue. It does not use a real relayer, just the GSNDevProvider.

Notice that the withdrawViaRelayer test fails, inrease works fine, though.

Expected behavior

The tx should be relayed because canRelay allows that.

Actual behavior

image

Steps to reproduce the behavior

  1. git clone git@github.com:peppersec/gsn-demo.git
  2. git checkout 6c2048b7a76fe8c889ba3740998157053ed6895c
  3. cd gsn-demo
  4. npm i
  5. npx truffle compile
  6. npx truffle test

Versions

Truffle v5.0.37 (core: 5.0.37) Solidity v0.5.8 (solc-js) Node v11.15.0 Web3.js v1.2.1 @openzeppelin/contracts-ethereum-package 2.2.3 @openzeppelin/gsn-helpers 0.2.0 @openzeppelin/gsn-provider 0.1.7

pertsev commented 5 years ago

@nventuro could you confirm that the relayer binary was updated after the Review call data estimation issue #33 ?

ylv-io commented 5 years ago

It happens because RelayHub limits amount of gas spent before calling recipient.

GasOverhead currently is 48204. Call data and RelayHub checks has to fit into 48204 limit.

This is unfortunate limitation. I hope it will be addressed soon in RelayHub.

pertsev commented 5 years ago

Dirty fix. So the project was updated accordingly

ylv-io commented 5 years ago

Fixed at #37.