hermes
hermes copied to clipboard
Improve configuration `max_block_time` validation
Summary
For the max_block_time
configuration Hermes will query the value on chain and verify if the configured value matches the queried value.
In Hermes v1.10.1
, if the max_block_time
is not configured, it will default to 30s
and the value will be updated with the queried max_expected_time_per_block
if it differs from 30s
.
From this discussion, https://github.com/informalsystems/hermes/pull/4144#discussion_r1715530132, the desired behaviour would be the following:
- If
max_block_time
is configured:- Query
max_expected_time_per_block
and output a warning if the queried value differs from the configured one, but keep the configured value - If the query fails, keep the configured value
- Query
- If
max_block_time
is not configured:- Query
max_expected_time_per_block
and use that value formax_block_time
- If the query fails, use the default value,
30s
, formax_block_time
- Query
For Admin Use
- [ ] Not duplicate issue
- [ ] Appropriate labels applied
- [ ] Appropriate milestone (priority) applied
- [ ] Appropriate contributors tagged
- [ ] Contributor assigned/self-assigned