-
Notifications
You must be signed in to change notification settings - Fork 357
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
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
I think this is good to be merged @adizere and @ancazamfir. |
Thanks! We also need to fix the scripts, |
We should also update the protos, now in https://github.com/cosmos/ibc-go/tree/main/proto/ibcgo |
I've tested the |
Got logic to compile the protos from I could compile all crates with the new protos. Ran a I think this is good to go |
@@ -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 {{ ... }}") } } } |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
…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]>
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:
docs/
) and code comments.Files changed
in the Github PR explorer.