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

chore: upgrade to v0.52 part 1 #150

Closed
wants to merge 42 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
55686af
compiler errors gone, just need to deal with the chainutiltest thing
technicallyty Jan 29, 2025
b6b3c9b
remove chaintestutil from e2e setup
technicallyty Jan 29, 2025
b16b859
big bag of changes
technicallyty Jan 29, 2025
cc6f615
update the chain and keepers and stuff
technicallyty Jan 30, 2025
a06e6a3
okay suite
technicallyty Jan 30, 2025
d2fa94e
fixture -> TestFixture
technicallyty Jan 30, 2025
382d884
ok integration test works now
technicallyty Jan 30, 2025
0f9a1d0
fixes
technicallyty Jan 30, 2025
f407451
wip
technicallyty Jan 30, 2025
9d24b96
wip
technicallyty Jan 30, 2025
7563c7a
set height to fix test
technicallyty Jan 30, 2025
246f149
ok
technicallyty Jan 31, 2025
e08e7c5
fix tests
technicallyty Jan 31, 2025
1e81743
building
aljo242 Jan 31, 2025
99aee8b
fixes
technicallyty Jan 31, 2025
459ff90
ok this works,, i think...
technicallyty Jan 31, 2025
5965a7a
updates
technicallyty Jan 31, 2025
e2f26e7
fixes and stuff
technicallyty Feb 3, 2025
3487f54
ok this works i guess
technicallyty Feb 3, 2025
7c1373b
remove that
technicallyty Feb 3, 2025
21b7f71
wip
technicallyty Feb 3, 2025
dcf048d
ok this works for some reason. need to revisit this.
technicallyty Feb 3, 2025
fe7f20c
use gas consumed constants
technicallyty Feb 3, 2025
a10adea
gas consumption comments
technicallyty Feb 3, 2025
6ae24db
thats not required
technicallyty Feb 3, 2025
29ad32b
linter
technicallyty Feb 3, 2025
3a93d5a
check the error
technicallyty Feb 3, 2025
5648045
fix lint job
technicallyty Feb 4, 2025
6797942
remove params
technicallyty Feb 4, 2025
f5d2919
ok
technicallyty Feb 4, 2025
df36c2b
ok
technicallyty Feb 4, 2025
01b2c00
ok
technicallyty Feb 4, 2025
1ae109f
oops
technicallyty Feb 4, 2025
9ebf97a
bye
technicallyty Feb 4, 2025
b46a456
remove ics stuff
technicallyty Feb 4, 2025
e9e76cf
e2e
technicallyty Feb 4, 2025
ee92e3a
ok
technicallyty Feb 4, 2025
dd615d3
Revert it all
technicallyty Feb 4, 2025
8bdb488
fix e2e
technicallyty Feb 4, 2025
b3754bd
changes
technicallyty Feb 4, 2025
ab5451a
fixed
technicallyty Feb 5, 2025
b06b0af
fix suite
technicallyty Feb 5, 2025
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
File renamed without changes.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ build/
# Dependency directories (remove the comment below to include it)
# vendor/

# Workspace state
go.work*

# editor
.idea/

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ TEST_E2E_TAGS = e2e

test-e2e: $(TEST_E2E_DEPS)
@echo "Running e2e tests..."
@go test ./tests/e2e/e2e_test.go -timeout 30m -p 1 -race -v -tags='$(TEST_E2E_TAGS)'
@go test ./tests/e2e/e2e_test.go -timeout 30m -p 1 -v -tags='$(TEST_E2E_TAGS)'

test-unit:
@go test -v -race $(shell go list ./... | grep -v tests/)
Expand Down Expand Up @@ -213,4 +213,4 @@ mocks: use-main
@go generate ./...
make format

.PHONY: format mocks
.PHONY: format mocks
2 changes: 1 addition & 1 deletion contrib/images/feemarket.e2e.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22-bullseye AS builder
FROM golang:1.23-bullseye AS builder

WORKDIR /src/feemarket
COPY . .
Expand Down
248 changes: 141 additions & 107 deletions go.mod

Large diffs are not rendered by default.

789 changes: 298 additions & 491 deletions go.sum

Large diffs are not rendered by default.

65 changes: 39 additions & 26 deletions tests/app/ante.go
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
package app

import (
"github.com/cosmos/cosmos-sdk/x/auth/ante/unorderedtx"

circuitante "cosmossdk.io/x/circuit/ante"

errorsmod "cosmossdk.io/errors"

sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
authante "github.com/cosmos/cosmos-sdk/x/auth/ante"
ante "github.com/cosmos/cosmos-sdk/x/auth/ante"

feemarketante "github.com/skip-mev/feemarket/x/feemarket/ante"
)

// AnteHandlerOptions are the options required for constructing an SDK AnteHandler with the fee market injected.
type AnteHandlerOptions struct {
BaseOptions authante.HandlerOptions
ante.HandlerOptions
BankKeeper feemarketante.BankKeeper
AccountKeeper feemarketante.AccountKeeper
FeeMarketKeeper feemarketante.FeeMarketKeeper
CircuitKeeper circuitante.CircuitBreaker
}

// NewAnteHandler returns an AnteHandler that checks and increments sequence
Expand All @@ -26,11 +31,15 @@ func NewAnteHandler(options AnteHandlerOptions) (sdk.AnteHandler, error) {
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "account keeper is required for ante builder")
}

if options.BaseOptions.BankKeeper == nil {
if options.CircuitKeeper == nil {
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "circuit keeper is required for ante builder")
}

if options.BankKeeper == nil {
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "base options bank keeper is required for ante builder")
}

if options.BaseOptions.SignModeHandler == nil {
if options.SignModeHandler == nil {
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "sign mode handler is required for ante builder")
}

Expand All @@ -42,30 +51,34 @@ func NewAnteHandler(options AnteHandlerOptions) (sdk.AnteHandler, error) {
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "bank keeper keeper is required for ante builder")
}

anteDecorators := []sdk.AnteDecorator{
authante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first
authante.NewExtensionOptionsDecorator(options.BaseOptions.ExtensionOptionChecker),
authante.NewValidateBasicDecorator(),
authante.NewTxTimeoutHeightDecorator(),
authante.NewValidateMemoDecorator(options.AccountKeeper),
authante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper),
feemarketante.NewFeeMarketCheckDecorator( // fee market check replaces fee deduct decorator
if options.FeegrantKeeper == nil {
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "feegrant keeper is required for ante builder")
}

feemarketDecorator := feemarketante.NewFeeMarketCheckDecorator( // fee market check replaces fee deduct decorator
options.AccountKeeper,
options.BankKeeper,
options.FeegrantKeeper,
options.FeeMarketKeeper,
ante.NewDeductFeeDecorator(
options.AccountKeeper,
options.BankKeeper,
options.BaseOptions.FeegrantKeeper,
options.FeeMarketKeeper,
authante.NewDeductFeeDecorator(
options.AccountKeeper,
options.BaseOptions.BankKeeper,
options.BaseOptions.FeegrantKeeper,
options.BaseOptions.TxFeeChecker,
),
), // fees are deducted in the fee market deduct post handler
authante.NewSetPubKeyDecorator(options.AccountKeeper), // SetPubKeyDecorator must be called before all signature verification decorators
authante.NewValidateSigCountDecorator(options.AccountKeeper),
authante.NewSigGasConsumeDecorator(options.AccountKeeper, options.BaseOptions.SigGasConsumer),
authante.NewSigVerificationDecorator(options.AccountKeeper, options.BaseOptions.SignModeHandler),
authante.NewIncrementSequenceDecorator(options.AccountKeeper),
options.FeegrantKeeper,
options.TxFeeChecker,
),
) // fees are deducted in the fee market deduct post handler
anteDecorators := []sdk.AnteDecorator{
ante.NewSetUpContextDecorator(options.Environment, options.ConsensusKeeper), // outermost AnteDecorator. SetUpContext must be called first
circuitante.NewCircuitBreakerDecorator(options.CircuitKeeper),
ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker),
ante.NewValidateBasicDecorator(options.Environment),
ante.NewTxTimeoutHeightDecorator(options.Environment),
ante.NewUnorderedTxDecorator(unorderedtx.DefaultMaxTimeoutDuration, options.UnorderedTxManager, options.Environment, ante.DefaultSha256Cost),
ante.NewValidateMemoDecorator(options.AccountKeeper),
ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper),
ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler, options.SigGasConsumer, options.AccountAbstractionKeeper),
feemarketDecorator,
ante.NewValidateSigCountDecorator(options.AccountKeeper),
}

return sdk.ChainAnteDecorators(anteDecorators...), nil
Expand Down
Loading
Loading