Conceptual Differences: Epoch & StorageLimit
Ethereum's Block Structure
Ethereum operates on a single-chain ledger where only transactions on the main chain are valid. Each block has a sequential block number, ensuring linear progression.
Conflux's Tree-Graph Structure
Conflux innovates with a Tree-Graph ledger structure for high throughput and low latency:
- Tree View: Follows parent edges hierarchically.
- Graph View: Includes both parent and reference edges, allowing concurrent block generation.
Unlike Ethereum, Conflux lacks traditional block numbers. Instead, it uses:
- Pivot Chain: A sequence of blocks selected via the GHAST rule, forming a linear chain akin to Ethereum’s main chain.
- Epoch: Corresponds to Ethereum’s block number but may encompass multiple blocks within a pivot block’s subtree.
Transaction Fees and Storage
| Feature | Ethereum | Conflux |
|---|---|---|
| Fee Model | gas * gasPrice (computation cost) | Adds storageLimit for state storage collateral (refundable post-storage release). |
| Transaction Params | gas, gasPrice | gas, gasPrice, storageLimit |
Development Tools Comparison
Conflux-Truffle vs. Truffle
| Feature | Truffle | Conflux-Truffle |
|---|---|---|
| CLI Name | truffle | cfxtruffle |
| Local Chain | Ganache (GUI support) | conflux-rust Docker (no GUI) |
| Subcommands | Supports develop | Excludes develop (planned in future updates) |
| Remote Deployment | Uses HDWalletProvider | Configures privateKeys in truffle-config.js |
| RPC Params | Standard Ethereum params | Includes Conflux-specific params (epoch, storageLimit) |
Conflux Studio vs. Remix
| Feature | Remix | Conflux Studio |
|---|---|---|
| Environment | Browser-based | Standalone executable |
| Debugging | Yes | No |
| Contract UI | Supports tuples, constructor args | Limited to basic ABI interactions |
| Node Management | Manual URL setup | Built-in testnet/mainnet selection |
| Plugins | Extensible via plugins | No plugin support |
FAQ
1. Why does Conflux use epochs instead of block numbers?
Conflux’s Tree-Graph structure requires Epochs to order blocks dynamically, unlike Ethereum’s linear chain.
2. Can I use Ethereum tools like Remix with Conflux?
No—Conflux requires specialized tools (e.g., Conflux Studio) due to its unique consensus and storage model.
3. How is storage collateral refunded in Conflux?
When a contract releases storage space, the collateral locked via storageLimit is returned to the sender.
4. What’s the advantage of Conflux-Truffle’s privateKeys setup?
It simplifies local signing for remote deployments, eliminating the need for external wallet providers.
5. Does Conflux Studio support debugging?
Not currently. Use logging or unit tests for error tracing.
6. Is Ganache available for Conflux?
No, but conflux-rust Docker provides a similar private chain setup.