You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently most of the execution logic is done in the Client class. The client should handle mostly network configurations.
Solution
Implement an abstract mechanism to handle execution processes, including retries, backoffs, and node health assessments.
The first iteration for Executable can have only a few features:
typeExecutableinterface {
shouldRetry() // retries depending on response status codemakeRequest() interface{} // builds the grpc bodygetMethod(*_Channel) _Method// get the grpc method
}
Since python uses stubs as it's grpc communication, we could take logic from the go sdk and create Channel class which holds all the GRPC services:
typeChannelstruct {
// these are protobuf defined grpc servies and each one has specific methodscrypto services.CryptoServiceClientfile services.FileServiceClientcontract services.SmartContractServiceClienttopic services.ConsensusServiceClientfreeze services.FreezeServiceClientnetwork services.NetworkServiceClienttoken services.TokenServiceClientschedule services.ScheduleServiceClientutil services.UtilServiceClientaddressBook services.AddressBookServiceClientclient*grpc.ClientConn
}
Every transaction or query needs to have getMethod func that creates grpc stub using the grpc definitions:
Problem
Currently most of the execution logic is done in the
Client
class. The client should handle mostly network configurations.Solution
Implement an abstract mechanism to handle execution processes, including retries, backoffs, and node health assessments.
The first iteration for
Executable
can have only a few features:Since python uses stubs as it's grpc communication, we could take logic from the go sdk and create
Channel
class which holds all the GRPC services:Every transaction or query needs to have
getMethod
func that creates grpc stub using the grpc definitions:The text was updated successfully, but these errors were encountered: