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

Updating gaiad to version 4.1.0 and updating proto-compiler to use ibc-go #735

Merged
merged 13 commits into from
Mar 15, 2021

Conversation

andynog
Copy link
Contributor

@andynog andynog commented Mar 10, 2021

Closes: #702

Description

Updated gaiad to the latest version 4.1.0 (released today March 10, 2021 which uses cosmos-sdk 0.42 but includes a security fix so all nodes upgraded to this version)


For contributor use:

  • Updated the Unreleased section of CHANGELOG.md with the issue.
  • If applicable: Unit tests written, added test to CI.
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Updated relevant documentation (docs/) and code comments.
  • Re-reviewed Files changed in the Github PR explorer.

@andynog andynog added the I: dependencies Internal: related to dependencies label Mar 10, 2021
@andynog andynog added this to the 03.2021 milestone Mar 10, 2021
@andynog andynog requested review from adizere and ancazamfir March 10, 2021 23:24
@andynog andynog requested a review from romac as a code owner March 10, 2021 23:24
@codecov-io
Copy link

codecov-io commented Mar 11, 2021

Codecov Report

Merging #735 (c00aaa6) into master (b1b37f5) will increase coverage by 30.2%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #735      +/-   ##
=========================================
+ Coverage    13.6%   43.8%   +30.2%     
=========================================
  Files          69     159      +90     
  Lines        3752   10420    +6668     
  Branches     1374       0    -1374     
=========================================
+ Hits          513    4572    +4059     
- Misses       2618    5848    +3230     
+ Partials      621       0     -621     
Impacted Files Coverage Δ
...application/ics20_fungible_token_transfer/error.rs 0.0% <ø> (ø)
...ion/ics20_fungible_token_transfer/msgs/transfer.rs 0.0% <ø> (ø)
..._transfer/relay_application_logic/send_transfer.rs 0.0% <ø> (ø)
modules/src/events.rs 0.0% <ø> (ø)
modules/src/handler.rs 100.0% <ø> (ø)
modules/src/ics02_client/client_consensus.rs 55.8% <ø> (ø)
modules/src/ics02_client/client_def.rs 33.0% <ø> (ø)
modules/src/ics02_client/client_state.rs 65.1% <ø> (ø)
modules/src/ics02_client/client_type.rs 79.1% <ø> (+31.5%) ⬆️
modules/src/ics02_client/context.rs 100.0% <ø> (ø)
... and 255 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1468495...c00aaa6. Read the comment docs.

@andynog
Copy link
Contributor Author

andynog commented Mar 11, 2021

I think this is good to be merged @adizere and @ancazamfir.

@ancazamfir
Copy link
Collaborator

Thanks! We also need to fix the scripts, ./scripts/dev-env ~/.hermes/config.toml ibc-0 ibc-1 currently fails. I realized that running ./e2e/run.py -c ~/.hermes/config.toml might be ok once the scripts are fixed as we currently don't decode in master the new header field in the update client result (this causes failures in my PR #691 where I do this)

@adizere adizere self-assigned this Mar 11, 2021
@ancazamfir
Copy link
Collaborator

We should also update the protos, now in https://github.com/cosmos/ibc-go/tree/main/proto/ibcgo

@andynog
Copy link
Contributor Author

andynog commented Mar 11, 2021

Thanks! We also need to fix the scripts, ./scripts/dev-env ~/.hermes/config.toml ibc-0 ibc-1 currently fails. I realized that running ./e2e/run.py -c ~/.hermes/config.toml might be ok once the scripts are fixed as we currently don't decode in master the new header field in the update client result (this causes failures in my PR #691 where I do this)

I've tested the dev-env script with gaiad v4.1.0 and it wokrs for me.

@andynog
Copy link
Contributor Author

andynog commented Mar 11, 2021

Got logic to compile the protos from ibc-go for ibc protos and from cosmos-sdk for cosmos protos working.

I could compile all crates with the new protos. Ran a dev-env test and it passed.

I think this is good to go

@andynog andynog changed the title Updating gaiad to version 4.1.0 for CI workflow Updating gaiad to version 4.1.0 for CI workflow and updating proto-compiler to use ibc-go protos Mar 11, 2021
@andynog andynog changed the title Updating gaiad to version 4.1.0 for CI workflow and updating proto-compiler to use ibc-go protos Updating gaiad to version 4.1.0 and updating proto-compiler to use ibc-go Mar 11, 2021
@andynog andynog added the proto label Mar 12, 2021
@@ -0,0 +1 @@
# [doc = r" Generated client implementations."] pub mod abci_application_client { # ! [allow (unused_variables , dead_code , missing_docs)] use tonic :: codegen :: * ; pub struct AbciApplicationClient < T > { inner : tonic :: client :: Grpc < T > , } impl AbciApplicationClient < tonic :: transport :: Channel > { # [doc = r" Attempt to create a new client by connecting to a given endpoint."] pub async fn connect < D > (dst : D) -> Result < Self , tonic :: transport :: Error > where D : std :: convert :: TryInto < tonic :: transport :: Endpoint > , D :: Error : Into < StdError > , { let conn = tonic :: transport :: Endpoint :: new (dst) ? . connect () . await ? ; Ok (Self :: new (conn)) } } impl < T > AbciApplicationClient < T > where T : tonic :: client :: GrpcService < tonic :: body :: BoxBody > , T :: ResponseBody : Body + HttpBody + Send + 'static , T :: Error : Into < StdError > , < T :: ResponseBody as HttpBody > :: Error : Into < StdError > + Send , { pub fn new (inner : T) -> Self { let inner = tonic :: client :: Grpc :: new (inner) ; Self { inner } } pub fn with_interceptor (inner : T , interceptor : impl Into < tonic :: Interceptor >) -> Self { let inner = tonic :: client :: Grpc :: with_interceptor (inner , interceptor) ; Self { inner } } pub async fn echo (& mut self , request : impl tonic :: IntoRequest < :: tendermint_proto :: abci :: RequestEcho > ,) -> Result < tonic :: Response < :: tendermint_proto :: abci :: ResponseEcho > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/tendermint.abci.ABCIApplication/Echo") ; self . inner . unary (request . into_request () , path , codec) . await } pub async fn flush (& mut self , request : impl tonic :: IntoRequest < :: tendermint_proto :: abci :: RequestFlush > ,) -> Result < tonic :: Response < :: tendermint_proto :: abci :: ResponseFlush > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/tendermint.abci.ABCIApplication/Flush") ; self . inner . unary (request . into_request () , path , codec) . await } pub async fn info (& mut self , request : impl tonic :: IntoRequest < :: tendermint_proto :: abci :: RequestInfo > ,) -> Result < tonic :: Response < :: tendermint_proto :: abci :: ResponseInfo > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/tendermint.abci.ABCIApplication/Info") ; self . inner . unary (request . into_request () , path , codec) . await } pub async fn set_option (& mut self , request : impl tonic :: IntoRequest < :: tendermint_proto :: abci :: RequestSetOption > ,) -> Result < tonic :: Response < :: tendermint_proto :: abci :: ResponseSetOption > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/tendermint.abci.ABCIApplication/SetOption") ; self . inner . unary (request . into_request () , path , codec) . await } pub async fn deliver_tx (& mut self , request : impl tonic :: IntoRequest < :: tendermint_proto :: abci :: RequestDeliverTx > ,) -> Result < tonic :: Response < :: tendermint_proto :: abci :: ResponseDeliverTx > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/tendermint.abci.ABCIApplication/DeliverTx") ; self . inner . unary (request . into_request () , path , codec) . await } pub async fn check_tx (& mut self , request : impl tonic :: IntoRequest < :: tendermint_proto :: abci :: RequestCheckTx > ,) -> Result < tonic :: Response < :: tendermint_proto :: abci :: ResponseCheckTx > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/tendermint.abci.ABCIApplication/CheckTx") ; self . inner . unary (request . into_request () , path , codec) . await } pub async fn query (& mut self , request : impl tonic :: IntoRequest < :: tendermint_proto :: abci :: RequestQuery > ,) -> Result < tonic :: Response < :: tendermint_proto :: abci :: ResponseQuery > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/tendermint.abci.ABCIApplication/Query") ; self . inner . unary (request . into_request () , path , codec) . await } pub async fn commit (& mut self , request : impl tonic :: IntoRequest < :: tendermint_proto :: abci :: RequestCommit > ,) -> Result < tonic :: Response < :: tendermint_proto :: abci :: ResponseCommit > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/tendermint.abci.ABCIApplication/Commit") ; self . inner . unary (request . into_request () , path , codec) . await } pub async fn init_chain (& mut self , request : impl tonic :: IntoRequest < :: tendermint_proto :: abci :: RequestInitChain > ,) -> Result < tonic :: Response < :: tendermint_proto :: abci :: ResponseInitChain > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/tendermint.abci.ABCIApplication/InitChain") ; self . inner . unary (request . into_request () , path , codec) . await } pub async fn begin_block (& mut self , request : impl tonic :: IntoRequest < :: tendermint_proto :: abci :: RequestBeginBlock > ,) -> Result < tonic :: Response < :: tendermint_proto :: abci :: ResponseBeginBlock > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/tendermint.abci.ABCIApplication/BeginBlock") ; self . inner . unary (request . into_request () , path , codec) . await } pub async fn end_block (& mut self , request : impl tonic :: IntoRequest < :: tendermint_proto :: abci :: RequestEndBlock > ,) -> Result < tonic :: Response < :: tendermint_proto :: abci :: ResponseEndBlock > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/tendermint.abci.ABCIApplication/EndBlock") ; self . inner . unary (request . into_request () , path , codec) . await } pub async fn list_snapshots (& mut self , request : impl tonic :: IntoRequest < :: tendermint_proto :: abci :: RequestListSnapshots > ,) -> Result < tonic :: Response < :: tendermint_proto :: abci :: ResponseListSnapshots > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/tendermint.abci.ABCIApplication/ListSnapshots") ; self . inner . unary (request . into_request () , path , codec) . await } pub async fn offer_snapshot (& mut self , request : impl tonic :: IntoRequest < :: tendermint_proto :: abci :: RequestOfferSnapshot > ,) -> Result < tonic :: Response < :: tendermint_proto :: abci :: ResponseOfferSnapshot > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/tendermint.abci.ABCIApplication/OfferSnapshot") ; self . inner . unary (request . into_request () , path , codec) . await } pub async fn load_snapshot_chunk (& mut self , request : impl tonic :: IntoRequest < :: tendermint_proto :: abci :: RequestLoadSnapshotChunk > ,) -> Result < tonic :: Response < :: tendermint_proto :: abci :: ResponseLoadSnapshotChunk > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/tendermint.abci.ABCIApplication/LoadSnapshotChunk") ; self . inner . unary (request . into_request () , path , codec) . await } pub async fn apply_snapshot_chunk (& mut self , request : impl tonic :: IntoRequest < :: tendermint_proto :: abci :: RequestApplySnapshotChunk > ,) -> Result < tonic :: Response < :: tendermint_proto :: abci :: ResponseApplySnapshotChunk > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/tendermint.abci.ABCIApplication/ApplySnapshotChunk") ; self . inner . unary (request . into_request () , path , codec) . await } } impl < T : Clone > Clone for AbciApplicationClient < T > { fn clone (& self) -> Self { Self { inner : self . inner . clone () , } } } impl < T > std :: fmt :: Debug for AbciApplicationClient < T > { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { write ! (f , "AbciApplicationClient {{ ... }}") } } }
Copy link
Collaborator

@ancazamfir ancazamfir Mar 12, 2021

Choose a reason for hiding this comment

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

Is there a way to not generate the proto/src/prost/tendermint* empty files? Also, not sure if we need this one here, should be picked from tendermint-rs. I don't think it has any impact now though.

Copy link
Member

Choose a reason for hiding this comment

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

It seems that the empty files related to tendermint are dependencies in other files, and that's why they get generated. I manually removed the empty ones from this commit. I left the abci.rs.

@adizere adizere merged commit 0a4cd91 into master Mar 15, 2021
@adizere adizere deleted the andy/gaia-410 branch March 15, 2021 11:10
hu55a1n1 pushed a commit to hu55a1n1/hermes that referenced this pull request Sep 13, 2022
…c-go (informalsystems#735)

* Updating gaiad to version 4.1.0 for CI workflow (informalsystems#702)

* Updated changelog (informalsystems#735)

* Fixing the version for ibc-0 and ibc-1 services (informalsystems#702)

* Added workaround for log levels error & fix typo in changelog

* Updated generated proto files to sdk v0.42.1

* Patched the clone command to be aware of both repositories

* Added logic to compile with ibc-go but commented out because doesn't compile (informalsystems#735)

* Added logic to compile ibc-go proto files with cosmos-sdk proto files combined (informalsystems#735)

* Update some references due to proto changes (informalsystems#735)

* Bit of cleanup

* FMT

Co-authored-by: Adi Seredinschi <[email protected]>
Co-authored-by: Romain Ruetschi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: dependencies Internal: related to dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update images, CI and scripts to use gaia v4.1.0
5 participants