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

Failed GRPC connections with reduced block time #174

Closed
rnbguy opened this issue Oct 25, 2022 · 0 comments · Fixed by #182
Closed

Failed GRPC connections with reduced block time #174

rnbguy opened this issue Oct 25, 2022 · 0 comments · Fixed by #182
Assignees
Labels
bug Something isn't working

Comments

@rnbguy
Copy link
Member

rnbguy commented Oct 25, 2022

When block time (timeout_commit in config.toml) is reduced, GRPC calls are failed. This is because, even though Tendermint has started to produce blocks, GRPC endpoints are not ready.

In the following code, .spinup() waits for RPC endpoints.

def spinup(self):
for node in self.validator_nodes.values():
node.start()
for node in self.validator_nodes.values():
while True:
try:
addr = node.get(
self.ports()["rpc"].config_file,
self.ports()["rpc"].property_path,
)
ip, port = addr.split("//")[-1].split(":")
with socket.create_connection(
(ip, port),
timeout=5,
):
break
except OSError:
# todo: remove this sleep in future
time.sleep(0.1)
pass

But it should also wait for GRPC endpoints, probably for LCD/REST endpoints too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant