Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into fix-export-appversion
Browse files Browse the repository at this point in the history
  • Loading branch information
najeal committed Jul 25, 2024
2 parents 66c82ec + 85bf2ae commit 0ffc469
Show file tree
Hide file tree
Showing 267 changed files with 3,414 additions and 6,156 deletions.
8 changes: 8 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,11 @@ pull_request_rules:
backport:
branches:
- v1.x
- name: backport patches to v2.x branch
conditions:
- base=main
- label=backport:v2.x
actions:
backport:
branches:
- v2.x
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
go.sum
- uses: golangci/[email protected]
with:
version: v1.57.0
version: v1.59.1
args: --timeout 10m
github-token: ${{ secrets.github_token }}
skip-pkg-cache: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-interchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
run: docker image save -o ${{ env.ARTIFACT_PATH }} ${{ env.DOCKER_IMAGE }}

- name: Publish Docker image as artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.ARTIFACT_PATH }}
Expand All @@ -40,7 +40,7 @@ jobs:
go-version-file: 'go.mod'

- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}

Expand Down
4 changes: 3 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,7 @@ changelog:
exclude:
- "^docs:"
- "^test:"
release:
prerelease: auto
git:
prerelease_suffix: "-"
prerelease_suffix: "-rc*"
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ IMAGE := ghcr.io/tendermint/docker-build-proto:latest
DOCKER_PROTO_BUILDER := docker run -v $(shell pwd):/workspace --workdir /workspace $(IMAGE)
PROJECTNAME=$(shell basename "$(PWD)")
HTTPS_GIT := https://github.com/celestiaorg/celestia-app.git
PACKAGE_NAME := github.com/celestiaorg/celestia-app/v2
PACKAGE_NAME := github.com/celestiaorg/celestia-app/v3
GOLANG_CROSS_VERSION ?= v1.22.4

# process linker flags
Expand Down Expand Up @@ -40,8 +40,6 @@ install: go.sum
mod:
@echo "--> Updating go.mod"
@go mod tidy
@echo "--> Updating go.mod in ./test/testground"
@(cd ./test/testground && go mod tidy)
@echo "--> Updating go.mod in ./test/interchain"
@(cd ./test/interchain && go mod tidy)
.PHONY: mod
Expand Down Expand Up @@ -105,13 +103,13 @@ lint:
@hadolint Dockerfile
@echo "--> Running yamllint"
@yamllint --no-warnings . -c .yamllint.yml

.PHONY: lint

## markdown-link-check: Check all markdown links.
markdown-link-check:
@echo "--> Running markdown-link-check"
@find . -name \*.md -print0 | xargs -0 -n1 markdown-link-check
.PHONY: markdown-link-check


## fmt: Format files per linters golangci-lint and markdownlint.
Expand Down Expand Up @@ -145,7 +143,7 @@ test-race:
# TODO: Remove the -skip flag once the following tests no longer contain data races.
# https://github.com/celestiaorg/celestia-app/issues/1369
@echo "--> Running tests in race mode"
@go test ./... -v -race -skip "TestPrepareProposalConsistency|TestIntegrationTestSuite|TestBlobstreamRPCQueries|TestSquareSizeIntegrationTest|TestStandardSDKIntegrationTestSuite|TestTxsimCommandFlags|TestTxsimCommandEnvVar|TestMintIntegrationTestSuite|TestBlobstreamCLI|TestUpgrade|TestMaliciousTestNode|TestBigBlobSuite|TestQGBIntegrationSuite|TestSignerTestSuite|TestPriorityTestSuite|TestTimeInPrepareProposalContext|TestBlobstream|TestCLITestSuite|TestLegacyUpgrade|TestSignerTwins|TestConcurrentTxSubmission|TestTxClientTestSuite"
@go test ./... -v -race -skip "TestPrepareProposalConsistency|TestIntegrationTestSuite|TestBlobstreamRPCQueries|TestSquareSizeIntegrationTest|TestStandardSDKIntegrationTestSuite|TestTxsimCommandFlags|TestTxsimCommandEnvVar|TestMintIntegrationTestSuite|TestBlobstreamCLI|TestUpgrade|TestMaliciousTestNode|TestBigBlobSuite|TestQGBIntegrationSuite|TestSignerTestSuite|TestPriorityTestSuite|TestTimeInPrepareProposalContext|TestBlobstream|TestCLITestSuite|TestLegacyUpgrade|TestSignerTwins|TestConcurrentTxSubmission|TestTxClientTestSuite|Test_testnode"
.PHONY: test-race

## test-bench: Run unit tests in bench mode.
Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ celestia-appd --help
### Environment variables
| Variable | Explanation | Default value | Required |
|-----------------|------------------------------------|----------------------------------------------------------|----------|
| `CELESTIA_HOME` | Home directory for the application | User home dir. [Ref](https://pkg.go.dev/os#UserHomeDir). | Optional |
| Variable | Explanation | Default value | Required |
|-----------------|-------------------------------------------------------------------|----------------------------------------------------------|----------|
| `CELESTIA_HOME` | Where the application directory (`.celestia-app`) should be saved | [User home directory](https://pkg.go.dev/os#UserHomeDir) | Optional |
### Create your own single node devnet
Expand All @@ -108,7 +108,7 @@ celestia-appd tx blob pay-for-blob 0x00010203040506070809 0x48656c6c6f2c20576f72

### Usage as a library

If import celestia-app as a Go module, you may need to add some Go module `replace` directives to avoid type incompatabilities. Please see the `replace` directive in [go.mod](./go.mod) for inspiration.
If import celestia-app as a Go module, you may need to add some Go module `replace` directives to avoid type incompatibilities. Please see the `replace` directive in [go.mod](./go.mod) for inspiration.

## Contributing

Expand All @@ -118,7 +118,7 @@ This repo contains multiple go modules. When using it, rename `go.work.example`

### Tools

1. Install [golangci-lint](https://golangci-lint.run/welcome/install) 1.57.0
1. Install [golangci-lint](https://golangci-lint.run/welcome/install) 1.59.1
1. Install [markdownlint](https://github.com/DavidAnson/markdownlint) 0.39.0
1. Install [hadolint](https://github.com/hadolint/hadolint)
1. Install [yamllint](https://yamllint.readthedocs.io/en/stable/quickstart.html)
Expand Down Expand Up @@ -153,7 +153,8 @@ Package-specific READMEs aim to explain implementation details for developers th

## Audits

| Date | Auditor | Version | Report |
|------------|-----------------------------------------------|-------------------------------------------------------------------------------------|---------------------------------------------------------|
| 2023/9/15 | [Informal Systems](https://informal.systems/) | [v1.0.0-rc6](https://github.com/celestiaorg/celestia-app/releases/tag/v1.0.0-rc6) | [informal-systems.pdf](docs/audit/informal-systems.pdf) |
| 2023/10/17 | [Binary Builders](https://binary.builders/) | [v1.0.0-rc10](https://github.com/celestiaorg/celestia-app/releases/tag/v1.0.0-rc10) | [binary-builders.pdf](docs/audit/binary-builders.pdf) |
| Date | Auditor | Version | Report |
|------------|-----------------------------------------------|-------------------------------------------------------------------------------------|---------------------------------------------------------------|
| 2023/9/15 | [Informal Systems](https://informal.systems/) | [v1.0.0-rc6](https://github.com/celestiaorg/celestia-app/releases/tag/v1.0.0-rc6) | [informal-systems.pdf](docs/audit/informal-systems.pdf) |
| 2023/10/17 | [Binary Builders](https://binary.builders/) | [v1.0.0-rc10](https://github.com/celestiaorg/celestia-app/releases/tag/v1.0.0-rc10) | [binary-builders.pdf](docs/audit/binary-builders.pdf) |
| 2024/7/1 | [Informal Systems](https://informal.systems/) | [v2.0.0-rc1](https://github.com/celestiaorg/celestia-app/releases/tag/v2.0.0-rc1) | [informal-systems-v2.pdf](docs/audit/informal-systems-v2.pdf) |
5 changes: 3 additions & 2 deletions app/ante/ante.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ante

import (
blobante "github.com/celestiaorg/celestia-app/v2/x/blob/ante"
blob "github.com/celestiaorg/celestia-app/v2/x/blob/keeper"
blobante "github.com/celestiaorg/celestia-app/v3/x/blob/ante"
blob "github.com/celestiaorg/celestia-app/v3/x/blob/keeper"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
"github.com/cosmos/cosmos-sdk/x/auth/signing"
Expand Down Expand Up @@ -44,6 +44,7 @@ func NewAnteHandler(
// Side effect: consumes gas from the gas meter.
ante.NewConsumeGasForTxSizeDecorator(accountKeeper),
// Ensure the feepayer (fee granter or first signer) has enough funds to pay for the tx.
// Ensure the gas price >= network min gas price if app version >= 2.
// Side effect: deducts fees from the fee payer. Sets the tx priority in context.
ante.NewDeductFeeDecorator(accountKeeper, bankKeeper, feegrantKeeper, ValidateTxFeeWrapper(paramKeeper)),
// Set public keys in the context for fee-payer and all signers.
Expand Down
6 changes: 3 additions & 3 deletions app/ante/fee_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package ante
import (
errors "cosmossdk.io/errors"
"cosmossdk.io/math"
"github.com/celestiaorg/celestia-app/v2/pkg/appconsts"
v1 "github.com/celestiaorg/celestia-app/v2/pkg/appconsts/v1"
"github.com/celestiaorg/celestia-app/v2/x/minfee"
"github.com/celestiaorg/celestia-app/v3/pkg/appconsts"
v1 "github.com/celestiaorg/celestia-app/v3/pkg/appconsts/v1"
"github.com/celestiaorg/celestia-app/v3/x/minfee"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerror "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
Expand Down
2 changes: 1 addition & 1 deletion app/ante/get_tx_priority_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package ante
import (
"testing"

"github.com/celestiaorg/celestia-app/v2/pkg/appconsts"
"github.com/celestiaorg/celestia-app/v3/pkg/appconsts"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/assert"
)
Expand Down
12 changes: 6 additions & 6 deletions app/ante/gov_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package ante_test
import (
"testing"

"github.com/celestiaorg/celestia-app/v2/app"
"github.com/celestiaorg/celestia-app/v2/app/ante"
"github.com/celestiaorg/celestia-app/v2/app/encoding"
"github.com/celestiaorg/celestia-app/v2/pkg/appconsts"
"github.com/celestiaorg/celestia-app/v2/test/util/testfactory"
"github.com/celestiaorg/celestia-app/v2/test/util/testnode"
"github.com/celestiaorg/celestia-app/v3/app"
"github.com/celestiaorg/celestia-app/v3/app/ante"
"github.com/celestiaorg/celestia-app/v3/app/encoding"
"github.com/celestiaorg/celestia-app/v3/pkg/appconsts"
"github.com/celestiaorg/celestia-app/v3/test/util/testfactory"
"github.com/celestiaorg/celestia-app/v3/test/util/testnode"
"github.com/cosmos/cosmos-sdk/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
Expand Down
14 changes: 7 additions & 7 deletions app/ante/min_fee_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import (
"math"
"testing"

"github.com/celestiaorg/celestia-app/v2/app"
"github.com/celestiaorg/celestia-app/v2/app/ante"
"github.com/celestiaorg/celestia-app/v2/app/encoding"
"github.com/celestiaorg/celestia-app/v2/pkg/appconsts"
v2 "github.com/celestiaorg/celestia-app/v2/pkg/appconsts/v2"
"github.com/celestiaorg/celestia-app/v2/test/util/testnode"
"github.com/celestiaorg/celestia-app/v2/x/minfee"
"github.com/celestiaorg/celestia-app/v3/app"
"github.com/celestiaorg/celestia-app/v3/app/ante"
"github.com/celestiaorg/celestia-app/v3/app/encoding"
"github.com/celestiaorg/celestia-app/v3/pkg/appconsts"
v2 "github.com/celestiaorg/celestia-app/v3/pkg/appconsts/v2"
"github.com/celestiaorg/celestia-app/v3/test/util/testnode"
"github.com/celestiaorg/celestia-app/v3/x/minfee"
"github.com/cosmos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
"github.com/cosmos/cosmos-sdk/store"
Expand Down
6 changes: 3 additions & 3 deletions app/ante/msg_gatekeeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package ante_test
import (
"testing"

"github.com/celestiaorg/celestia-app/v2/app"
"github.com/celestiaorg/celestia-app/v2/app/ante"
"github.com/celestiaorg/celestia-app/v2/app/encoding"
"github.com/celestiaorg/celestia-app/v3/app"
"github.com/celestiaorg/celestia-app/v3/app/ante"
"github.com/celestiaorg/celestia-app/v3/app/encoding"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/authz"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
Expand Down
8 changes: 4 additions & 4 deletions app/ante/panic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"fmt"
"testing"

"github.com/celestiaorg/celestia-app/v2/app"
"github.com/celestiaorg/celestia-app/v2/app/ante"
"github.com/celestiaorg/celestia-app/v2/app/encoding"
"github.com/celestiaorg/celestia-app/v2/test/util/testnode"
"github.com/celestiaorg/celestia-app/v3/app"
"github.com/celestiaorg/celestia-app/v3/app/ante"
"github.com/celestiaorg/celestia-app/v3/app/encoding"
"github.com/celestiaorg/celestia-app/v3/test/util/testnode"
sdk "github.com/cosmos/cosmos-sdk/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
"github.com/stretchr/testify/require"
Expand Down
38 changes: 19 additions & 19 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ import (
"io"
"slices"

"github.com/celestiaorg/celestia-app/v2/app/ante"
"github.com/celestiaorg/celestia-app/v2/app/encoding"
"github.com/celestiaorg/celestia-app/v2/app/module"
"github.com/celestiaorg/celestia-app/v2/app/posthandler"
appv1 "github.com/celestiaorg/celestia-app/v2/pkg/appconsts/v1"
appv2 "github.com/celestiaorg/celestia-app/v2/pkg/appconsts/v2"
"github.com/celestiaorg/celestia-app/v2/pkg/proof"
blobkeeper "github.com/celestiaorg/celestia-app/v2/x/blob/keeper"
blobtypes "github.com/celestiaorg/celestia-app/v2/x/blob/types"
blobstreamkeeper "github.com/celestiaorg/celestia-app/v2/x/blobstream/keeper"
blobstreamtypes "github.com/celestiaorg/celestia-app/v2/x/blobstream/types"
"github.com/celestiaorg/celestia-app/v2/x/minfee"
mintkeeper "github.com/celestiaorg/celestia-app/v2/x/mint/keeper"
minttypes "github.com/celestiaorg/celestia-app/v2/x/mint/types"
"github.com/celestiaorg/celestia-app/v2/x/paramfilter"
"github.com/celestiaorg/celestia-app/v2/x/signal"
signaltypes "github.com/celestiaorg/celestia-app/v2/x/signal/types"
"github.com/celestiaorg/celestia-app/v2/x/tokenfilter"
"github.com/celestiaorg/celestia-app/v3/app/ante"
"github.com/celestiaorg/celestia-app/v3/app/encoding"
"github.com/celestiaorg/celestia-app/v3/app/module"
"github.com/celestiaorg/celestia-app/v3/app/posthandler"
appv1 "github.com/celestiaorg/celestia-app/v3/pkg/appconsts/v1"
appv2 "github.com/celestiaorg/celestia-app/v3/pkg/appconsts/v2"
"github.com/celestiaorg/celestia-app/v3/pkg/proof"
blobkeeper "github.com/celestiaorg/celestia-app/v3/x/blob/keeper"
blobtypes "github.com/celestiaorg/celestia-app/v3/x/blob/types"
blobstreamkeeper "github.com/celestiaorg/celestia-app/v3/x/blobstream/keeper"
blobstreamtypes "github.com/celestiaorg/celestia-app/v3/x/blobstream/types"
"github.com/celestiaorg/celestia-app/v3/x/minfee"
mintkeeper "github.com/celestiaorg/celestia-app/v3/x/mint/keeper"
minttypes "github.com/celestiaorg/celestia-app/v3/x/mint/types"
"github.com/celestiaorg/celestia-app/v3/x/paramfilter"
"github.com/celestiaorg/celestia-app/v3/x/signal"
signaltypes "github.com/celestiaorg/celestia-app/v3/x/signal/types"
"github.com/celestiaorg/celestia-app/v3/x/tokenfilter"
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node"
Expand Down Expand Up @@ -254,7 +254,7 @@ func New(
)

app.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, keys[feegrant.StoreKey], app.AccountKeeper)
// The ugrade keeper is intialised solely for the ibc keeper which depends on it to know what the next validator hash is for after the
// The upgrade keeper is intialised solely for the ibc keeper which depends on it to know what the next validator hash is for after the
// upgrade. This keeper is not used for the actual upgrades but merely for compatibility reasons. Ideally IBC has their own upgrade module
// for performing IBC based upgrades. Note, as we use rolling upgrades, IBC technically never needs this functionality.
app.UpgradeKeeper = upgradekeeper.NewKeeper(nil, keys[upgradetypes.StoreKey], appCodec, "", app.BaseApp, authtypes.NewModuleAddress(govtypes.ModuleName).String())
Expand Down
6 changes: 3 additions & 3 deletions app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package app_test
import (
"testing"

"github.com/celestiaorg/celestia-app/v2/app"
"github.com/celestiaorg/celestia-app/v2/app/encoding"
"github.com/celestiaorg/celestia-app/v2/x/minfee"
"github.com/celestiaorg/celestia-app/v3/app"
"github.com/celestiaorg/celestia-app/v3/app/encoding"
"github.com/celestiaorg/celestia-app/v3/x/minfee"
"github.com/stretchr/testify/assert"
"github.com/tendermint/tendermint/libs/log"
tmdb "github.com/tendermint/tm-db"
Expand Down
4 changes: 2 additions & 2 deletions app/check_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package app
import (
"fmt"

"github.com/celestiaorg/celestia-app/v2/pkg/appconsts"
blobtypes "github.com/celestiaorg/celestia-app/v2/x/blob/types"
"github.com/celestiaorg/celestia-app/v3/pkg/appconsts"
blobtypes "github.com/celestiaorg/celestia-app/v3/x/blob/types"
"github.com/celestiaorg/go-square/blob"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
abci "github.com/tendermint/tendermint/abci/types"
Expand Down
6 changes: 3 additions & 3 deletions app/default_overrides.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"fmt"
"time"

"github.com/celestiaorg/celestia-app/v2/pkg/appconsts"
"github.com/celestiaorg/celestia-app/v2/x/mint"
minttypes "github.com/celestiaorg/celestia-app/v2/x/mint/types"
"github.com/celestiaorg/celestia-app/v3/pkg/appconsts"
"github.com/celestiaorg/celestia-app/v3/x/mint"
minttypes "github.com/celestiaorg/celestia-app/v3/x/mint/types"
"github.com/cosmos/cosmos-sdk/codec"
serverconfig "github.com/cosmos/cosmos-sdk/server/config"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down
2 changes: 1 addition & 1 deletion app/default_overrides_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"
"time"

"github.com/celestiaorg/celestia-app/v2/app/encoding"
"github.com/celestiaorg/celestia-app/v3/app/encoding"
"github.com/cosmos/cosmos-sdk/types"
distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
Expand Down
2 changes: 1 addition & 1 deletion app/denom.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package app

import "github.com/celestiaorg/celestia-app/v2/pkg/appconsts"
import "github.com/celestiaorg/celestia-app/v3/pkg/appconsts"

const (
// BondDenom defines the native staking token denomination.
Expand Down
21 changes: 10 additions & 11 deletions app/errors/insufficient_gas_price_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import (
"testing"

"cosmossdk.io/errors"
"github.com/celestiaorg/celestia-app/v2/app"
"github.com/celestiaorg/celestia-app/v2/app/encoding"
apperr "github.com/celestiaorg/celestia-app/v2/app/errors"
"github.com/celestiaorg/celestia-app/v2/pkg/appconsts"
"github.com/celestiaorg/celestia-app/v2/pkg/user"
testutil "github.com/celestiaorg/celestia-app/v2/test/util"
"github.com/celestiaorg/celestia-app/v2/test/util/testfactory"
blob "github.com/celestiaorg/celestia-app/v2/x/blob/types"
"github.com/celestiaorg/celestia-app/v3/app"
"github.com/celestiaorg/celestia-app/v3/app/encoding"
apperr "github.com/celestiaorg/celestia-app/v3/app/errors"
"github.com/celestiaorg/celestia-app/v3/pkg/appconsts"
"github.com/celestiaorg/celestia-app/v3/pkg/user"
testutil "github.com/celestiaorg/celestia-app/v3/test/util"
"github.com/celestiaorg/celestia-app/v3/test/util/testfactory"
blob "github.com/celestiaorg/celestia-app/v3/x/blob/types"
"github.com/celestiaorg/go-square/namespace"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
Expand All @@ -26,7 +26,7 @@ import (
func TestInsufficientMinGasPriceIntegration(t *testing.T) {
var (
gasLimit uint64 = 1_000_000
feeAmount int64 = 10
feeAmount uint64 = 10
gasPrice = float64(feeAmount) / float64(gasLimit)
)
account := "test"
Expand All @@ -40,14 +40,13 @@ func TestInsufficientMinGasPriceIntegration(t *testing.T) {
signer, err := user.NewSigner(kr, enc.TxConfig, testutil.ChainID, appconsts.LatestVersion, user.NewAccount(account, acc.GetAccountNumber(), acc.GetSequence()))
require.NoError(t, err)

fee := sdk.NewCoins(sdk.NewCoin(app.BondDenom, sdk.NewInt(feeAmount)))
b, err := blob.NewBlob(namespace.RandomNamespace(), []byte("hello world"), 0)
require.NoError(t, err)

msg, err := blob.NewMsgPayForBlobs(signer.Account(account).Address().String(), appconsts.LatestVersion, b)
require.NoError(t, err)

rawTx, err := signer.CreateTx([]sdk.Msg{msg}, user.SetGasLimit(gasLimit), user.SetFeeAmount(fee))
rawTx, err := signer.CreateTx([]sdk.Msg{msg}, user.SetGasLimit(gasLimit), user.SetFee(feeAmount))
require.NoError(t, err)

decorator := ante.NewDeductFeeDecorator(testApp.AccountKeeper, testApp.BankKeeper, testApp.FeeGrantKeeper, nil)
Expand Down
Loading

0 comments on commit 0ffc469

Please sign in to comment.