Skip to content

Releases: opengsn/gsn

v2.2.1 Release

14 May 16:15
8c03079
Compare
Choose a tag to compare

This is the latest version deployed on the Ethereum mainnet, including contracts, client and relay servers.
The audits folder includes the security audit reports by Least Authority and Chainsafe.

This is the first release with a monorepo project structure. The old @opengsn/gsn package is now deprecated, instead every component is published separately on npm:

@opengsn/contracts
@opengsn/provider
@opengsn/relay
@opengsn/cli

Client Changes

A client must import the @opengsn/provider package instead of @opengsn/gsn.

Relay Server Changes

The relayer code is published as @opengsn/relay

The opengsn/jsrelay docker container we maintain is still the recommended way to run the relay server.

The Relay Server now needs to know its owner in advance. Its configuration must have a new item:

   "ownerAddress": "0x..."

CLI changes

The gsn relayer-register tool now verifies that the relayer it attempts to register indeed has the correct owner address, and refuses to send funds to it otherwise.

Experimental gsn status command is created.

Contract Changes

  • The import statements for Recipients and Paymasters smart-contracts should be changed to:

import "@opengsn/contracts/src/BaseRelayRecipient.sol";
import "@opengsn/contracts/src/BasePaymaster.sol";

In the version string (versionRecipient or versionPaymaster), the version string must conform to SemVer and start with "2.2."

  • Solidity compiler version bumped to 0.7.6
  • Staking for relay on StakeManager now has to be authorized by the Relay Server.
  • Penalization of illegal transactions now uses a commit-reveal scheme to prevent front-running. Penalization of EIP-2930 transaction types added in Berlin is now supported.

v2.1.0 release

05 Jan 22:18
c464dc8
Compare
Choose a tag to compare

This a new client and relayer release.

This new version is fully compatible with previous versions (that is, newer client can use older relayers, and vice-versa)

Client Changes

  • We try to make creation simpler. a relayer is now created with a helper function:
   const gsnProvider = await RelayProvider
      .newProvider( provider,  { paymasterAddress: ..., }  )
      .init()
  • the resolveConfigurationGSN,configureGSN methods are now removed completely from the API, as they became internal methods of the relay client.
  • logger configuration are packed into inner structure. so to set logs to error only, you need to specify:
    loggerConfiguration: {logLevel: 'error'},
  • loggerURL was added in previous release. now it is moved into the loggerConfiguration block.

Relay modifications (note that these items were reported on the unpublished 2.0.3 relay version)

  • gasPriceOracle - relayer can use an external gas-price oracle, instead of relying on the Node's getGasPrice(). See #526
  • support loggerUrl (like the client) to redirect logs to a centralized logger, for trouble-shooting.
  • Several security enhancements:
    • Paymaster reputation mechanism
    • Improved boosting mechanism (after gas-price fluctuations):

Contracts

There are no contract changes. the new client and relayers are fully compatible with the deployed contacts (and also previous relayers/clients)

v2.0.3

05 Dec 09:31
09e46a2
Compare
Choose a tag to compare

This a new client library release.

Client Changes

  • Added a simpler way to initialize the provider:

    gsnProvider = await RelayProvider( provider,  { paymasterAddres: ..., }  ).init()
    
  • This is actually 2 changes:

    • No longer need to provide full configuration (e.g. using resolveConfigurationGSN()/configureGSN()) before passing the configuration to the provider.
    • added explicit async init() function (which resolves any missing configuration parameters).
      This init method is called automatically by first "send()" operation - But it is much better to call it explicitly, even if in the background, so that the first transaction will execute faster.
    • The "old" way of using the RelayProvider still works, it is just less efficient (requires async call before creating the provider, and still defers some of the initialization to the first call of "send()"
  • added loggerUrl configuration param, to allow centralized logger for troubleshooting.

  • the logLevel parameter now receives textual values "error/warning/info/debug" and not numeric.
    the default is still "error" (used to be 5), which means only errors are logged.

  • auditorsCount : a mechanism for the client to verify its server's response: the client select other relayer(s) to verify the relayer didn't try to "cheat". The default is "1". set this parameter to zero (e.g. on testnets) to prevent sending the request through another relayer.

  • added registerEventListener(), to let the client receive events on the progress of the GSN event handling.

  • Better error handling of failed requests.

Relay modifications:

  • gasPriceOracle - relayer can use an external gas-price oracle, instead of relying on the Node's getGasPrice(). See #526
  • support loggerUrl (like the client) to redirect logs to a centralized logger, for trouble-shooting.
  • Several security enhancements:
    • Paymaster reputation mechanism
    • Improved boosting mechanism (after gas-price fluctuations):

Contracts

There are no contract changes. the new client and relayers are fully compatible with the deployed contacts (and previous relayers/clients)

v2.0.1

30 Sep 16:11
9856bdd
Compare
Choose a tag to compare

This is an official release of the GSN network

Deployed contracts:

Contracts version is "2.0.0". Relayer (server) and RelayProvider(client) versions are 2.0.1

How to use these addresses?

A client must configure a paymaster that is willing to pay for its gas.
On test networks, you can use the "accept-everything" samples below.

When writing a contract, you must initialize its trustedForarder address.
If you write a paymaster, it should define the paymaster and relayhub it supports.

Ropsten

Contract Address
RelayHub 0x29e41C2b329fF4921d8AC654CEc909a0B575df20
Forwarder 0x25CEd1955423BA34332Ec1B60154967750a0297D
VersionRegistry 0x666eaf8628FEb3389003ef69C57fE4ebaae2aAF5
Accept-Everything Paymaster 0x8057c0fb7089BB646f824fF4A4f5a18A8d978ecC

Rinkeby

Contract Address
RelayHub 0x53C88539C65E0350408a2294C4A85eB3d8ce8789
Forwarder 0x956868751Cc565507B3B58E53a6f9f41B56bed74
VersionRegistry 0x6fa486Bfd75E8C791D75F7B118bf20F6c8dA5E5D
Accept-Everything Paymaster 0x43d66E6Dce20264F6511A0e8EEa3f570980341a2

Kovan

Contract Address
RelayHub 0xE9dcD2CccEcD77a92BA48933cb626e04214Edb92
Forwarder 0x0842Ad6B8cb64364761C7c170D0002CC56b1c498
VersionRegistry 0x570EFB87a19367cDbD715039b4aC38554b308896
Accept-Everything Paymaster 0x083082b7Eada37dbD8f263050570B31448E61c94

Goerli

Contract Address
RelayHub 0x1F3d1C33977957EA41bEdFDcBf7fF64Fd3A3985e
Forwarder 0xd9c1a99e9263B98F3f633a9f1A201FA0AFC2A1c2
VersionRegistry 0xB31d191557754e7C7f0e6aabe832396aC8F608DD
Accept-Everything Paymaster 0x50d2b611CC85308CeEecd7a43D00168b97B71F9A

Mainnet

Contract Address
RelayHub 0x515e39f12590a94B102903363336AF9761ebF621
Forwarder 0xa530F85085C6FE2f866E7FdB716849714a89f4CD
VersionRegistry 0x31e861242d3fDCD1cAeF4b2c802E06c5E8A8E0b5

(no "Accept-Everything" paymaster, as its real money here..)

v2.0.0-beta.1.3

30 Aug 21:37
6b6f569
Compare
Choose a tag to compare
v2.0.0-beta.1.3 Pre-release
Pre-release

Major change for the contracts:

Major Paymaster change:

Removed Paymaster.acceptRelayedCall
This reduce the gas cost of request (no double check for signature, nonce) and simplifies paymaster implementation.

  • now the paymaster decide in its preRelayedCall whether to accept the call or not. You don't need a separate "view verifier" function. e.g. can call mytoken.transferFrom(req.from, address(this), preCharge) instead of verifying separately that the caller has balance, has approval, etc.
  • paymaster needs also to call _verifyForwarder() - but actual signature, nonce check are done later (and correctly refuse the request if they fail)

Generic Forwarder

the trustedForwarder is no longer GSN specific: This also means that a "recipient" contract trusting the forwarder will continue to work with future GSN version which might modify request structure (or other relaying network)

Client configuration

As the bare-minimum, the client can be configured with the paymaster address. From there, the resolveConfigurationGSN() can build the configuration required by the RelayProvider

Development environment

Added simple ways to start GSN for testing (deploy contracts and start a relayer), on top of existing "ganache" instance:
from command-ilne: npx gsn start
from the test file itself: GsnTestEnvironment.startGsn()

v0.10.0

28 May 00:05
Compare
Choose a tag to compare
v0.10.0 Pre-release
Pre-release
  • Added 'forwarder' to the signed RelayRequest struct
  • Made 'canRelay' method of RelayHub internal
  • All contracts now expose semver-compatibe 'versionX' field
  • Relay Server source code migrated to TypeScript
  • Implemented Batched Forwarder
  • Added SPDX license comments to all contracts
  • Added support for providing BIP39-compatible mnemonic to CLI commands
  • Fixed error preventing this module to be imported in TypeScript projects