Does GSN require constantinople hardfork?


I am trying to deploy the RelayHub but I am running into an out-of-gas error on a blockchain network without having Constantinople hardfork enabled, regardless how much gas I send with the TX:

Error: Error: StatusError: Transaction: 0xbd0f92cf137d45f8e0085296a8321739f0dc3b6fc7a914decff312560f31926a exited with an error (status 0) after consuming all gas.

The moment I switch to a network with Constantinople hardwork enabled, I am able to deploy it even though it consumes 6M gas:

Could you please confirm that the Constantinople bytecode improvements are a prerequisite?

1 Like

That is correct, RelayHub was compiled with solc 0.5.10. The default EVM target has been Petersburg (Constantinople) since solc 0.5.5, so it is possible that new opcodes were used in the bytecode, as you seem to have encountered.

How are you deploying RelayHub on your network? You should use the OpenZeppelin GSN Helpers, which will deploy RelayHub at the canonical address.