-
Notifications
You must be signed in to change notification settings - Fork 16
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
Expose ContractReader and ChainWriter of relayer in relayerSet #749
Conversation
Is this PR part of a set? If so, please link them together from the descriptions. |
I don't follow - relayerset is supposed to serve relayers, which then hold a Chain Reader and Chain Writer. What does defining a Chain Reader and Chain Writer on a relayerset mean? |
@patrickhuie19 This is just a way to save us from instantiating an extra server for the relayer. The calls we would make normally are: We could translate this to the GRPC world by having each call to RelayerSet.Get wrap the returned relayer in a server and register that to the GRPC server. However this is actually pretty inefficient since a relayer object on its own is useless; users will always want to use the relayer to instantiate eg. a chainreader or chainwriter. So we can avoid the intermediate server for the relayer by just storing a reference to the relayerSet client and the relayer we want to fetch. I.e. the calls described above instead would become: RelayerSet.Get -> RelayerClient (i.e. a RelayerSetClient + relayerID) -- effectively this call just acts as a check that the relayer exists |
That makes sense to me. Can we document that @kidambisrinivas ? |
@patrickhuie19 Documented this |
Updates
Testing