Releases: opengsn/gsn
Release 3.0.0-beta.10
- 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
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
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.jsnewEthersV5Provider
to create a pair of Provider and Signer objects compatible with Ethers.js v5newEthersV6Provider
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
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
implementExternalProvider
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
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 ingsn start
command (OG-1008) -
Allow passing
--relayUrl
and--port
parameters to thegsn 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
Improvements:
- 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.
- 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.
- Separate 'deployGSN' function from 'GsnTestEnvironment' (OG-958)
Fixes:
-
Fixed "Relay Server happily prints amount of staked token even if token address is incorrect" (OG-939)
-
Rename 'GatewayForwarder' to 'TestGatewayForwarder' (OG- 957)
Release 3.0.0-beta.2
Note: The GSN v3.0.0-beta.2
includes breaking changes and is not compatible with v3.0.0-beta.1
.
Improvements:
-
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. -
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 apreferredRelays
value. -
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
. -
Made
GsnDomainSeparatorType.name
field configurable.
Previously, customers of all dapps were seeing theGSN Relayed Transaction
message in the MetaMask popup.
Now you can configure it with adomainSeparatorName
parameter for Relay Providers. Your application will have to register this type with the Forwarder contract. -
Support custom derivation paths for mnemonics and custom private keys in CLI commands.
The new command-line parameters are:--mnemonic
,--derivationPath
,--derivationIndex
,--privateKeyHex
-
Improved WhitelistPaymaster.
TheWhitelistPaymaster
allows you to configure a whitelist of senders, targets and methods on those targets. -
The new
PermitERC20UniswapV3Paymaster
c
Previously, this Paymaster performed a Uniswapswap
operation on every transaction. This caused it to be very expensive to use.
Now, the Paymaster will only perform aswap
periodically. This significantly decreases the overhead of using the GSN to pay for transactions in ERC-20 tokens.
Fixes:
-
Removed calls to
getNetworkType
inContractInteractor
. This function works by requesting a hash of block #0, which is not available on many networks. -
Fixed bug where
eth_getTransactionByHash
would return an incorrectactualTransactionHash
(byakkien
). -
Fixed exception thrown in
ContractInteractor
inPromise.catch
context meaning it was impossible totry
/catch
it. -
Fixed broken global npm installation of
@opengsn/cli
package. -
Fixed Relayer crashes if network supports EIP-1559 transactions but the RPC node does not support "eth_feeHistory" API.
-
Node.js specific packages no longer required by the Relay Provider, simplifying configuration for Webpack.
-
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.
-
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
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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).
- 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.
- Multiple bug fixes and minor improvements
Release 2.2.5
release 2.2.4
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 directlytrustedForwarder=f
- Adding sample paymasters package to main repo (and deprecated the gsn-paymasters git repo)