rm (#530)
This commit is contained in:
@@ -92,7 +92,6 @@ mevLane, freeLane, defaultLane := CreateLanes(app)
|
||||
mempool, err := block.NewLanedMempool(
|
||||
app.Logger(),
|
||||
[]block.Lane{mevLane, freeLane, defaultLane},
|
||||
&app.blocksdkKeeper,
|
||||
)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
||||
@@ -48,7 +48,6 @@ import (
|
||||
service "github.com/skip-mev/block-sdk/v2/block/service"
|
||||
"github.com/skip-mev/block-sdk/v2/block/utils"
|
||||
auctionkeeper "github.com/skip-mev/block-sdk/v2/x/auction/keeper"
|
||||
blocksdkkeeper "github.com/skip-mev/block-sdk/v2/x/blocksdk/keeper"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -90,7 +89,6 @@ type TestApp struct {
|
||||
ConsensusParamsKeeper consensuskeeper.Keeper
|
||||
CircuitBreakerKeeper circuitkeeper.Keeper
|
||||
auctionkeeper auctionkeeper.Keeper
|
||||
blocksdkKeeper blocksdkkeeper.Keeper
|
||||
FeeGrantKeeper feegrantkeeper.Keeper
|
||||
|
||||
// custom checkTx handler
|
||||
@@ -172,7 +170,6 @@ func New(
|
||||
&app.AuthzKeeper,
|
||||
&app.GroupKeeper,
|
||||
&app.auctionkeeper,
|
||||
&app.blocksdkKeeper,
|
||||
&app.ConsensusParamsKeeper,
|
||||
&app.FeeGrantKeeper,
|
||||
&app.CircuitBreakerKeeper,
|
||||
@@ -220,7 +217,6 @@ func New(
|
||||
mempool, err := block.NewLanedMempool(
|
||||
app.Logger(),
|
||||
[]block.Lane{mevLane, freeLane, defaultLane},
|
||||
&app.blocksdkKeeper,
|
||||
)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
||||
@@ -67,11 +67,8 @@ import (
|
||||
_ "github.com/cosmos/cosmos-sdk/x/staking" // import for side-effects
|
||||
|
||||
auctionmodulev1 "github.com/skip-mev/block-sdk/v2/api/sdk/auction/module/v1"
|
||||
blocksdkmodulev1 "github.com/skip-mev/block-sdk/v2/api/sdk/blocksdk/module/v1"
|
||||
_ "github.com/skip-mev/block-sdk/v2/x/auction" // import for side-effects
|
||||
auctiontypes "github.com/skip-mev/block-sdk/v2/x/auction/types"
|
||||
_ "github.com/skip-mev/block-sdk/v2/x/blocksdk" // import for side-effects
|
||||
blocksdktypes "github.com/skip-mev/block-sdk/v2/x/blocksdk/types"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -155,7 +152,6 @@ var (
|
||||
consensustypes.ModuleName,
|
||||
circuittypes.ModuleName,
|
||||
auctiontypes.ModuleName,
|
||||
blocksdktypes.ModuleName,
|
||||
feegrant.ModuleName,
|
||||
},
|
||||
// When ExportGenesis is not specified, the export genesis module order
|
||||
@@ -252,10 +248,6 @@ var (
|
||||
Name: auctiontypes.ModuleName,
|
||||
Config: appconfig.WrapAny(&auctionmodulev1.Module{}),
|
||||
},
|
||||
{
|
||||
Name: blocksdktypes.ModuleName,
|
||||
Config: appconfig.WrapAny(&blocksdkmodulev1.Module{}),
|
||||
},
|
||||
},
|
||||
}),
|
||||
depinject.Supply(
|
||||
|
||||
@@ -4,8 +4,6 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/math"
|
||||
|
||||
testutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
|
||||
interchaintest "github.com/strangelove-ventures/interchaintest/v8"
|
||||
"github.com/strangelove-ventures/interchaintest/v8/chain/cosmos"
|
||||
@@ -13,12 +11,8 @@ import (
|
||||
ictestutil "github.com/strangelove-ventures/interchaintest/v8/testutil"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/skip-mev/block-sdk/v2/lanes/base"
|
||||
"github.com/skip-mev/block-sdk/v2/lanes/free"
|
||||
"github.com/skip-mev/block-sdk/v2/lanes/mev"
|
||||
"github.com/skip-mev/block-sdk/v2/tests/e2e"
|
||||
auctiontypes "github.com/skip-mev/block-sdk/v2/x/auction/types"
|
||||
blocksdkmoduletypes "github.com/skip-mev/block-sdk/v2/x/blocksdk/types"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -41,26 +35,6 @@ var (
|
||||
Key: "app_state.auction.params.max_bundle_size",
|
||||
Value: 3,
|
||||
},
|
||||
{
|
||||
Key: "app_state.blocksdk.lanes",
|
||||
Value: []blocksdkmoduletypes.Lane{
|
||||
{
|
||||
Id: mev.LaneName,
|
||||
MaxBlockSpace: math.LegacyMustNewDecFromStr("0.2"),
|
||||
Order: 0,
|
||||
},
|
||||
{
|
||||
Id: free.LaneName,
|
||||
MaxBlockSpace: math.LegacyMustNewDecFromStr("0.2"),
|
||||
Order: 1,
|
||||
},
|
||||
{
|
||||
Id: base.LaneName,
|
||||
MaxBlockSpace: math.LegacyMustNewDecFromStr("0.6"),
|
||||
Order: 2,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
consensusParams = ictestutil.Toml{
|
||||
@@ -102,7 +76,6 @@ func MakeEncodingConfig() *testutil.TestEncodingConfig {
|
||||
|
||||
// register auction types
|
||||
auctiontypes.RegisterInterfaces(cfg.InterfaceRegistry)
|
||||
blocksdkmoduletypes.RegisterInterfaces(cfg.InterfaceRegistry)
|
||||
|
||||
return &cfg
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ import (
|
||||
|
||||
testkeeper "github.com/skip-mev/block-sdk/v2/testutils/keeper"
|
||||
auctiontypes "github.com/skip-mev/block-sdk/v2/x/auction/types"
|
||||
blocksdktypes "github.com/skip-mev/block-sdk/v2/x/blocksdk/types"
|
||||
)
|
||||
|
||||
type IntegrationTestSuite struct {
|
||||
@@ -29,7 +28,6 @@ func TestIntegrationTestSuite(t *testing.T) {
|
||||
func (s *IntegrationTestSuite) SetupTest() {
|
||||
s.encCfg = encoding.MakeTestEncodingConfig(func(registry types.InterfaceRegistry) {
|
||||
auctiontypes.RegisterInterfaces(registry)
|
||||
blocksdktypes.RegisterInterfaces(registry)
|
||||
})
|
||||
|
||||
s.ctx, s.TestKeepers, s.TestMsgServers = testkeeper.NewTestSetup(s.T())
|
||||
|
||||
@@ -21,7 +21,6 @@ import (
|
||||
|
||||
"github.com/skip-mev/block-sdk/v2/testutils/networksuite"
|
||||
auctiontypes "github.com/skip-mev/block-sdk/v2/x/auction/types"
|
||||
blocksdktypes "github.com/skip-mev/block-sdk/v2/x/blocksdk/types"
|
||||
)
|
||||
|
||||
// NetworkTestSuite is a test suite for network integration tests.
|
||||
@@ -34,39 +33,6 @@ func TestNetworkTestSuite(t *testing.T) {
|
||||
suite.Run(t, new(NetworkTestSuite))
|
||||
}
|
||||
|
||||
func (s *NetworkTestSuite) TestGetLanes() {
|
||||
common := []string{
|
||||
fmt.Sprintf("--%s=json", tmcli.OutputFlag),
|
||||
}
|
||||
for _, tc := range []struct {
|
||||
name string
|
||||
|
||||
args []string
|
||||
err error
|
||||
obj []blocksdktypes.Lane
|
||||
}{
|
||||
{
|
||||
name: "should return default lanes",
|
||||
args: common,
|
||||
obj: s.BlockSDKState.Lanes,
|
||||
},
|
||||
} {
|
||||
s.T().Run(tc.name, func(t *testing.T) {
|
||||
tc := tc
|
||||
resp, err := s.QueryBlockSDKLanes()
|
||||
if tc.err != nil {
|
||||
stat, ok := status.FromError(tc.err)
|
||||
require.True(t, ok)
|
||||
require.ErrorIs(t, stat.Err(), tc.err)
|
||||
} else {
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, resp.Lanes)
|
||||
require.ElementsMatch(t, tc.obj, resp.Lanes)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func (s *NetworkTestSuite) TestGetAuctionParams() {
|
||||
common := []string{
|
||||
fmt.Sprintf("--%s=json", tmcli.OutputFlag),
|
||||
@@ -111,17 +77,6 @@ func (s *NetworkTestSuite) QueryAuctionParams() (*auctiontypes.QueryParamsRespon
|
||||
return client.Params(context.Background(), &auctiontypes.QueryParamsRequest{})
|
||||
}
|
||||
|
||||
func (s *NetworkTestSuite) QueryBlockSDKLanes() (*blocksdktypes.QueryLanesResponse, error) {
|
||||
s.T().Helper()
|
||||
|
||||
cc, closeConn, err := s.NetworkSuite.GetGRPC()
|
||||
s.Require().NoError(err)
|
||||
defer closeConn()
|
||||
|
||||
client := blocksdktypes.NewQueryClient(cc)
|
||||
return client.Lanes(context.Background(), &blocksdktypes.QueryLanesRequest{})
|
||||
}
|
||||
|
||||
func (s *NetworkTestSuite) TestFreeTxNoFees() {
|
||||
val := s.NetworkSuite.Network.Validators[0]
|
||||
acc := *s.Accounts[0]
|
||||
|
||||
Reference in New Issue
Block a user