Engine v0.0.26 - Improved error messages, gas spike reliability, throughput + more

Phillip Ho

thirdweb Engine is an open-source server for your web3 app to read, write, and deploy contracts to the blockchain.

The team is working hard to continuously improve stability and developer experience.

Summary

  • Clear error messages for onchain failures
  • Improved reliability during gas spikes
  • Higher read/write throughput
  • Updated dashboard timeline
  • Version indicator with update prompt
  • Deploy contracts on behalf of other users
  • New endpoints

Clear error messages for onchain failures

Engine now return the onchain error from the contract if the call is expected to fail. Bonus: since the transaction is simulated, gas funds are not spent!

Previous: An obscure, low-level error indicating the transaction will fail ("execution reverted").

cannot estimate gas; transaction may fail or may require manual gas limit [ See: https://links.ethers.org/v5-errors-UNPREDICTABLE_GAS_LIMIT ] (error={"reason":"execution reverted","code":"UNPREDICTABLE_GAS_LIMIT","method":"estimateGas","transaction":{"from":"0x4a1677844Da684c840f1780817601fd3DB715286","maxPriorityFeePerGas":{"type":"BigNumber","hex":"0x10c8e0"},"maxFeePerGas":{"type":"BigNumber","hex":"0x10cadc"},"to":"0x9ca57B9341dCB029a5b11163C9a47FB65BA6F4c3","value":{"type":"BigNumber","hex":"0x00"},"data":"0x0075a3170000000000000000000000004a1677844da684c840f1780817601fd3db71528600000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000037697066733a2f2f516d5078364d594d5a7a54466b4e703336787a394832374e58433753334d454a6947476b59636a4d6b766a5a35712f30000000000000000000","type":2,"accessList":null},"error":{"code":3,"data":"0x08c379a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000094416363657373436f6e74726f6c3a206163636f756e7420307834613136373738343464613638346338343066313738303831373630316664336462373135323836206973206d697373696e6720726f6c6520307839663264663066656432633737363438646535383630613463633530386364303831386338356238623861316162346365656566386439383163383935366136000000000000000000000000"}}, tx={"to":{},"from":"0x4a1677844da684c840f1780817601fd3db715286","data":"0x0075a3170000000000000000000000004a1677844da684c840f1780817601fd3db71528600000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000037697066733a2f2f516d5078364d594d5a7a54466b4e703336787a394832374e58433753334d454a6947476b59636a4d6b766a5a35712f30000000000000000000","value":{"type":"BigNumber","hex":"0x00"},"nonce":{"type":"BigNumber","hex":"0x00"},"maxFeePerGas":{"type":"BigNumber","hex":"0x10cadc"},"maxPriorityFeePerGas":{"type":"BigNumber","hex":"0x10c8e0"},"type":2,"gasLimit":{},"chainId":{}}, code=UNPREDICTABLE_GAS_LIMIT, version=abstract-signer/5.7.0)

Now: A clear error returned the contract.

This error can be seen on the transaction drawer in the thirdweb dashboard.

Improved reliability during gas spikes

We've fixed numerous bugs that may occur during gas volatility. These cases occasionally caused nonce desync issues in the past.

  • Removing a global "max gas price" limit. We'll re-introduce this limit per-chain or per-transaction in the future.
  • Ensuring retries attempt with at least 10% higher gas (handles error
    Transaction error: Replacement transaction underpriced
    ).
  • Slightly increasing a transaction's gas limit to handle inaccuracies with the RPC provider's estimation.

Higher read/write throughput

Our goal is for Engine with 1 vCPU / 1GB memory* to handle the majority of apps' use cases. (*Costs $0.27 / day on AWS!)

We've made a handful of improvements to allow Engine to better handle traffic bursts:

  • Configured server timeouts.
  • Cached consistent auth computation (no impact to behavior).
  • Improved underlying RPC latency.
  • Improved underlying Contract metadata resolution latency.
  • Scaled up load balancers for cloud-hosted Engine customers.
  • Improved extension resolution in the thirdweb SDK.
  • Improved batching behavior in the thirdweb SDK.

As a result, a single Engine on minimal infrastructure can handle 100-200 read requests per second and process 500 write requests per second. And throughput scales linearly by adding more Engine instances. Or get a cloud-hosted Engine for thirdweb to manage the infrastructure + scaling.

Bonus: most of these changes were made to thirdweb's infrastructure and SDK, so you'll see improvements across the thirdweb stack!

Updated dashboard timeline

The timeline in the dashboard shows where in the lifecycle the current transaction is. Select Cancel transaction to cancel any transactions not yet mined.

Version indicator with update prompt

The version badge in the dashboard now shows your current version.

This Engine instance is up to date.

And if it's out of date, cloud-hosted Engine customers can request a version update. The Engine team will update your host during low traffic (within 2 business days).

This Engine instance can be updated.

Deploy contracts on behalf of other users

The prebuilt contract deployment endpoints now accept a defaultAdmin field which overrides the admin for a deployed contract.

POST /deploy/137/prebuilts/nft-collection
Body:
{
"contractMetadata": {
"name": "My NFT Collection",
"symbol": "ABC",
"defaultAdmin": "0xb282cAAC28e0bE9b7acad6158765a69D452395b3"
}
}

This means your app can sponsor contract deployments and the contract admin will be a different wallet address. Your backend wallet that paid the gas will not have any permissions on the deployed contract.

New endpoints

  • Sign typed data (EIP-712): POST /backend-wallet/sign-typed-data
  • Prepare a signature to sign for ERC721 signature mints:
    POST /contract/{chain}/{contractAddress}/erc721/signature/prepare
    • Returns the typed data to be signed by an external wallet.

Conclusion

The team is continuously iterating based on feedback. Please let us know in Discord if you have feature requests or encounter issues.

Want to contribute? thirdweb Engine is fully open-source and we welcome contributions.

We're also hiring!