Skip to content

Commit

Permalink
Merge branch 'main' into mtsitrin/937-rollapp-hard-fork-hub-side
Browse files Browse the repository at this point in the history
  • Loading branch information
mtsitrin committed Nov 7, 2024
2 parents 5a3f9b5 + ea79caf commit 6fc604a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 deletions.
8 changes: 4 additions & 4 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,6 @@ func (a *AppKeepers) InitKeepers(

a.CapabilityKeeper.Seal()

a.CrisisKeeper = crisiskeeper.NewKeeper(
appCodec, a.keys[crisistypes.StoreKey], invCheckPeriod, a.BankKeeper, authtypes.FeeCollectorName, govModuleAddress,
)

a.UpgradeKeeper = upgradekeeper.NewKeeper(
skipUpgradeHeights,
a.keys[upgradetypes.StoreKey],
Expand Down Expand Up @@ -225,6 +221,10 @@ func (a *AppKeepers) InitKeepers(
govModuleAddress,
)

a.CrisisKeeper = crisiskeeper.NewKeeper(
appCodec, a.keys[crisistypes.StoreKey], invCheckPeriod, a.BankKeeper, authtypes.FeeCollectorName, govModuleAddress,
)

a.StakingKeeper = stakingkeeper.NewKeeper(
appCodec,
a.keys[stakingtypes.StoreKey],
Expand Down
1 change: 0 additions & 1 deletion scripts/src/genesis_config_commands.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ set_hub_params() {
jq '.app_state.rollapp.params.dispute_period_in_blocks = "50"' "$GENESIS_FILE" > "$tmp" && mv "$tmp" "$GENESIS_FILE"


jq '.app_state.sequencer.params.unbonding_time = "1209600s"' "$GENESIS_FILE" > "$tmp" && mv "$tmp" "$GENESIS_FILE"
jq '.app_state.sequencer.params.notice_period = "60s"' "$GENESIS_FILE" > "$tmp" && mv "$tmp" "$GENESIS_FILE"

#increase the tx size cost per byte from 10 to 100
Expand Down
9 changes: 8 additions & 1 deletion x/delayedack/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import (
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/spf13/cobra"

sdk "github.com/cosmos/cosmos-sdk/types"

commontypes "github.com/dymensionxyz/dymension/v3/x/common/types"
"github.com/dymensionxyz/dymension/v3/x/delayedack/types"
)
Expand Down Expand Up @@ -223,14 +225,19 @@ func CmdGetPendingPacketsByAddress() *cobra.Command {
cmd := &cobra.Command{
Use: "pending-packets-by-address [address]",
Short: "Get pending packets by address",
Args: cobra.MinimumNArgs(1),
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx, err := client.GetClientQueryContext(cmd)
if err != nil {
return err
}
queryClient := types.NewQueryClient(clientCtx)

_, err = sdk.AccAddressFromBech32(args[0])
if err != nil {
return err
}

res, err := queryClient.GetPendingPacketsByAddress(cmd.Context(), &types.QueryPendingPacketsByAddressRequest{
Address: args[0],
Pagination: nil, // TODO: handle pagination
Expand Down
15 changes: 13 additions & 2 deletions x/rollapp/keeper/grpc_query_rollapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,21 @@ func getSummaryResponse(ctx sdk.Context, k Keeper, rollapp types.Rollapp, ok, wi
latestStateInfoIndex, found := k.GetLatestStateInfoIndex(ctx, rollapp.RollappId)
if found {
s.LatestStateIndex = &latestStateInfoIndex

latestStateInfo, foundFin := k.GetStateInfo(ctx, rollapp.RollappId, latestStateInfoIndex.Index)
if foundFin {
s.LatestHeight = latestStateInfo.GetLatestHeight()
}
}
latestFinalizedStateInfoIndex, found := k.GetLatestFinalizedStateIndex(ctx, rollapp.RollappId)
if found {

latestFinalizedStateInfoIndex, foundFinIdx := k.GetLatestFinalizedStateIndex(ctx, rollapp.RollappId)
if foundFinIdx {
s.LatestFinalizedStateIndex = &latestFinalizedStateInfoIndex

latestFinalizedStateInfo, foundFin := k.GetStateInfo(ctx, rollapp.RollappId, latestFinalizedStateInfoIndex.Index)
if foundFin {
s.LatestFinalizedHeight = latestFinalizedStateInfo.GetLatestHeight()
}
}

resp := &types.QueryGetRollappResponse{
Expand Down

0 comments on commit 6fc604a

Please sign in to comment.