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

x/epochs: Make the epochs module store the start height #452

Closed
ValarDragon opened this issue Aug 28, 2021 · 4 comments · Fixed by #562
Closed

x/epochs: Make the epochs module store the start height #452

ValarDragon opened this issue Aug 28, 2021 · 4 comments · Fixed by #562

Comments

@ValarDragon
Copy link
Member

We currently only store the start time, but the start height is quite helpful as well in debugging things

@ValarDragon
Copy link
Member Author

This can be done in a backwards compatible way. We just need to add a start_height field to the proto file https://github.com/osmosis-labs/osmosis/blob/main/proto/osmosis/epochs/genesis.proto#L10

And then whenever we update the epoch height in https://github.com/osmosis-labs/osmosis/blob/main/x/epochs/abci.go#L29-L33, we just need to add the start height field as well.

@jeebster
Copy link
Contributor

@ValarDragon I'm happy to help with this, but I'd appreciate some guidance on the protobuf compilation strategy used in this repository. I compiled changes in the proto file via gogo proto and my result looks like it's missing some extensions relative to the existing compiled genesis file. Anyways, I didn't see much instruction other than a few of the tools in the devtools directory that I manually installed previously.

Here's my compiler invocation for reference:

protoc -I=. -I=/usr/local/include/ -I=$GOPATH/pkg/mod/github.com/gogo/protobuf\@v1.3.2/ --\
google/protobuf/any.proto=github.com/gogo/protobuf/types,\
google/protobuf/duration.proto=github.com/gogo/protobuf/types,\
google/protobuf/struct.proto=github.com/gogo/protobuf/types,\
google/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\
gogoproto/gogo.proto=github.com/gogo/protobuf/gogoproto,\
google/protobuf/wrappers.proto=github.com/gogo/protobuf/types:. \
proto/osmosis/epochs/genesis.proto

Perhaps I should be using buf via the protocgen.sh?

@ValarDragon
Copy link
Member Author

Amazing, thanks! The way I compile these is to use the commands in the make file, I believe its make proto-all. You do need docker installed, and to delete the /vendor if its present though

@jeebster
Copy link
Contributor

Ah I missed this, thanks for the guidance; all good now 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants