Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#
# This image is pushed to the GHCR as https://ghcr.io/cosmos/simapp

FROM golang:1.23-alpine AS build-env
FROM golang:1.24-alpine AS build-env

# Install minimum necessary dependencies
ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev
Expand Down
338 changes: 236 additions & 102 deletions api/cosmos/base/abci/v1beta1/abci.pulsar.go

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions contrib/devtools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# docker build --pull --rm -f "contrib/devtools/Dockerfile" -t cosmossdk-proto:latest "contrib/devtools"
# docker run --rm -v $(pwd):/workspace --workdir /workspace cosmossdk-proto sh ./scripts/protocgen.sh

FROM bufbuild/buf:1.24.0 as BUILDER
FROM golang:1.23-alpine
FROM bufbuild/buf:1.54.0 AS builder
FROM golang:1.24-alpine

RUN apk add --no-cache \
nodejs \
Expand Down
2 changes: 1 addition & 1 deletion contrib/images/simd-dlv/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.23-alpine AS build
FROM golang:1.24-alpine AS build

RUN apk add build-base git linux-headers libc-dev
RUN go install github.com/go-delve/delve/cmd/dlv@latest
Expand Down
12 changes: 6 additions & 6 deletions proto/buf.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ deps:
- remote: buf.build
owner: cosmos
repository: cosmos-proto
commit: 1935555c206d4afb9e94615dfd0fad31
digest: shake256:c74d91a3ac7ae07d579e90eee33abf9b29664047ac8816500cf22c081fec0d72d62c89ce0bebafc1f6fec7aa5315be72606717740ca95007248425102c365377
commit: 04467658e59e44bbb22fe568206e1f70
digest: shake256:73a640bd60e0c523b0f8237ff34eab67c45a38b64bbbde1d80224819d272dbf316ac183526bd245f994af6608b025f5130483d0133c5edd385531326b5990466
- remote: buf.build
owner: cosmos
repository: gogo-proto
commit: 5e5b9fdd01804356895f8f79a6f1ddc1
digest: shake256:0b85da49e2e5f9ebc4806eae058e2f56096ff3b1c59d1fb7c190413dd15f45dd456f0b69ced9059341c80795d2b6c943de15b120a9e0308b499e43e4b5fc2952
commit: 88ef6483f90f478fb938c37dde52ece3
digest: shake256:89c45df2aa11e0cff97b0d695436713db3d993d76792e9f8dc1ae90e6ab9a9bec55503d48ceedd6b86069ab07d3041b32001b2bfe0227fa725dd515ff381e5ba
- remote: buf.build
owner: googleapis
repository: googleapis
commit: cc916c31859748a68fd229a3c8d7a2e8
digest: shake256:469b049d0eb04203d5272062636c078decefc96fec69739159c25d85349c50c34c7706918a8b216c5c27f76939df48452148cff8c5c3ae77fa6ba5c25c1b8bf8
commit: 72c8614f3bd0466ea67931ef2c43d608
digest: shake256:b3ac4d383db09f92ab0ca85d12bff8c49eddf7031bd3a854c260b6ac4ed6a2bb85b52b3393c316d28f8038bf3b8e70cb3d16470e8cc4423007678fb6d89d36d4
2 changes: 2 additions & 0 deletions proto/cosmos/base/abci/v1beta1/abci.proto
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ message TxResponse {
//
// Since: cosmos-sdk 0.42.11, 0.44.5, 0.45
repeated tendermint.abci.Event events = 13 [(gogoproto.nullable) = false];
// The signers of the transaction.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[question] How is each signer represented in this [][]byte? In celestia-app we often use the signer's address as a string but given this isn't a repeated string, I assume it's a slice of the raw bytes of each signer (?)

Maybe this comment can clarify the format of signers.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it's a slice of raw bytes of each signer buy now that I'm thinking I think it'd be better to parse it to strings before we return to the user so might just change it to strings and I'll update the comment too.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated it to strings.

repeated string signers = 14;
}

// ABCIMessageLog defines a structure containing an indexed tx ABCI message log.
Expand Down
36 changes: 24 additions & 12 deletions scripts/protocgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# docker build --pull --rm -f "contrib/devtools/Dockerfile" -t cosmossdk-proto:latest "contrib/devtools"
# docker run --rm -v $(pwd):/workspace --workdir /workspace cosmossdk-proto sh ./scripts/protocgen.sh

# Allow go to download a newer toolchain when the container ships with an older version.
export GOTOOLCHAIN="${GOTOOLCHAIN:-auto}"

echo "Formatting protobuf files"
find ./ -name "*.proto" -exec clang-format -i {} \;

Expand All @@ -13,22 +16,31 @@ echo "Generating gogo proto code"
cd proto
proto_dirs=$(find ./cosmos ./amino -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
for dir in $proto_dirs; do
for file in $(find "${dir}" -maxdepth 1 -name '*.proto'); do
# this regex checks if a proto file has its go_package set to cosmossdk.io/api/...
# gogo proto files SHOULD ONLY be generated if this is false
# we don't want gogo proto to run for proto files which are natively built for google.golang.org/protobuf
if grep -q "option go_package" "$file" && grep -H -o -c 'option go_package.*cosmossdk.io/api' "$file" | grep -q ':0$'; then
buf generate --template buf.gen.gogo.yaml $file
fi
done
for file in $(find "${dir}" -maxdepth 1 -name '*.proto'); do
# this regex checks if a proto file has its go_package set to cosmossdk.io/api/...
# gogo proto files SHOULD ONLY be generated if this is false
# we don't want gogo proto to run for proto files which are natively built for google.golang.org/protobuf
if grep -q "option go_package" "$file" && grep -H -o -c 'option go_package.*cosmossdk.io/api' "$file" | grep -q ':0$'; then
buf generate --template buf.gen.gogo.yaml $file
fi
done
done

cd ..

# generate tests proto code
(cd testutil/testdata; buf generate)
(cd baseapp/testutil; buf generate)
(cd tests/integration/tx/internal; make codegen)
(
cd testutil/testdata
buf generate
)
(
cd baseapp/testutil
buf generate
)
(
cd tests/integration/tx/internal
make codegen
)

# move proto files to the right places
cp -r github.com/cosmos/cosmos-sdk/* ./
Expand All @@ -37,4 +49,4 @@ rm -rf github.com cosmossdk.io

go mod tidy

./scripts/protocgen-pulsar.sh
./scripts/protocgen-pulsar.sh
174 changes: 112 additions & 62 deletions types/abci.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions types/result_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ height: "10"
info: info
logs: []
raw_log: '[]'
signers: []
timestamp: timestamp
tx: null
txhash: "74657374"
Expand Down
Loading
Loading