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/
* [#3984](https://github.com/sei-protocol/sei-chain/pull/3984) feat(query): origin-aware pagination limits for ABCI queries. Untrusted callers on the ABCI/gRPC query path get configurable `max-limit`, `max-offset`, and flat `max-iterations` (defaults: 1000 / 10000 / 11000); requests above the caps are rejected upfront, and an exhausted iteration budget returns a partial page with `next_key` instead of failing. Trusted origins (new `[query] trusted-cidrs`) and the `[query] disable-limits` kill switch bypass the caps; the consensus/EVM precompile path is unaffected.

### Upgrade guide
* **IBC transfer removal.** Removes ICS-20 execution, module APIs, CLI commands, CosmWasm transfer messages, transfer codecs, and transfer keeper integration, including the IBC EVM precompile's keeper injection. The transfer store and module account remain materialized for state compatibility. Transfer queries, historical transfer transaction decoding, and pre-v6.7 IBC precompile tracing must be served by v6.6 freeze nodes; v6.7 nodes do not provide them.
* **Capability removal.** Removes the capability module and its IBC, transfer, and CosmWasm integrations. The capability store remains mounted for historical state access in freeze mode.
* [#3958](https://github.com/sei-protocol/sei-chain/pull/3958) **Feegrant removal.** Removes feegrant execution, module APIs, and the unreleased feegrant EVM precompile. The feegrant store remains mounted for historical state access. Transactions with a fee granter different from the payer are rejected.
* **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.
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
Sei is the fastest general purpose L1 blockchain and the first parallelized EVM. This allows Sei to get the best of Solana and Ethereum - a hyper optimized execution layer that benefits from the tooling and mindshare around the EVM.

# Overview
**Sei** is a high-performance, low-fee, delegated proof-of-stake blockchain designed for developers. It supports optimistic parallel execution of both EVM and CosmWasm, opening up new design possibilities. With unique optimizations like twin turbo consensus and SeiDB, Sei ensures consistent 400ms block times and a transaction throughput that’s orders of magnitude higher than Ethereum. This means faster, more cost-effective operations. Plus, Sei’s seamless interoperability between EVM and CosmWasm gives developers native access to the entire Cosmos ecosystem, including IBC tokens, multi-sig accounts, and more.
**Sei** is a high-performance, low-fee, delegated proof-of-stake blockchain designed for developers. It supports optimistic parallel execution of both EVM and CosmWasm, opening up new design possibilities. With unique optimizations like twin turbo consensus and SeiDB, Sei ensures consistent 400ms block times and a transaction throughput that’s orders of magnitude higher than Ethereum. This means faster, more cost-effective operations. Plus, Sei’s seamless interoperability between EVM and CosmWasm gives developers native access to multi-sig accounts and more.

# Documentation
For the most up to date documentation please visit https://www.docs.sei.io/

Developer reference in this repo: [EVM JSON-RPC explicitly unsupported methods](docs/evm_jsonrpc_unsupported.md) (methods that return `-32000` with a clear message).

Starting with v6.7, transfer queries, historical transfer transaction decoding, and pre-v6.7 IBC precompile tracing are not served by v6.7 nodes. Run a v6.6 freeze node to serve pre-v6.7 transfer history.

# Sei Optimizations
Sei introduces four major innovations:

Expand Down
46 changes: 14 additions & 32 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,6 @@ import (
gigautils "github.com/sei-protocol/sei-chain/giga/executor/utils"
"github.com/sei-protocol/sei-chain/precompiles"
putils "github.com/sei-protocol/sei-chain/precompiles/utils"
"github.com/sei-protocol/sei-chain/sei-ibc-go/modules/apps/transfer"
ibctransferkeeper "github.com/sei-protocol/sei-chain/sei-ibc-go/modules/apps/transfer/keeper"
ibctransfertypes "github.com/sei-protocol/sei-chain/sei-ibc-go/modules/apps/transfer/types"
ibc "github.com/sei-protocol/sei-chain/sei-ibc-go/modules/core"
ibcporttypes "github.com/sei-protocol/sei-chain/sei-ibc-go/modules/core/05-port/types"
ibchost "github.com/sei-protocol/sei-chain/sei-ibc-go/modules/core/24-host"
Expand Down Expand Up @@ -220,7 +217,6 @@ var (
ibc.AppModuleBasic{},
upgrade.AppModuleBasic{},
evidence.AppModuleBasic{},
transfer.AppModuleBasic{},
vesting.AppModuleBasic{},
oraclemodule.AppModuleBasic{},
evm.AppModuleBasic{},
Expand All @@ -238,7 +234,7 @@ var (
stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking},
stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking},
govtypes.ModuleName: {authtypes.Burner},
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
transferModuleName: {authtypes.Minter, authtypes.Burner},
oracletypes.ModuleName: nil,
wasm.ModuleName: {authtypes.Burner},
evmtypes.ModuleName: {authtypes.Minter, authtypes.Burner},
Expand All @@ -260,7 +256,7 @@ var (
authtypes.StoreKey, authzkeeper.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey,
minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey,
govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey, feegrantModuleName,
evidencetypes.StoreKey, ibctransfertypes.StoreKey, capabilityModuleName, oracletypes.StoreKey,
evidencetypes.StoreKey, transferModuleName, capabilityModuleName, oracletypes.StoreKey,
evmtypes.StoreKey, wasm.StoreKey,
epochmoduletypes.StoreKey,
tokenfactorytypes.StoreKey,
Expand Down Expand Up @@ -298,6 +294,7 @@ const (
MinGasEVMTx = 21000
capabilityModuleName = "capability"
feegrantModuleName = "feegrant"
transferModuleName = "transfer"

// NewHeadsNotifierCapacity bounds the in-process eth_newHeads
// notifier buffer. Capacity 1 pairs with the notifier's
Expand Down Expand Up @@ -395,7 +392,6 @@ type App struct {
ParamsKeeper paramskeeper.Keeper
IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
EvidenceKeeper evidencekeeper.Keeper
TransferKeeper ibctransferkeeper.Keeper
WasmKeeper wasm.Keeper
OracleKeeper oraclekeeper.Keeper
EvmKeeper evmkeeper.Keeper
Expand Down Expand Up @@ -591,20 +587,6 @@ func New(
appCodec, keys[ibchost.StoreKey], app.GetSubspace(ibchost.ModuleName), app.StakingKeeper, app.UpgradeKeeper,
)

// Create Transfer Keepers
app.TransferKeeper = ibctransferkeeper.NewKeeperWithAddressHandler(
appCodec,
keys[ibctransfertypes.StoreKey],
app.GetSubspace(ibctransfertypes.ModuleName),
app.IBCKeeper.ChannelKeeper,
app.IBCKeeper.ChannelKeeper,
app.AccountKeeper,
app.BankKeeper,
evmkeeper.NewEvmAddressHandler(&app.EvmKeeper),
)
transferModule := transfer.NewAppModule(app.TransferKeeper)
transferIBCModule := transfer.NewIBCModule(app.TransferKeeper)

// Create evidence Keeper for to register the IBC light client misbehaviour evidence route
evidenceKeeper := evidencekeeper.NewKeeper(
appCodec, keys[evidencetypes.StoreKey], &app.StakingKeeper, app.SlashingKeeper,
Expand Down Expand Up @@ -653,7 +635,6 @@ func New(
app.IBCKeeper.ChannelKeeper,
app.BankKeeper,
appCodec,
app.TransferKeeper,
&app.EvmKeeper,
app.StakingKeeper,
),
Expand All @@ -670,7 +651,6 @@ func New(
app.DistrKeeper,
app.IBCKeeper.ChannelKeeper,
app.UpgradeKeeper,
app.TransferKeeper,
app.MsgServiceRouter(),
app.GRPCQueryRouter(),
wasmDir,
Expand All @@ -692,7 +672,7 @@ func New(
}
app.EvmKeeper = *evmkeeper.NewKeeper(keys[evmtypes.StoreKey],
tkeys[evmtypes.TransientStoreKey], app.GetSubspace(evmtypes.ModuleName), app.receiptStore, app.BankKeeper,
&app.AccountKeeper, &app.StakingKeeper, app.TransferKeeper,
&app.AccountKeeper, &app.StakingKeeper,
wasmkeeper.NewDefaultPermissionKeeper(app.WasmKeeper), &app.WasmKeeper, &app.UpgradeKeeper)
app.BankKeeper.RegisterRecipientChecker(app.EvmKeeper.CanAddressReceive)

Expand Down Expand Up @@ -763,7 +743,7 @@ func New(

app.GigaEvmKeeper = *gigaevmkeeper.NewKeeper(keys[evmtypes.StoreKey],
tkeys[evmtypes.TransientStoreKey], app.GetSubspace(evmtypes.ModuleName), app.receiptStore, app.GigaBankKeeper,
&app.AccountKeeper, &app.StakingKeeper, app.TransferKeeper,
&app.AccountKeeper, &app.StakingKeeper,
wasmkeeper.NewDefaultPermissionKeeper(app.WasmKeeper), &app.WasmKeeper, &app.UpgradeKeeper)
app.GigaEvmKeeper.UseRegularStore = true
app.GigaBankKeeper.UseRegularStore = true
Expand Down Expand Up @@ -827,9 +807,8 @@ func New(

// this line is used by starport scaffolding # stargate/app/keeperDefinition

// Create static IBC router, add transfer route, then set and seal it
// Create the static IBC router, then set and seal it.
ibcRouter := ibcporttypes.NewRouter()
ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferIBCModule)
ibcRouter.AddRoute(wasm.ModuleName, wasm.NewIBCHandler(app.WasmKeeper, app.IBCKeeper.ChannelKeeper))
// this line is used by starport scaffolding # ibc/app/router
app.IBCKeeper.SetRouter(ibcRouter)
Expand Down Expand Up @@ -862,7 +841,6 @@ func New(
oraclemodule.NewAppModule(appCodec, app.OracleKeeper, app.AccountKeeper, app.BankKeeper),
wasm.NewAppModule(appCodec, &app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper),
evm.NewAppModule(appCodec, &app.EvmKeeper),
transferModule,
epochModule,
tokenfactorymodule.NewAppModule(app.TokenFactoryKeeper, app.AccountKeeper, app.BankKeeper),
authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry),
Expand Down Expand Up @@ -921,7 +899,6 @@ func New(
ibchost.ModuleName,
genutiltypes.ModuleName,
evidencetypes.ModuleName,
ibctransfertypes.ModuleName,
authz.ModuleName,
oracletypes.ModuleName,
tokenfactorytypes.ModuleName,
Expand Down Expand Up @@ -949,7 +926,6 @@ func New(
oraclemodule.NewAppModule(appCodec, app.OracleKeeper, app.AccountKeeper, app.BankKeeper),
wasm.NewAppModule(appCodec, &app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper),
ibc.NewAppModule(app.IBCKeeper),
transferModule,
epochModule,
tokenfactorymodule.NewAppModule(app.TokenFactoryKeeper, app.AccountKeeper, app.BankKeeper),
// this line is used by starport scaffolding # stargate/app/appModule
Expand Down Expand Up @@ -1200,7 +1176,14 @@ func (app *App) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.Res
}
}
app.UpgradeKeeper.SetModuleVersionMap(ctx, app.mm.GetVersionMap())
return app.mm.InitGenesis(ctx, app.appCodec, genesisState, app.genesisImportConfig)
response := app.mm.InitGenesis(ctx, app.appCodec, genesisState, app.genesisImportConfig)
app.initializeRetiredTransferModuleAccount(ctx)
return response
}

// initializeRetiredTransferModuleAccount materializes the retained transfer module account during genesis.
func (app *App) initializeRetiredTransferModuleAccount(ctx sdk.Context) {
app.AccountKeeper.GetModuleAccount(ctx, transferModuleName)
}

func (app *App) GetOptimisticProcessingInfo() OptimisticProcessingInfo {
Expand Down Expand Up @@ -2779,7 +2762,6 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(distrtypes.ModuleName)
paramsKeeper.Subspace(slashingtypes.ModuleName)
paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govtypes.ParamKeyTable())
paramsKeeper.Subspace(ibctransfertypes.ModuleName)
paramsKeeper.Subspace(ibchost.ModuleName)
paramsKeeper.Subspace(oracletypes.ModuleName)
paramsKeeper.Subspace(wasm.ModuleName)
Expand Down
12 changes: 0 additions & 12 deletions app/precompiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ type PrecompileKeepers struct {
putils.SlashingMsgServer
putils.SlashingQuerier
putils.UpgradeQuerier
putils.TransferKeeper
putils.ClientKeeper
putils.ConnectionKeeper
putils.ChannelKeeper
txConf client.TxConfig
cdc codec.Codec
}
Expand Down Expand Up @@ -71,10 +67,6 @@ func NewPrecompileKeepers(a *App) *PrecompileKeepers {
SlashingMsgServer: slashingkeeper.NewMsgServerImpl(a.SlashingKeeper),
SlashingQuerier: a.SlashingKeeper,
UpgradeQuerier: a.UpgradeKeeper,
TransferKeeper: a.TransferKeeper,
ClientKeeper: a.IBCKeeper.ClientKeeper,
ConnectionKeeper: a.IBCKeeper.ConnectionKeeper,
ChannelKeeper: a.IBCKeeper.ChannelKeeper,
txConf: a.GetTxConfig(),
cdc: a.appCodec,
}
Expand Down Expand Up @@ -106,9 +98,5 @@ func (pk *PrecompileKeepers) ParamsQ() putils.ParamsQuerier { return pk.P
func (pk *PrecompileKeepers) SlashingMS() putils.SlashingMsgServer { return pk.SlashingMsgServer }
func (pk *PrecompileKeepers) SlashingQ() putils.SlashingQuerier { return pk.SlashingQuerier }
func (pk *PrecompileKeepers) UpgradeQ() putils.UpgradeQuerier { return pk.UpgradeQuerier }
func (pk *PrecompileKeepers) TransferK() putils.TransferKeeper { return pk.TransferKeeper }
func (pk *PrecompileKeepers) ClientK() putils.ClientKeeper { return pk.ClientKeeper }
func (pk *PrecompileKeepers) ConnectionK() putils.ConnectionKeeper { return pk.ConnectionKeeper }
func (pk *PrecompileKeepers) ChannelK() putils.ChannelKeeper { return pk.ChannelKeeper }
func (pk *PrecompileKeepers) TxConfig() client.TxConfig { return pk.txConf }
func (pk *PrecompileKeepers) Codec() codec.Codec { return pk.cdc }
22 changes: 22 additions & 0 deletions app/store_keys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package app
import (
"testing"

authtypes "github.com/sei-protocol/sei-chain/sei-cosmos/x/auth/types"
"github.com/sei-protocol/sei-chain/sei-db/common/keys"
tmproto "github.com/sei-protocol/sei-chain/sei-tendermint/proto/tendermint/types"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -30,6 +31,27 @@ func TestFeegrantStoreRemainsMounted(t *testing.T) {
require.Equal(t, []byte("retained"), store.Get([]byte("allowance")))
}

func TestTransferStoreRemainsMounted(t *testing.T) {
require.Contains(t, kvStoreKeyNames, keys.IBCTransferStoreKey)

testApp := Setup(t, false, false, false)
ctx := testApp.NewContext(false, tmproto.Header{})
store := ctx.KVStore(testApp.GetKey(keys.IBCTransferStoreKey))
store.Set([]byte("denom-trace"), []byte("retained"))
require.Equal(t, []byte("retained"), store.Get([]byte("denom-trace")))
}

func TestRetiredTransferModuleAccountRemainsMaterialized(t *testing.T) {
testApp := Setup(t, false, false, false)
ctx := testApp.NewContext(false, tmproto.Header{})

account := testApp.AccountKeeper.GetAccount(ctx, authtypes.NewModuleAddress(transferModuleName))
moduleAccount, ok := account.(authtypes.ModuleAccountI)
require.True(t, ok)
require.Equal(t, transferModuleName, moduleAccount.GetName())
require.ElementsMatch(t, []string{authtypes.Minter, authtypes.Burner}, moduleAccount.GetPermissions())
}

func TestCapabilityStoreRemainsMounted(t *testing.T) {
require.Contains(t, kvStoreKeyNames, keys.CapabilityStoreKey)

Expand Down
2 changes: 2 additions & 0 deletions app/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func TestV67RemovesRetiredModuleVersions(t *testing.T) {
versionMap := testWrapper.App.UpgradeKeeper.GetModuleVersionMap(testWrapper.Ctx)
versionMap["capability"] = 1
versionMap["feegrant"] = 1
versionMap["transfer"] = 2
testWrapper.App.UpgradeKeeper.SetModuleVersionMap(testWrapper.Ctx, versionMap)

testWrapper.App.UpgradeKeeper.ApplyUpgrade(testWrapper.Ctx, types.Plan{
Expand All @@ -50,6 +51,7 @@ func TestV67RemovesRetiredModuleVersions(t *testing.T) {
versionMap = testWrapper.App.UpgradeKeeper.GetModuleVersionMap(testWrapper.Ctx)
require.NotContains(t, versionMap, "capability")
require.NotContains(t, versionMap, "feegrant")
require.NotContains(t, versionMap, "transfer")
}

func TestSkipOptimisticProcessingOnUpgrade(t *testing.T) {
Expand Down
1 change: 1 addition & 0 deletions app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ func (app *App) RegisterUpgradeHandlers() {
}
app.UpgradeKeeper.DeleteModuleVersion(ctx, capabilityModuleName)
app.UpgradeKeeper.DeleteModuleVersion(ctx, feegrantModuleName)
app.UpgradeKeeper.DeleteModuleVersion(ctx, transferModuleName)
return newVM, nil
}

Expand Down
Loading
Loading