Skip to content

Releases: opengsn/gsn

Release 3.0.0-beta.10

25 Sep 13:43
Compare
Choose a tag to compare
  • OG-1075: ContractInteractor causes operation="getAddress", code=UNSUPPORTED_OPERATION
  • Fix "BigNumber.toString does not accept any parameters" warning
  • Update to TypeScript v5.2.2

Release 3.0.0-beta.9

10 Aug 15:22
Compare
Choose a tag to compare

⚠️ Warning! This is the first published release after internal migration from Truffle "Contract" to Ethers.js v5 "Contract" types and, consequently, from BN.js to @ethersproject/bignumber.

This may break things internally - please do report all bugs in our Discord!

Breaking changes:

OG-1012: Remove unnecessary 'LightTruffleContract' absraction and fix Ethers.js support

LightTruffleContract wrapper class was created when we transitioned from using Truffle "Contract" to using Web3 "Contract" (437c2e6) almost 3 years ago.

However, using the same approach with LightTruffleContract as an adapter from Ethers.js (both v5 and v6) "Contract" for a code that expects a Truffle "Contract" proved to be impractical, so instead the entire @opengsn/provider code was converted to use Ethers.js "Contract" natively.

OG-1063: Expose 'actual transaction hash' for users of Ethers.js

As Ethers.js does not expose the original JSON RPC response object returned by the underlying provider, it is impossible to add undeclared fields to it. For Ethers.js the related transaction hash is now available as an experimental getPossibleTransactionHashFromRequestId() function.

Note that the function may not work in case the Relay Server decided to pay a different gas price then the one specified in the RelayRequest.

OG-1065: Fix broken ephemeral keypairs flow

Previously there was an issue with using ephemeral keys with an RPC provider that refuses calls to eth_accounts. This must be resolved now.

Release 3.0.0-beta.8

16 May 22:24
Compare
Choose a tag to compare

Breaking changes:

RelayProvider.newProvider method has been deprecated to avoid confusion.
Please use one of the following:

  • newWeb3Provider to create an EIP-1193 Provider compatible with Web3.js
  • newEthersV5Provider to create a pair of Provider and Signer objects compatible with Ethers.js v5
  • newEthersV6Provider to create a pair of Provider and Signer objects compatible with Ethers.js v6

New features:

OG-1057: Expreimental support for Ethers.js v6. Support passing an Ethers Signer objects, including Wallet, into "new provider" methods

OG-1062: Print skipped relays as errors if relay request failed

OG-1053: GsnTestEnvironment generates deterministic address for Relay Manager and Worker by default. Allow overriding Test Environment server configuration parameters.

OG-1045: Estimate view call gas limit on client with the same logic the Relay Server will use

Previously this caused many errors related to maxViewableGasLimit and minViewableGasLimit parameters, and required the Paymaster and Relay Worker to have a lot of excess balance to relay transactions.

Release 3.0.0-beta.7

11 Apr 15:41
Compare
Choose a tag to compare

New features:

  • OG-1026: Create SingletonWhitelistPaymaster

Previously, the WhitelistPaymaster was only able to serve a single dapp operator, meaning everyone who wanted to use such a Paymaster had to deploy their own instance to the selected chain.

This change introduces a SingletonWhitelistPaymaster that will be deployed on each chain together with the GSN contracts. It will allow dapp developers to sponsor transactions for specified senders, targets and methods on those targets, without having to deploy their own Paymaster. Currently only deployed on Goerli network.

  • OG-1022: Publish the PermitERC20UniswapV3Paymaster

An experimental Paymaster contract that uses ERC-20 tokens with meta-transaction support via a permit() function to pay for gas.
The Paymaster maintains a positive cash-flow by converting the tokens on Uniswap v3. Currently only deployed on Goerli network.

  • OG-1027: Publish the official Paymasters addresses as part of the GSN

Previously, the only way to find the official deployed addresses for GSN contracts was through the documentation page (https://docs.opengsn.org/networks/addresses.html).

Going forward, we will be adding all necessary addresses as part of the GSN NPM package. You can access the OfficialPaymasterDeployments global object, or provide an enum value of PaymasterType instead of a Paymaster address in the GSN configuration.

Warning - highly experimental feature.

Fixes and improvements:

  • OG-1039: Fix "max priority fee per" exceeding "max fee per gas"

As part of adjusting its gas fees for the Relay Server's demands, the GSN provider could get itself into an invalid state.

  • OG-1030: Make RelayProvider implement ExternalProvider interface

Now there is no TypeScript error when wrapping RelayProvider instance with an ethers.Web3Provider.

  • OG-1031: Avoid calling to 'getAddress' on underlying provider

This issue prevented using the GSN with a JsonRpcProvider and an Ephemeral Keypair. This must be resolved.

  • OG-1029: If RelayHub address is "0x00..00" on the Paymaster throw an exception

Release 3.0.0-beta.6

15 Mar 23:42
30d5325
Compare
Choose a tag to compare

Improvements:

  • Switch from Ethers.js to Web3.js to decrease the impact the GSN has on the bundle size (OG-1009)

This is a major breaking change for this version and it may actually break things.
Please report your issues here or in the Discord chat.
However, this saves ~1.1 MB of bundle size (minimized), and for those dapps who already have
Ethers.js as their dependency brings overhead of the GNS to a minimum.

  • Allow adjusting the RelayRequest for the winning PingResponse (OG-1005)

Previously, the Relay Provider would decide on a gas price and skip the Relay Server
whose gas fees are above what that value.
This however often lead to the clients being unable to make a transaction completely.
With this change the client will agree to adjust a gas price up to a certain percentage.

  • Enable silent as log level and add --loglevel parameter in gsn start command (OG-1008)

  • Allow passing --relayUrl and --port parameters to the gsn start command (OG-1006)

Note that this issue prevented running gsn start on "Windows Subsystem for Linux"

  • Implement Calldata Gas Estimation callback (OG-1000)

On some L2's, instead of calculating zero/nonzero bytes, we estimate gas by making a view call to address(0)
and get a current calldata gas cost.

  • Fix issue: Relay Server gets stuck if worker balance is insufficient to boost a transaction (OG-1017)

Release 3.0.0-beta.3

03 Jan 12:15
Compare
Choose a tag to compare

Improvements:

  1. Accept the 'signTransaction' callback as a dependency override (OG-983)

Previously, there were only two ways the GSN Provider could sign the RelayRequest: either by using an underlying Web3.js/Ethers.js provider to execute signTypedData, or by using a provided private key directly. Both methods would produce the signature compatible with the ERC-712. This is by design and is a requirement for the ERC-2770 Forwarder to verify the signature.

However, the GSN does not require a specific Forwarder implementation. The signing can be performed using different signature algorithms, or RelayRequest signature may be omitted entirely if the Recipient contract has different validation mechanisms.

Now, one can simply override the asyncSignTypedData callback and provide a custom signature function to the GSN.

  1. Expose RelayRequestID to AsyncApprovalData callback (OG-946)

The RelayRequestID may be required in the Verifying Paymaster use-case to keep track of issued 'ApprovalData' signatures, so now RelayRequestID is passed to the AsyncApprovalData.

  1. Separate 'deployGSN' function from 'GsnTestEnvironment' (OG-958)

Fixes:

  1. Fixed "Relay Server happily prints amount of staked token even if token address is incorrect" (OG-939)

  2. Rename 'GatewayForwarder' to 'TestGatewayForwarder' (OG- 957)

Release 3.0.0-beta.2

19 Sep 11:54
13b69a6
Compare
Choose a tag to compare
Release 3.0.0-beta.2 Pre-release
Pre-release

Note: The GSN v3.0.0-beta.2 includes breaking changes and is not compatible with v3.0.0-beta.1.

Improvements:

  1. The Relay Servers now return the range of the gas fees they support in the "Ping Response"
    Previously, the users were forced to sign the same transaction multiple times only to see their requests rejected.
    Now, the Relay Clients will no longer send transactions to Relays whose acceptable gas fee ranges are invalid.

  2. Enable the private RelayServer registration.
    Previously, the Relay Server would refuse to start without a configured URL, and the clients were unable to handle such servers anyway.
    Now, configuring a Relay Server without a URL is allowed and will make it invisible to the rest of the GSN network. However the Relay Clients can use the servers URL or IP address as a preferredRelays value.

  3. More control over addresses your Relay Server will serve exclusively and ability to deny service to some contracts.
    Previously, the GSN Relay Servers supported only Paymasters blacklist.
    Now, the new configuration parameters are: whitelistedPaymasters, blacklistedPaymasters, whitelistedRecipients, blacklistedRecipients.

  4. Made GsnDomainSeparatorType.name field configurable.
    Previously, customers of all dapps were seeing the GSN Relayed Transaction message in the MetaMask popup.
    Now you can configure it with a domainSeparatorName parameter for Relay Providers. Your application will have to register this type with the Forwarder contract.

  5. Support custom derivation paths for mnemonics and custom private keys in CLI commands.
    The new command-line parameters are: --mnemonic, --derivationPath, --derivationIndex, --privateKeyHex

  6. Improved WhitelistPaymaster.
    The WhitelistPaymaster allows you to configure a whitelist of senders, targets and methods on those targets.

  7. The new PermitERC20UniswapV3Paymaster c
    Previously, this Paymaster performed a Uniswap swap operation on every transaction. This caused it to be very expensive to use.
    Now, the Paymaster will only perform a swap periodically. This significantly decreases the overhead of using the GSN to pay for transactions in ERC-20 tokens.

Fixes:

  1. Removed calls to getNetworkType in ContractInteractor. This function works by requesting a hash of block #0, which is not available on many networks.

  2. Fixed bug where eth_getTransactionByHash would return an incorrect actualTransactionHash (by akkien).

  3. Fixed exception thrown in ContractInteractor in Promise.catch context meaning it was impossible to try/catch it.

  4. Fixed broken global npm installation of @opengsn/cli package.

  5. Fixed Relayer crashes if network supports EIP-1559 transactions but the RPC node does not support "eth_feeHistory" API.

  6. Node.js specific packages no longer required by the Relay Provider, simplifying configuration for Webpack.

  7. Reduced the number of RPC calls the Relay Server performs when idle. This will help with Relay Servers reaching their API key quotas and halting.

  8. Fixed the parameters for 'getFeeHistory' query to be configurable and default to a correct values (5 blocks, 50%) instead of incorrect (1 block, 0.5%). This might have affected your Relay Server causing it to refuse legitimate transactions due to gas fees range being incorrect.

And a lot of more minor bug fixes.

Release 3.0.0-beta.1

29 Jun 13:29
Compare
Choose a tag to compare
Release 3.0.0-beta.1 Pre-release
Pre-release
  1. Added support for EIP-1559 transactions

Now the GSN allows users and relays to set ‘maxFeePerGas’ and ‘maxPriorityFeePerGas’ allowing them to save on transaction fees.

  1. Added support for L2 rollups and side chains with better Relayer Server lookup

Our new Relayer Server lookup is based on on-chain storage so that the GSN clients no longer need to rely on emitted events to find recently registered Relayer Servers. This allows the GSN to run smoothly on L2 rollups and significantly improves lookup speed, client responsiveness and stability under high load on all chains.

  1. Added support for L2 rollups and side chains with different calldata cost structure

Now the GSN will have clients estimate and sign the cost of a transaction’s calldata separately from the transaction’s execution gas limit. This allows the GSN to support L2 rollups and other networks which have different fee cost structure for calldata and execution.

  1. Avoid asking the client to sign anything for transactions destined to fail

Now the GSN will perform an “unsigned dry-run” view call of the transaction that the user is trying to send during the initialization stage without asking for the user's signature. In case the transaction reverts in this view call, there is no need to request the signature as we already know the revert reason.

  1. Added support for Relayer operators to stake in ERC-20 tokens

Now the GSN will allow Relayer Server operators to put stake in select ERC-20 tokens. This will allow using stablecoins to set a stake size, which will prevent floating exchange rates affecting the security assumptions of the network.

  1. Added a stable transaction ID for GSN meta-transactions

Previously, the transactions sent through the GSN were identified with a regular transaction hash. This created a problem in case the Relayer had to modify the gas price of a transaction, which led to change in the transaction hash and potentially making the relayed transaction invisible to the client. Now transactions will be discoverable by the clients using an artificial meta-transaction ID.

  1. Implemented a fair relayer selection algorithm

Now all relays will have to charge the same fee and the clients by default will pick a random relayer out of the registered ones. This prevents a situation where all traffic flows through a couple of relayers and hopefully makes running a relayer a much more interesting task.

  1. Better support for Ethers.js Contracts and Signers

The Ethers.js package supports wrapping a Web3.js-style provider like RelayProvider out-of-the-box. This has allowed the GSN 2.0 to work with Ethers.js projects but made it inconvenient.
In GSN 3.0 we have added wrapContract and wrapSigner functions to the GSN to allow you to connect an individual Ethers.js contract or signer via GSN. (This feature is experimental).

  1. Added support for ERC-165 interface check

Now all smart contracts of the GSN, including Paymasters, implement ERC-165 preventing dapp developers and Relayer operators from making mistakes in configuration.

  1. Multiple bug fixes and minor improvements

Release 2.2.5

11 Jan 12:06
Compare
Choose a tag to compare

This is a maintenance release for the RelayProvider and relayer service.

Changes:

Client:

Support hardware wallets: Support Ledger and Trezor One (needs latest firmware update) (#735)
Fixed relayers selection mechanism (#718)

Relayer:

Fix relayer transaction boosting (#708 )

release 2.2.4

27 Oct 12:22
Compare
Choose a tag to compare

This is a maintenance release for the RelayProvider and relayer service.

Relayer Changes:

  • Pagination for client and server log queries (#637) - to support networks that don't allow getLogs from block:1
  • Server registration fix - validate stake before attempting to register/add workers (#647)
  • Server keeps running after unstake to ensure it sends all funds to the owner (#655)
  • Server tx boosting fixes (#657) (#696)
  • Adding ownerAddress as required configuration parameter to the server (#665)
  • Adding http request ‘/stats’ for basic availability information (#666)
  • Server DB file size fix (#696)

Contract Changes

  • Upgrading contracts to Solidity 0.8
  • License change to MIT
  • BaseRelayRecipient: now requires _setTrustedForwarder(f) instead of setting directly trustedForwarder=f
  • Adding sample paymasters package to main repo (and deprecated the gsn-paymasters git repo)