I see that all the tests for
oz-contracts are passing on the CI, however when I try to run them on my personal machine, not all the tests actually pass. In particular I am trying to investigate why I am having trouble getting the
GSNSignatureBouncer.sol to work in practice. My personal setup (using Eth-crypto) does not seem to create the proper signature, but in attempting to mimic the tests, I am dismayed to find the same (stock) tests are also not passing.
The error I am getting from the test is:
Compiling your contracts... =========================== > Everything is up to date, there is nothing to compile. Contract: GSNBouncerSignature when called directly ✓ mock function can be called (56ms) when relay-called ✓ rejects unsigned relay requests (112ms) ✓ rejects relay requests where some parameters are signed (91ms) 1) accepts relay requests where all parameters are signed Events emitted during test: --------------------------- Deposited(recipient: <indexed> 0x0b30f794473AB83910ED4fb5DB36838714a7839f (address), from: <indexed> 0x76ba33B93f013f4ca9906498695e6114D2D1eF3B (address), amount: 1000000000000000000 (uint256)) --------------------------- ✓ rejects relay requests where all parameters are signed by an invalid signer (75ms) 4 passing (3s) 1 failing 1) Contract: GSNBouncerSignature when relay-called accepts relay requests where all parameters are signed: Error: Error: Returned error: sender account not recognized at Object._fireError (/Users/dennison/.nvm/versions/node/v10.16.0/lib/node_modules/truffle/build/webpack:/~/web3-utils/src/index.js:56:1) at sendTxCallback (/Users/dennison/.nvm/versions/node/v10.16.0/lib/node_modules/truffle/build/webpack:/~/web3-eth/~/web3-core-method/src/index.js:491:1) at /Users/dennison/.nvm/versions/node/v10.16.0/lib/node_modules/truffle/build/webpack:/~/web3-core-requestmanager/src/index.js:136:1 at fn.then.catch.err (node_modules/@openzeppelin/gsn-provider/src/utils.js:23:9)
One thing in the test I didn’t understand: (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/test/GSN/GSNBouncerSignature.test.js)
Was why line 49 and line 65 there is a difference in the way data.txfee, data.gasPrice, data.gas, data.nonce are passed? In line 49 they are BN objects and line 65 they appear to not be BN instances. Maybe @nventuro could help me to shed some light on this? I’m confused why not only my implementation and the tests should be failing on my machine.