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

Set default trusting period to be 2/3 of unbonding period for Cosmos chains #1392

Merged
merged 4 commits into from
Sep 29, 2021

Conversation

hu55a1n1
Copy link
Member

@hu55a1n1 hu55a1n1 commented Sep 27, 2021

Closes: #1133

Description

Set config trusting period to be 2/3 of unbonding period if not specified for Cosmos chains.
This is done where the ChainEndpoint impl for chains exists because we aren't sure if a chain is a Cosmos SDK chain while parsing the config.


For contributor use:

  • Added a changelog entry, using unclog.
  • If applicable: Unit tests written, added test to CI.
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Updated relevant documentation (docs/) and code comments.
  • Re-reviewed Files changed in the Github PR explorer.

relayer/src/chain/mock.rs Outdated Show resolved Hide resolved
@@ -322,8 +318,7 @@ pub struct ChainConfig {
pub max_tx_size: MaxTxSize,
#[serde(default = "default::clock_drift", with = "humantime_serde")]
pub clock_drift: Duration,
#[serde(default = "default::trusting_period", with = "humantime_serde")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the serde(with) attribute means we cannot express the trusting period as a human readable string, eg. 14days. Let's find a way to re-enable it :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Thanks for reviewing, @romac!

Copy link
Member

@romac romac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌼

@romac romac merged commit 6959e05 into master Sep 29, 2021
@romac romac deleted the hu55a1n1/1133-default-trusting-period branch September 29, 2021 10:24
hu55a1n1 added a commit to hu55a1n1/hermes that referenced this pull request Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Config trusting-period, when not specified, should be set to 2/3rds of the unbonding period
2 participants