Godwoken Documentation

website·Indexed 32 days ago

https://docs.godwoken.io

Documentation for Godwoken, an EVM-compatible layer 2 chain built on Nervos CKB. It features 100% EVM compatibility, gasless transactions via ERC-4337, and tools like Godwoken-Kicker for network deployment and GW-tools for asset deposits and withdrawals. The platform supports pCKB and pETH, providing a bridge between layer 1 (CKB) and layer 2.

Tokens
29.3K
Snippets
119
Records
242
Agent score
64%

What's inside Godwoken

  1. Overview of developing on Godwoken

    Godwoken is an EVM-compatible optimistic rollup layer 2 chain built on the Nervos Network (a Proof-of-Work layer 1). It allows Ethereum developers to use existing Ethereum development tools to deploy smart contracts and interact with the chain. Key features include low transaction costs (typically < $0.0001) and interoperability with Nervos, Ethereum, and BSC via the Force Bridge.
  2. Overview of the Godwoken L2 Rollup Framework

    Godwoken is a flexible and extensible layer 2 rollup framework designed for the Nervos CKB layer 1 blockchain. It currently utilizes Proof of Authority (PoA) consensus, with Proof of Stake (PoS) planned for future release. It is designed to be paired with a separate framework that defines the L2 programming model, enabling support for various blockchain models (e.g., EOS, Stellar, Libra). When combined with Polyjuice, it allows Solidity dApps to run on Nervos L2.
  3. Overview of Godwoken and Polyjuice

    Godwoken is a layer 2 rollup framework built atop Nervos CKB that provides an abstract account model and abstract layer 2 transactions. Polyjuice is an Ethereum-compatible layer designed using the Godwoken account model, allowing developers to deploy and run Ethereum contracts seamlessly on CKB.
  4. Overview of Godwoken Architecture

    Godwoken is a multi-chain solution designed to enable interoperability and EVM compatibility on the Nervos Network. It consists of two primary components: the Godwoken optimistic rollup framework and the Polyjuice EVM-compatible framework. Polyjuice acts as the backend, providing an Ethereum-compatible layer atop Nervos CKB by leveraging the account model and integrating evmone as the EVM engine to execute Ethereum smart contracts.
  5. Overview of Godwoken Layer 2

    Godwoken is an EVM-compatible, layer 2 optimistic rollup solution built on Nervos layer 1. It utilizes the Polyjuice EVM framework to provide a scalable environment for dApp builders. It is designed to allow Ethereum developers to migrate existing dApps to Nervos with minimal effort, offering benefits such as instant transaction finality and low gas fees while maintaining compatibility with Ethereum's infrastructure and tools.
  6. Overview of Godwoken Gasless Transactions

    Godwoken provides a gasless feature based on a simplified version of ERC-4337 that allows developers to sponsor transaction fees for users. This is achieved by routing transactions through an Entrypoint contract, which then interacts with a Paymaster contract deployed by the developer to verify and pay the gas fees.

    Key Constraints:

    • Only supports paying gas fees with native tokens (CKB or ETH).
    • Does not work for native token transfers (users must still pay gas).
    • Does not support paying gas fees using ERC20 tokens directly via the paymaster mechanism.
    • Requires maxFeePerGas and maxPriorityFeePerGas to be set to the same value in the UserOperation to avoid errors, as London hard fork (EIP-3198) is not currently supported.
  7. Overview of EVM on Nervos

    Nervos supports Ethereum-compatible smart contracts via the Godwoken and Polyjuice frameworks, which run the Ethereum Virtual Machine (EVM) in a Layer 2 execution environment. This allows developers to use Solidity and enables users to interact with dApps using the MetaMask wallet.
  8. Overview of Nervos Layer 2 EVM Compatibility

    Nervos is a multi-layer blockchain platform that supports Ethereum Virtual Machine (EVM) compatibility via a Layer 2 solution. This allows developers to use the Solidity smart contract programming language and existing Ethereum-based tooling to build and deploy applications on Nervos.
  9. Get started with Covalent API for Godwoken

    Covalent provides a unified RESTful API to access asset transparency and visibility across blockchain networks, including Godwoken. To begin using the API, you must first sign up for an API Key via the Covalent platform.
  10. Understand the Godwoken withdrawal process and challenge period

    Withdrawing funds from Godwoken is a two-step process: first, the withdrawal is initiated, and second, the funds are released. Due to the optimistic rollup architecture, there is a mandatory 5-day 'challenge period' after the withdrawal process commences. This period allows the Layer 2 network operator to examine transactions for malicious activity before funds can be unlocked.
  11. Understand the Godwoken Optimistic Rollup challenge mechanism

    Godwoken uses an Optimistic Rollup architecture where aggregators collect Layer 2 transactions, pack them into blocks, and submit them to CKB. Blocks are initially 'unfinalized' and subject to a challenge period.

    • Aggregators: Must stake CKB to submit blocks. They bear L1 transaction fees and liquidity costs but can charge L2 users fees in CKB or sUDT.
    • Challengers: Can mark a transaction in an unfinalized block as invalid by staking CKB.
    • Resolution:
      • The aggregator must prove the transaction is valid by submitting a 'cancel challenge request' that executes the transaction on-chain. If successful, the aggregator claims the challenger's stake.
      • If the aggregator fails, the challenger claims the aggregator's stake, and the chain reverts to the state prior to the invalid block.
    • Finalization: After a specific period, blocks become 'finalized', are frozen, and can no longer be challenged.
  12. Analyze blockchain data using the Layer1 Explorer

    The Nervos Explorer provides a searchable web interface to analyze blockchain data without requiring a local node. Common use cases include:

    • Tracking transactions to view all internal actions.
    • Searching addresses to view transaction history and asset balances.
    • Inspecting individual cells to view contained data and associated smart contracts.
    Mainnet: https://explorer.nervos.org
    Testnet: https://explorer.nervos.org/aggron