Skip to content

Commit

Permalink
Merge branch 'main' into yzang/SEI-8920
Browse files Browse the repository at this point in the history
  • Loading branch information
Kbhat1 authored Jan 31, 2025
2 parents f466989 + f5e6716 commit 947514f
Show file tree
Hide file tree
Showing 20 changed files with 951 additions and 368 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ Ref: https://keepachangelog.com/en/1.0.0/
-->

# Changelog
## v6.0.3
sei-chain
* [#2057](https://github.com/sei-protocol/sei-chain/pull/2057) Avoid panic tx error message in debug trace
* [#2056](https://github.com/sei-protocol/sei-chain/pull/2056) Properly encode ERC1155 translated batch event data
* [#2051](https://github.com/sei-protocol/sei-chain/pull/2051) Add IBC support for 0x addresses
* [#2027](https://github.com/sei-protocol/sei-chain/pull/2027) Fix eth_subscribe with geth open ended range
* [#2043](https://github.com/sei-protocol/sei-chain/pull/2043) Query owner on ERC-721 and ERC-1155 pointers
* [#2044](https://github.com/sei-protocol/sei-chain/pull/2044) Support JS tracers
* [#2031](https://github.com/sei-protocol/sei-chain/pull/2031) Add custom query handling for unbonding balances
* [#1755](https://github.com/sei-protocol/sei-chain/pull/1755) Pointer contracts: support for ERC1155 and CW1155 contracts

## v6.0.2
sei-chain
* [#2018](https://github.com/sei-protocol/sei-chain/pull/2018) Remove TxHashes from EVM module
Expand All @@ -45,7 +56,6 @@ sei-chain
* [#1974](https://github.com/sei-protocol/sei-chain/pull/1974) Optimize getLogs with parallelization
* [#1971](https://github.com/sei-protocol/sei-chain/pull/1971) Remove tokenfactory config
* [#1970](https://github.com/sei-protocol/sei-chain/pull/1970) Add unbonding delegation query
* [#1755](https://github.com/sei-protocol/sei-chain/pull/1755) Pointer contracts: support for ERC1155 and CW1155 contracts

sei-cosmos
* [#559](https://github.com/sei-protocol/sei-cosmos/pull/559) Fix state sync halt issue
Expand Down
27 changes: 27 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"github.com/cosmos/cosmos-sdk/client/rpc"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/codec/types"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
"github.com/cosmos/cosmos-sdk/server"
"github.com/cosmos/cosmos-sdk/server/api"
"github.com/cosmos/cosmos-sdk/server/config"
Expand Down Expand Up @@ -370,6 +371,8 @@ type App struct {

stateStore seidb.StateStore
receiptStore seidb.StateStore

forkInitializer func(sdk.Context)
}

type AppOption func(*App)
Expand Down Expand Up @@ -927,6 +930,7 @@ func New(
app.SetPrepareProposalHandler(app.PrepareProposalHandler)
app.SetProcessProposalHandler(app.ProcessProposalHandler)
app.SetFinalizeBlocker(app.FinalizeBlocker)
app.SetInplaceTestnetInitializer(app.inplacetestnetInitializer)

// Register snapshot extensions to enable state-sync for wasm.
if manager := app.SnapshotManager(); manager != nil {
Expand Down Expand Up @@ -1070,6 +1074,10 @@ func (app App) GetStateStore() seidb.StateStore { return app.stateStore }
func (app *App) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock {
metrics.GaugeSeidVersionAndCommit(app.versionInfo.Version, app.versionInfo.GitCommit)
// check if we've reached a target height, if so, execute any applicable handlers
if app.forkInitializer != nil {
app.forkInitializer(ctx)
app.forkInitializer = nil
}
if app.HardForkManager.TargetHeightReached(ctx) {
app.HardForkManager.ExecuteForTargetHeight(ctx)
}
Expand Down Expand Up @@ -1984,6 +1992,25 @@ func (app *App) SetTxDecoder(txDecoder sdk.TxDecoder) {
app.txDecoder = txDecoder
}

func (app *App) inplacetestnetInitializer(pk cryptotypes.PubKey) error {
app.forkInitializer = func(ctx sdk.Context) {
val, _ := stakingtypes.NewValidator(
sdk.ValAddress(pk.Address()), pk, stakingtypes.NewDescription("test", "test", "test", "test", "test"))
app.StakingKeeper.SetValidator(ctx, val)
_ = app.StakingKeeper.SetValidatorByConsAddr(ctx, val)
app.StakingKeeper.SetValidatorByPowerIndex(ctx, val)
_ = app.SlashingKeeper.AddPubkey(ctx, pk)
app.SlashingKeeper.SetValidatorSigningInfo(
ctx,
sdk.ConsAddress(pk.Address()),
slashingtypes.NewValidatorSigningInfo(
sdk.ConsAddress(pk.Address()), 0, 0, time.Unix(0, 0), false, 0,
),
)
}
return nil
}

func init() {
// override max wasm size to 2MB
wasmtypes.MaxWasmSize = 2 * 1024 * 1024
Expand Down
4 changes: 2 additions & 2 deletions app/params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ func SetTendermintConfigs(config *tmcfg.Config) {
config.Mempool.Size = 1000
config.Mempool.MaxTxsBytes = 10737418240
config.Mempool.MaxTxBytes = 2048576
config.Mempool.TTLDuration = 15 * time.Second
config.Mempool.TTLNumBlocks = 30
config.Mempool.TTLDuration = 5 * time.Second
config.Mempool.TTLNumBlocks = 10
// Consensus Configs
config.Consensus.GossipTransactionKeyOnly = true
config.Consensus.UnsafeProposeTimeoutOverride = 300 * time.Millisecond
Expand Down
Loading

0 comments on commit 947514f

Please sign in to comment.