Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Upgrade guide
* **WebSocket frame size default drops from 10 MiB to 5 MiB.** Before this release, :8546 used a hardcoded 10 MiB frame cap. Both HTTP and WebSocket now share `[evm].max_request_body_bytes`, whose default is 5 MiB (`5242880`). WS clients that send frames in the 5-10 MiB range (large `eth_sendRawTransaction` batches, wide filter payloads, etc.) will be disconnected after upgrade unless the limit is raised. **Operators who relied on the old 10 MiB WS cap should set `max_request_body_bytes = 10485760` in `app.toml` before upgrading.** This also raises the HTTP body limit to 10 MiB. The exported `DefaultWebsocketMaxMessageSize` constant was removed; use the config knob instead.
* [#3927](https://github.com/sei-protocol/sei-chain/pull/3927) **Legacy Sei JSON-RPC and CLI removal.** Removes `sei_associate`, `sei_getBlockByHash`, `sei_getBlockByHashExcludeTraceFail`, `sei_getBlockTransactionCountByHash`, `sei_getBlockTransactionCountByNumber`, `sei_getEvmTx`, `sei_getFilterChanges`, `sei_getFilterLogs`, `sei_getLogs`, `sei_getTransactionByBlockHashAndIndex`, `sei_getTransactionByBlockNumberAndIndex`, `sei_getTransactionByHash`, `sei_getTransactionCount`, `sei_getTransactionErrorByHash`, `sei_getTransactionReceiptExcludeTraceFail`, `sei_getVMError`, `sei_newBlockFilter`, `sei_newFilter`, `sei_sign`, and `sei_uninstallFilter`. Use standard `eth_*` methods for EVM-originated data and `seid tx evm native-associate <custom-message> -y` for address association. There is no block- or filter-level replacement for discovering Cosmos-originated synthetic logs; clients that know the synthetic transaction hash can enable `sei_getTransactionReceipt`.

## v6.6
sei-chain
Expand Down
4 changes: 0 additions & 4 deletions contracts/test/CW20toERC20PointerTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,6 @@ describe("CW20 to ERC20 Pointer", function () {
const ethlogs = await ethers.provider.send('eth_getLogs', [filter]);
expect(ethlogs.length).to.equal(0);

// send via sei_ endpoint - synthetic event shows up
const seilogs = await ethers.provider.send('sei_getLogs', [filter]);
expect(seilogs.length).to.equal(1);
expect(seilogs[0]["topics"][0]).to.equal(ethers.id("Transfer(address,address,uint256)"));
const respAfter = await queryWasm(pointer, "balance", {address: accounts[1].seiAddress});
const balanceAfter = respAfter.data.balance;
expect(balanceAfter).to.equal((parseInt(balanceBefore) + 100).toString());
Expand Down
17 changes: 5 additions & 12 deletions contracts/test/ERC20toCW20PointerTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,7 @@ describe("ERC20 to CW20 Pointer", function () {
const ethlogs = await ethers.provider.send('eth_getLogs', [filter]);
expect(ethlogs.length).to.equal(1);

// send via sei_ endpoint - synthetic event also shows up
const seilogs = await ethers.provider.send('sei_getLogs', [filter]);
expect(seilogs.length).to.equal(1);

seilogs.forEach(async (log) => {
ethlogs.forEach(async (log) => {
expect(log["address"].toLowerCase()).to.equal((await pointer.getAddress()).toLowerCase());
expect(log["topics"][0]).to.equal(ethers.id("Transfer(address,address,uint256)"));
expect(log["topics"][1].substring(26)).to.equal(sender.evmAddress.substring(2).toLowerCase());
Expand Down Expand Up @@ -177,13 +173,10 @@ describe("ERC20 to CW20 Pointer", function () {
const ethlogs = await ethers.provider.send('eth_getLogs', [filter]);
expect(ethlogs.length).to.equal(1);

// sei_ includes synthetic logs -> expect 1
const seilogs = await ethers.provider.send('sei_getLogs', [filter]);
expect(seilogs.length).to.equal(1);
expect(seilogs[0]["address"].toLowerCase()).to.equal((await pointer.getAddress()).toLowerCase());
expect(seilogs[0]["topics"][0]).to.equal(ethers.id("Approval(address,address,uint256)"));
expect(seilogs[0]["topics"][1].substring(26)).to.equal(owner.substring(2).toLowerCase());
expect(seilogs[0]["topics"][2].substring(26)).to.equal(spender.substring(2).toLowerCase());
expect(ethlogs[0]["address"].toLowerCase()).to.equal((await pointer.getAddress()).toLowerCase());
expect(ethlogs[0]["topics"][0]).to.equal(ethers.id("Approval(address,address,uint256)"));
expect(ethlogs[0]["topics"][1].substring(26)).to.equal(owner.substring(2).toLowerCase());
expect(ethlogs[0]["topics"][2].substring(26)).to.equal(spender.substring(2).toLowerCase());
});

it("should lower approval", async function () {
Expand Down
10 changes: 2 additions & 8 deletions contracts/test/ERC721toCW721PointerTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,7 @@ describe("ERC721 to CW721 Pointer", function () {
const ethlogs = await ethers.provider.send('eth_getLogs', [filter]);
expect(ethlogs.length).to.equal(1);

// send via sei_ endpoint - synthetic event shows up
const seilogs = await ethers.provider.send('sei_getLogs', [filter]);
expect(seilogs.length).to.equal(1);

seilogs.forEach(async (log) => {
ethlogs.forEach(async (log) => {
expect(log["address"].toLowerCase()).to.equal((await pointer.getAddress()).toLowerCase());
expect(log["topics"][0]).to.equal(ethers.id("Transfer(address,address,uint256)"));
expect(log["topics"][1].substring(26)).to.equal(accounts[0].evmAddress.substring(2).toLowerCase());
Expand All @@ -132,9 +128,7 @@ describe("ERC721 to CW721 Pointer", function () {
// send via eth_ endpoint
const ethlogs = await ethers.provider.send('eth_getLogs', [filter]);
expect(ethlogs.length).to.equal(1);
const seilogs = await ethers.provider.send('sei_getLogs', [filter]);
expect(seilogs.length).to.equal(1);
seilogs.forEach(async (log) => {
ethlogs.forEach(async (log) => {
expect(log["address"].toLowerCase()).to.equal((await pointerAcc1.getAddress()).toLowerCase());
expect(log["topics"][0]).to.equal(ethers.id("Transfer(address,address,uint256)"));
expect(log["topics"][1].substring(26)).to.equal(accounts[1].evmAddress.substring(2).toLowerCase());
Expand Down
48 changes: 0 additions & 48 deletions contracts/test/SeiEndpointsTest.js

This file was deleted.

12 changes: 2 additions & 10 deletions contracts/test/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,6 @@ async function getCosmosTx(provider, evmTxHash) {
return await provider.send("sei_getCosmosTx", [evmTxHash])
}

async function getEvmTx(provider, cosmosTxHash) {
return await provider.send("sei_getEvmTx", [cosmosTxHash])
}

async function fundAddress(addr, amount="1000000000000000000000") {
return await evmSend(addr, adminKeyName, amount)
}
Expand Down Expand Up @@ -306,10 +302,7 @@ async function waitForProposalStatus(
async function associateKey(keyName) {
try {
const seiAddress = await getKeySeiAddress(keyName)
// seid tx evm associate-address has a custom (non-cosmos-JSON) output
// format. The try/catch already tolerates failure here, and subsequent
// associate calls will succeed once the chain catches up.
await execute(`seid tx evm associate-address --from ${keyName} -b sync`)
await execute(`seid tx evm native-associate integration-test --from ${keyName} -b sync -y`)
Comment thread
masih marked this conversation as resolved.
await waitForCondition(
async () => (await getEvmAddressAssociation(seiAddress)).associated === true,
`${seiAddress} to have an associated EVM address`,
Expand All @@ -323,7 +316,7 @@ async function associateKey(keyName) {
// Strict helper for tests that are explicitly asserting association behavior.
async function associateKeyStrict(keyName) {
const seiAddress = await getKeySeiAddress(keyName)
await execute(`seid tx evm associate-address --from ${keyName} -b sync`)
await execute(`seid tx evm native-associate integration-test --from ${keyName} -b sync -y`)
await waitForCondition(
async () => (await getEvmAddressAssociation(seiAddress)).associated === true,
`${seiAddress} to have an associated EVM address`,
Expand Down Expand Up @@ -1211,7 +1204,6 @@ module.exports = {
evmSend,
waitForReceipt,
getCosmosTx,
getEvmTx,
isDocker,
testAPIEnabled,
incrementPointerVersion,
Expand Down
25 changes: 2 additions & 23 deletions docker/localnode/config/app.toml
Original file line number Diff line number Diff line change
Expand Up @@ -285,34 +285,13 @@ trace_allow_js_tracers = false
# Legacy sei_* JSON-RPC (EVM HTTP only).
# DEPRECATION: All sei_* methods are deprecated and scheduled for removal - no new integrations.
# HTTP 200; gate errors: JSON-RPC error (data legacy_sei_deprecated). Success: unchanged body; optional header Sei-Legacy-RPC-Deprecation.
# Docker localnet enables every gated method except sei_sign (integration tests assert the
# disabled-method path; sei_sign is not in partner telemetry and has no rpc_io_test fixtures).
# Production defaults from seid init remain the three-method sei_* allowlist - see evmrpc/config.
# Docker localnet enables every remaining gated method. Production defaults from seid init
# remain the three-method address/Cosmos allowlist - see evmrpc/config.
enabled_legacy_sei_apis = [
# "sei_sign",
"sei_associate",
"sei_getBlockByHash",
"sei_getBlockByHashExcludeTraceFail",
"sei_getBlockTransactionCountByHash",
"sei_getBlockTransactionCountByNumber",
"sei_getCosmosTx",
"sei_getEVMAddress",
"sei_getEvmTx",
"sei_getFilterChanges",
"sei_getFilterLogs",
"sei_getLogs",
"sei_getSeiAddress",
"sei_getTransactionByBlockHashAndIndex",
"sei_getTransactionByBlockNumberAndIndex",
"sei_getTransactionByHash",
"sei_getTransactionCount",
"sei_getTransactionErrorByHash",
"sei_getTransactionReceipt",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be removed as well?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup follow up PR will do that. I have another one brewing

"sei_getTransactionReceiptExcludeTraceFail",
"sei_getVMError",
"sei_newBlockFilter",
"sei_newFilter",
"sei_uninstallFilter",
]

###############################################################################
Expand Down
22 changes: 1 addition & 21 deletions docker/rpcnode/config/app.toml
Original file line number Diff line number Diff line change
Expand Up @@ -273,30 +273,10 @@ trace_allow_js_tracers = false
# Legacy sei_* JSON-RPC (EVM HTTP only).
# DEPRECATION: All sei_* methods are deprecated and scheduled for removal - no new integrations.
# HTTP 200; gate errors: JSON-RPC error (data legacy_sei_deprecated). Success: unchanged body; optional header Sei-Legacy-RPC-Deprecation.
# Same allowlist as docker/localnode (all gated methods except sei_sign for integration coverage).
# Same allowlist as docker/localnode (all remaining gated methods).
enabled_legacy_sei_apis = [
# "sei_sign"
"sei_associate",
"sei_getBlockByHash",
"sei_getBlockByHashExcludeTraceFail",
"sei_getBlockTransactionCountByHash",
"sei_getBlockTransactionCountByNumber",
"sei_getCosmosTx",
"sei_getEVMAddress",
"sei_getEvmTx",
"sei_getFilterChanges",
"sei_getFilterLogs",
"sei_getLogs",
"sei_getSeiAddress",
"sei_getTransactionByBlockHashAndIndex",
"sei_getTransactionByBlockNumberAndIndex",
"sei_getTransactionByHash",
"sei_getTransactionCount",
"sei_getTransactionErrorByHash",
"sei_getTransactionReceipt",
"sei_getTransactionReceiptExcludeTraceFail",
"sei_getVMError",
"sei_newBlockFilter",
"sei_newFilter",
"sei_uninstallFilter",
]
4 changes: 2 additions & 2 deletions evmrpc/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ EVM RPCs prefixed by `eth_` and `debug_` on Sei generally follows [Ethereum's sp
- `eth_syncing`

## `sei_` prefixed endpoints
Several `eth_` prefixed endpoints have a `sei_` prefixed counterpart. `eth_` endpoints only have visibility into EVM transactions, whereas `sei_` endpoints have visibility into EVM transactions plus Cosmos transactions that have synthetic EVM receipts.
The legacy `sei_` namespace contains address/Cosmos transaction helpers and a synthetic-aware transaction receipt method.

Legacy **`sei_*`** JSON-RPC (EVM HTTP only) are **gated** by the `[evm].enabled_legacy_sei_apis` list in `app.toml` (after `deny_list`). Enforcement is **centralized** in `wrapSeiLegacyHTTP` (see `sei_legacy_http.go`): it inspects the JSON-RPC `method` field only. Wired from `HTTPServer.EnableRPC` via `HTTPConfig.SeiLegacyAllowlist` — handlers do not duplicate gate logic. The surface is **deprecated** and scheduled for removal; **only methods named in that array** are allowed. `seid init` / `DefaultConfig` pre-fill the three `sei_*` address/Cosmos helpers; other gated methods appear **commented** in the generated template. **Docker localnet** (`docker/localnode/config/app.toml`) enables **all remaining** gated methods except **`sei_sign`**. **HTTP 200** for all responses. **Disabled** methods return JSON-RPC `error` code `-32601`, `message` explains not enabled + deprecated, `data` `"legacy_sei_deprecated"`. **Allowed** single-object bodies pass through **unchanged**; JSON **batches** may be subset-forwarded with responses merged by `id` (for requests that include `id`). Per JSON-RPC 2.0, **notifications** (no `id` in the request) do not produce entries in the batch response array, so the merged array is **not** 1:1 with the request batch when notifications are present; if nothing would be returned, the gateway sends an **empty HTTP body** (not `[]`). Optional deprecation signal: HTTP header `Sei-Legacy-RPC-Deprecation` (`SeiLegacyDeprecationHTTPHeader` in `sei_legacy.go`). Coverage: `evmrpc/sei_legacy_test.go` and `integration_test/evm_module/rpc_io_test/testdata/sei_legacy_deprecation/*.iox`.
Legacy **`sei_*`** JSON-RPC (EVM HTTP only) are **gated** by the `[evm].enabled_legacy_sei_apis` list in `app.toml` (after `deny_list`). Enforcement is **centralized** in `wrapSeiLegacyHTTP` (see `sei_legacy_http.go`): it inspects the JSON-RPC `method` field only. Wired from `HTTPServer.EnableRPC` via `HTTPConfig.SeiLegacyAllowlist` — handlers do not duplicate gate logic. The surface is **deprecated** and scheduled for removal; **only methods named in that array** are allowed. `seid init` / `DefaultConfig` pre-fill the three `sei_*` address/Cosmos helpers; the receipt method appears **commented** in the generated template. **Docker localnet** (`docker/localnode/config/app.toml`) enables **all remaining** gated methods. **HTTP 200** for all responses. **Disabled** methods return JSON-RPC `error` code `-32601`, `message` explains not enabled + deprecated, `data` `"legacy_sei_deprecated"`. **Allowed** single-object bodies pass through **unchanged**; JSON **batches** may be subset-forwarded with responses merged by `id` (for requests that include `id`). Per JSON-RPC 2.0, **notifications** (no `id` in the request) do not produce entries in the batch response array, so the merged array is **not** 1:1 with the request batch when notifications are present; if nothing would be returned, the gateway sends an **empty HTTP body** (not `[]`). Optional deprecation signal: HTTP header `Sei-Legacy-RPC-Deprecation` (`SeiLegacyDeprecationHTTPHeader` in `sei_legacy.go`). Coverage: `evmrpc/sei_legacy_test.go` and `integration_test/evm_module/rpc_io_test/testdata/sei_legacy_deprecation/*.iox`.

## `debug_` prefixed endpoints
`debug_trace*` endpoints should faithfully replay historical execution. If a transaction encountered an error during its actual execution, a `debug_trace*` call for it should reflect so. If a transction consumed X amount of gas during its actual execution, a `debug_trace*` call should show that exact amount as well.
Expand Down
Loading
Loading