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

Cherry-pick upgrade-14 cosmos changes #8869

Merged
merged 70 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
fb30a30
chore: update proto dependencies and scripts to produce/use them
JimLarson Jan 19, 2024
2d5fb88
chore: update ibc-go import versions
JimLarson Jan 19, 2024
3566817
chore: update for cosmos-sdk API changes
JimLarson Jan 19, 2024
4807023
fix: unwrap account keeper for app module
JimLarson Jan 22, 2024
bd7f21e
build: use temporary tag for cosmos-sdk
JimLarson Jan 22, 2024
cc1668f
build: clean up no-op go.mod replace directive
JimLarson Jan 23, 2024
972d243
feat: expose node service to retrieve operator config
JimLarson Jan 23, 2024
2d41178
fix: pick up snapshot initiation fix
JimLarson Jan 26, 2024
f4bd519
fix: avoid broken goleveldb
JimLarson Jan 29, 2024
0be9f00
fix: exempt more 3rd-party protos from link check
JimLarson Jan 30, 2024
e1fb84e
chore: use more cosmos-sdk replace directives and align formatting
JimLarson Jan 30, 2024
e83fb57
fix: govulncheck updates
JimLarson Jan 30, 2024
8633f4d
feat: tolerate missing files in gaia 3-way diff
JimLarson Jan 31, 2024
947048b
Fix for MacOS Sonoma Ledger detection issues
zmanian Oct 19, 2023
f91fbf3
docs: typo
JimLarson Feb 1, 2024
63bdd54
fix: update protobuf download and generation for ibc-go v4
JimLarson Jan 18, 2024
4fed53b
Merge pull request #8462 from zmanian/zaki/ledger
mergify[bot] Jan 9, 2024
2371b51
feat: upgrade ibc-go to v6.2.1
JimLarson Feb 1, 2024
a489858
build: update cosmos-sdk fork to final tag
JimLarson Feb 6, 2024
b6bc1c3
Merge pull request #8769 from Agoric/8767-ibc-4-proto
mergify[bot] Jan 18, 2024
aa4c9d4
ci(golangci-lint): ignore deprecations until we have none
michaelfig Feb 6, 2024
13ee402
docs: update note on unwrapping of account keeper
JimLarson Feb 6, 2024
89ffa75
Merge pull request #8791 from Agoric/8224-ibc5
mergify[bot] Feb 6, 2024
f49e069
chore(cosmos): panic instead of ignoring export errors
michaelfig Feb 6, 2024
b770ab4
Merge pull request #8865 from Agoric/8224-ibc6
mergify[bot] Feb 6, 2024
9c3e86f
Merge pull request #8866 from Agoric/mfig-silence-golint-errors
mergify[bot] Feb 7, 2024
a7fa8c3
build(cosmos): update cosmos-sdk with gov fixes
mhofman Feb 8, 2024
ce1197d
fix(cosmos): add action context to core evals
mhofman Feb 12, 2024
eb856af
Revert "fix(cosmos): don't log expected missing tx context of CORE_EVAL"
mhofman Feb 12, 2024
bd95f61
chore: handle new agd query gov proposals response
mhofman Feb 12, 2024
4f429c8
chore: handle failed proposals in test script
mhofman Feb 12, 2024
4cb5bc9
chore: debug faucet script
mhofman Feb 12, 2024
04eae85
Merge pull request #8902 from Agoric/mhofman/8887-fix-governance
mergify[bot] Feb 13, 2024
f1b6b74
feat(cosmos): Add a vstorage package for decoding CapData
gibson042 Jul 17, 2023
d20e708
feat(cosmos): Add a "CapData" vstorage RPC endpoint
gibson042 Jul 17, 2023
0cf99ec
chore(cosmos): Regenerate protobuf code
gibson042 Jul 17, 2023
8f6f377
fixup! feat(cosmos): Add a "CapData" vstorage RPC endpoint
gibson042 Jul 17, 2023
8cd6cd6
chore(cosmos): Improve vstorage capdata error messages
gibson042 Jul 21, 2023
68598e8
test(cosmos): Test vstorage capdata
gibson042 Jul 21, 2023
5426135
test(cosmos): Test gRPC endpoint "/agoric.vstorage.Query/CapData"
gibson042 Jul 22, 2023
4c4dc2f
chore(cosmos): Improve vstorage/keeper/grpc_query.go doc comments
gibson042 Jul 26, 2023
b0c6e7d
chore(cosmos): Add vstorage README
gibson042 Jul 26, 2023
26d4b6c
chore(cosmos): Avoid special treatment of HTML characters in vstorage…
gibson042 Jul 27, 2023
49429b5
chore(cosmos): Update doc comments for accuracy
gibson042 Jul 31, 2023
ee23c4e
feat(cosmos): Always include alleged name and slot id in vstorage Cap…
gibson042 Jul 27, 2023
ae0e71d
docs(cosmos): Fix hyperlinks
gibson042 Jul 31, 2023
8cda00a
Merge pull request #8056 from Agoric/gibson-7581-rpc-capdata-formatting
gibson042 Jul 28, 2023
3f7f19e
docs(cosmos/x/vstorage): Add README section for "REST" API interface
gibson042 Aug 2, 2023
f2d2bc8
docs(cosmos/x/vstorage): Add REAME link to vstorage/query.proto
gibson042 Aug 1, 2023
4d3c6e0
Merge pull request #8119 from Agoric/gibson-8056-followup
gibson042 Jul 31, 2023
72556d1
docs(cosmos/x/vstorage): Add README section for CLI
gibson042 Aug 2, 2023
f71b439
Merge pull request #8130 from Agoric/gibson-8056-followup-2
gibson042 Aug 1, 2023
71a217e
feat: agd vstorage 'path' for data or children
turadg Dec 15, 2023
9a61356
docs(vstorage): Add an example external protobuf interface interaction
gibson042 Oct 26, 2023
3a00786
Merge pull request #8134 from Agoric/gibson-8056-followup-3
gibson042 Aug 2, 2023
428fbea
docs: recommend 'path' style of vstorage query
turadg Dec 15, 2023
0417812
Merge pull request #8475 from Agoric/gibson-2023-10-vstorage-protobuf…
mergify[bot] Oct 26, 2023
70e5121
style(golang): Align CLI command fields with upstream recommendations
gibson042 Dec 20, 2023
c8611f7
Merge pull request #8637 from Agoric/ta/vstorage-cli
mergify[bot] Dec 15, 2023
2463df5
chore(agd testnet): Deprecate --v in favor of --validator-count, -n
gibson042 Dec 20, 2023
29bc63d
chore: Avoid out-of-bounds reads in go-lang code (#8674)
gibson042 Dec 19, 2023
1279bec
chore(x/swingset): Adopt and explain conventions for file/inline CLI …
gibson042 Jan 19, 2024
95e9aca
chore(golang): Clarify error messages (#8677)
gibson042 Dec 24, 2023
7d6d60a
Merge pull request #8678 from Agoric/gibson-2023-12-golang-cli-commands
mergify[bot] Jan 19, 2024
5440139
docs(golang): Improve the description of PopulateAction
gibson042 Feb 1, 2024
0624a16
style(golang): Rename PopulateAction variables for clarity
gibson042 Feb 1, 2024
02f7abc
style(golang): Rename a test helper function for clarity
gibson042 Feb 1, 2024
a96d23b
Merge pull request #8855 from Agoric/gibson-gh-8703-followup
mergify[bot] Feb 4, 2024
0bb03a0
feat(cosmos)!: make vm comms use `context.Context`
michaelfig Jun 29, 2023
e8a3a77
feat(cosmos): clean up `OnStartHook` and `OnExitHook` signatures
michaelfig Jul 1, 2023
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
5 changes: 5 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
golangci:
name: golangci-lint
runs-on: ubuntu-latest
strategy:
matrix:
mode: [no-deprecations, no-failure]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
Expand All @@ -32,6 +35,8 @@ jobs:
with:
version: latest
args: --timeout=3m
${{ matrix.mode == 'no-deprecations' && '--exclude=^SA1019' || '' }}
${{ matrix.mode == 'no-failure' && '--issues-exit-code=0' || '' }}
# for pull requests, show only new issues
# Too bad it's incompatible with working-directory.
# only-new-issues: true
Expand Down
37 changes: 25 additions & 12 deletions golang/cosmos/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,44 +98,57 @@ proto-lint: proto-tools
proto-check-breaking: proto-tools
${BIN}/buf breaking --against $(PR_TARGET_REPO)#branch=$(PR_TARGET_BRANCH),subdir=golang/cosmos

TMVER := $(shell go list -m all | sed -ne 's!^github\.com/tendermint/tendermint \(.*\)!\1!p')
COSMOSVER = $(shell go list -m all | sed -ne 's!^github\.com/cosmos/cosmos-sdk \(.*\)!\1!p')
IBCVER = 832044782f10
t:
echo "X$(COSMOSVER)X"

TM_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/tendermint/tendermint)/proto/tendermint
GOGO_PROTO_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/gogo/protobuf)
IBC_PROTO_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/ibc-go/v4)/proto/ibc/core
GOGO_PROTO_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/gogo/protobuf)
# GOOGLE_API_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/googleapis/googleapis)/google/api
IBC_PROTO_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/ibc-go/v6)/proto/ibc/core
COSMOS_PROTO_PROTO_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/cosmos-proto)/proto/cosmos_proto
COSMOS_SDK_PROTO_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/cosmos-sdk)/proto/cosmos

COSMOS_PROTO_TYPES = third_party/proto/cosmos_proto
GOGO_PROTO_TYPES = third_party/proto/gogoproto
GOOGLE_API_TYPES = third_party/proto/google/api
GOOGLE_PROTO_TYPES = third_party/proto/google/protobuf
IBC_CHANNEL_TYPES = third_party/proto/ibc/core/channel/v1
IBC_CLIENT_TYPES = third_party/proto/ibc/core/client/v1
SDK_QUERY_TYPES = third_party/proto/cosmos/base/query/v1beta1
SDK_BASE_TYPES = third_party/proto/cosmos/base/v1beta1
SDK_QUERY_TYPES = third_party/proto/cosmos/base/query/v1beta1
SDK_UPGRADE_TYPES = third_party/proto/cosmos/upgrade/v1beta1

proto-update-deps:
mkdir -p $(COSMOS_PROTO_TYPES)
curl -sSL $(COSMOS_PROTO_PROTO_URL)/cosmos.proto > $(COSMOS_PROTO_TYPES)/cosmos.proto

mkdir -p $(GOGO_PROTO_TYPES)
curl -sSL $(GOGO_PROTO_URL)/gogoproto/gogo.proto > $(GOGO_PROTO_TYPES)/gogo.proto

# Downloading from a not-a-go-module is problematic. These files are artifacts for now.
# mkdir -p $(GOOGLE_API_TYPES)
# curl -sSL $(GOOGLE_API_URL)/annotations.proto > $(GOOGLE_API_TYPES)/annotations.proto
# curl -sSL $(GOOGLE_API_URL)/http.proto > $(GOOGLE_API_TYPES)/http.proto
# curl -sSL $(GOOGLE_API_URL)/httpbody.proto > $(GOOGLE_API_TYPES)/httpbody.proto

mkdir -p $(GOOGLE_PROTO_TYPES)
curl -sSL $(GOGO_PROTO_URL)/protobuf/google/protobuf/any.proto > $(GOOGLE_PROTO_TYPES)/any.proto

mkdir -p $(IBC_CHANNEL_TYPES)
curl -sSL $(IBC_PROTO_URL)/channel/v1/channel.proto > $(IBC_CHANNEL_TYPES)/channel.proto

mkdir -p $(IBC_CLIENT_TYPES)
curl -sSL $(IBC_PROTO_URL)/client/v1/client.proto > $(IBC_CLIENT_TYPES)/client.proto

mkdir -p $(SDK_BASE_TYPES)
curl -sSL $(COSMOS_SDK_PROTO_URL)/base/v1beta1/coin.proto > $(SDK_BASE_TYPES)/coin.proto

mkdir -p $(SDK_QUERY_TYPES)
curl -sSL $(COSMOS_SDK_PROTO_URL)/base/query/v1beta1/pagination.proto > $(SDK_QUERY_TYPES)/pagination.proto

mkdir -p $(SDK_UPGRADE_TYPES)
curl -sSL $(COSMOS_SDK_PROTO_URL)/upgrade/v1beta1/upgrade.proto > $(SDK_UPGRADE_TYPES)/upgrade.proto


UNAME_S ?= $(shell uname -s)
UNAME_M ?= $(shell uname -m)

BUF_VERSION ?= 0.56.0
BUF_VERSION ?= 1.0.0

PROTOC_VERSION ?= 3.11.2
ifeq ($(UNAME_S),Linux)
Expand Down
12 changes: 7 additions & 5 deletions golang/cosmos/ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
ibcante "github.com/cosmos/ibc-go/v4/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v4/modules/core/keeper"
ibcante "github.com/cosmos/ibc-go/v6/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v6/modules/core/keeper"
)

// HandlerOptions extend the SDK's AnteHandler options by requiring the IBC
Expand Down Expand Up @@ -43,8 +43,10 @@ func NewAnteHandler(opts HandlerOptions) (sdk.AnteHandler, error) {

anteDecorators := []sdk.AnteDecorator{
ante.NewSetUpContextDecorator(),
ante.NewRejectExtensionOptionsDecorator(),
ante.NewMempoolFeeDecorator(),
ante.NewExtensionOptionsDecorator(nil), // reject all extensions
// former ante.NewMempoolFeeDecorator()
// replaced as in https://github.com/provenance-io/provenance/pull/1016
ante.NewDeductFeeDecorator(opts.AccountKeeper, opts.BankKeeper, opts.FeegrantKeeper, nil),
ante.NewValidateBasicDecorator(),
ante.NewTxTimeoutHeightDecorator(),
ante.NewValidateMemoDecorator(opts.AccountKeeper),
Expand All @@ -58,7 +60,7 @@ func NewAnteHandler(opts HandlerOptions) (sdk.AnteHandler, error) {
ante.NewSigVerificationDecorator(opts.AccountKeeper, opts.SignModeHandler),
NewAdmissionDecorator(opts.AdmissionData),
ante.NewIncrementSequenceDecorator(opts.AccountKeeper),
ibcante.NewAnteDecorator(opts.IBCKeeper),
ibcante.NewRedundantRelayDecorator(opts.IBCKeeper),
}

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