Conversation
Add a single comprehensive EVM compatibility guide (evm/next/documentation/evm-compatibility.mdx) that documents supported EIPs/ERCs/opcodes, tooling, precompiles, JSON‑RPC behavior, and Cosmos-specific capabilities (finality, fees, addresses, chain IDs, performance). Remove now-redundant subpages: eip-2935.mdx, eip-7702.mdx, eip-reference.mdx, and overview.mdx to centralize compatibility information and avoid duplication.
|
|
||
| ### Transaction Type Routing | ||
|
|
||
| **Ethereum transactions (`MsgEthereumTx`)**: Routed to the EVM TxPool, which handles nonce gaps, promotion, and eviction. Executable transactions are then broadcast via CometBFT P2P. |
There was a problem hiding this comment.
This will definitely change after Krakatoa
There was a problem hiding this comment.
I was told that the mempool stays as-is, and krakatoa is an opt-in feature, so we'll put krakatoa docs in an "experimental features" section.
| The mempool setup is split across two locations: | ||
|
|
||
| ### Step 1: Add EVM Mempool to App Struct | ||
| - [`evmd/mempool.go`](https://github.com/cosmos/evm/blob/main/evmd/mempool.go) — `configureEVMMempool` and `createMempoolConfig`, called automatically from `NewExampleApp` |
There was a problem hiding this comment.
What does "automatically" mean?
There was a problem hiding this comment.
This is something we need to include to app.go
There was a problem hiding this comment.
Updated to:
- [`evmd/mempool.go`](https://github.com/cosmos/evm/blob/main/evmd/mempool.go) — `configureEVMMempool` and `createMempoolConfig`, which must be called from your `app.go` after `setAnteHandler`
wdyt?
...documentation/getting-started/build-a-chain/additional-configuration/mempool-integration.mdx
Outdated
Show resolved
Hide resolved
|
|
||
| ## Enabling Precompiles | ||
|
|
||
| Precompiles are enabled via the `active_static_precompiles` parameter in the `vm` module. Only addresses listed here are callable at runtime. For the full list of built-in precompiles and their addresses, see the [precompiles overview](/evm/next/documentation/smart-contracts/precompiles/overview). |
There was a problem hiding this comment.
You also need to wire them in during the app.go wiring (either with DefaultPrecompiles) or with your own set.
There was a problem hiding this comment.
done. please review the file changes
| } | ||
| ``` | ||
|
|
||
| To enable only a specific subset, pass the addresses explicitly. Addresses must be in sorted order: |
There was a problem hiding this comment.
Addresses must be in sorted order:
I'm actually not sure this is true - what tells you this?
There was a problem hiding this comment.
"Sorted order is required for determinism. This is enforced by ValidatePrecompiles in x/vm/types/params.go — validation fails with "precompiles need to be sorted" if slices.IsSorted(precompiles) returns false.
"
evm/next/documentation/smart-contracts/precompiles/overview.mdx
Outdated
Show resolved
Hide resolved
| // WRONG: Assuming Ethereum's 18 decimals | ||
| uint256 amount = 1 ether; // 1000000000000000000 | ||
| staking.delegate(validator, amount); // Delegates 1 trillion tokens! | ||
| Cosmos chains typically use 6 decimals. Passing a value like `1000000000000000000` (1 ETH in wei) to a precompile on a 6-decimal chain will be interpreted as 1 trillion tokens. |
There was a problem hiding this comment.
NO
Specify 18 decimals on Cosmos chains. There's no modern reason why you should use 6
There was a problem hiding this comment.
is this good?
<Warning>
All precompile contracts should use Ethereum's standard 18 decimals.
Although typical Cosmos chains use 6 decimals, EVM chains should use 18 decimals.
Always check your chain's decimal precision before interacting with a precompile.
</Warning>
Update EVM docs files and streamline