Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(feeabs): fix BeginBlocker disabled #200

Merged
merged 10 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/interchaintest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

- run: make ictest-basic
env:
BRANCH_CI: 'latest'
BRANCH_CI: "latest"

test-ibc:
runs-on: ubuntu-latest
Expand All @@ -57,9 +57,9 @@ jobs:

- run: make ictest-ibc
env:
BRANCH_CI: 'latest'
BRANCH_CI: "latest"

test-packet-forward:
test-ibc-ibcfee:
runs-on: ubuntu-latest
needs: build-and-push-image
steps:
Expand All @@ -71,11 +71,11 @@ jobs:
- name: checkout code
uses: actions/checkout@v3

- run: make ictest-packet-forward
- run: make ictest-ibc-custom
env:
BRANCH_CI: 'latest'
BRANCH_CI: "latest"

test-host-zone-proposal:
test-packet-forward:
runs-on: ubuntu-latest
needs: build-and-push-image
steps:
Expand All @@ -87,11 +87,11 @@ jobs:
- name: checkout code
uses: actions/checkout@v3

- run: make ictest-host-zone-proposal
- run: make ictest-packet-forward
env:
BRANCH_CI: 'latest'
BRANCH_CI: "latest"

test-feeabs:
test-host-zone-proposal:
runs-on: ubuntu-latest
needs: build-and-push-image
steps:
Expand All @@ -103,9 +103,9 @@ jobs:
- name: checkout code
uses: actions/checkout@v3

- run: make ictest-feeabs
- run: make ictest-host-zone-proposal
env:
BRANCH_CI: 'latest'
BRANCH_CI: "latest"

test-query-osmosis-twap:
runs-on: ubuntu-latest
Expand All @@ -121,4 +121,4 @@ jobs:

- run: make ictest-query-osmosis-twap
env:
BRANCH_CI: 'latest'
BRANCH_CI: "latest"
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ ictest-basic:

# Executes IBC tests via interchaintest
ictest-ibc:
cd tests/interchaintest && go test -timeout=25m -race -v -run TestFeeabsGaiaIBCTransfer .
cd tests/interchaintest && go test -timeout=25m -race -v -run '^TestFeeabsGaiaIBCTransfer$$' .

# Executes IBC tests via interchaintest
ictest-packet-forward:
Expand All @@ -128,12 +128,12 @@ ictest-packet-forward:
ictest-host-zone-proposal:
cd tests/interchaintest && go test -timeout=25m -race -v -run TestHostZoneProposal .

ictest-feeabs:
cd tests/interchaintest && go test -timeout=25m -race -v -run '^TestFeeAbs$$' .

ictest-query-osmosis-twap:
cd tests/interchaintest && go test -timeout=25m -race -v -run TestQueryOsmosisTwap .

ictest-ibc-custom:
cd tests/interchaintest && go test -timeout=25m -race -v -run TestFeeabsGaiaIBCTransferWithIBCFee .

# ictest-feeabs-ibc-transfer:
# cd tests/interchaintest && go test -timeout=25m -race -v -run TestIBCTransferWithFeeAbs .

Expand Down
240 changes: 0 additions & 240 deletions tests/interchaintest/feeabs_test.go

This file was deleted.

5 changes: 0 additions & 5 deletions tests/interchaintest/query_osmosis_twap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,6 @@ func ParamChangeProposal(t *testing.T, ctx context.Context, feeabs *cosmos.Cosmo

}

// "ibc_denom": "ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9",
//
// "osmosis_pool_token_denom_in": "ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9",
// "pool_id": "1",
// "status": 0
func AddHostZoneProposal(t *testing.T, ctx context.Context, feeabs *cosmos.CosmosChain, feeabsUser ibc.Wallet) {
t.Helper()

Expand Down
1 change: 1 addition & 0 deletions tests/interchaintest/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@ func SetupOsmosisContracts(t *testing.T,
osmosis *cosmos.CosmosChain,
user ibc.Wallet,
) ([]string, error) {
t.Helper()
registryWasm := "./bytecode/crosschain_registry.wasm"
swaprouterWasm := "./bytecode/swaprouter.wasm"
xcsV2Wasm := "./bytecode/crosschain_swaps.wasm"
Expand Down
4 changes: 2 additions & 2 deletions x/feeabs/ante/decorate.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ func (famfd FeeAbstrationMempoolFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk
// Not contain zeroCoinFeesDenomReq's denoms
//
// check if the feeCoins has coins' amount higher/equal to nonZeroCoinFeesReq
if !feeCoins.IsAnyGTE(nonZeroCoinFeesReq) {
err := sdkerrors.Wrapf(errorstypes.ErrInsufficientFee, "insufficient fees; got: %s required: %s", feeCoins, feeRequired)
if !feeCoinsNonZeroDenom.IsAnyGTE(nonZeroCoinFeesReq) {
err := sdkerrors.Wrapf(errorstypes.ErrInsufficientFee, "insufficient fees; got: %s required: %s", feeCoinsNonZeroDenom, nonZeroCoinFeesReq)
if byPassExceedMaxGasUsage {
err = sdkerrors.Wrapf(errorstypes.ErrInsufficientFee, "Insufficient fees; bypass-min-fee-msg-types with gas consumption exceeds the maximum allowed gas value.")
}
Expand Down
3 changes: 2 additions & 1 deletion x/feeabs/keeper/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

// BeginBlocker of epochs module.
func (k Keeper) BeginBlocker(ctx sdk.Context) {
func (k Keeper) BeginBlock(ctx sdk.Context) {
defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker)
k.IterateEpochInfo(ctx, func(index int64, epochInfo types.EpochInfo) (stop bool) {
logger := k.Logger(ctx)
Expand All @@ -27,6 +27,7 @@ func (k Keeper) BeginBlocker(ctx sdk.Context) {
shouldEpochStart := (ctx.BlockTime().After(epochEndTime)) || shouldInitialEpochStart

if !shouldEpochStart {
logger.Info(fmt.Sprintf("Epoch with identifier %s has not ended yet", epochInfo.Identifier))
return false
}
epochInfo.CurrentEpochStartHeight = ctx.BlockHeight()
Expand Down
Loading
Loading