diff --git a/skill/references/cli/evmonly-rpc.md b/skill/references/cli/evmonly-rpc.md new file mode 100644 index 0000000..c0fdf2e --- /dev/null +++ b/skill/references/cli/evmonly-rpc.md @@ -0,0 +1,425 @@ +# EVM-only JSON-RPC surface + +The EVM-only (Autobahn / giga) deployment exposes a deliberately minimal EVM +JSON-RPC surface. All other `eth_*` methods return JSON-RPC method-not-found. + +## Supported methods + + +## WebSocket endpoint and `eth_subscribe("newHeads")` + +The EVM-only JSON-RPC is served over **both** HTTP and WebSocket. The HTTP +listener binds `giga.execution.evm_rpc_port` (default 8545); the WebSocket +listener binds `giga.execution.evm_ws_port` (default 8546). Both must be in +`1..65535` and `evm_ws_port` must differ from `evm_rpc_port`, or the node +refuses to start. + +- The WebSocket listener serves the **same** JSON-RPC methods as the HTTP + listener, plus the WebSocket-only `eth_subscribe`/`eth_unsubscribe` flow. +- Upgrades are accepted from **any `Origin`** header (WebSocket is exempt from + the browser same-origin policy), and concurrent WebSocket connections are + bounded to **2000**. +- Plain (non-upgraded) HTTP requests to the WebSocket listener, and + `eth_subscribe` over the HTTP listener, are rejected + (`notifications not supported`). + +`eth_subscribe("newHeads")` pushes **one Ethereum header per executed block**, +starting from the block after the subscription is created. Each header carries +the block's `number`, `hash`, `gasUsed`, `gasLimit`, `timestamp`, etc. + +**Requires Autobahn execution.** On nodes that do not execute blocks through +Autobahn the subscription is unavailable and fails with +`newHeads subscriptions require Autobahn execution`. + +### Subscribe to new heads via `cast` + +```sh +cast subscribe \ + --rpc-url ws://127.0.0.1:8546 \ + newHeads +``` + +### Subscribe to new heads via JSON-RPC over WebSocket + +```sh +wscat -c ws://127.0.0.1:8546 \ + -x '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' +``` + + +- `eth_sendRawTransaction` — submit a signed raw EVM transaction. Used by + `sei-load` and `cast publish`. Because there is no chain ID, nonce, + fee-estimation, gas-estimation, or call method, raw transactions must supply + chain ID, nonce, gas limit, and gas price offline. +- `eth_subscribe("newHeads")` — WebSocket-only subscription that pushes one + Ethereum header per executed block (#4345, v6.8.0). Delivered over the + EVM-only WebSocket listener (default port 8546, configured by + `giga.execution.evm_ws_port`), **not** the HTTP listener on 8545. Requires + Autobahn execution; on non-Autobahn nodes the subscription errors with + `newHeads subscriptions require Autobahn execution`. Over plain HTTP it + returns `notifications not supported`. +- `eth_getTransactionReceipt` — returns a finalized receipt. A lookup for a + pending or unknown hash returns `null`. +- `eth_getBalance` — returns the current committed EVM balance. + + +- `eth_getCode` — returns the current committed contract code at an address. + +- `eth_feeHistory` — returns `gasUsedRatio`, `baseFeePerGas`, and reward + percentiles for a range of blocks (see below). +- `eth_gasPrice` — returns a suggested gas price (see below). + + +- `eth_estimateGas` — estimates the gas a transaction would consume, built on + the existing estimation libraries (#4325). Now available on the EVM-only Giga + RPC. +- `eth_getLogs` — returns event logs matching a filter over a block range + (#4308). Now available on the EVM-only Giga RPC. + + +- `eth_getBlockTransactionCountByNumber` — returns the number of transactions + in a finalized block by number as a hex count (#4345, v6.8.0). Resolves the + block the same way as `eth_getBlockByNumber`: `latest`, `safe`, `finalized`, + and `pending` all map to the latest committed block, `earliest` to the oldest + retained height, or an explicit height. Returns `null` for a zero/negative or + future height; errors for a pruned height. An empty (zero-transaction) block + returns `0x0`, not `null`. +- `eth_getBlockTransactionCountByHash` — returns the number of transactions in + a finalized block by hash as a hex count (#4345, v6.8.0). Resolves the block + the same way as `eth_getBlockByHash`. Returns `null` for an unknown hash. + +### Fetch the block transaction count via JSON-RPC + +```sh +curl -s http://127.0.0.1:8545 \ + -H 'Content-Type: application/json' \ + -d '{"jsonrpc":"2.0","id":1,"method":"eth_getBlockTransactionCountByNumber","params":["latest"]}' +``` + +```sh +curl -s http://127.0.0.1:8545 \ + -H 'Content-Type: application/json' \ + -d '{"jsonrpc":"2.0","id":1,"method":"eth_getBlockTransactionCountByHash","params":["0xYOUR_BLOCK_HASH"]}' +``` + + +## `eth_getTransactionByBlockNumberAndIndex` and `eth_getTransactionByBlockHashAndIndex` + +Fetch the transaction at a given index within a finalized block (#4345, v6.8.0). +Each returns exactly the entry the full-transaction `eth_getBlockByNumber` / +`eth_getBlockByHash` lists at that index. + +- `eth_getTransactionByBlockNumberAndIndex(number, index)` — resolves the block + the same way as `eth_getBlockByNumber`: `latest`, `safe`, `finalized`, and + `pending` all map to the latest committed block, `earliest` to the oldest + retained height, or an explicit height. Returns `null` for a zero/negative or + future height, or when `index` is past the end of the block (including an + index beyond `int` range, or an empty block at index `0`). Errors for a + pruned height (and surfaces any other backend failure). +- `eth_getTransactionByBlockHashAndIndex(hash, index)` — resolves the block the + same way as `eth_getBlockByHash`. Returns `null` for an unknown hash or when + `index` is past the end of the block. + +`index` is a hex quantity (e.g. `0x0`, `0x1`). The returned transaction's +`blockNumber` and `transactionIndex` come from the listing block itself, so a +replayed transaction whose stored receipt belongs to an earlier block still +reports this block's number and index here. + +### Fetch a transaction by block and index via JSON-RPC + +```sh +curl -s http://127.0.0.1:8545 \ + -H 'Content-Type: application/json' \ + -d '{"jsonrpc":"2.0","id":1,"method":"eth_getTransactionByBlockNumberAndIndex","params":["latest","0x1"]}' +``` + +```sh +curl -s http://127.0.0.1:8545 \ + -H 'Content-Type: application/json' \ + -d '{"jsonrpc":"2.0","id":1,"method":"eth_getTransactionByBlockHashAndIndex","params":["0xYOUR_BLOCK_HASH","0x0"]}' +``` + + + +## `eth_getBlockReceipts` + +Signature: `eth_getBlockReceipts(blockNumberOrHash) -> []receipt`. + +Returns the receipts stored for a finalized block, in transaction index order. + +Block selector handling: + +- Accepts an explicit height, a block tag, or a block hash. +- The tags `latest`, `safe`, `finalized`, and `pending` all resolve to the + latest block whose receipts are **indexed** — not necessarily the committed + head. When the committed head is ahead of the last indexed block, a tag + resolves to the last indexed height. +- `earliest` resolves to the oldest retained height. +- An empty (zero-transaction) block returns an **empty list** (`[]`), not `null`. + +Null-vs-error semantics: + +- Returns `null` for an unknown block hash, a zero/negative or future height, + or a height whose receipts are not yet indexed. +- Errors for a **pruned** height or pruned receipts (`eth_getBlockReceipts + block receipts are pruned`), and when the call supplies no block selector + (`eth_getBlockReceipts requires a block number or hash`, returned as + invalid-params / JSON-RPC code `-32602`). Any other backend failure is + surfaced as an error. + +Which receipts are listed: + +- Only the receipts **stored for that block** are listed. A rejected + transaction that produced no receipt is skipped. +- A replayed (repeated) transaction keeps its receipt at the block where it + first executed, so it is listed under that original block and not under the + block where it was replayed. +- Each listed receipt equals what `eth_getTransactionReceipt` returns for that + transaction hash. + +### Fetch block receipts with `cast` + +```sh +cast block-receipts \ + --rpc-url http://127.0.0.1:8545 \ + latest +``` + +### Fetch block receipts via JSON-RPC + +```sh +curl -s http://127.0.0.1:8545 \ + -H 'Content-Type: application/json' \ + -d '{"jsonrpc":"2.0","id":1,"method":"eth_getBlockReceipts","params":["latest"]}' +``` + +```sh +curl -s http://127.0.0.1:8545 \ + -H 'Content-Type: application/json' \ + -d '{"jsonrpc":"2.0","id":1,"method":"eth_getBlockReceipts","params":["0xYOUR_BLOCK_HASH"]}' +``` + + + + +## `eth_feeHistory` + +Signature: `eth_feeHistory(blockCount, lastBlock, rewardPercentiles) -> FeeHistoryResult`. + +Returns, for the `blockCount` blocks ending at `lastBlock`: + +- `oldestBlock` — the oldest block covered by the response. +- `gasUsedRatio` — per-block `TotalGasUsed / gasLimit`, one entry per block. +- `baseFeePerGas` — **always zero on giga** (giga's base fee is fixed at zero). + Carries one more entry than `gasUsedRatio`: the projected fee for the block + after `lastBlock`, also zero. +- `reward` — present only when `rewardPercentiles` is non-empty. One row per + block, one entry per requested percentile, holding that block's + gas-weighted priority-fee reward at that percentile. + +Constraints and behaviour: + +- `blockCount` is capped at **1024**; a larger request is silently clamped. A + `blockCount` below 1 returns an empty result (`oldestBlock` 0, empty + `gasUsedRatio`). +- `rewardPercentiles` must be **strictly ascending** and each value in + **[0, 100]**; otherwise the call errors with + `invalid reward percentiles: must be ascending and between 0 and 100`. The + list length must be 100 or fewer. +- `lastBlock` accepts block tags (`latest`, `safe`, `finalized`, `pending` all + resolve to the latest committed block; `earliest` resolves to the oldest + retained height) or an explicit height. An explicit height above the latest + committed block errors (`not yet available`). +- Pruned/unavailable heights below the retention floor are skipped; + `oldestBlock` reflects the earliest retained height actually returned. +- An empty (zero-transaction) block returns `0` gasUsedRatio and `0` reward + for every requested percentile. + +Which reward percentiles a block can answer from cache is governed by the +`receipt-store.rs-reward-percentiles` config (littidx backend; empty defaults +to `[0, 10, 20, 25, 30, 50, 75, 90, 100]`). A requested percentile not covered +by the stored set is recomputed from the block's receipts. + +### Fetch fee history via JSON-RPC + +```sh +curl -s http://127.0.0.1:8545 \ + -H 'Content-Type: application/json' \ + -d '{"jsonrpc":"2.0","id":1,"method":"eth_feeHistory","params":["0x4","latest",[25,50,75]]}' +``` + +## `eth_gasPrice` + +Signature: `eth_gasPrice() -> hexutil.Big`. + +Returns a suggested gas price: + +- Base suggestion is a **10% margin over the admission floor** (the minimum + effective gas price the application admits a transaction at): `floor * 110 / 100`. +- When the latest committed block is **congested** — `gasUsedRatio` strictly + exceeds **80%** — and that block's **median (50th-percentile) reward** is at + or above the margin, the median reward is returned instead. +- A block exactly at 80% is not congested. If the median reward is below the + margin, or no percentile was stored for the congested block, the suggestion + falls back to the margin. + +### Fetch the suggested gas price via JSON-RPC + +```sh +curl -s http://127.0.0.1:8545 \ + -H 'Content-Type: application/json' \ + -d '{"jsonrpc":"2.0","id":1,"method":"eth_gasPrice","params":[]}' +``` + +## `eth_getCode` + +Signature: `eth_getCode(address, blockNumberOrHash) -> hexutil.Bytes`. + +Returns the contract code at the address in the committed EVM state after the +selected block, matching go-ethereum semantics. + +Block parameter handling (#4388, v6.8.0): + +- Accepts `latest`, `safe`, `finalized`, and `pending`. All four read the + current committed EVM state, because Sei has instant finality. +- An **explicit block height** reads the code after that block, and `earliest` + reads block 0. A past height is served from the EVM state store, so it + requires a node that keeps state history (a full node, not a validator), and + fails once that height has been pruned. +- A **block hash**, or no block number or hash at all, returns + `state queries by block hash are not supported by EVM-only RPC` + (`errBlockHashUnsupported`). A height **above the current head** returns + `block is above the latest block`. + +Code semantics: + +- An address with no code at the selected block — including an EOA or an + address that was never touched — returns `0x` (empty bytes), not `null`, as + go-ethereum does. + +### Fetch contract code with `cast code` + +```sh +cast code \ + --rpc-url http://127.0.0.1:8545 \ + 0xYOUR_CONTRACT_ADDRESS +``` + +### Fetch code via JSON-RPC + +```sh +curl -s http://127.0.0.1:8545 \ + -H 'Content-Type: application/json' \ + -d '{"jsonrpc":"2.0","id":1,"method":"eth_getCode","params":["0xYOUR_CONTRACT_ADDRESS","latest"]}' +``` + + +## `eth_getStorageAt` + +Signature: `eth_getStorageAt(address, storageKey, blockNumberOrHash) -> hexutil.Bytes`. + +Returns the 32-byte value at a contract storage slot from the current committed +EVM state, matching go-ethereum semantics (#4388 is the EVM-only addition). + +Block parameter handling (#4388, v6.8.0): + +- Accepts `latest`, `safe`, `finalized`, and `pending`. All four read the + current committed EVM state, because Sei has instant finality. +- An explicit block height reads the storage slot in the committed EVM state + **after that block**, and `earliest` reads block 0. A past height is served + from the EVM state store, so it needs a node that keeps one (a full node, not + a validator), and fails once that height is pruned. +- A **block hash** returns an error (`state queries by block hash are not + supported by EVM-only RPC`), and a height **above the current head** returns + `block is above the latest block`. + +Storage-key semantics: + +- The slot key is a hex number of **at most 32 bytes**. A `0x`/`0X` prefix is + optional; odd-length values are left-padded to a full byte, and the whole + key is then left-padded to 32 bytes. An empty key (`0x`) is slot zero. +- A non-hex key fails with `hex string invalid`; a doubled prefix (e.g. + `0x0X1`) is also treated as invalid hex. A key longer than 32 bytes fails + with `hex string too long, want at most 32 bytes`. +- An **unset slot** — including any slot of an address with no contract — + returns 32 zero bytes (`0x0000…0000`), not `null` or `0x`, as go-ethereum + does. + +### Read contract storage with `cast storage` + +```sh +cast storage \ + --rpc-url http://127.0.0.1:8545 \ + 0xYOUR_CONTRACT_ADDRESS \ + 0 +``` + +### Fetch a storage slot via JSON-RPC + +```sh +curl -s http://127.0.0.1:8545 \ + -H 'Content-Type: application/json' \ + -d '{"jsonrpc":"2.0","id":1,"method":"eth_getStorageAt","params":["0xYOUR_CONTRACT_ADDRESS","0x0","latest"]}' +``` + + +## `eth_getBalance` + +Signature: `eth_getBalance(address, blockNumberOrHash)`. + +Block parameter handling: + +- Accepts `latest`, `safe`, `finalized`, and `pending`. All four read the + current committed EVM state, because Sei has instant finality. +- Accepts an explicit block height (`--block`): reads the balance after that + block, served from the EVM state store. This requires a node that keeps + state history (a full node, not a validator), and fails once that height is + pruned (`the EVM state after block N is not held by this node`). +- `earliest` reads block 0. +- A block hash returns `state queries by block hash are not supported by + EVM-only RPC`; a height above the current head returns `block is above the + latest block`; a negative/unsupported tag returns `block tag is not + supported by EVM-only RPC`. + +Balance semantics: + +- Every previously unseen address starts with a test-only `2^200` wei balance + in the EVM-only setup. + +### Fetch a balance with `cast` + +```sh +cast balance \ + --rpc-url http://127.0.0.1:8545 \ + 0x000000000000000000000000000000000000dEaD +``` + +At a past height: + +```sh +cast balance \ + --rpc-url http://127.0.0.1:8545 \ + --block 100 \ + 0x000000000000000000000000000000000000dEaD +``` + +### Fetch a balance via JSON-RPC + +```sh +curl -s http://127.0.0.1:8545 \ + -H 'Content-Type: application/json' \ + -d '{"jsonrpc":"2.0","id":1,"method":"eth_getBalance","params":["0x000000000000000000000000000000000000dEaD","latest"]}' +``` + +## Fetch receipts with `cast` + +`cast receipt` works for a known finalized transaction hash. There is no +`eth_getTransactionByHash` or block API to discover a transfer hash, so the +hash must be known ahead of time. + +The inspection, balance, and receipt examples also require `jq` and Foundry's +`cast`. diff --git a/skill/references/cli/seid-cli.md b/skill/references/cli/seid-cli.md index f538ade..d36bea9 100644 --- a/skill/references/cli/seid-cli.md +++ b/skill/references/cli/seid-cli.md @@ -177,6 +177,11 @@ Supported types: Note: `pointee` does not support `CW1155` or `ERC1155`. + +### Oracle Module Removed + +The oracle module has been removed behind the v6.8 upgrade ([sei-chain#4319](https://github.com/sei-protocol/sei-chain/pull/4319)): its CLI commands, store, protobuf schema, REST/gRPC endpoints, and CosmWasm query route are gone. `seid q oracle ...` now returns `unknown command "oracle"`, and store queries against the deleted store return `no such store: oracle`. Only the oracle `Msg` types remain decodable so historical blocks still trace; oracle transactions submitted after the upgrade are rejected before any fee is charged. The `oracle` module no longer appears in any tooling module list (`dump_app_state_for_height.sh`, `seidb` `AllModules`, iaviewer helpers). + ### Transaction Lookup ```bash @@ -234,6 +239,10 @@ seid tx evm call-precompile [args...] Available precompile names: `distribution`, `json`, `p256`, `staking`. See [EVM Precompiles](https://docs.sei.io/evm/precompiles) for method signatures. + + +> **No built-in WSEI deploy command.** The `seid tx evm deploy-wsei` subcommand (with flags `--from`, `--gas-fee-cap`, `--gas-limit`, `--evm-rpc`, `--nonce`) has been removed, along with its embedded WSEI (Wrapped Sei) contract artifacts. There is no `seid` command to deploy a Wrapped Sei ERC20 contract. To deploy a Wrapped Sei contract, compile and deploy your own bytecode via `seid tx evm deploy --from ` or external EVM tooling. + ## Node Start (`seid start`) ### `--freeze-height` @@ -250,7 +259,6 @@ seid start --freeze-height Constraints: - Must not exceed `MaxInt64`. - Cannot be combined with `--halt-height`/`halt-height` or `--halt-time`/`halt-time`. -- Cannot be combined with grpc-only mode (`--grpc-only`). - State sync is disabled under freeze mode and falls back to block sync. - Full nodes only: not supported in validator or seed mode, or with Autobahn. - The target height must not be below the chain's initial height, and the application, block store, and state store must not have reached it yet — otherwise the node refuses to start. @@ -314,6 +322,9 @@ For writes: sign first, then submit via `eth_sendRawTransaction`. Prefer a walle `seidb` is the SeiDB maintenance/analysis tool (built from `sei-db/tools/cmd/seidb`). Use it for inspecting on-disk state stores — not for chain queries. The commands below cover FlatKV analysis and hash-log inspection. As of v6.7.0 the fourth FlatKV bucket is named `misc` (it was `legacy` in v6.6). + +> **Shipped in the Docker image.** The official Docker image now builds and ships `seidb` at `/usr/bin/seidb` alongside `/usr/bin/seid`, so container users already have it and do not need a separate build (sei-chain Dockerfile). `seidb` is pure Go — it builds with `CGO_ENABLED=0` and does not link libwasmvm. Outside the container, build it from source with `CGO_ENABLED=0 go build -o seidb ./sei-db/tools/cmd/seidb`. + ### dump-flatkv Iterates a FlatKV store and dumps every physical `(key, value)` pair into per-bucket files, one file per bucket, formatted to match `dump-iavl` so the same diff tooling works on both. @@ -416,7 +427,7 @@ seidb evm-logical-digest --backend flatkv|memiavl|composite --db-dir --hei | `--list-limit` | | Inspect mode: maximum pairs to print with `--list`; `<=0` means unlimited | `1000` | | `--details` | | Inspect list mode: include backend-specific version metadata | `false` | | `--find-hash` | | 32-byte hex per-entry hash to hunt for; every entry whose `sha256(len(key)||key||len(val)||val)` matches is printed as `FOUND-HASH` | — | -| `--json` | | Emit the digest or inspect report as one JSON object on stdout (narration goes to stderr), for scheduled digest checks | `false` | +| `--json` | | Emit the digest or inspect report as one JSON object on stdout (narration goes to stderr), for scheduled digest checks (sei-chain#4255) | `false` | Notes: - The per-bucket accumulator is an order-independent XOR of `sha256(len(key)||key||len(val)||val)`, so it does not matter that flatkv iterates in pebble global order while memiavl is scanned by leaf index. diff --git a/skill/references/contracts/common-errors.md b/skill/references/contracts/common-errors.md index 348de6e..ed53dfa 100644 --- a/skill/references/contracts/common-errors.md +++ b/skill/references/contracts/common-errors.md @@ -105,6 +105,12 @@ STAKING.delegate{value: 1 ether}(validatorAddr); **Cause**: Calling a precompile from a contract without `payable` when the precompile requires value. **Fix**: Ensure the calling function is `payable` and forwards `msg.value`. + + +### `pointer precompile is retired; EVM pointer creation is disabled` +**Cause**: EVM pointer creation has been retired. The pointer precompile at `0x…100b` stays registered so its `addNativePointer`, `addCW20Pointer`, `addCW721Pointer`, and `addCW1155Pointer` selectors still decode, but every call now reverts with this reason. The removed `seid tx evm register-evm-pointer`, `seid tx evm call-precompile pointer addNativePointer`, `seid tx evm add-cw-erc20-pointer`, and the pointer governance proposals (`AddERCNativePointer`/`AddERCNativePointerProposalV2`, `AddERCCW20/721/1155Pointer`, `AddCWERC20/721/1155Pointer`) all fail the same way — proposals now return `ErrPointerProposalDeprecated`. +**Fix**: None — there is no retry, flag, or workaround that re-enables creation. Do not attempt to create a new pointer of any kind. Pointers registered before the retirement remain live and readable: their registry entries, versions, and `seid query evm pointer`-equivalent lookups (via the pointerview precompile at `0x…100A`) are unchanged, and their deployed ERC20/721/1155 contracts keep working. Only creation of new pointers is disabled. + ### `JSON precompile: path not found` **Cause**: `extractAs*` function given a JSON path that doesn't exist in the input. **Fix**: Validate JSON structure before passing to precompile. Use try/catch. diff --git a/skill/references/contracts/performance-testing.md b/skill/references/contracts/performance-testing.md index 962d242..a86358d 100644 --- a/skill/references/contracts/performance-testing.md +++ b/skill/references/contracts/performance-testing.md @@ -118,6 +118,41 @@ Source: https://github.com/sei-protocol/sei-chain/tree/main/loadtest You don't need to fork it. Build your own loadtest in TypeScript with viem (above) — same shape, easier to iterate. + + +### evmonly-loadtest + +`giga/evmonly/cmd/evmonly-loadtest` is a standalone binary that feeds synthetic blocks to the EVM-only executor through the disk-backed Giga state and receipt stores (no Cosmos SDK state, mempool, or RPC). + +Build it: + +```bash +make build-evmonly-loadtest +``` + +This writes `./build/evmonly-loadtest`. `go run ./giga/evmonly/cmd/evmonly-loadtest` is equivalent when you don't want a binary. + +Run a bounded prebuilt test: + +```bash +./build/evmonly-loadtest --blocks=1000 --txs-per-block=1000 +``` + +**`--storage-dir`** sets the GigaStorageManager home directory: + +- Empty (default) → a temporary directory is used and removed on exit. +- A set path is created if missing and is **kept** after the run. + +```bash +./build/evmonly-loadtest \ + --blocks=1000 \ + --txs-per-block=1000 \ + --storage-dir=/tmp/evmonly-storage +``` + +Note: a second run against an already-populated `--storage-dir` will fail at genesis commit — point each kept run at a fresh (empty or non-existent) directory. + + ## Common bottlenecks discovered by load testing | Symptom | Likely cause | Fix | diff --git a/skill/references/contracts/tokens.md b/skill/references/contracts/tokens.md index e7208b1..4bda8b7 100644 --- a/skill/references/contracts/tokens.md +++ b/skill/references/contracts/tokens.md @@ -97,11 +97,13 @@ USDC on Sei is a native ERC20 — no pointer or bridging step needed. | Legacy | Recommended | |---|---| -| CW20 token | ERC20 token + optional pointer | -| CW721 NFT | ERC721 NFT + optional pointer | -| Native denom | Native denom + ERC20 pointer (TokenFactory) | +| CW20 token | ERC20 token | +| CW721 NFT | ERC721 NFT | +| Native denom | Native denom (TokenFactory) | -For existing CW20/CW721 tokens: register an ERC20/ERC721 pointer to make them accessible in EVM wallets while migrating. See [pointers/overview.md](../pointers/overview.md). +> **EVM pointer creation is disabled.** The pointer precompile is retired, and transactions that previously created pointers now revert with `pointer precompile is retired; EVM pointer creation is disabled`. The CLI commands and governance proposals that registered pointers have been removed (`seid tx evm register-evm-pointer`, `seid tx evm call-precompile pointer addNativePointer`, `seid query evm pointer`, `seid tx evm add-cw-erc20-pointer`, and the `AddERC*/AddCW*Pointer` proposal types). + +For existing CW20/CW721 tokens there is **no longer any way to create a new pointer** to make them accessible in EVM wallets — new tokens should be deployed natively as ERC20/ERC721. Only pointers registered before the retirement remain live and readable. ## Native Denoms diff --git a/skill/references/ecosystem/integration-defi.md b/skill/references/ecosystem/integration-defi.md index 1ba09d9..609d959 100644 --- a/skill/references/ecosystem/integration-defi.md +++ b/skill/references/ecosystem/integration-defi.md @@ -240,7 +240,7 @@ Pointer addresses are deterministic from the underlying CW20 denom. See [pointer ## Sei-specific notes -- **WSEI** (wrapped SEI) plays the role of WETH. Verify the canonical WSEI address via [docs.sei.io ecosystem contracts](https://docs.sei.io/evm/ecosystem-contracts). +- **WSEI** (wrapped SEI) plays the role of WETH. It is an already-deployed ecosystem contract — verify the canonical WSEI address via [docs.sei.io ecosystem contracts](https://docs.sei.io/evm/ecosystem-contracts). There is no CLI deployment path for it: the `seid tx evm deploy-wsei` subcommand and its bundled WSEI contract artifacts have been removed. To get WSEI, call `deposit()` (or send SEI) on the already-deployed WSEI contract — do not attempt to deploy your own. - **Native SEI** uses 18 decimals (not 6 like Cosmos-side `usei` micro-denom — that's a Cosmos-side concept; EVM sees 18 decimals). - **Atomic batching**: account abstraction (see [contracts/account-abstraction.md](../contracts/account-abstraction.md)) lets users do approve+swap in one user op without a separate approval tx. - **Liquidation latency**: 400ms blocks make liquidation MEV competitive; bots can react within 1-2 blocks. diff --git a/skill/references/ecosystem/node-operations.md b/skill/references/ecosystem/node-operations.md index 78cdcce..65b9678 100644 --- a/skill/references/ecosystem/node-operations.md +++ b/skill/references/ecosystem/node-operations.md @@ -155,6 +155,29 @@ ss-keep-recent = 100000 # Keep last 100k blocks ss-prune-interval = 600 ``` + +--- + +## Receipt-store reward percentiles (`receipt-store.rs-reward-percentiles`) + +Controls the per-block gas-weighted reward percentiles computed and stored alongside each block's receipts. These are what the EVM-only (giga) RPC server's `eth_feeHistory` reward rows and `eth_gasPrice` congestion escalation read from. + +```toml +[receipt-store] +# Gas-weighted eth_feeHistory reward percentiles stored per block. +# Applies ONLY when rs-backend = "littidx". +# Each entry must be in [0, 100], with no duplicates. +# An empty list ([]) defaults to [0, 10, 20, 25, 30, 50, 75, 90, 100]. +rs-reward-percentiles = [] +``` + +- **littidx backend only.** The pebble backend does not group receipts by block and records no block stats; `eth_feeHistory`/`eth_gasPrice` callers fall back to recomputing from receipts. +- **Validation (startup fails if violated):** each entry must be within `[0, 100]`, there must be no duplicates, and the list must be 100 entries or fewer. +- **Empty default:** an empty list (`[]`) applies the built-in default `[0, 10, 20, 25, 30, 50, 75, 90, 100]`. +- **Read through the AppOptions/viper key** `receipt-store.rs-reward-percentiles`. Settable via a comma- or whitespace-separated environment-variable string (e.g. `0,50,100`) in addition to a TOML float array. +- A requested `eth_feeHistory` percentile not covered by the stored set is recomputed from that block's receipts rather than approximated. + + --- ## SeiDB storage, RocksDB, and Giga @@ -181,6 +204,51 @@ SeiDB has two layers: **State Commit (SC)** — a memiavl Merkle tree that holds The migration is staged: `migrate_evm` drains EVM data in the background and settles at `evm_migrated`; later modes migrate the remaining modules. - **Giga Executor** (`[giga_executor] enabled`) is a *separate* feature — an evmone-based EVM interpreter for throughput. Don't conflate it with Giga Storage. + +### `seidb` CLI from the Docker image + +The official Docker image now builds and ships the `seidb` tool binary at `/usr/bin/seidb` alongside `seid` ([sei-chain#4323 build change](https://github.com/sei-protocol/sei-chain)). Container users no longer need to build it separately — run it directly: + +```bash +docker run --rm -v $HOME/.sei:/root/.sei seidb --help +``` + +- `seidb` is pure Go — it is built with `CGO_ENABLED=0` and does not link `libwasmvm`, so it runs standalone in the container. +- Use it for SeiDB State Store / State Commit inspection and maintenance tasks against the node's data directory (mount `$HOME/.sei` into the container). +- Note the post-v6.8 tooling change: `oracle` has been removed from the seidb `AllModules` list, so module-iterating subcommands no longer include it. + + + +--- + +## `[giga]` app.toml section + +A `[giga]` section in `app.toml` is honored on the Autobahn node ([sei-chain#4323](https://github.com/sei-protocol/sei-chain/pull/4323)). It carries Giga-specific node settings read by the Autobahn executor path; place it as its own top-level `[giga]` table in `app.toml`. + +```toml +[giga] +# Giga-specific settings honored on the Autobahn node. +``` + +- Distinct from `[giga_executor]` (the evmone interpreter toggle) and from the SeiDB SC FlatKV routing (`[state-commit]` keys) — do not conflate the three. + +--- + +## Node config from `sei.toml` (ConfigManager) + +ConfigManager sources node configuration from a node's `sei.toml` file ([sei-chain#4043](https://github.com/sei-protocol/sei-chain/pull/4043), [#4045](https://github.com/sei-protocol/sei-chain/pull/4045)). `sei.toml` lives alongside the other config files under `$HOME/.sei/config/`, and ConfigManager reads it to resolve node section settings in addition to the established `app.toml` / `config.toml` / `client.toml`. + +``` +$HOME/.sei/config/ +├── app.toml +├── config.toml +├── client.toml +├── sei.toml # ConfigManager node sections +├── genesis.json +├── node_key.json +└── priv_validator_key.json +``` + > Minimum gas price, block gas limit, and SSTORE/storage gas are governance-adjustable — confirm live values at https://docs.sei.io/evm/differences-with-ethereum, and set `minimum-gas-prices` at or above the mainnet floor (`0usei` is local-dev only). @@ -250,7 +318,6 @@ Both fields are read through the AppOptions/viper keys `evm.trace_allowed_tracer | `26656` | TCP | P2P — must be open to join the network | | `26657` | TCP | Tendermint RPC | | `1317` | TCP | Cosmos REST API | -| `9090` | TCP | gRPC | | `8545` | TCP | EVM JSON-RPC (HTTP) | | `8546` | TCP | EVM JSON-RPC (WebSocket) | | `26660` | TCP | Prometheus metrics (disabled by default) | @@ -315,6 +382,30 @@ make install sudo systemctl restart seid ``` + +--- + +## v6.8 Upgrade: Oracle Module Removal (one-way) + +The v6.8 upgrade ([sei-chain#4319](https://github.com/sei-protocol/sei-chain/pull/4319)) removes the oracle module — its store, keeper, param subspace, protobuf schema, wasm query route, and tooling are deleted. Only the oracle `Msg` types remain decodable so historical blocks still trace. The change is **app-hash breaking at the upgrade height**, and the oracle store is dropped via `StoreUpgrades.Deleted`. + +### Operator actions + +- **Upgrade to v6.8 at the scheduled plan height.** An unupgraded (v6.7) binary has no `v6.8` upgrade handler and **halts at the plan height** with `UPGRADE "v6.8" NEEDED` rather than advancing — build and stage the v6.8 binary before the halt height as with any governance upgrade. +- **Downgrade to v6.7 is impossible after migration.** Once v6.8 has run and deleted the oracle store, a v6.7 binary **panics on reopen** (missing `store "oracle"`). Do not roll back the binary after the upgrade height; restore from a pre-upgrade backup if you must return to v6.7. +- The migration deletes the oracle store and removes the oracle module version from the version map. No oracle genesis state is exported after the upgrade. + +### Post-upgrade behavior + +- Oracle CLI is gone: `seid q oracle ...` returns `unknown command "oracle"`. +- Oracle gRPC/REST query and Msg endpoints are removed; a raw store query against `oracle` returns `no such store: oracle` (no longer the old deprecation error). +- The CosmWasm `oracle` query route is removed — contracts hitting it now get an unknown route. +- Oracle transactions submitted after the upgrade are rejected **before fees are charged** (previously rejected but still charged a fee and consumed a sequence number). + +### Tooling module lists + +The `oracle` entry is removed from all tooling module lists — `scripts/dump_app_state_for_height.sh`, the seidb `AllModules` list, and the iaviewer helpers. Scripts and iaviewer invocations that iterate the module list no longer include `oracle`; remove any hardcoded `oracle` references in your own dump/inspect wrappers after upgrading. + --- ## Freeze Height (`--freeze-height` / `freeze-height`) @@ -346,7 +437,6 @@ To serve historical EVM JSON-RPC from frozen nodes behind one endpoint, put [fro ### Validation constraints (startup fails if violated) - `freeze-height` **cannot be combined with `halt-height` or `halt-time`**. -- `--freeze-height` **cannot be used with grpc-only mode**. - **Full nodes only** — not supported in validator or seed mode (`mode = "validator"` / `mode = "seed"` in `config.toml`). - **Not supported with Autobahn** (fails if `autobahn-config-file` is set). - Must **not exceed `MaxInt64`** (`9223372036854775807`). diff --git a/skill/references/ecosystem/rpc-providers.md b/skill/references/ecosystem/rpc-providers.md index 7b12ae4..8129711 100644 --- a/skill/references/ecosystem/rpc-providers.md +++ b/skill/references/ecosystem/rpc-providers.md @@ -29,7 +29,8 @@ Public, community, and paid RPC endpoints for Sei. Use this as the source of tru | `https://evm-rpc.sei-apis.com` | EVM JSON-RPC | Primary EVM endpoint | | `https://rpc.sei-apis.com` | Cosmos Tendermint RPC | Native Cosmos RPC | | `https://rest.sei-apis.com` | Cosmos REST/LCD | Cosmos SDK REST | -| `grpcs://grpc.sei-apis.com:443` | Cosmos gRPC | High-performance native | + +> **Cosmos gRPC removed:** `seid` no longer runs the Cosmos gRPC (port 9090) or gRPC-Web (port 9091) servers — the `[grpc]` and `[grpc-web]` config sections are gone and no gRPC endpoint is served. The former `grpcs://grpc.sei-apis.com:443` endpoint no longer serves native gRPC. Query over Cosmos REST/LCD (`https://rest.sei-apis.com`) or Tendermint RPC (`https://rpc.sei-apis.com`) instead. ### Community (free) diff --git a/skill/references/ecosystem/staking-governance.md b/skill/references/ecosystem/staking-governance.md index 0ca9279..b3f03f5 100644 --- a/skill/references/ecosystem/staking-governance.md +++ b/skill/references/ecosystem/staking-governance.md @@ -253,6 +253,14 @@ seid tx gov submit-proposal software-upgrade v5.9.0 \ ### Expedited Proposal (Fast-Track) + + +> **App-hash-breaking upgrades delete state (e.g. v6.8).** The v6.8 upgrade removes the `oracle` module and **deletes its store** at the upgrade height via `StoreUpgrades.Deleted`, also removing the oracle module version from the version map. This is app-hash breaking at the plan height. Operational consequences a software-upgrade proposal implies: +> - Unupgraded (v6.7) binaries **halt** at the plan height instead of producing a divergent block. +> - A v6.7 binary **cannot reopen** a database already migrated by v6.8 — it panics on the missing oracle store. Downgrade past v6.8 is impossible once migration has run; back up data before upgrading. +> - After v6.8, oracle commands are gone (`seid q oracle ...` returns `unknown command "oracle"`) and store queries for oracle return `no such store: oracle`. Only oracle `Msg` types remain decodable so historical blocks still trace; oracle transactions submitted after the upgrade are rejected **without charging a fee** (`ErrDeprecated`). + + ```bash seid tx gov submit-proposal software-upgrade emergency-patch \ --upgrade-height 20100000 \ diff --git a/skill/references/networks.md b/skill/references/networks.md index b5d858e..8f780fa 100644 --- a/skill/references/networks.md +++ b/skill/references/networks.md @@ -14,8 +14,9 @@ description: Network information for Sei mainnet and testnet — chain IDs, RPC | EVM RPC | `https://evm-rpc.sei-apis.com` | `https://evm-rpc-testnet.sei-apis.com` | | Cosmos RPC | `https://rpc.sei-apis.com` | `https://rpc-testnet.sei-apis.com` | | REST/LCD | `https://rest.sei-apis.com` | `https://rest-testnet.sei-apis.com` | -| gRPC | `https://grpc.sei-apis.com` | `https://grpc-testnet.sei-apis.com` | | WebSocket (EVM) | `wss://evm-ws.sei-apis.com` | `wss://evm-ws-testnet.sei-apis.com` | + +> **No Cosmos gRPC endpoint:** seid no longer runs the Cosmos gRPC or gRPC-Web servers (ports 9090/9091 are gone, along with the `[grpc]` and `[grpc-web]` config sections). Query the node over REST/LCD (`rest.sei-apis.com`) or Cosmos RPC (`rpc.sei-apis.com`) instead. Clients that previously used `grpc.sei-apis.com` must migrate to REST or Tendermint RPC. | Explorer | https://seiscan.io | https://testnet.seiscan.io | | Faucet | N/A | https://atlantic-2.app.sei.io/faucet | diff --git a/skill/references/pointers/overview.md b/skill/references/pointers/overview.md index aca4ca7..dc834d8 100644 --- a/skill/references/pointers/overview.md +++ b/skill/references/pointers/overview.md @@ -26,70 +26,25 @@ Each smart contract is limited to **one** associated pointer contract. This: |---|---|---| | CW20 contract | ERC20 pointer | `CW20` | | CW721 contract | ERC721 pointer | `CW721` | +| CW1155 contract | ERC1155 pointer | `CW1155` | | Native denom (e.g., factory/...) | ERC20 pointer | `NATIVE` | -| ERC20 contract | CW20 pointer | `ERC20` | -| ERC721 contract | CW721 pointer | `ERC721` | -## Registering Pointers via CLI +> **EVM pointer creation is retired.** The EVM pointer precompile (`0x…100b`) is retired and EVM pointer creation is now disabled. Any transaction that previously created a pointer now reverts with `pointer precompile is retired; EVM pointer creation is disabled`. None of the directions in this table can be registered any more — in either direction. Pointers (and CW wrappers) registered before the retirement remain live and readable: their registry entries, versions, and queries are unchanged, and `AssociateContractAddress` still gives them an EVM address. -```bash -# Register an ERC20 pointer for a CW20 contract -seid tx evm register-evm-pointer CW20 \ - --from \ - --chain-id atlantic-2 \ - --node https://rpc-testnet.sei-apis.com \ - --fees 40000usei - -# Register an ERC721 pointer for a CW721 contract -seid tx evm register-evm-pointer CW721 \ - --from \ - --chain-id atlantic-2 \ - --node https://rpc-testnet.sei-apis.com \ - --fees 40000usei - -# Register an ERC20 pointer for a native denom (e.g., factory/sei1.../mytoken) -seid tx evm register-evm-pointer NATIVE \ - --from \ - --chain-id atlantic-2 \ - --node https://rpc-testnet.sei-apis.com \ - --fees 40000usei - -# Register a CW20 pointer for an ERC20 contract -seid tx evm register-cosmos-pointer ERC20 \ - --from \ - --chain-id atlantic-2 \ - --node https://rpc-testnet.sei-apis.com \ - --fees 40000usei -``` - -## Registering Pointers via Solidity - -For programmatic registration (e.g., in a factory contract): +> **ERC→CW pointers are also retired.** ERC20/721/1155 tokens could once be given a CosmWasm wrapper (CW20/CW721/CW1155) via `MsgRegisterPointer`. That handler now always returns `ErrRegisterPointerDeprecated`, and the wrapper wasm is no longer shipped. -```solidity -pragma solidity ^0.8.28; +## Registering Pointers — Removed -interface IPointer { - // The ABI marks these payable, but a non-zero msg.value reverts. - function addNativePointer(string memory token) external returns (address ret); - function addCW20Pointer(string memory cwAddr) external returns (address ret); - function addCW721Pointer(string memory cwAddr) external returns (address ret); - function addCW1155Pointer(string memory cwAddr) external returns (address ret); -} - -contract TokenFactory { - address constant POINTER = 0x000000000000000000000000000000000000100B; +Pointer registration is no longer possible. The following have all been removed: - function createTokenWithPointer(string memory denom) external { - // Register ERC20 pointer for an existing native denom. The denom must have bank - // metadata; otherwise its pointer can only be set by governance proposal. - address pointerAddr = IPointer(POINTER).addNativePointer(denom); - emit PointerCreated(denom, pointerAddr); - } +- The `seid tx evm register-evm-pointer CW20|CW721|CW1155|NATIVE ` CLI command. +- The `seid tx evm call-precompile pointer addNativePointer ` CLI path. +- The `seid tx evm add-cw-erc20-pointer ...` governance-proposal CLI command. +- All pointer-related governance proposal types (`AddERCNativePointer`, `AddERCCW20/721/1155Pointer`, `AddCWERC20/721/1155Pointer`, `AddERCNativePointerProposalV2`) — submission and execution both refuse with `pointer governance proposals are deprecated`. +- The pointer precompile creation methods (`addNativePointer`, `addCW20Pointer`, `addCW721Pointer`, `addCW1155Pointer`) at `0x…100b` — the address stays registered with its ABI so the selectors still decode, but every call reverts with `pointer precompile is retired; EVM pointer creation is disabled`. +- The built-in pointer Solidity contract sources (`CW20ERC20Pointer`, `CW721ERC721Pointer`, `CW1155ERC1155Pointer`, `NativeSeiTokensERC20`) and their precompile interfaces. - event PointerCreated(string denom, address pointer); -} -``` +There is no supported way to create a new pointer of any kind. Do not call the removed CLI commands or the precompile `add*` methods — they will fail. Only querying existing pointers (below) still works. ## Querying Existing Pointers diff --git a/skill/references/pointers/token-factory.md b/skill/references/pointers/token-factory.md index 52488c2..9bd91a9 100644 --- a/skill/references/pointers/token-factory.md +++ b/skill/references/pointers/token-factory.md @@ -86,37 +86,36 @@ seid tx bank set-denom-metadata \ --fees 20000usei ``` -## Register an ERC20 Pointer (Make Token Visible in MetaMask) +## ERC20 Pointer Creation Is Disabled -After creating your native token, register an ERC20 pointer so EVM wallets can see and interact with it: +EVM pointer creation has been retired. The `seid tx evm register-evm-pointer NATIVE ...` command has been removed, and any transaction that attempts to create a pointer (including via the pointer precompile at `0x000000000000000000000000000000000000100b`) now reverts with: -```bash -seid tx evm register-evm-pointer NATIVE factory/sei1abc.../MYTOKEN \ - --from \ - --chain-id atlantic-2 \ - --node https://rpc-testnet.sei-apis.com \ - --fees 40000usei +``` +pointer precompile is retired; EVM pointer creation is disabled ``` -This creates an ERC20 contract at a deterministic address that MetaMask and other EVM wallets recognize. Users can: -- View the token balance in MetaMask -- Send/receive via standard ERC20 `transfer()` -- Use in any ERC20-compatible DeFi protocol +You can no longer register a new ERC20 pointer for a native TokenFactory denom. Pointers that were registered before the retirement remain live and readable — their registry entries, versions, and lookups are unchanged — but no new pointer of any kind can be created, and existing pointer versions can no longer be advanced. -## Query Pointer Address +The following have all been removed: +- `seid tx evm register-evm-pointer CW20|CW721|CW1155|NATIVE ` +- `seid tx evm call-precompile pointer addNativePointer ` +- `seid tx evm add-cw-erc20-pointer ...` (governance proposal) +- `seid query evm pointer NATIVE|CW20|CW721|CW1155 ` +- The pointer governance proposal types (`AddERCNativePointer`, `AddERCCW20/721/1155Pointer`, `AddCWERC20/721/1155Pointer`, `AddERCNativePointerProposalV2`), which now refuse both submission and execution. -```bash -# Get the ERC20 pointer address for your native token -seid q evm pointer NATIVE factory/sei1abc.../MYTOKEN \ - --node https://rpc-testnet.sei-apis.com -``` +## Query an Existing Pointer Address + +The `seid query evm pointer` CLI command has been removed. Read a previously registered pointer through the PointerView precompile instead (lookups never revert — an unregistered denom returns `(0x0, 0, false)`): -Or via the PointerView precompile: ```typescript const [pointerAddress, version, exists] = await pointerView.getNativePointer( "factory/sei1abc.../MYTOKEN" ); -console.log("ERC20 pointer at:", pointerAddress); +if (exists) { + console.log("ERC20 pointer at:", pointerAddress); +} else { + console.log("No pointer registered for this denom (creation is disabled)."); +} ``` diff --git a/skill/references/precompiles/auth-authz-and-query-precompiles.md b/skill/references/precompiles/auth-authz-and-query-precompiles.md index 10fe538..0582340 100644 --- a/skill/references/precompiles/auth-authz-and-query-precompiles.md +++ b/skill/references/precompiles/auth-authz-and-query-precompiles.md @@ -72,7 +72,6 @@ Interface `IUpgrade`. Methods: - `currentPlan()` → `Plan{string name, int64 height, string info}` — returns a zero-valued plan when none is scheduled. - `appliedPlan(string name)` → `int64 height` — block height the named upgrade was applied, `0` if never applied (no error). -- `upgradedConsensusState(int64 lastHeight)` → `bytes consensusState` — empty bytes if none stored (no error). - `moduleVersions(string moduleName)` → `ModuleVersion[]{string name, uint64 version}` — empty `moduleName` returns all modules; a specific name returns one entry and reverts if the module is unknown. ## Example (ethers.js v6) diff --git a/skill/references/precompiles/cosmwasm-bridge.md b/skill/references/precompiles/cosmwasm-bridge.md index 603621b..0217915 100644 --- a/skill/references/precompiles/cosmwasm-bridge.md +++ b/skill/references/precompiles/cosmwasm-bridge.md @@ -229,7 +229,7 @@ interface ICosmWasm { } ``` -`execute_batch` is still in the ABI but has been disabled since v6.7 ([sei-chain#4074](https://github.com/sei-protocol/sei-chain/pull/4074)); calls revert with `wasmd execute_batch is disabled`. Use one `execute` call per message. +`execute_batch` is still in the ABI but has been disabled ([sei-chain#4066](https://github.com/sei-protocol/sei-chain/pull/4066)); calls revert with `wasmd execute_batch is disabled`. Use one `execute` call per message. --- @@ -245,26 +245,32 @@ To move native SEI, factory tokens, or existing `ibc/...` denoms between the EVM ## Pointer Precompile (`0x100B`) -Register pointer contracts to bridge EVM ↔ Cosmos tokens. See [pointers/overview.md](../pointers/overview.md) for the full workflow. +**This precompile is retired — EVM pointer creation is disabled.** The precompile stays registered at `0x100B` with its original ABI so the four creation selectors still decode, but every call reverts with `pointer precompile is retired; EVM pointer creation is disabled`. No pointer of any kind can be created. See [pointers/overview.md](../pointers/overview.md) for context. ```solidity interface IPointer { - // Create an ERC20 pointer for a CW20 contract + // ALL of these now revert with: + // "pointer precompile is retired; EVM pointer creation is disabled" function addCW20Pointer(string memory cwAddr) external returns (address ret); - - // Create an ERC721 pointer for a CW721 contract function addCW721Pointer(string memory cwAddr) external returns (address ret); - - // Create an ERC1155 pointer for a CW1155 contract function addCW1155Pointer(string memory cwAddr) external returns (address ret); - - // Create an ERC20 pointer for a native Cosmos denom (the denom must have bank metadata; - // otherwise its pointer can only be set by governance proposal) function addNativePointer(string memory token) external returns (address ret); } ``` -The ABI marks these methods `payable`, but every one rejects a non-zero `msg.value`. The precompile only creates EVM-side pointers; there are no `register*` methods and no ERC20→CW20 / ERC721→CW721 registration through it. +These methods formerly created EVM-side pointers (ERC pointers for CW tokens, plus native-denom pointers); they no longer do. Transactions that previously created pointers now revert. + +All associated tooling has been removed as well: + +- The `seid tx evm register-evm-pointer CW20|CW721|CW1155|NATIVE ` CLI subcommand is removed. +- The `seid tx evm call-precompile pointer addNativePointer ` path is removed. +- The `seid query evm pointer NATIVE|CW20|CW721|CW1155 ` query commands are removed. +- The `seid tx evm add-cw-erc20-pointer ...` governance proposal command is removed, along with all pointer-related governance proposal types (`AddERCNativePointer`, `AddERCCW20/721/1155Pointer`, `AddCWERC20/721/1155Pointer`, `AddERCNativePointerProposalV2`). Those proposal types still decode (gov keeps a proposal in state once its vote has ended) but every one refuses both submission and execution with `pointer governance proposals are deprecated`. +- The built-in pointer Solidity contracts (`CW20ERC20Pointer`, `CW721ERC721Pointer`, `CW1155ERC1155Pointer`, `NativeSeiTokensERC20`) and their precompile interfaces have been removed from the contracts source. + +The reverse direction — creating a CosmWasm wrapper (CW20/CW721/CW1155) around an ERC20/721/1155 token — was already retired: the `MsgRegisterPointer` handler always fails with `ErrRegisterPointerDeprecated` (`MsgRegisterPointer is deprecated`). + +**Pointers registered before the retirement remain live and readable** — their registry entries, versions, and queries are unchanged, `AssociateContractAddress` still gives such a wrapper an EVM address, and the PointerView precompile (`0x100A`) still returns them — but no new ones of any kind can be created. --- diff --git a/skill/references/precompiles/overview.md b/skill/references/precompiles/overview.md index 9d3a903..cc8cc35 100644 --- a/skill/references/precompiles/overview.md +++ b/skill/references/precompiles/overview.md @@ -18,10 +18,10 @@ Precompiles are fixed-address contracts deployed by the Sei protocol that expose | Staking | `0x0000000000000000000000000000000000001005` | Delegate/undelegate/redelegate SEI | | Governance | `0x0000000000000000000000000000000000001006` | Vote, submit proposals, deposit | | Distribution | `0x0000000000000000000000000000000000001007` | Claim staking rewards | -| Oracle | `0x0000000000000000000000000000000000001008` | ❌ Retired (shut off July 2026) — queries revert; use a third-party oracle | +| Oracle | `0x0000000000000000000000000000000000001008` | ❌ Dead — the underlying oracle module was removed at the v6.8 upgrade (sei-chain#4319): its store, keeper, gRPC/REST endpoints, CLI (`seid q oracle …` → `unknown command "oracle"`), and the CosmWasm `oracle` query route are all gone. Oracle data is no longer served on-chain; use a third-party oracle | | IBC | `0x0000000000000000000000000000000000001009` | **Do not use** — IBC is disabled in both directions; `transfer` cannot succeed | | PointerView | `0x000000000000000000000000000000000000100A` | Query pointer registrations | -| Pointer | `0x000000000000000000000000000000000000100B` | Register pointer contracts | +| Pointer | `0x000000000000000000000000000000000000100B` | ❌ Retired — EVM pointer creation is disabled; `addNativePointer`/`addCW20Pointer`/`addCW721Pointer`/`addCW1155Pointer` all revert with `pointer precompile is retired; EVM pointer creation is disabled` | | Solo | `0x000000000000000000000000000000000000100C` | Claim/migrate legacy CW20 and CW721 tokens to EVM | | Auth | `0x000000000000000000000000000000000000100D` | Query accounts, account numbers, auth params (v6.7+) | | Authz | `0x000000000000000000000000000000000000100E` | Query authz grants (v6.7+) | diff --git a/skill/references/precompiles/staking-distribution.md b/skill/references/precompiles/staking-distribution.md index 71f9ea4..9115128 100644 --- a/skill/references/precompiles/staking-distribution.md +++ b/skill/references/precompiles/staking-distribution.md @@ -98,6 +98,45 @@ function redelegateWithAuthorization( The full interface (also `validator`, `validatorDelegations`, `unbondingDelegation`, `redelegations`, `historicalInfo`, `pool`, `params`, `createValidator`, `editValidator`) is in sei-chain at `precompiles/staking/Staking.sol`. + +> **Query methods run on a branched context.** Like the Distribution query methods, every non-transaction (view) method on the Staking precompile now runs on a cache context, so any incidental state writes (e.g. `pool` creating a missing module account) are discarded and never persisted (sei-chain#3767). +> +> **`redelegations` filter constraint.** `redelegations(delegator, srcValidator, dstValidator, nextKey)` only accepts three filter combinations; any other combination reverts with `"unsupported redelegations filter"`: +> - `delegator`, `srcValidator` and `dstValidator` all set +> - `srcValidator` alone (`delegator` and `dstValidator` empty) +> - `delegator` alone (`srcValidator` and `dstValidator` empty) +> +> In particular `delegator`+`srcValidator` (without `dstValidator`), `delegator`+`dstValidator`, `dstValidator` alone, and no filter at all all revert. + + + + +### Redelegations Query — Supported Filters + +```solidity +// Get redelegations (paginated). The filter arguments are validated: only certain +// combinations are honoured by the staking querier; any other combination reverts +// with "unsupported redelegations filter". +function redelegations( + string memory delegator, // delegator address, or "" when filtering by srcValidator alone + string memory srcValidator, // source validator, or "" when filtering by delegator alone + string memory dstValidator, // destination validator, set only together with delegator and srcValidator + bytes memory nextKey +) external view returns (RedelegationsResponse memory response); +``` + +Exactly one of these combinations is permitted; anything else reverts with `unsupported redelegations filter`: + +| delegator | srcValidator | dstValidator | Result | +|---|---|---|---| +| set | set | set | OK — redelegations from src to dst for that delegator | +| empty | set | empty | OK — all redelegations from that source validator | +| set | empty | empty | OK — all redelegations of that delegator | +| any other combination | | | reverts: `unsupported redelegations filter` | + +For example, delegator + srcValidator (without dstValidator), delegator + dstValidator, dstValidator alone, or no filter at all all revert. + + ### Events ```solidity