EVM integration and optimization
Based on the Cosmos network's group technology architecture, we integrate Ethereum's EVM into the Fibonacci network. However, the native instructions of EVM require high GAS costs, which brings a high cost burden to users' social interaction with the Fibonacci network.
Therefore, we propose the concept of Gas Less EVM. That is, while maintaining the integrity of EVM, optimize the implementation method and algorithm to reduce the GAS cost of native EVM instructions by one sixth.
Specifically, we optimize the EVM instruction execution path by simplifying complex instructions and using simpler equivalent instructions to replace them, reducing the GAS cost of smart contract execution. The main optimizations include:
1. Simplify complex instructions: Complex EVM instructions are simplified by splitting them into simpler sequential operations, thereby reducing the GAS cost required to execute these instructions.
2. Replace complex instructions with equivalent simple instructions: Replace the original complex instructions with simpler equivalent instructions to reduce the GAS cost of instruction execution while not affecting the correctness of smart contracts.
3. Optimize memory management mechanism: By optimizing the memory management mechanism of EVM, the number of memory accesses is reduced, thereby reducing the GAS cost of executing smart contracts.
4. Optimize stack operations: By optimizing the stack operations of EVM, the number of stack operations and stack depth are reduced, further reducing the GAS cost of executing smart contracts.
At the same time, we introduce a new data structure Blob to replace some of the functions of CallData. Blob data does not need to be permanently stored in HistoryLog and will be automatically deleted within a certain time window. Through this optimization, we reduce the GAS cost of call data from 16 gas/byte to 3 gas/byte.
Last updated