Godwoken is EVM-compatible optimistic rollup running on Nervos.
Godwoken testnet and mainnet software have been updated to version 1.5 on August 25th, 2022. In this article you will find a list of software changes that have been deployed.
Godwoken Node
Godwoken Node is a core piece of the Layer 2 network. It has been updated to version 1.5.
Before we jump into new features remember you can always find the latest configuration to run your own Godwoken node in this repository: https://github.com/nervosnetwork/godwoken-info.
1. Introduce “Max Cycles Limit”
Cycles is a term used to specify the number of computations required to run a smart contract. If you’re familiar with gas on Ethereum that is used for transactions then its a good analogy. You can think of “cycles” as gas, but on Nervos Layer 1.
Because Godwoken (for security reasons) submits transactions to Layer 1, it has to be subject to its performance capabilities to make sure it can always fulfill its duties and submit them.
The actual work that’s going to be done here is introducing Max Cycles Limit to the Godwoken block. It means that all the computation for transactions in the Godwoken block needs to be manageable for submitting and running it later on Nervos Layer 1. This is crucial for verification and security challenge mechanisms. It guards the safety of the funds.
The developers should see Max Cycles Limit introduction affecting Maximum Gas Limit per Block on Godwoken.
2. Expose mempool RPC endpoint
RPC method gw_get_pending_tx_hashes
has been added to the Godwoken node meaning it’s possible now to tap into the mempool and see which transactions are still pending. Related pull request.
Other changes
- Fix some Godwoken tests #773
- Fix submitting withdrawal tests #774
- fix(mempool): pool cycles not reset on next mem block for readonly node #781
Godwoken Web3
Godwoken Web3 is a Ethereum-compatibility RPC layer. It is running on top of the Godwoken Node. Godwoken Web3 has been updated to version 1.6.3.
1. Fix transaction log index
Event logs transaction index was always zero when indexed after version v1.6.0-rc1. You need to resync the database from scratch or use the provided CLI tool to correct the wrong data.
The CLI and more information can be found here.
2. Fixes to automatic account creation
Automatic account creation directly on Layer 2 has been introduced in previous releases of Godwoken. In this release some bugs connected to it have been fixed. Related pull request.
3. Apply rate limiting to Websocket RPC
Developers have the option to either use HTTP or Websocket RPCs in their applications. In this pull request rate limiting has been added to the public RPC. Remember you can always run your own node and remove rate limiting.
4. Support EIP-1898
Added supported for specifying block hash instead of block number when sending calls to RPC methods. This is part of EIP-1898. Using block hash could be more reliable than block number in cases of block reorganizations. Related pull request.
5. Get transaction from fullnode if readonly node returns null
As part of ongoing work to streamline running readonly nodes one of the RPC methods is now checking if transactions also exist in fullnode before returning results. In the future, the communication between readonly nodes and fullnodes is going to be improved even further, for example by proxying write calls to the fullnode such as submitting transactions. Related pull request for the first part of the work can be found here.
Other changes
A full list of other changes including internal optimizations of the software can be found by looking at our Releases page.
- perf(web3-indexer): Store block faster #414
- feat: add NewRelic instruments #444
- feat: add optional Prof rpc #447
- feat: disallow meta contract tx, add parser tooling #454
- fix(indexer): dockerfile install libcurl4 #485
- fix: handle error for vm max cycle exceed #486
- fix(indexer): Retry when tx receipt not found #488