Skip to content

Commit

Permalink
fix/execution issue (#139)
Browse files Browse the repository at this point in the history
* fix: remove the manually gc

* chroe/bump: bump aspect-runtime version to v0.4.7-rc7-fix-execution
  • Loading branch information
0xDevVoyager authored Jul 4, 2024
1 parent fd7aa25 commit 01f8bc3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ require (
)

replace (
github.com/artela-network/aspect-runtime => github.com/artela-network/aspect-runtime v0.4.7-rc7-fix-execution
github.com/btcsuite/btcd => github.com/btcsuite/btcd v0.22.3 // TODO artela: btcd/btcec become not valid for 0.23.x, need to dig into it
github.com/bytecodealliance/wasmtime-go/v20 => github.com/artela-network/wasmtime-go/v20 v20.0.2
github.com/cosmos/cosmos-sdk => github.com/artela-network/artela-cosmos-sdk v0.47.4-artela-rc-7-1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ github.com/artela-network/artela-evm v0.4.7-rc7 h1:6BbpLmZZQQDIqtU9KIK0yKCovZKag
github.com/artela-network/artela-evm v0.4.7-rc7/go.mod h1:kRZPmabNVQ+qwtC75qG/JxUTO/bekgAvfvURI8ObcOY=
github.com/artela-network/aspect-core v0.4.7-rc7-1 h1:jH3NcHfjcWJ3BZqVwHag3CWZwF3EeuR0zTHNOry8kJI=
github.com/artela-network/aspect-core v0.4.7-rc7-1/go.mod h1:C/aJERYZ2O3yxAuP6I4gg0I/R3efZSIDt64PMw50Uwo=
github.com/artela-network/aspect-runtime v0.4.7-rc7 h1:CPqrp4Zrm3s6+EvzIvlhid9bqDLGlxWVo8Xg12rgLdY=
github.com/artela-network/aspect-runtime v0.4.7-rc7/go.mod h1:eiBT6JkElkgJNRgRXTOJu/bVS3br+GoqMDv6Gn4a0cU=
github.com/artela-network/aspect-runtime v0.4.7-rc7-fix-execution h1:CUnw7f36L2aDG15acx77Bys+INaOSwe1Q+QcB+nFQV0=
github.com/artela-network/aspect-runtime v0.4.7-rc7-fix-execution/go.mod h1:eiBT6JkElkgJNRgRXTOJu/bVS3br+GoqMDv6Gn4a0cU=
github.com/artela-network/wasmtime-go/v20 v20.0.2 h1:miyLlk3+w+5b2LdI0sMpzHiUOFv4O+MzaZjQIg0vqW8=
github.com/artela-network/wasmtime-go/v20 v20.0.2/go.mod h1:Va362hmt7aqwyb2Vu73yHbmx6NkSvGmvHOzJa2xMECQ=
github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A=
Expand Down
12 changes: 0 additions & 12 deletions x/evm/blocker.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package evm

import (
"runtime"

"github.com/artela-network/artela/x/evm/artela/types"
abci "github.com/cometbft/cometbft/abci/types"

Expand All @@ -15,16 +13,6 @@ import (

// BeginBlock sets the cosmos Context and EIP155 chain id to the Keeper.
func BeginBlock(_ cosmos.Context, k *keeper.Keeper, beginBlock abci.RequestBeginBlock) {
// We manually call runtime.GC in every block because in certain cases,
// the store objects created by wasmtime-go are not promptly released,
// causing the memory allocated by the wasm engine, which consumes a significant
// amount of resources, to linger in memory for extended periods. This may
// lead to excessive memory consumption and failure to allocate new memory
// on some machines.
// In testing, the time spent by runtime.GC with STW (Stop-The-World) is
// approximately 100 to 200 microseconds, with very limited impact on blocks.
runtime.GC()

// Aspect Runtime Context Lifecycle: create and store ExtBlockContext
// due to the design of the block context in Cosmos SDK,
// the extBlockCtx cannot be saved directly to the context of the deliver state
Expand Down

0 comments on commit 01f8bc3

Please sign in to comment.