Skip to content

Commit

Permalink
Problem: websocket refactoring not used (backport crypto-org-chain#1239)
Browse files Browse the repository at this point in the history
* Problem: websocket refactoring not used

Solution:
- use the recent websocket/filter system refactoring in ethermint.

* update ethermint

* update filter offset to latest so only new changes are fetched in next call

* fix filter

* Revert "update filter offset to latest so only new changes are fetched in next call"

This reverts commit 6910f84.

* changelog

---------

Co-authored-by: mmsqe <[email protected]>
  • Loading branch information
yihuang and mmsqe committed Nov 15, 2023
1 parent 3693b6a commit 6c91cc2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ replace (
// TODO: remove it: https://github.com/cosmos/cosmos-sdk/issues/13134
github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2
github.com/ethereum/go-ethereum => github.com/crypto-org-chain/go-ethereum v1.10.19-deepcopy-jumptable
github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.20.11-cronos.0.20230809091211-3fdb18b1c2d9
github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.20.11-cronos.0.20231114081059-0cd23d4cd4d6
// Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities.
// TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409
github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1268,8 +1268,8 @@ github.com/crypto-org-chain/cronos/store v0.0.4 h1:w3pv5XVLiHQ3f0Ir8MpFjZy8rrBOG
github.com/crypto-org-chain/cronos/store v0.0.4/go.mod h1:LVocDb5u3bTS1c5IWvjp0Mgn9iQ66Jt5N4osvizpkpY=
github.com/crypto-org-chain/cronos/versiondb v0.0.0-20230809065519-af389f66015a h1:NUlWNavUQrx5V2YW2bwV64utaDrCf5eoK45vIgW2kWc=
github.com/crypto-org-chain/cronos/versiondb v0.0.0-20230809065519-af389f66015a/go.mod h1:i9e8vrU54C/JvSM+rX/jUidFRBcyXZ8FgNX+EvrasQc=
github.com/crypto-org-chain/ethermint v0.20.11-cronos.0.20230809091211-3fdb18b1c2d9 h1:c1KS8c8epruyUAonKBYHDCrCSCsSmGIIPXA/49505dE=
github.com/crypto-org-chain/ethermint v0.20.11-cronos.0.20230809091211-3fdb18b1c2d9/go.mod h1:EDjmywAw/EMpMufJA2Q+E9pNHAB00Dt5siQanMOZC88=
github.com/crypto-org-chain/ethermint v0.20.11-cronos.0.20231114081059-0cd23d4cd4d6 h1:INlxFa0JW/j2xZfDqD2mRmpLW8OKq+LnsCNaOceLoQY=
github.com/crypto-org-chain/ethermint v0.20.11-cronos.0.20231114081059-0cd23d4cd4d6/go.mod h1:EDjmywAw/EMpMufJA2Q+E9pNHAB00Dt5siQanMOZC88=
github.com/crypto-org-chain/go-ethereum v1.10.19-deepcopy-jumptable h1:VQLW0R8t9DcC/HvQZO1i0mIWjJfAezhI8lLUCholP0M=
github.com/crypto-org-chain/go-ethereum v1.10.19-deepcopy-jumptable/go.mod h1:IJBNMtzKcNHPtllYihy6BL2IgK1u+32JriaTbdt4v+w=
github.com/crypto-org-chain/go-ethereum-hdwallet v0.1.2 h1:Qu2GMavGHCcomdVWmZej76JpOO6uvII6IpPDdJUG+Qo=
Expand Down
4 changes: 2 additions & 2 deletions gomod2nix.toml
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ schema = 3
hash = "sha256-QKuYnEXXrnHPPHk/Xc9ocez2Jheo/0IOOa1IQaMH61c="
replaced = "github.com/crypto-org-chain/go-ethereum"
[mod."github.com/evmos/ethermint"]
version = "v0.20.11-cronos.0.20230809091211-3fdb18b1c2d9"
hash = "sha256-cm3AZsL45+jnOH5+XCUSVzhAN0cuav0gn+dm+1nxJow="
version = "v0.20.11-cronos.0.20231114081059-0cd23d4cd4d6"
hash = "sha256-7UhfYcbSOfb99cEPzz7BKvm2vfzHcTgXmpUo4pdkPhk="
replaced = "github.com/crypto-org-chain/ethermint"
[mod."github.com/felixge/httpsnoop"]
version = "v1.0.2"
Expand Down
4 changes: 2 additions & 2 deletions x/cronos/rpc/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ import (
"github.com/ethereum/go-ethereum/rpc"
evmrpc "github.com/evmos/ethermint/rpc"
"github.com/evmos/ethermint/rpc/backend"
"github.com/evmos/ethermint/rpc/stream"
rpctypes "github.com/evmos/ethermint/rpc/types"
ethermint "github.com/evmos/ethermint/types"
evmtypes "github.com/evmos/ethermint/x/evm/types"
"github.com/tendermint/tendermint/libs/log"
coretypes "github.com/tendermint/tendermint/rpc/core/types"
rpcclient "github.com/tendermint/tendermint/rpc/jsonrpc/client"
)

const (
Expand All @@ -40,7 +40,7 @@ func init() {
}

// CreateCronosRPCAPIs creates extension json-rpc apis
func CreateCronosRPCAPIs(ctx *server.Context, clientCtx client.Context, tmWSClient *rpcclient.WSClient, allowUnprotectedTxs bool, indexer ethermint.EVMTxIndexer) []rpc.API {
func CreateCronosRPCAPIs(ctx *server.Context, clientCtx client.Context, _ *stream.RPCStream, allowUnprotectedTxs bool, indexer ethermint.EVMTxIndexer) []rpc.API {
evmBackend := backend.NewBackend(ctx, ctx.Logger, clientCtx, allowUnprotectedTxs, indexer)
return []rpc.API{
{
Expand Down

0 comments on commit 6c91cc2

Please sign in to comment.